* [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
@ 2022-03-11 23:30 Oram, Isaac W
2022-03-14 20:27 ` manickavasakam karpagavinayagam
2022-04-27 20:18 ` Nate DeSimone
0 siblings, 2 replies; 6+ messages in thread
From: Oram, Isaac W @ 2022-03-11 23:30 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Chasel Chiu, Manickavasakam Karpagavinayagam
Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15 +++++
3 files changed, 81 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
index 0b919b5ea9..b72aa2b688 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
@@ -601,6 +601,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
# UBA DXE common and board specific components
#
!include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
+ INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf
@@ -682,6 +683,8 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+ INF RuleOverride = ACPITABLE WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
+ INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 33698f9809..72d0c5089a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
:returns: nothing
"""
print("pre_build_ex")
+
config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
'Build',
config["PLATFORM_BOARD_PACKAGE"],
@@ -55,6 +56,68 @@ def pre_build_ex(config, functions):
if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
raise ValueError("FSP API Mode is currently unsupported on Ice Lake Xeon Scalable")
+
+ # Build the ACPI AML offset table *.offset.h
+ print("Info: re-generating PlatformOffset header files")
+
+ execute_script = functions.get("execute_script")
+
+ command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+
+ if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
+
+ aml_offsets_split = os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
+ command.append("-p")
+ command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) + '.dsc')
+ command.append("-m")
+ command.append(os.path.join(aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
+ command.append("-y")
+ command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
+ command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
+
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ # Build AmlGenOffset command to consume the *.offset.h and produce AmlOffsetTable.c for StaticSkuDataDxe use.
+
+ # Get destination path and filename from config
+ relative_file_path = os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get path relative to Platform/Intel
+ out_file_path = os.path.join(config["WORKSPACE_PLATFORM"], relative_file_path) # full path to output file
+ out_file_dir = os.path.dirname(out_file_path) # remove filename
+
+ out_file_root_ext = os.path.splitext(os.path.basename(out_file_path)) # root and extension of output file
+
+ # Get relative path for the generated offset.h file
+ relative_dsdt_file_path = os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to Platform/Intel
+ dsdt_file_root_ext = os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and extension of generated offset.h file
+
+ # Generate output directory if it doesn't exist
+ if not os.path.exists(out_file_dir):
+ os.mkdir(out_file_dir)
+
+ command = ["python",
+ os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
+ "-d", "--aml_filter", config["AML_FILTER"],
+ "-o", out_file_path,
+ os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
+
+ # execute the command
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ print("GenOffset done")
+
+
return None
def _merge_files(files, ofile):
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
index 8744e9072c..3b66995128 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
@@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE
FSP_TEST_RELEASE = FALSE
SECURE_BOOT_ENABLE = FALSE
BIOS_INFO_GUID = 4A4CA1C6-871C-45BB-8801-6910A7AA5807
+
+#
+# AML offset table generation configuration options
+# All paths should use / and be relative to edk2-platforms/Platform/Intel
+#
+# AML_FILTER - AML filter is used to strip out unused AML offset data
+# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C source file
+# The directory name, DSC file name, INF file name, and BASE_NAME must match identically
+# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
+# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file consumed by UBA driver
+#
+AML_FILTER = \"PSYS\" .\.DRVT\" .\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\" .\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\" .\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL };
+AML_OFFSETS_PATH = WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
+DSDT_TABLE_FILE_PATH = WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+STRIPPED_AML_OFFSETS_FILE_PATH = WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
2022-03-11 23:30 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content Oram, Isaac W
@ 2022-03-14 20:27 ` manickavasakam karpagavinayagam
2022-03-15 19:22 ` manickavasakam karpagavinayagam
2022-04-27 20:18 ` Nate DeSimone
1 sibling, 1 reply; 6+ messages in thread
From: manickavasakam karpagavinayagam @ 2022-03-14 20:27 UTC (permalink / raw)
To: Isaac Oram, devel@edk2.groups.io, Sureshkumar Ponnusamy
Cc: Nate DeSimone, Chasel Chiu, Harikrishna Doppalapudi
[-- Attachment #1.1.1: Type: text/plain, Size: 9578 bytes --]
Isaac/Nate :
Extracted the patch (refer the attached patch) from this email. When trying to apply the patch on latest edk2-platform (7cd51aa3c1ee601e0bf56d34dcf0533334c38997), we are seeing patch apply failure.
It says conflict at line number 39 or 26 based on the patch command used.
[cid:image001.png@01D837C0.57814DD0]
Please let us know EDKII-Platform commit you used for creating the patch ? Also, let us know which EDKII tag used by you to build the source ?
Thank you
-Manic
-----Original Message-----
From: Isaac Oram <isaac.w.oram@intel.com>
Sent: Friday, March 11, 2022 6:31 PM
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>; Chasel Chiu <chasel.chiu@intel.com>; Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
Subject: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com<mailto:manickavasakamk@ami.com>>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>
---
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15 +++++
3 files changed, 81 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
index 0b919b5ea9..b72aa2b688 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
@@ -601,6 +601,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
# UBA DXE common and board specific components
#
!include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
+ INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf
@@ -682,6 +683,8 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+ INF RuleOverride = ACPITABLE
+ WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
+ INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 33698f9809..72d0c5089a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
:returns: nothing
"""
print("pre_build_ex")
+
config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
'Build',
config["PLATFORM_BOARD_PACKAGE"], @@ -55,6 +56,68 @@ def pre_build_ex(config, functions):
if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
raise ValueError("FSP API Mode is currently unsupported on Ice Lake Xeon Scalable")
+
+ # Build the ACPI AML offset table *.offset.h
+ print("Info: re-generating PlatformOffset header files")
+
+ execute_script = functions.get("execute_script")
+
+ command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+
+ if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
+
+ aml_offsets_split = os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
+ command.append("-p")
+ command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) + '.dsc')
+ command.append("-m")
+ command.append(os.path.join(aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
+ command.append("-y")
+ command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
+ command.append("--log=" + os.path.join(config["WORKSPACE"],
+ "PreBuild.log"))
+
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ # Build AmlGenOffset command to consume the *.offset.h and produce AmlOffsetTable.c for StaticSkuDataDxe use.
+
+ # Get destination path and filename from config
+ relative_file_path = os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get path relative to Platform/Intel
+ out_file_path = os.path.join(config["WORKSPACE_PLATFORM"], relative_file_path) # full path to output file
+ out_file_dir = os.path.dirname(out_file_path) # remove filename
+
+ out_file_root_ext = os.path.splitext(os.path.basename(out_file_path)) # root and extension of output file
+
+ # Get relative path for the generated offset.h file
+ relative_dsdt_file_path = os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to Platform/Intel
+ dsdt_file_root_ext = os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and extension of generated offset.h file
+
+ # Generate output directory if it doesn't exist
+ if not os.path.exists(out_file_dir):
+ os.mkdir(out_file_dir)
+
+ command = ["python",
+ os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
+ "-d", "--aml_filter", config["AML_FILTER"],
+ "-o", out_file_path,
+ os.path.join(config["BUILD_X64"], aml_offsets_split[0],
+ aml_offsets_split[1], aml_offsets_split[1], "OUTPUT",
+ os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] +
+ ".offset.h")]
+
+ # execute the command
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ print("GenOffset done")
+
+
return None
def _merge_files(files, ofile):
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
index 8744e9072c..3b66995128 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
@@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE BIOS_INFO_GUID = 4A4CA1C6-871C-45BB-8801-6910A7AA5807
+
+#
+# AML offset table generation configuration options # All paths should
+use / and be relative to edk2-platforms/Platform/Intel #
+# AML_FILTER - AML filter is used to strip out unused AML offset data
+# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C source file
+# The directory name, DSC file name, INF file name, and BASE_NAME must match identically
+# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
+# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file
+consumed by UBA driver # AML_FILTER = \"PSYS\" .\.DRVT\"
+.\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\"
+.\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\"
+.\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL }; AML_OFFSETS_PATH =
+WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
+DSDT_TABLE_FILE_PATH =
+WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+STRIPPED_AML_OFFSETS_FILE_PATH =
+WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
--
2.27.0.windows.1
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
[-- Attachment #1.1.2: Type: text/html, Size: 21124 bytes --]
[-- Attachment #1.2: image001.png --]
[-- Type: image/png, Size: 42777 bytes --]
[-- Attachment #2: 0001-WhitleyOpenBoardPkg-JunctionCity-Build-ACPI-content-warn.patch --]
[-- Type: application/octet-stream, Size: 7827 bytes --]
From: Isaac Oram <isaac.w.oram@intel.com>
Date: 3/11/2022 6:30:51 PM
Subject: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15 +++++
3 files changed, 81 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
index 0b919b5ea9..b72aa2b688 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
@@ -601,6 +601,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
# UBA DXE common and board specific components
#
!include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
+ INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf
@@ -682,6 +683,8 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+ INF RuleOverride = ACPITABLE WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
+ INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 33698f9809..72d0c5089a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
:returns: nothing
"""
print("pre_build_ex")
+
config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
'Build',
config["PLATFORM_BOARD_PACKAGE"],
@@ -55,6 +56,68 @@ def pre_build_ex(config, functions):
if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
raise ValueError("FSP API Mode is currently unsupported on Ice Lake Xeon Scalable")
+
+ # Build the ACPI AML offset table *.offset.h
+ print("Info: re-generating PlatformOffset header files")
+
+ execute_script = functions.get("execute_script")
+
+ command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+
+ if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
+
+ aml_offsets_split = os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
+ command.append("-p")
+ command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) + '.dsc')
+ command.append("-m")
+ command.append(os.path.join(aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
+ command.append("-y")
+ command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
+ command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
+
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ # Build AmlGenOffset command to consume the *.offset.h and produce AmlOffsetTable.c for StaticSkuDataDxe use.
+
+ # Get destination path and filename from config
+ relative_file_path = os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get path relative to Platform/Intel
+ out_file_path = os.path.join(config["WORKSPACE_PLATFORM"], relative_file_path) # full path to output file
+ out_file_dir = os.path.dirname(out_file_path) # remove filename
+
+ out_file_root_ext = os.path.splitext(os.path.basename(out_file_path)) # root and extension of output file
+
+ # Get relative path for the generated offset.h file
+ relative_dsdt_file_path = os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to Platform/Intel
+ dsdt_file_root_ext = os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and extension of generated offset.h file
+
+ # Generate output directory if it doesn't exist
+ if not os.path.exists(out_file_dir):
+ os.mkdir(out_file_dir)
+
+ command = ["python",
+ os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
+ "-d", "--aml_filter", config["AML_FILTER"],
+ "-o", out_file_path,
+ os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
+
+ # execute the command
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ print("GenOffset done")
+
+
return None
def _merge_files(files, ofile):
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
index 8744e9072c..3b66995128 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
@@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE
FSP_TEST_RELEASE = FALSE
SECURE_BOOT_ENABLE = FALSE
BIOS_INFO_GUID = 4A4CA1C6-871C-45BB-8801-6910A7AA5807
+
+#
+# AML offset table generation configuration options
+# All paths should use / and be relative to edk2-platforms/Platform/Intel
+#
+# AML_FILTER - AML filter is used to strip out unused AML offset data
+# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C source file
+# The directory name, DSC file name, INF file name, and BASE_NAME must match identically
+# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
+# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file consumed by UBA driver
+#
+AML_FILTER = \"PSYS\" .\.DRVT\" .\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\" .\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\" .\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL };
+AML_OFFSETS_PATH = WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
+DSDT_TABLE_FILE_PATH = WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+STRIPPED_AML_OFFSETS_FILE_PATH = WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
--
2.27.0.windows.1
GitPatchExtractor 1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
2022-03-14 20:27 ` manickavasakam karpagavinayagam
@ 2022-03-15 19:22 ` manickavasakam karpagavinayagam
2022-03-16 19:30 ` Oram, Isaac W
0 siblings, 1 reply; 6+ messages in thread
From: manickavasakam karpagavinayagam @ 2022-03-15 19:22 UTC (permalink / raw)
To: Isaac Oram, devel@edk2.groups.io, Sureshkumar Ponnusamy
Cc: Nate DeSimone, Chasel Chiu, Harikrishna Doppalapudi
[-- Attachment #1.1: Type: text/plain, Size: 11007 bytes --]
Isaac/Nate :
Using the patch reference, we manually updated the source. Below are the commits used in our testing source.
- edk2 - b24306f15daa2ff8510b06702114724b33895d3c (edk2-stable202202)
- edk2-non-osi - 0320db977fb27e63424b0953a3020bb81c89e8f0
- edk2-platforms - 7cd51aa3c1ee601e0bf56d34dcf0533334c38997 + the PATCH
- FSP - 478a80a7e7b170873c9fa7f55fecfd0e0bdaf63e
We are able to boot to Windows 2019 and RHEL 7.3. Also, confirmed that only one instance of StaticSkuDataDxe (Outside FSP) is present in the source.
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 68F098C0 PDB = c:\XXX\XXX\XXX\icx\ocp_mar14\whitley\Build\WhitleyOpenBoardPkg\DEBUG_VS2015\X64\WhitleyOpenBoardPkg\Uba\UbaMain\StaticSkuDataDxe\StaticSkuDataDxe\DEBUG\StaticSkuDataDxeBaseline.pdb
Thank you
-Manic
From: Manickavasakam Karpagavinayagam
Sent: Monday, March 14, 2022 4:27 PM
To: Isaac Oram <isaac.w.oram@intel.com>; devel@edk2.groups.io; Sureshkumar Ponnusamy <sureshkumarp@ami.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>; Chasel Chiu <chasel.chiu@intel.com>; Harikrishna Doppalapudi <Harikrishnad@ami.com>
Subject: RE: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
Isaac/Nate :
Extracted the patch (refer the attached patch) from this email. When trying to apply the patch on latest edk2-platform (7cd51aa3c1ee601e0bf56d34dcf0533334c38997), we are seeing patch apply failure.
It says conflict at line number 39 or 26 based on the patch command used.
[cid:image001.png@01D8387E.BAB330D0]
Please let us know EDKII-Platform commit you used for creating the patch ? Also, let us know which EDKII tag used by you to build the source ?
Thank you
-Manic
-----Original Message-----
From: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>
Sent: Friday, March 11, 2022 6:31 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Manickavasakam Karpagavinayagam <manickavasakamk@ami.com<mailto:manickavasakamk@ami.com>>
Subject: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com<mailto:manickavasakamk@ami.com>>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>
---
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15 +++++
3 files changed, 81 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
index 0b919b5ea9..b72aa2b688 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
@@ -601,6 +601,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
# UBA DXE common and board specific components
#
!include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
+ INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf
@@ -682,6 +683,8 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+ INF RuleOverride = ACPITABLE
+ WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
+ INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 33698f9809..72d0c5089a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
:returns: nothing
"""
print("pre_build_ex")
+
config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
'Build',
config["PLATFORM_BOARD_PACKAGE"], @@ -55,6 +56,68 @@ def pre_build_ex(config, functions):
if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
raise ValueError("FSP API Mode is currently unsupported on Ice Lake Xeon Scalable")
+
+ # Build the ACPI AML offset table *.offset.h
+ print("Info: re-generating PlatformOffset header files")
+
+ execute_script = functions.get("execute_script")
+
+ command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+
+ if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
+
+ aml_offsets_split = os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
+ command.append("-p")
+ command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) + '.dsc')
+ command.append("-m")
+ command.append(os.path.join(aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
+ command.append("-y")
+ command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
+ command.append("--log=" + os.path.join(config["WORKSPACE"],
+ "PreBuild.log"))
+
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ # Build AmlGenOffset command to consume the *.offset.h and produce AmlOffsetTable.c for StaticSkuDataDxe use.
+
+ # Get destination path and filename from config
+ relative_file_path = os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get path relative to Platform/Intel
+ out_file_path = os.path.join(config["WORKSPACE_PLATFORM"], relative_file_path) # full path to output file
+ out_file_dir = os.path.dirname(out_file_path) # remove filename
+
+ out_file_root_ext = os.path.splitext(os.path.basename(out_file_path)) # root and extension of output file
+
+ # Get relative path for the generated offset.h file
+ relative_dsdt_file_path = os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to Platform/Intel
+ dsdt_file_root_ext = os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and extension of generated offset.h file
+
+ # Generate output directory if it doesn't exist
+ if not os.path.exists(out_file_dir):
+ os.mkdir(out_file_dir)
+
+ command = ["python",
+ os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
+ "-d", "--aml_filter", config["AML_FILTER"],
+ "-o", out_file_path,
+ os.path.join(config["BUILD_X64"], aml_offsets_split[0],
+ aml_offsets_split[1], aml_offsets_split[1], "OUTPUT",
+ os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] +
+ ".offset.h")]
+
+ # execute the command
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ print("GenOffset done")
+
+
return None
def _merge_files(files, ofile):
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
index 8744e9072c..3b66995128 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
@@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE BIOS_INFO_GUID = 4A4CA1C6-871C-45BB-8801-6910A7AA5807
+
+#
+# AML offset table generation configuration options # All paths should
+use / and be relative to edk2-platforms/Platform/Intel #
+# AML_FILTER - AML filter is used to strip out unused AML offset data
+# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C source file
+# The directory name, DSC file name, INF file name, and BASE_NAME must match identically
+# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
+# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file
+consumed by UBA driver # AML_FILTER = \"PSYS\" .\.DRVT\"
+.\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\"
+.\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\"
+.\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL }; AML_OFFSETS_PATH =
+WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
+DSDT_TABLE_FILE_PATH =
+WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+STRIPPED_AML_OFFSETS_FILE_PATH =
+WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
--
2.27.0.windows.1
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
[-- Attachment #1.2: Type: text/html, Size: 25066 bytes --]
[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 42777 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
2022-03-15 19:22 ` manickavasakam karpagavinayagam
@ 2022-03-16 19:30 ` Oram, Isaac W
0 siblings, 0 replies; 6+ messages in thread
From: Oram, Isaac W @ 2022-03-16 19:30 UTC (permalink / raw)
To: KARPAGAVINAYAGAM, MANICKAVASAKAM, devel@edk2.groups.io,
Ponnusamy, Suresh
Cc: Desimone, Nathaniel L, Chiu, Chasel, DOPPALAPUDI, HARIKRISHNA
[-- Attachment #1.1: Type: text/plain, Size: 11875 bytes --]
Thanks for the confirmation. I didn't have any trouble applying the patch on the same commit. Best idea is that maybe something went wrong extracting the patch from the email.
Regards,
Isaac
From: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
Sent: Tuesday, March 15, 2022 12:22 PM
To: Oram, Isaac W <isaac.w.oram@intel.com>; devel@edk2.groups.io; Ponnusamy, Suresh <sureshkumarp@ami.com>
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; DOPPALAPUDI, HARIKRISHNA <harikrishnad@ami.com>
Subject: RE: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
Isaac/Nate :
Using the patch reference, we manually updated the source. Below are the commits used in our testing source.
- edk2 - b24306f15daa2ff8510b06702114724b33895d3c (edk2-stable202202)
- edk2-non-osi - 0320db977fb27e63424b0953a3020bb81c89e8f0
- edk2-platforms - 7cd51aa3c1ee601e0bf56d34dcf0533334c38997 + the PATCH
- FSP - 478a80a7e7b170873c9fa7f55fecfd0e0bdaf63e
We are able to boot to Windows 2019 and RHEL 7.3. Also, confirmed that only one instance of StaticSkuDataDxe (Outside FSP) is present in the source.
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 68F098C0 PDB = c:\XXX\XXX\XXX\icx\ocp_mar14\whitley\Build\WhitleyOpenBoardPkg\DEBUG_VS2015\X64\WhitleyOpenBoardPkg\Uba\UbaMain\StaticSkuDataDxe\StaticSkuDataDxe\DEBUG\StaticSkuDataDxeBaseline.pdb
Thank you
-Manic
From: Manickavasakam Karpagavinayagam
Sent: Monday, March 14, 2022 4:27 PM
To: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Sureshkumar Ponnusamy <sureshkumarp@ami.com<mailto:sureshkumarp@ami.com>>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Harikrishna Doppalapudi <Harikrishnad@ami.com<mailto:Harikrishnad@ami.com>>
Subject: RE: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
Isaac/Nate :
Extracted the patch (refer the attached patch) from this email. When trying to apply the patch on latest edk2-platform (7cd51aa3c1ee601e0bf56d34dcf0533334c38997), we are seeing patch apply failure.
It says conflict at line number 39 or 26 based on the patch command used.
[cid:image001.png@01D83931.99261460]
Please let us know EDKII-Platform commit you used for creating the patch ? Also, let us know which EDKII tag used by you to build the source ?
Thank you
-Manic
-----Original Message-----
From: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>
Sent: Friday, March 11, 2022 6:31 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Manickavasakam Karpagavinayagam <manickavasakamk@ami.com<mailto:manickavasakamk@ami.com>>
Subject: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com<mailto:manickavasakamk@ami.com>>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com<mailto:isaac.w.oram@intel.com>>
---
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15 +++++
3 files changed, 81 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
index 0b919b5ea9..b72aa2b688 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
@@ -601,6 +601,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
# UBA DXE common and board specific components
#
!include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
+ INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf
INF $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf
@@ -682,6 +683,8 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+ INF RuleOverride = ACPITABLE
+ WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
+ INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 33698f9809..72d0c5089a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
:returns: nothing
"""
print("pre_build_ex")
+
config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
'Build',
config["PLATFORM_BOARD_PACKAGE"], @@ -55,6 +56,68 @@ def pre_build_ex(config, functions):
if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
raise ValueError("FSP API Mode is currently unsupported on Ice Lake Xeon Scalable")
+
+ # Build the ACPI AML offset table *.offset.h
+ print("Info: re-generating PlatformOffset header files")
+
+ execute_script = functions.get("execute_script")
+
+ command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+
+ if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
+
+ aml_offsets_split = os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
+ command.append("-p")
+ command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) + '.dsc')
+ command.append("-m")
+ command.append(os.path.join(aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
+ command.append("-y")
+ command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
+ command.append("--log=" + os.path.join(config["WORKSPACE"],
+ "PreBuild.log"))
+
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ # Build AmlGenOffset command to consume the *.offset.h and produce AmlOffsetTable.c for StaticSkuDataDxe use.
+
+ # Get destination path and filename from config
+ relative_file_path = os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get path relative to Platform/Intel
+ out_file_path = os.path.join(config["WORKSPACE_PLATFORM"], relative_file_path) # full path to output file
+ out_file_dir = os.path.dirname(out_file_path) # remove filename
+
+ out_file_root_ext = os.path.splitext(os.path.basename(out_file_path)) # root and extension of output file
+
+ # Get relative path for the generated offset.h file
+ relative_dsdt_file_path = os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to Platform/Intel
+ dsdt_file_root_ext = os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and extension of generated offset.h file
+
+ # Generate output directory if it doesn't exist
+ if not os.path.exists(out_file_dir):
+ os.mkdir(out_file_dir)
+
+ command = ["python",
+ os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
+ "-d", "--aml_filter", config["AML_FILTER"],
+ "-o", out_file_path,
+ os.path.join(config["BUILD_X64"], aml_offsets_split[0],
+ aml_offsets_split[1], aml_offsets_split[1], "OUTPUT",
+ os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] +
+ ".offset.h")]
+
+ # execute the command
+ _, _, _, code = execute_script(command, config)
+ if code != 0:
+ print(" ".join(command))
+ print("Error re-generating PlatformOffset header files")
+ sys.exit(1)
+
+ print("GenOffset done")
+
+
return None
def _merge_files(files, ofile):
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
index 8744e9072c..3b66995128 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
@@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE BIOS_INFO_GUID = 4A4CA1C6-871C-45BB-8801-6910A7AA5807
+
+#
+# AML offset table generation configuration options # All paths should
+use / and be relative to edk2-platforms/Platform/Intel #
+# AML_FILTER - AML filter is used to strip out unused AML offset data
+# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C source file
+# The directory name, DSC file name, INF file name, and BASE_NAME must match identically
+# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
+# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file
+consumed by UBA driver # AML_FILTER = \"PSYS\" .\.DRVT\"
+.\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\"
+.\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\"
+.\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL }; AML_OFFSETS_PATH =
+WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
+DSDT_TABLE_FILE_PATH =
+WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+STRIPPED_AML_OFFSETS_FILE_PATH =
+WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
--
2.27.0.windows.1
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
[-- Attachment #1.2: Type: text/html, Size: 26444 bytes --]
[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 42777 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
2022-03-11 23:30 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content Oram, Isaac W
2022-03-14 20:27 ` manickavasakam karpagavinayagam
@ 2022-04-27 20:18 ` Nate DeSimone
2022-04-27 20:22 ` Oram, Isaac W
1 sibling, 1 reply; 6+ messages in thread
From: Nate DeSimone @ 2022-04-27 20:18 UTC (permalink / raw)
To: Oram, Isaac W, devel@edk2.groups.io
Cc: Chiu, Chasel, KARPAGAVINAYAGAM, MANICKAVASAKAM
Reviewed-By: Nate DeSimone <nathaniel.l.desimone@intel.com>
> -----Original Message-----
> From: Oram, Isaac W <isaac.w.oram@intel.com>
> Sent: Friday, March 11, 2022 3:31 PM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; KARPAGAVINAYAGAM, MANICKAVASAKAM
> <manickavasakamk@ami.com>
> Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1]
> WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
>
> Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
> Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
> ---
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63
> ++++++++++++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15
> +++++
> 3 files changed, 81 insertions(+)
>
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> index 0b919b5ea9..b72aa2b688 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> @@ -601,6 +601,7 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
> # UBA DXE common and board specific components
> #
> !include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
> + INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe
> /UsbOcUpdateDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/
> IioCfgUpdateDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateD
> xe/SlotDataUpdateDxe.inf
> @@ -682,6 +683,8 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
> INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
> INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>
> + INF RuleOverride = ACPITABLE
> + WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
> + INF WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
> INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
> INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
>
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> index 33698f9809..72d0c5089a 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> @@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
> :returns: nothing
> """
> print("pre_build_ex")
> +
> config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
> 'Build',
> config["PLATFORM_BOARD_PACKAGE"], @@ -55,6
> +56,68 @@ def pre_build_ex(config, functions):
>
> if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
> raise ValueError("FSP API Mode is currently unsupported on Ice Lake
> Xeon Scalable")
> +
> + # Build the ACPI AML offset table *.offset.h
> + print("Info: re-generating PlatformOffset header files")
> +
> + execute_script = functions.get("execute_script")
> +
> + command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
> +
> + if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
> + ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
> + ext_build_flags = [x.strip() for x in ext_build_flags]
> + ext_build_flags = [x for x in ext_build_flags if x != ""]
> + command.extend(ext_build_flags)
> +
> + aml_offsets_split =
> os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
> + command.append("-p")
> + command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) +
> '.dsc')
> + command.append("-m")
> + command.append(os.path.join(aml_offsets_split[0],
> aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
> + command.append("-y")
> + command.append(os.path.join(config["WORKSPACE"],
> "PreBuildReport.txt"))
> + command.append("--log=" + os.path.join(config["WORKSPACE"],
> + "PreBuild.log"))
> +
> + _, _, _, code = execute_script(command, config)
> + if code != 0:
> + print(" ".join(command))
> + print("Error re-generating PlatformOffset header files")
> + sys.exit(1)
> +
> + # Build AmlGenOffset command to consume the *.offset.h and produce
> AmlOffsetTable.c for StaticSkuDataDxe use.
> +
> + # Get destination path and filename from config
> + relative_file_path =
> os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get
> path relative to Platform/Intel
> + out_file_path = os.path.join(config["WORKSPACE_PLATFORM"],
> relative_file_path) # full path to output file
> + out_file_dir = os.path.dirname(out_file_path) #
> remove filename
> +
> + out_file_root_ext = os.path.splitext(os.path.basename(out_file_path))
> # root and extension of output file
> +
> + # Get relative path for the generated offset.h file
> + relative_dsdt_file_path =
> os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to
> Platform/Intel
> + dsdt_file_root_ext =
> os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and
> extension of generated offset.h file
> +
> + # Generate output directory if it doesn't exist
> + if not os.path.exists(out_file_dir):
> + os.mkdir(out_file_dir)
> +
> + command = ["python",
> + os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> + "-d", "--aml_filter", config["AML_FILTER"],
> + "-o", out_file_path,
> + os.path.join(config["BUILD_X64"], aml_offsets_split[0],
> + aml_offsets_split[1], aml_offsets_split[1], "OUTPUT",
> + os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] +
> + ".offset.h")]
> +
> + # execute the command
> + _, _, _, code = execute_script(command, config)
> + if code != 0:
> + print(" ".join(command))
> + print("Error re-generating PlatformOffset header files")
> + sys.exit(1)
> +
> + print("GenOffset done")
> +
> +
> return None
>
> def _merge_files(files, ofile):
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> index 8744e9072c..3b66995128 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> @@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE =
> FALSE SECURE_BOOT_ENABLE = FALSE BIOS_INFO_GUID = 4A4CA1C6-871C-
> 45BB-8801-6910A7AA5807
> +
> +#
> +# AML offset table generation configuration options # All paths should
> +use / and be relative to edk2-platforms/Platform/Intel #
> +# AML_FILTER - AML filter is used to strip out unused AML offset
> data
> +# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C
> source file
> +# The directory name, DSC file name, INF file name, and BASE_NAME must
> match identically
> +# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
> +# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file
> +consumed by UBA driver # AML_FILTER = \"PSYS\" .\.DRVT\"
> +.\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\"
> +.\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\"
> +.\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL }; AML_OFFSETS_PATH =
> +WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
> +DSDT_TABLE_FILE_PATH =
> +WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm
> .asl
> +STRIPPED_AML_OFFSETS_FILE_PATH =
> +WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
> --
> 2.27.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
2022-04-27 20:18 ` Nate DeSimone
@ 2022-04-27 20:22 ` Oram, Isaac W
0 siblings, 0 replies; 6+ messages in thread
From: Oram, Isaac W @ 2022-04-27 20:22 UTC (permalink / raw)
To: Desimone, Nathaniel L, devel@edk2.groups.io
Cc: Chiu, Chasel, KARPAGAVINAYAGAM, MANICKAVASAKAM
Pushed as: c06b98a171..1ba46425cf
-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Sent: Wednesday, April 27, 2022 1:18 PM
To: Oram, Isaac W <isaac.w.oram@intel.com>; devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; KARPAGAVINAYAGAM, MANICKAVASAKAM <manickavasakamk@ami.com>
Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
Reviewed-By: Nate DeSimone <nathaniel.l.desimone@intel.com>
> -----Original Message-----
> From: Oram, Isaac W <isaac.w.oram@intel.com>
> Sent: Friday, March 11, 2022 3:31 PM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu,
> Chasel <chasel.chiu@intel.com>; KARPAGAVINAYAGAM, MANICKAVASAKAM
> <manickavasakamk@ami.com>
> Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1]
> WhitleyOpenBoardPkg/JunctionCity: Build ACPI content
>
> Use source versions of AcpiTables, AcpiPlatform, and StaticSkuDataDxe.
>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Manickavasakam Karpagavinayagam <manickavasakamk@ami.com>
> Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
> ---
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf | 3 +
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 63
> ++++++++++++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg | 15
> +++++
> 3 files changed, 81 insertions(+)
>
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> index 0b919b5ea9..b72aa2b688 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> @@ -601,6 +601,7 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
> # UBA DXE common and board specific components
> #
> !include WhitleyOpenBoardPkg/Uba/UbaDxeCommon.fdf
> + INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/UsbOcUpdateDxe
> /UsbOcUpdateDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/IioCfgUpdateDxe/
> IioCfgUpdateDxe.inf
> INF
> $(RP_PKG)/$(BOARD_NAME)/Uba/TypeJunctionCity/Dxe/SlotDataUpdateD
> xe/SlotDataUpdateDxe.inf
> @@ -682,6 +683,8 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x01000000
> INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf
> INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>
> + INF RuleOverride = ACPITABLE
> + WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/AcpiTables10nm.inf
> + INF
> + WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
> INF WhitleyOpenBoardPkg/Features/AcpiVtd/AcpiVtd.inf
> INF MinPlatformPkg/Acpi/AcpiSmm/AcpiSmm.inf
>
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> index 33698f9809..72d0c5089a 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> @@ -25,6 +25,7 @@ def pre_build_ex(config, functions):
> :returns: nothing
> """
> print("pre_build_ex")
> +
> config["BUILD_DIR_PATH"] = os.path.join(config["WORKSPACE"],
> 'Build',
>
> config["PLATFORM_BOARD_PACKAGE"], @@ -55,6
> +56,68 @@ def pre_build_ex(config, functions):
>
> if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
> raise ValueError("FSP API Mode is currently unsupported on
> Ice Lake Xeon Scalable")
> +
> + # Build the ACPI AML offset table *.offset.h
> + print("Info: re-generating PlatformOffset header files")
> +
> + execute_script = functions.get("execute_script")
> +
> + command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
> +
> + if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
> + ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
> + ext_build_flags = [x.strip() for x in ext_build_flags]
> + ext_build_flags = [x for x in ext_build_flags if x != ""]
> + command.extend(ext_build_flags)
> +
> + aml_offsets_split =
> os.path.split(os.path.normpath(config["AML_OFFSETS_PATH"]))
> + command.append("-p")
> + command.append(os.path.normpath(config["AML_OFFSETS_PATH"]) +
> '.dsc')
> + command.append("-m")
> + command.append(os.path.join(aml_offsets_split[0],
> aml_offsets_split[1], aml_offsets_split[1] + '.inf'))
> + command.append("-y")
> + command.append(os.path.join(config["WORKSPACE"],
> "PreBuildReport.txt"))
> + command.append("--log=" + os.path.join(config["WORKSPACE"],
> + "PreBuild.log"))
> +
> + _, _, _, code = execute_script(command, config)
> + if code != 0:
> + print(" ".join(command))
> + print("Error re-generating PlatformOffset header files")
> + sys.exit(1)
> +
> + # Build AmlGenOffset command to consume the *.offset.h and
> + produce
> AmlOffsetTable.c for StaticSkuDataDxe use.
> +
> + # Get destination path and filename from config
> + relative_file_path =
> os.path.normpath(config["STRIPPED_AML_OFFSETS_FILE_PATH"]) # get
> path relative to Platform/Intel
> + out_file_path = os.path.join(config["WORKSPACE_PLATFORM"],
> relative_file_path) # full path to output file
> + out_file_dir = os.path.dirname(out_file_path) #
> remove filename
> +
> + out_file_root_ext =
> + os.path.splitext(os.path.basename(out_file_path))
> # root and extension of output file
> +
> + # Get relative path for the generated offset.h file
> + relative_dsdt_file_path =
> os.path.normpath(config["DSDT_TABLE_FILE_PATH"]) # path relative to
> Platform/Intel
> + dsdt_file_root_ext =
> os.path.splitext(os.path.basename(relative_dsdt_file_path)) # root and
> extension of generated offset.h file
> +
> + # Generate output directory if it doesn't exist
> + if not os.path.exists(out_file_dir):
> + os.mkdir(out_file_dir)
> +
> + command = ["python",
> + os.path.join(config["MIN_PACKAGE_TOOLS"],
> + "AmlGenOffset",
> "AmlGenOffset.py"),
> + "-d", "--aml_filter", config["AML_FILTER"],
> + "-o", out_file_path,
> + os.path.join(config["BUILD_X64"],
> + aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1],
> + "OUTPUT", os.path.dirname(relative_dsdt_file_path),
> + dsdt_file_root_ext[0] + ".offset.h")]
> +
> + # execute the command
> + _, _, _, code = execute_script(command, config)
> + if code != 0:
> + print(" ".join(command))
> + print("Error re-generating PlatformOffset header files")
> + sys.exit(1)
> +
> + print("GenOffset done")
> +
> +
> return None
>
> def _merge_files(files, ofile):
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> index 8744e9072c..3b66995128 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_config.cfg
> @@ -35,3 +35,18 @@ FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE
> SECURE_BOOT_ENABLE = FALSE BIOS_INFO_GUID = 4A4CA1C6-871C-
> 45BB-8801-6910A7AA5807
> +
> +#
> +# AML offset table generation configuration options # All paths
> +should use / and be relative to edk2-platforms/Platform/Intel #
> +# AML_FILTER - AML filter is used to strip out unused AML offset
> data
> +# AML_OFFSETS_PATH - Path to INF file that builds AML offsets C
> source file
> +# The directory name, DSC file name, INF file name, and BASE_NAME must
> match identically
> +# DSDT_TABLE_FILE_PATH - Path to DSDT ASL file for the board
> +# STRIPPED_AML_OFFSETS_FILE_PATH - Target AML offset data file
> +consumed by UBA driver # AML_FILTER = \"PSYS\" .\.DRVT\"
> +.\.FIX[0-9,A-Z] BBI[0] BBU[0] CRCM BAR0 .\.CCT[0-9A-Z]\"
> +.\.CFH[0-9A-Z]\" .\.FXCD\" .\.FXST\" .\.FXIN\" .\.FXOU\" .\.FXBS\"
> +.\.FXFH\" .\.CENA\" .\.DRVT\" .\.CFIS\" {NULL }; AML_OFFSETS_PATH =
> +WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets
> +DSDT_TABLE_FILE_PATH =
> +WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm
> .asl
> +STRIPPED_AML_OFFSETS_FILE_PATH =
> +WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
> --
> 2.27.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-27 20:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11 23:30 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/JunctionCity: Build ACPI content Oram, Isaac W
2022-03-14 20:27 ` manickavasakam karpagavinayagam
2022-03-15 19:22 ` manickavasakam karpagavinayagam
2022-03-16 19:30 ` Oram, Isaac W
2022-04-27 20:18 ` Nate DeSimone
2022-04-27 20:22 ` Oram, Isaac W
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox