https://github.com/EfiPy/EfiPy2/blob/main/Efi/Apps/EfiPy2Sample/EfiPy2Smbios.py
Description:
This sample uses EFI_SMBIOS_PROTOCOL, defined from EfiPy2.MdePkg.Protocol.Smbios.
By using EFI_SMBIOS_PROTOCOL protocol member function GetNext(), it has the same algorithm as EDK II driver/application. infinite while loop until return error in GetNext().
In this sample, it uses getattr() member function to get SMBIOS type class defined in EfiPy2.MdePkg.IndustryStandard.SmBios.
This sample also leverages the power of Python/ctypes (sample in the function SmbiosDumpStruct2() and SmbiosDumpStruct3()).
In this function, it does not need to know SMBIOS structure definition, it uses Python getattr() to get SMBIOS structure member name and its value.
No comments:
Post a Comment