/* Locates and extracts the QEMU SMBIOS data if present in fw_cfg */
UINT8* GetQemuSmbiosTables(VOID)
/* Locates and extracts the QEMU SMBIOS data if present in fw_cfg */
UINT8* GetQemuSmbiosTables(VOID)
{
  EFI_STATUS            Status;
  FIRMWARE_CONFIG_ITEM  Tables;
  UINTN                 TablesSize;
  UINT8                 *QemuTables;
  if (!PcdGetBool (PcdQemuSmbiosValidated)) {
    return NULL;
  }
  Status = QemuFwCfgFindFile (
             "etc/smbios/smbios-tables",
             &Tables,
             &TablesSize
             );
  ASSERT_EFI_ERROR (Status);
  ASSERT (TablesSize > 0);
  QemuTables = AllocatePool (TablesSize);
  if (QemuTables == NULL) {
    return NULL;
  }
  QemuFwCfgSelectItem (Tables);
  QemuFwCfgReadBytes (TablesSize, QemuTables);
  return QemuTables;
}