]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
OvmfPkg/LegacyRegion: Support legacy region manipulation of Q35
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index 776743a710726e32ce5c02c19bb537adebbe9cbb..7106a7c54c64211d90bf6a74eb22c67c237560c2 100644 (file)
@@ -1162,7 +1162,10 @@ class PlatformAutoGen(AutoGen):
                                 except:\r
                                     EdkLogger.error("build", FORMAT_INVALID, "Invalid offset value %s for PCD %s.%s." % (Sku.VpdOffset, Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
                             if VpdOffset % Alignment != 0:\r
-                                EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Alignment))\r
+                                if PcdValue.startswith("{"):\r
+                                    EdkLogger.warn("build", "The offset value of PCD %s.%s is not 8-byte aligned!" %(Pcd.TokenSpaceGuidCName, Pcd.TokenCName), File=self.MetaFile)\r
+                                else:\r
+                                    EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Alignment))\r
                         VpdFile.Add(Pcd, Sku.VpdOffset)\r
                         # if the offset of a VPD is *, then it need to be fixed up by third party tool.\r
                         if not NeedProcessVpdMapFile and Sku.VpdOffset == "*":\r
@@ -1235,7 +1238,10 @@ class PlatformAutoGen(AutoGen):
                                         except:\r
                                             EdkLogger.error("build", FORMAT_INVALID, "Invalid offset value %s for PCD %s.%s." % (Sku.VpdOffset, DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName))\r
                                     if VpdOffset % Alignment != 0:\r
-                                        EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, Alignment))\r
+                                        if PcdValue.startswith("{"):\r
+                                            EdkLogger.warn("build", "The offset value of PCD %s.%s is not 8-byte aligned!" %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName), File=self.MetaFile)\r
+                                        else:\r
+                                            EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, Alignment))\r
                                 VpdFile.Add(DscPcdEntry, Sku.VpdOffset)\r
                                 if not NeedProcessVpdMapFile and Sku.VpdOffset == "*":\r
                                     NeedProcessVpdMapFile = True \r
@@ -2372,6 +2378,8 @@ class ModuleAutoGen(AutoGen):
             self._Macro["MODULE_BUILD_DIR"      ] = self.BuildDir\r
             self._Macro["OUTPUT_DIR"            ] = self.OutputDir\r
             self._Macro["DEBUG_DIR"             ] = self.DebugDir\r
+            self._Macro["DEST_DIR_OUTPUT"       ] = self.OutputDir\r
+            self._Macro["DEST_DIR_DEBUG"        ] = self.DebugDir\r
         return self._Macro\r
 \r
     ## Return the module build data object\r