Sunday, May 15, 2016

SMBIOS - 2

In https://sourceforge.net/u/efipy/svn/HEAD/tree/Trunk/smbios.py r14, it adds 2 functions.

1.
Smbios.py accepts command line input parameter, which is requested SMBIOS type in numeric list.
example "Python.efi smbios.py 1 3 5", output SMBIOS information, type 1, 3, 5.

Python receives command line input parameter by Python list sys.argv.
sys.argv[0] is the program name.

2.
In StructDump() function, it output SMBIOS string if it parse SMBIOS raw data and get SMBIOS_TABLE_STRING data type.

Pseudo code of checking SMBIOS data type
#
# EfiPy/MdePkg/IndustryStandard/SmBios.py
#
class SMBIOS_TABLE_STRING (UINT8):
  pass


#
# SMBIOS sample code
#
if issubclass (field[1], Isb.SMBIOS_TABLE_STRING):
elif issubclass (field[1], EfiPy._SimpleCData):
elif isinstance (_o, EfiPy.GUID):
elif isinstance (_o, EfiPy.Structure):
elif isinstance (_o, EfiPy.Array):

No comments:

Post a Comment