Lines Matching defs:Smbios
1 /* $NetBSD: smbios.c,v 1.1.1.3 2021/09/30 18:50:09 jmcneill Exp $ */
9 Smbios.c
13 Lib fucntions for SMBIOS. Used to get system serial number and GUID
39 SMBIOS_STRUCTURE_POINTER Smbios;
48 Smbios.Hdr = (SMBIOS_HEADER *)SmbiosTable->TableAddress;
51 if (Smbios.Hdr->Type == 1) {
52 if (Smbios.Hdr->Length < 0x19) {
60 // SMBIOS tables are byte packed so we need to do a byte copy to
63 CopyMem (SystemGuid, &Smbios.Type1->Uuid, sizeof(EFI_GUID));
64 *SystemSerialNumber = LibGetSmbiosString(&Smbios, Smbios.Type1->SerialNumber);
69 // Make Smbios point to the next record
71 LibGetSmbiosString (&Smbios, -1);
73 if (Smbios.Raw >= SmbiosEnd.Raw) {
75 // SMBIOS 2.1 incorrectly stated the length of SmbiosTable as 0x1e.
88 IN SMBIOS_STRUCTURE_POINTER *Smbios,
93 Return SMBIOS string given the string number.
96 Smbios - Pointer to SMBIOS structure
98 point to the next SMBIOS structure.
101 Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1
110 String = (CHAR8 *)(Smbios->Raw + Smbios->Hdr->Length);
129 // Retrun pointer to next structure in Smbios.
132 Smbios->Raw = (UINT8 *)++String;