From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: chasel.chiu@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Tue, 28 May 2019 00:52:25 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 00:52:24 -0700 X-ExtLoop1: 1 Received: from cchiu4-mobl1.gar.corp.intel.com ([10.5.240.30]) by fmsmga004.fm.intel.com with ESMTP; 28 May 2019 00:52:22 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Agyeman Prince , Nate DeSimone , Michael Kubacki Subject: [PATCH] Platform/Intel: Add fspapi build parameter Date: Tue, 28 May 2019 15:52:20 +0800 Message-Id: <20190528075220.12576-1-chasel.chiu@intel.com> X-Mailer: git-send-email 2.13.3.windows.1 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1824 Going forward FSP Dispatch mode will be default in KabylakeOpenBoardPkg and requires fspapi build parameter to switch back to FSP API mode. When --fspapi given to build python script it will set gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection to 1, otherwise the PCD will be the default value defined by each *BoardPkg. Test: verified the PCD PcdFspModeSelection can be overridden by new build parameter. Cc: Agyeman Prince Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Chasel Chiu --- Platform/Intel/build_bios.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 9effefc0c7..9f8d78f6e8 100644 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -359,6 +359,11 @@ def build(config): command.append("-D") command.append("MAX_SOCKET=" + config["MAX_SOCKET"]) + if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE": + #Override PCD to enable API mode FSP wrapper. + command.append("--pcd") + command.append("gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection=1") + shell = True if os.name == "posix": shell = False @@ -840,6 +845,9 @@ def get_cmd_config_arguments(arguments): if arguments.fsp is True: result["FSP_WRAPPER_BUILD"] = "TRUE" + if arguments.fspapi is True: + result["API_MODE_FSP_WRAPPER_BUILD"] = "TRUE" + return result @@ -910,9 +918,12 @@ def get_cmd_arguments(build_config): parser.add_argument("--performance", help="performance build enabled", action='store_true', dest="performance") - parser.add_argument("--fsp", help="fsp build enabled", + parser.add_argument("--fsp", help="fsp wrapper build enabled", action='store_true', dest="fsp") + parser.add_argument("--fspapi", help="API mode fsp wrapper build enabled", + action='store_true', dest="fspapi") + return parser.parse_args() -- 2.13.3.windows.1