Changeset 105670 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2Pkg/Tools/PatchFv.py
- Timestamp:
- Aug 14, 2024 1:16:30 PM (6 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-159268 /vendor/edk2/current 103735-103757,103769-103776,129194-164365
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2Pkg/Tools/PatchFv.py
r101291 r105670 144 144 fvInfo['Base'] = 0 145 145 for rptLine in rptLines: 146 match = re.match( "^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", rptLine)146 match = re.match(r"^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", rptLine) 147 147 if match: 148 148 fvInfo['Base'] = int(match.group(1), 16) … … 313 313 while (rptLine != "" ): 314 314 #EFI_BASE_ADDRESS = 0xFFFDF400 315 match = re.match( "^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", rptLine)315 match = re.match(r"^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", rptLine) 316 316 if match is not None: 317 317 self.fdBase = int(match.group(1), 16) - fvOffset … … 341 341 rptLine = fdIn.readline() 342 342 while (rptLine != "" ): 343 match = re.match( "(0x[a-fA-F0-9]+)\s([0-9a-fA-F\-]+)", rptLine)343 match = re.match(r"(0x[a-fA-F0-9]+)\s([0-9a-fA-F\-]+)", rptLine) 344 344 if match is not None: 345 345 if match.group(2) in self.dictFfsOffset: … … 375 375 if rptLine[0] != ' ': 376 376 #DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958,Type=PE) 377 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)377 match = re.match(r"([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+),\s*Type=\w+\)", rptLine) 378 378 if match is None: 379 379 #DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958) 380 match = re.match( "([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine)380 match = re.match(r"([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine) 381 381 if match is not None: 382 382 foundModHdr = True … … 387 387 self.dictModBase['%s:ENTRY' % modName] = int (match.group(3), 16) 388 388 #(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178) 389 match = re.match( "\(GUID=([A-Z0-9\-]+)\s+\.textbaseaddress=(0x[0-9a-fA-F]+)\s+\.databaseaddress=(0x[0-9a-fA-F]+)\)", rptLine)389 match = re.match(r"\(GUID=([A-Z0-9\-]+)\s+\.textbaseaddress=(0x[0-9a-fA-F]+)\s+\.databaseaddress=(0x[0-9a-fA-F]+)\)", rptLine) 390 390 if match is not None: 391 391 if foundModHdr: … … 400 400 # 0x00fff8016c __ModuleEntryPoint 401 401 foundModHdr = False 402 match = re.match( "^\s+(0x[a-z0-9]+)\s+([_a-zA-Z0-9]+)", rptLine)402 match = re.match(r"^\s+(0x[a-z0-9]+)\s+([_a-zA-Z0-9]+)", rptLine) 403 403 if match is not None: 404 404 self.dictSymbolAddress["%s:%s"%(modName, match.group(2))] = match.group(1) … … 433 433 #GCC 434 434 # 0x0000000000001d55 IoRead8 435 patchMapFileMatchString = "\s+(0x[0-9a-fA-F]{16})\s+([^\s][^0x][_a-zA-Z0-9\-]+)\s"435 patchMapFileMatchString = r"\s+(0x[0-9a-fA-F]{8,16})\s+([^\s][^0x][_a-zA-Z0-9\-]+)\s" 436 436 matchKeyGroupIndex = 2 437 437 matchSymbolGroupIndex = 1 … … 440 440 #MSFT 441 441 #0003:00000190 _gComBase 00007a50 SerialPo 442 patchMapFileMatchString = "^\s[0-9a-fA-F]{4}:[0-9a-fA-F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)"442 patchMapFileMatchString = r"^\s[0-9a-fA-F]{4}:[0-9a-fA-F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)" 443 443 matchKeyGroupIndex = 1 444 444 matchSymbolGroupIndex = 2 … … 459 459 handleNext = False 460 460 pcdName = match.group(1) 461 match = re.match( "\s+(0x[0-9a-fA-F]{16})\s+", reportLine)461 match = re.match(r"\s+(0x[0-9a-fA-F]{16})\s+", reportLine) 462 462 if match is not None: 463 463 modSymbols[prefix + pcdName] = match.group(1) 464 464 else: 465 match = re.match( "^\s\.data\.(_gPcd_BinaryPatch[_a-zA-Z0-9\-]+)", reportLine)465 match = re.match(r"^\s\.data\.(_gPcd_BinaryPatch[_a-zA-Z0-9\-]+)", reportLine) 466 466 if match is not None: 467 467 handleNext = True … … 508 508 rptLine = fdIn.readline() 509 509 while (rptLine != "" ): 510 match = re.match( "([0-9a-fA-F\-]+)\s([_a-zA-Z0-9]+)", rptLine)510 match = re.match(r"([0-9a-fA-F\-]+)\s([_a-zA-Z0-9]+)", rptLine) 511 511 if match is not None: 512 512 self.dictGuidNameXref[match.group(1).upper()] = match.group(2)
Note:
See TracChangeset
for help on using the changeset viewer.