VirtualBox

Ignore:
Timestamp:
Aug 14, 2024 1:16:30 PM (6 months ago)
Author:
vboxsync
Message:

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2Pkg/Tools/PatchFv.py

    r101291 r105670  
    144144        fvInfo['Base'] = 0
    145145        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)
    147147            if match:
    148148                fvInfo['Base'] = int(match.group(1), 16)
     
    313313        while (rptLine != "" ):
    314314            #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)
    316316            if match is not None:
    317317                self.fdBase = int(match.group(1), 16) - fvOffset
     
    341341        rptLine  = fdIn.readline()
    342342        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)
    344344            if match is not None:
    345345                if match.group(2) in self.dictFfsOffset:
     
    375375            if rptLine[0] != ' ':
    376376                #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)
    378378                if match is None:
    379379                    #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)
    381381                if match is not None:
    382382                    foundModHdr = True
     
    387387                    self.dictModBase['%s:ENTRY' % modName] = int (match.group(3), 16)
    388388                #(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)
    390390                if match is not None:
    391391                    if foundModHdr:
     
    400400                #   0x00fff8016c    __ModuleEntryPoint
    401401                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)
    403403                if match is not None:
    404404                    self.dictSymbolAddress["%s:%s"%(modName, match.group(2))] = match.group(1)
     
    433433            #GCC
    434434            #                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"
    436436            matchKeyGroupIndex = 2
    437437            matchSymbolGroupIndex  = 1
     
    440440            #MSFT
    441441            #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+)"
    443443            matchKeyGroupIndex = 1
    444444            matchSymbolGroupIndex  = 2
     
    459459                    handleNext = False
    460460                    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)
    462462                    if match is not None:
    463463                        modSymbols[prefix + pcdName] = match.group(1)
    464464                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)
    466466                    if match is not None:
    467467                        handleNext = True
     
    508508        rptLine  = fdIn.readline()
    509509        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)
    511511            if match is not None:
    512512                self.dictGuidNameXref[match.group(1).upper()] = match.group(2)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette