33 FIRMWARE_CONFIG_ITEM Anchor, Tables;
34 UINTN AnchorSize, TablesSize;
37 RETURN_STATUS PcdStatus;
50 "etc/smbios/smbios-anchor",
57 "etc/smbios/smbios-tables",
70 case sizeof QemuAnchor.V2:
73 if ((QemuAnchor.V2.MajorVersion != 2) ||
74 (QemuAnchor.V2.TableLength != TablesSize) ||
75 (
CompareMem (QemuAnchor.V2.AnchorString,
"_SM_", 4) != 0) ||
76 (
CompareMem (QemuAnchor.V2.IntermediateAnchorString,
"_DMI_", 5) != 0))
81 SmbiosVersion = (UINT16)(QemuAnchor.V2.MajorVersion << 8 |
82 QemuAnchor.V2.MinorVersion);
85 case sizeof QemuAnchor.V3:
88 if ((QemuAnchor.V3.MajorVersion != 3) ||
89 (QemuAnchor.V3.TableMaximumSize != TablesSize) ||
90 (
CompareMem (QemuAnchor.V3.AnchorString,
"_SM3_", 5) != 0))
95 SmbiosVersion = (UINT16)(QemuAnchor.V3.MajorVersion << 8 |
96 QemuAnchor.V3.MinorVersion);
100 "%a: SMBIOS 3.x DocRev from QEMU: 0x%02x\n",
104 PcdStatus =
PcdSet8S (PcdSmbiosDocRev, QemuAnchor.V3.DocRev);
114 "%a: SMBIOS version from QEMU: 0x%04x\n",
118 PcdStatus =
PcdSet16S (PcdSmbiosVersion, SmbiosVersion);
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define RETURN_ERROR(StatusCode)
#define ASSERT_RETURN_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdSetBoolS(TokenName, Value)
#define PcdGetBool(TokenName)
#define PcdSet8S(TokenName, Value)
#define PcdSet16S(TokenName, Value)
RETURN_STATUS EFIAPI QemuFwCfgFindFile(IN CONST CHAR8 *Name, OUT FIRMWARE_CONFIG_ITEM *Item, OUT UINTN *Size)
VOID EFIAPI QemuFwCfgReadBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
VOID EFIAPI QemuFwCfgSelectItem(IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem)