]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/Tools/PatchFv.py
IntelFsp2Pkg/Tools: Fixed PatchFv.py to parse new Fv map file format
[mirror_edk2.git] / IntelFsp2Pkg / Tools / PatchFv.py
index 0c8d908063154babdee8d5575a5443a8f71a63f8..112de4077a18eb95679d9e18fec75508d949993e 100644 (file)
@@ -361,9 +361,11 @@ class Symbols:
         foundModHdr = False\r
         while (rptLine != "" ):\r
             if rptLine[0] != ' ':\r
-                #DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958)\r
-                #(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178)\r
-                match = re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine)\r
+                #DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958,Type=PE)\r
+                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)\r
+                if match is None:\r
+                    #DxeIpl (Fixed Flash Address, BaseAddress=0x00fffb4310, EntryPoint=0x00fffb4958)\r
+                    match = re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=(0x[0-9a-fA-F]+),\s+EntryPoint=(0x[0-9a-fA-F]+)\)", rptLine)\r
                 if match is not None:\r
                     foundModHdr = True\r
                     modName = match.group(1)\r
@@ -371,6 +373,7 @@ class Symbols:
                        modName = self.dictGuidNameXref[modName.upper()]\r
                     self.dictModBase['%s:BASE'  % modName] = int (match.group(2), 16)\r
                     self.dictModBase['%s:ENTRY' % modName] = int (match.group(3), 16)\r
+                #(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178)\r
                 match = re.match("\(GUID=([A-Z0-9\-]+)\s+\.textbaseaddress=(0x[0-9a-fA-F]+)\s+\.databaseaddress=(0x[0-9a-fA-F]+)\)", rptLine)\r
                 if match is not None:\r
                     if foundModHdr:\r