IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name
authorChasel, Chiu <chasel.chiu@intel.com>
Wed, 8 Nov 2017 12:35:26 +0000 (20:35 +0800)
committerChasel, Chiu <chasel.chiu@intel.com>
Wed, 8 Nov 2017 12:44:29 +0000 (20:44 +0800)
PcdSerialIoUartDebugEnable UPD is platform specific and should not
be included in generic GenCfgOpt.py script. Remove this and platform
DSC should control the default value instead.

Cc: Jiewen Yao <Jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
IntelFsp2Pkg/Tools/GenCfgOpt.py

index 6dc1b10..c9b7bc5 100644 (file)
@@ -289,7 +289,6 @@ class CGenCfgOpt:
     def __init__(self):\r
         self.Debug          = False\r
         self.Error          = ''\r
-        self.ReleaseMode    = True\r
 \r
         self._GlobalDataDef = """\r
 GlobalDataDef\r
@@ -318,13 +317,6 @@ EndList
         self._FvDir       = ''\r
         self._MapVer      = 0\r
 \r
-    def ParseBuildMode (self, OutputStr):\r
-        if "RELEASE_" in OutputStr:\r
-            self.ReleaseMode = True\r
-        if "DEBUG_" in OutputStr:\r
-            self.ReleaseMode = False\r
-        return\r
-\r
     def ParseMacros (self, MacroDefStr):\r
         # ['-DABC=1', '-D', 'CFG_DEBUG=1', '-D', 'CFG_OUTDIR=Build']\r
         self._MacroDict = {}\r
@@ -815,9 +807,6 @@ EndList
                     TxtFd.write("%s.UnusedUpdSpace%d|%s0x%04X|0x%04X|{0}\n" % (Item['space'], SpaceIdx, Default, NextOffset - StartAddr, Offset - NextOffset))\r
                     SpaceIdx = SpaceIdx + 1\r
                 NextOffset = Offset + Item['length']\r
-                if Item['cname'] == 'PcdSerialIoUartDebugEnable':\r
-                    if self.ReleaseMode == False:\r
-                        Item['value'] = 0x01\r
                 TxtFd.write("%s.%s|%s0x%04X|%s|%s\n" % (Item['space'],Item['cname'],Default,Item['offset'] - StartAddr,Item['length'],Item['value']))\r
             TxtFd.close()\r
         return 0\r
@@ -1437,7 +1426,6 @@ def Main():
                     print "ERROR: Macro parsing failed !"\r
                     return 3\r
 \r
-        GenCfgOpt.ParseBuildMode(sys.argv[3])\r
         FvDir = sys.argv[3]\r
         if not os.path.exists(FvDir):\r
             os.makedirs(FvDir)\r