[BootloaderCorePkg] Fix build after syncing up to EDK2 stable tag
EDK2 stable tag 202111 changed some field name in SMBIOS structure. This patch matched the changes to fix the build issue for SBL. It also added new library class in DSC. Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
parent
dda4d34fb3
commit
749c32b71c
|
@ -39,6 +39,7 @@
|
|||
################################################################################
|
||||
[LibraryClasses]
|
||||
PcdLib|BootloaderCommonPkg/Library/PcdLib/PcdLib.inf
|
||||
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
|
||||
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
|
||||
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
||||
PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
|
||||
|
|
|
@ -607,7 +607,7 @@ BuildProcessorInfo (
|
|||
|
||||
// Fill string index
|
||||
SmbiosRecord.Socket = SMBIOS_STRING_INDEX_1;
|
||||
SmbiosRecord.ProcessorManufacture = SMBIOS_STRING_INDEX_2;
|
||||
SmbiosRecord.ProcessorManufacturer = SMBIOS_STRING_INDEX_2;
|
||||
SmbiosRecord.ProcessorVersion = SMBIOS_STRING_INDEX_3;
|
||||
SmbiosRecord.SerialNumber = SMBIOS_STRING_INDEX_4;
|
||||
SmbiosRecord.AssetTag = SMBIOS_STRING_INDEX_5;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#define EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM 1
|
||||
#define EFI_PCI_HOST_BRIDGE_MEM64_DECODE 2
|
||||
|
||||
#define PNP_EISA_ID_CONST 0x41D0
|
||||
#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
|
||||
#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ class Symbols:
|
|||
# If the fvDir is not a directory, then raise an exception
|
||||
#
|
||||
if not os.path.isdir(fvDir):
|
||||
raise Exception ("'%s' is not a valid directory!" % FvDir)
|
||||
raise Exception ("'%s' is not a valid directory!" % fvDir)
|
||||
|
||||
#
|
||||
# If the Guid.xref is not existing in fvDir, then raise an exception
|
||||
|
@ -306,10 +306,11 @@ class Symbols:
|
|||
match = re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", rptLine)
|
||||
if match is not None:
|
||||
self.fdBase = int(match.group(1), 16) - fvOffset
|
||||
break
|
||||
rptLine = fdIn.readline()
|
||||
fdIn.close()
|
||||
if self.fdBase == 0xFFFFFFFF:
|
||||
raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" % fvFile)
|
||||
raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" % infFile)
|
||||
return 0
|
||||
|
||||
#
|
||||
|
@ -363,9 +364,11 @@ class Symbols:
|
|||
foundModHdr = False
|
||||
while (rptLine != "" ):
|
||||
if rptLine[0] != ' ':
|
||||
#DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958)
|
||||
#(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178)
|
||||
match = re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine)
|
||||
#DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958,Type=PE)
|
||||
match = re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+),\s*Type=\w+\)", rptLine)
|
||||
if match is None:
|
||||
#DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958)
|
||||
match = re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine)
|
||||
if match is not None:
|
||||
foundModHdr = True
|
||||
modName = match.group(1)
|
||||
|
@ -374,6 +377,7 @@ class Symbols:
|
|||
self.dictModBase['%s:BASE' % modName] = int (match.group(2), 16)
|
||||
self.dictModBase['%s:ENTRY' % modName] = int (match.group(3), 16)
|
||||
self.dictSymbolAddress["%s:BASE" % modName] = match.group(2)
|
||||
#(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178)
|
||||
match = re.match("\(GUID=([A-Z0-9\-]+)\s+\.textbaseaddress=(0x[0-9a-fA-F]+)\s+\.databaseaddress=(0x[0-9a-fA-F]+)\)", rptLine)
|
||||
if match is not None:
|
||||
if foundModHdr:
|
||||
|
@ -402,6 +406,7 @@ class Symbols:
|
|||
#
|
||||
# retval 0 Parsed MOD MAP file successfully
|
||||
# retval 1 There is no moduleEntryPoint in modSymbols
|
||||
# retval 2 There is no offset for moduleEntryPoint in modSymbols
|
||||
#
|
||||
def parseModMapFile(self, moduleName, mapFile):
|
||||
#
|
||||
|
@ -467,13 +472,13 @@ class Symbols:
|
|||
if not moduleEntryPoint in modSymbols:
|
||||
return 1
|
||||
|
||||
modEntry = '%s:%s' % (moduleName,moduleEntryPoint)
|
||||
modEntry = '%s:%s' % (moduleName, moduleEntryPoint)
|
||||
if not modEntry in self.dictSymbolAddress:
|
||||
modKey = '%s:ENTRY' % moduleName
|
||||
if modKey in self.dictModBase:
|
||||
baseOffset = self.dictModBase['%s:ENTRY' % moduleName] - int(modSymbols[moduleEntryPoint], 16)
|
||||
else:
|
||||
return 2
|
||||
return 2
|
||||
else:
|
||||
baseOffset = int(self.dictSymbolAddress[modEntry], 16) - int(modSymbols[moduleEntryPoint], 16)
|
||||
for symbol in modSymbols:
|
||||
|
@ -508,7 +513,7 @@ class Symbols:
|
|||
#
|
||||
# Get current character
|
||||
#
|
||||
# retval elf.string[self.index]
|
||||
# retval self.string[self.index]
|
||||
# retval '' Exception
|
||||
#
|
||||
def getCurr(self):
|
||||
|
|
Loading…
Reference in New Issue