This driver provides data for boards patching AML, PIRQ, and MP tables.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h | 41 ++++++++
Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h | 42 ++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf | 5 +
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c | 54 ++++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c | 100 ++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c | 110 ++++++++++++++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md | 19 ++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c | 60 +++++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h | 41 ++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf | 59 +++++++++++
Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc | 5 +
11 files changed, 536 insertions(+)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h
new file mode 100644
index 0000000000..5aedaf62be
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h
@@ -0,0 +1,41 @@
+/** @file
+ UBA Mp table Update Library Header File.
+
+ @copyright
+ Copyright 2008 - 2015 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _UBA_MP_TABLE_UPDATE_LIB_H
+#define _UBA_MP_TABLE_UPDATE_LIB_H
+
+#include <Base.h>
+#include <Uefi.h>
+
+#include <PlatDevData.h>
+
+#define PLATFORM_MP_TABLE_UPDATE_SIGNATURE SIGNATURE_32 ('U', 'M', 'P', 'T')
+#define PLATFORM_MP_TABLE_UPDATE_VERSION 0x01
+
+// {0FF8A1CF-A0AB-4ac0-BFC9-34A78F68DD8A}
+#define PLATFORM_MP_TABLE_CONFIG_DATA_GUID \
+{ 0xff8a1cf, 0xa0ab, 0x4ac0, { 0xbf, 0xc9, 0x34, 0xa7, 0x8f, 0x68, 0xdd, 0x8a } };
+
+
+typedef struct {
+ UINT32 Signature;
+ UINT32 Version;
+
+ DEVICE_DATA *DeviceDataPtr;
+
+} PLATFORM_MP_UPDATE_TABLE;
+
+EFI_STATUS
+PlatformGetMpTableDataPointer (
+ IN DEVICE_DATA **DeviceData
+);
+
+STATIC EFI_GUID gPlatformMpTableConfigDataGuid =PLATFORM_MP_TABLE_CONFIG_DATA_GUID;
+
+#endif //_UBA_MP_TABLE_UPDATE_LIB_H
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h
new file mode 100644
index 0000000000..4261b7b74f
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h
@@ -0,0 +1,42 @@
+/** @file
+ UBA PirqData Update Library Header File.
+
+ @copyright
+ Copyright 2008 - 2014 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _UBA_PIRQ_UPDATE_LIB_H
+#define _UBA_PIRQ_UPDATE_LIB_H
+
+#include <Base.h>
+#include <Uefi.h>
+
+#include <PlatPirqData.h>
+
+#define PLATFORM_PIRQ_UPDATE_SIGNATURE SIGNATURE_32 ('P', 'I', 'R', 'Q')
+#define PLATFORM_PIRQ_UPDATE_VERSION 0x01
+
+
+// {4C1F48A5-C976-4d90-9F03-8E9B1C327FCF}
+#define PLATFORM_PIRQ_CONFIG_DATA_GUID \
+{ 0x4c1f48a5, 0xc976, 0x4d90, { 0x9f, 0x3, 0x8e, 0x9b, 0x1c, 0x32, 0x7f, 0xcf } }
+
+
+typedef struct {
+ UINT32 Signature;
+ UINT32 Version;
+
+ PLATFORM_PIRQ_DATA *PirqDataPtr;
+
+} PLATFORM_PIRQ_UPDATE_TABLE;
+
+EFI_STATUS
+PlatformGetPirqDataPointer (
+ IN PLATFORM_PIRQ_DATA **PirqData
+);
+
+STATIC EFI_GUID gPlatformPirqConfigDataGuid = PLATFORM_PIRQ_CONFIG_DATA_GUID;
+
+#endif //_UBA_PIRQ_UPDATE_LIB_H
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
index fcf147885f..7c182db5df 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
@@ -7,6 +7,11 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
+#
+# Currently shared by all platforms
+#
+INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
+
#
# Platform TypeWilsonCityRP
#
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c
new file mode 100644
index 0000000000..c658b9fd28
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c
@@ -0,0 +1,54 @@
+/** @file
+ ACPI static data update.
+
+ @copyright
+ Copyright 2013 - 2022 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include "StaticSkuDataDxe.h"
+#include <Library/UbaAcpiUpdateLib.h>
+
+#include "AmlOffsetTable.c" // Generated in PreBuild step
+
+#include <Library/HobLib.h>
+#include <Guid/PlatformInfo.h>
+
+ACPI_FIX_UPDATE_TABLE FixupTableUpdate10nm =
+{
+ PLATFORM_ACPI_FIX_UPDATE_SIGNATURE,
+ PLATFORM_ACPI_FIX_UPDATE_VERSION,
+ &DSDT_EPRP10NM_OffsetTable
+};
+
+EFI_STATUS
+InstallAcpiFixupTableData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+ )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ EFI_HOB_GUID_TYPE *GuidHob;
+ EFI_PLATFORM_INFO *PlatformInfo;
+ ACPI_FIX_UPDATE_TABLE *PtrTable;
+ UINT32 TableSize;
+
+ GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
+ ASSERT (GuidHob != NULL);
+ if (GuidHob == NULL) {
+ return EFI_NOT_FOUND;
+ }
+ PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
+ PtrTable = &FixupTableUpdate10nm;
+ TableSize = sizeof(FixupTableUpdate10nm);
+ DEBUG ((DEBUG_INFO, "UBA: Loading Acpi table for ICX\n"));
+
+ Status = UbaConfigProtocol->AddData (
+ UbaConfigProtocol,
+ &gPlatformAcpiFixTableGuid,
+ PtrTable,
+ TableSize
+ );
+ return Status;
+}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c
new file mode 100644
index 0000000000..dc49390cb2
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c
@@ -0,0 +1,100 @@
+/** @file
+ Device data installation.
+
+ @copyright
+ Copyright 2014 - 2022 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include "StaticSkuDataDxe.h"
+
+#include <Library/UbaPirqUpdateLib.h>
+#include <Library/UbaMpTableUpdateLib.h>
+
+#include <PlatPirqData.h>
+#include <PlatDevData.h>
+
+#include <Library/HobLib.h>
+#include <Guid/PlatformInfo.h>
+
+extern PLATFORM_PIRQ_DATA mPlatformPirqDataPlatformSRP10nm;
+
+PLATFORM_PIRQ_UPDATE_TABLE PirqUpdate10nm =
+{
+ PLATFORM_PIRQ_UPDATE_SIGNATURE,
+ PLATFORM_PIRQ_UPDATE_VERSION,
+ &mPlatformPirqDataPlatformSRP10nm
+};
+
+EFI_STATUS
+InstallPirqData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+ )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ PLATFORM_PIRQ_UPDATE_TABLE *PtrTable;
+ UINT32 TableSize;
+ EFI_HOB_GUID_TYPE *GuidHob;
+ EFI_PLATFORM_INFO *PlatformInfo;
+
+ GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
+ ASSERT (GuidHob != NULL);
+ if (GuidHob == NULL) {
+ return EFI_NOT_FOUND;
+ }
+ PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
+ PtrTable = &PirqUpdate10nm;
+ TableSize = sizeof(PirqUpdate10nm);
+ DEBUG ((DEBUG_ERROR, "UBA: Loading Pirqupdate table for ICX\n"));
+
+ Status = UbaConfigProtocol->AddData (
+ UbaConfigProtocol,
+ &gPlatformPirqConfigDataGuid,
+ PtrTable,
+ TableSize
+ );
+ return Status;
+}
+
+extern DEVICE_DATA mDeviceDataPlatformSRP10nm;
+
+PLATFORM_MP_UPDATE_TABLE MpTableUpdate10nm =
+{
+ PLATFORM_MP_TABLE_UPDATE_SIGNATURE,
+ PLATFORM_MP_TABLE_UPDATE_VERSION,
+ &mDeviceDataPlatformSRP10nm
+};
+
+EFI_STATUS
+InstallMpTableData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+ )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ PLATFORM_MP_UPDATE_TABLE *PtrTable;
+ UINT32 TableSize;
+ EFI_HOB_GUID_TYPE *GuidHob;
+ EFI_PLATFORM_INFO *PlatformInfo;
+
+ GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
+ ASSERT (GuidHob != NULL);
+ if (GuidHob == NULL) {
+ return EFI_NOT_FOUND;
+ }
+ PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
+
+ PtrTable = &MpTableUpdate10nm;
+ TableSize = sizeof(MpTableUpdate10nm);
+ DEBUG ((DEBUG_ERROR, "UBA: Loading MpTableupdate table for ICX\n"));
+
+ Status = UbaConfigProtocol->AddData (
+ UbaConfigProtocol,
+ &gPlatformMpTableConfigDataGuid,
+ PtrTable,
+ TableSize
+ );
+
+ return Status;
+}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c
new file mode 100644
index 0000000000..ed9f80734c
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c
@@ -0,0 +1,110 @@
+/** @file
+
+ @copyright
+ Copyright 2017 - 2018 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include <PlatPirqData.h>
+#include <PlatDevData.h>
+#include <IndustryStandard/LegacyBiosMpTable.h>
+
+#ifndef V_INTEL_VID
+#define V_INTEL_VID 0x8086
+#endif // #ifndef V_INTEL_VID
+
+//
+// Describes Local APICs' connections.
+//
+STATIC DEVICE_DATA_HW_LOCAL_INT DeviceDataHwLocalInt1[] = {
+ {
+ {{0},{{0xFF,0},{0xFF,0},{0xFF,0}}},
+ 0x00,
+ 0xff,
+ 0x00,
+ EfiLegacyMpTableEntryLocalIntTypeExtInt,
+ EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec,
+ EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec
+ },
+ {
+ {{0},{{0xFF,0},{0xFF,0},{0xFF,0}}},
+ 0x00,
+ 0xff,
+ 0x01,
+ EfiLegacyMpTableEntryLocalIntTypeInt,
+ EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec,
+ EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec
+ },
+};
+
+//
+// Describes system's address space mapping, specific to the system.
+//
+STATIC DEVICE_DATA_HW_ADDR_SPACE_MAPPING DeviceDataHwAddrSpace1[] = {
+ //
+ // Legacy IO addresses.
+ //
+ { {0}, EfiLegacyMpTableEntryExtSysAddrSpaceMappingIo, 0x0000, 0x1000 },
+};
+
+//
+// IRQ priority
+//
+STATIC EFI_LEGACY_IRQ_PRIORITY_TABLE_ENTRY IrqPriorityTable1[] = {
+ {11, 0},
+ {10, 0},
+ {9, 0},
+ {5, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0}
+};
+
+//
+// Note : UpdateBusNumbers updates the bus numeber
+//
+STATIC EFI_LEGACY_PIRQ_TABLE PirqTableHead1 [] = {
+ {
+ {
+ EFI_PIRQ_TABLE_SIGNATURE,
+ 00,
+ 01,
+ 0000,
+ 00,
+ 00,
+ 0000,
+ V_INTEL_VID,
+ 30,
+ 00000000,
+ {00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00,
+ 00},
+ 00
+ }
+ }
+};
+
+//
+// Instantiation of the system device data.
+//
+DEVICE_DATA mDeviceDataPlatformSRP10nm = {
+ DeviceDataHwLocalInt1, sizeof (DeviceDataHwLocalInt1) / sizeof (DeviceDataHwLocalInt1[0]),
+ DeviceDataHwAddrSpace1, sizeof (DeviceDataHwAddrSpace1)/ sizeof (DeviceDataHwAddrSpace1[0])
+};
+
+//
+// Instantiation of platform PIRQ data.
+//
+PLATFORM_PIRQ_DATA mPlatformPirqDataPlatformSRP10nm = {
+ IrqPriorityTable1, sizeof(IrqPriorityTable1) / sizeof(IrqPriorityTable1[0]),
+ PirqTableHead1, sizeof(PirqTableHead1) / sizeof(PirqTableHead1[0])
+};
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md
new file mode 100644
index 0000000000..2138810db4
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md
@@ -0,0 +1,19 @@
+# **Generating ACPI AML Offset table**
+
+The StaticSkuDataDxe driver includes AmlOffsetTable.c which contains the AML offset table. This Readme captures the build process for this file.
+
+edk2-platforms/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py drives the build since ACPI tables are expected to be board specific.
+
+The AmlOffsetTable.c file is generated in two key steps:
+1. Generate the *Dsdt*.offsets.h where *Dsdt* is the DSDT ASL file name specific for this build. For WilsonCityRvp:
+ * The DSDT is WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
+ * The generated file is Build/WhitleyOpenBoardPkg/DEBUG_VS2015x86/X64/WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets/AmlOffsets/OUTPUT/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.offset.h
+ * These are customized in the build_config.cfg file
+2. Generat the AmlOffsetTable.c using the AmlGenOffset.py script from the MinPlatformPkg. For WilsonCityRvp:
+ * Script is at edk2-platforms/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py
+ * Input is Build/WhitleyOpenBoardPkg/DEBUG_VS2015x86/X64/WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets/AmlOffsets/OUTPUT/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.offset.h
+ * Output is edk2-platforms/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
+
+Common Issues:
+* The same iasl compiler version must be used to build the AML offset table and to build the DSDT.
+* The Board/*AmlOffsets*.dsc file name, Board/*AmlOffsets* directory name, Board/AmlOffsets/*AmlOffsets*.inf file name, and the BASE_NAME in *AmlOffsets*.inf must all match exactly.
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c
new file mode 100644
index 0000000000..c4f0102f59
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c
@@ -0,0 +1,60 @@
+/** @file
+ UBA static sku data update dxe driver.
+
+ @copyright
+ Copyright 2013 - 2014 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include "StaticSkuDataDxe.h"
+
+/**
+ The Driver Entry Point.
+
+ The function is the driver Entry point.
+
+ @param ImageHandle A handle for the image that is initializing this driver
+ @param SystemTable A pointer to the EFI system table
+
+ @retval EFI_SUCCESS: Driver initialized successfully
+ @retval EFI_LOAD_ERROR: Failed to Initialize or has been loaded
+ @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources
+
+**/
+EFI_STATUS
+EFIAPI
+StaticSkuConfigDataDxeEntry (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ EFI_STATUS Status;
+ UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol = NULL;
+
+ Status = gBS->LocateProtocol (
+ &gUbaConfigDatabaseProtocolGuid,
+ NULL,
+ &UbaConfigProtocol
+ );
+ if (EFI_ERROR(Status)) {
+ return Status;
+ }
+
+ Status = InstallMpTableData (UbaConfigProtocol);
+ if (EFI_ERROR(Status)) {
+ return Status;
+ }
+
+ Status = InstallPirqData (UbaConfigProtocol);
+ if (EFI_ERROR(Status)) {
+ return Status;
+ }
+
+ Status = InstallAcpiFixupTableData (UbaConfigProtocol);
+ if (EFI_ERROR(Status)) {
+ return Status;
+ }
+
+ return Status;
+}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h
new file mode 100644
index 0000000000..e54191d4f7
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h
@@ -0,0 +1,41 @@
+/** @file
+ UBA static sku data update dxe driver.
+
+ @copyright
+ Copyright 2013 - 2022 Intel Corporation. <BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _STATIC_SKU_DATA_DXE_H_
+#define _STATIC_SKU_DATA_DXE_H_
+
+#include <Base.h>
+#include <Uefi.h>
+
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/IoLib.h>
+#include <UncoreCommonIncludes.h>
+#include <Protocol/UbaCfgDb.h>
+
+EFI_STATUS
+InstallMpTableData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+);
+
+EFI_STATUS
+InstallPirqData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+);
+
+EFI_STATUS
+InstallAcpiFixupTableData (
+ IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
+);
+
+#endif // _STATIC_SKU_DATA_DXE_H_
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
new file mode 100644
index 0000000000..97a1931c84
--- /dev/null
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
@@ -0,0 +1,59 @@
+## @file
+# Static Board Data DXE Driver.
+#
+# @copyright
+# Copyright 2018 - 2022 Intel Corporation. <BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = StaticSkuDataDxeBaseline
+ FILE_GUID = 2C03C058-4305-7829-7E84-C7B3D6232F42
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+
+ ENTRY_POINT = StaticSkuConfigDataDxeEntry
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = x64
+#
+
+[Sources]
+ StaticSkuDataDxe.c
+ StaticSkuDataDxe.h
+ DeviceDataInstall.c
+ PlatformDeviceDataSRP10nm.c
+ AcpiStaticData.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ WhitleySiliconPkg/SiliconPkg.dec
+ WhitleySiliconPkg/CpRcPkg.dec
+ WhitleyOpenBoardPkg/PlatformPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ BaseMemoryLib
+ MemoryAllocationLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
+ DebugLib
+ IoLib
+ HobLib
+
+[Guids]
+ gEfiPlatformInfoGuid
+
+[Protocols]
+ gUbaConfigDatabaseProtocolGuid
+
+[Depex]
+ gEfiPlatformTypeWilsonCitySMTProtocolGuid OR
+ gEfiPlatformTypeWilsonCityRPProtocolGuid OR
+ gEfiPlatformTypeJunctionCityProtocolGuid
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
index f37093bccd..48b26de427 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
@@ -30,6 +30,11 @@ $(RP_PKG)/Uba/BoardInit/Pei/BoardInitPei.inf {
}
[Components.X64]
+#
+# Currently shared by all platforms
+#
+$(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
+
#
# Platform TypeWilsonCityRP
#
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86429): https://edk2.groups.io/g/devel/message/86429
Mute This Topic: https://groups.io/mt/88979447/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Isaac,
Please see feedback inline.
There is a minor typo in Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md. "Generat" should be "Generate". This can be fixed during the commit process, no need to send a V2 patch series.
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Thanks,
Nate
> -----Original Message-----
> From: Oram, Isaac W <isaac.w.oram@intel.com>
> Sent: Monday, February 7, 2022 11:03 AM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>
> Subject: [edk2-devel][edk2-platforms][PATCH V1 8/8]
> WhitleyOpenBoardPkg/StaticSkuDataDxe: Add open source driver
>
> This driver provides data for boards patching AML, PIRQ, and MP tables.
>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
> ---
> Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h | 41 ++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h | 42 ++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf | 5 +
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c | 54 ++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c | 100 ++++++++++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c | 110 ++++++++++++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md | 19 ++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c | 60 +++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h | 41 ++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf | 59 +++++++++++
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc | 5 +
> 11 files changed, 536 insertions(+)
>
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h
> new file mode 100644
> index 0000000000..5aedaf62be
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaMpTableUpdateLib.h
> @@ -0,0 +1,41 @@
> +/** @file
> + UBA Mp table Update Library Header File.
> +
> + @copyright
> + Copyright 2008 - 2015 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _UBA_MP_TABLE_UPDATE_LIB_H
> +#define _UBA_MP_TABLE_UPDATE_LIB_H
> +
> +#include <Base.h>
> +#include <Uefi.h>
> +
> +#include <PlatDevData.h>
> +
> +#define PLATFORM_MP_TABLE_UPDATE_SIGNATURE SIGNATURE_32 ('U', 'M', 'P', 'T')
> +#define PLATFORM_MP_TABLE_UPDATE_VERSION 0x01
> +
> +// {0FF8A1CF-A0AB-4ac0-BFC9-34A78F68DD8A}
> +#define PLATFORM_MP_TABLE_CONFIG_DATA_GUID \
> +{ 0xff8a1cf, 0xa0ab, 0x4ac0, { 0xbf, 0xc9, 0x34, 0xa7, 0x8f, 0x68, 0xdd, 0x8a } };
> +
> +
> +typedef struct {
> + UINT32 Signature;
> + UINT32 Version;
> +
> + DEVICE_DATA *DeviceDataPtr;
> +
> +} PLATFORM_MP_UPDATE_TABLE;
> +
> +EFI_STATUS
> +PlatformGetMpTableDataPointer (
> + IN DEVICE_DATA **DeviceData
> +);
> +
> +STATIC EFI_GUID gPlatformMpTableConfigDataGuid =PLATFORM_MP_TABLE_CONFIG_DATA_GUID;
> +
> +#endif //_UBA_MP_TABLE_UPDATE_LIB_H
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h
> new file mode 100644
> index 0000000000..4261b7b74f
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/UbaPirqUpdateLib.h
> @@ -0,0 +1,42 @@
> +/** @file
> + UBA PirqData Update Library Header File.
> +
> + @copyright
> + Copyright 2008 - 2014 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _UBA_PIRQ_UPDATE_LIB_H
> +#define _UBA_PIRQ_UPDATE_LIB_H
> +
> +#include <Base.h>
> +#include <Uefi.h>
> +
> +#include <PlatPirqData.h>
> +
> +#define PLATFORM_PIRQ_UPDATE_SIGNATURE SIGNATURE_32 ('P', 'I', 'R', 'Q')
> +#define PLATFORM_PIRQ_UPDATE_VERSION 0x01
> +
> +
> +// {4C1F48A5-C976-4d90-9F03-8E9B1C327FCF}
> +#define PLATFORM_PIRQ_CONFIG_DATA_GUID \
> +{ 0x4c1f48a5, 0xc976, 0x4d90, { 0x9f, 0x3, 0x8e, 0x9b, 0x1c, 0x32, 0x7f, 0xcf } }
> +
> +
> +typedef struct {
> + UINT32 Signature;
> + UINT32 Version;
> +
> + PLATFORM_PIRQ_DATA *PirqDataPtr;
> +
> +} PLATFORM_PIRQ_UPDATE_TABLE;
> +
> +EFI_STATUS
> +PlatformGetPirqDataPointer (
> + IN PLATFORM_PIRQ_DATA **PirqData
> +);
> +
> +STATIC EFI_GUID gPlatformPirqConfigDataGuid = PLATFORM_PIRQ_CONFIG_DATA_GUID;
> +
> +#endif //_UBA_PIRQ_UPDATE_LIB_H
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
> index fcf147885f..7c182db5df 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaDxeRpBoards.fdf
> @@ -7,6 +7,11 @@
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> ##
>
> +#
> +# Currently shared by all platforms
> +#
> +INF $(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> +
> #
> # Platform TypeWilsonCityRP
> #
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c
> new file mode 100644
> index 0000000000..c658b9fd28
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AcpiStaticData.c
> @@ -0,0 +1,54 @@
> +/** @file
> + ACPI static data update.
> +
> + @copyright
> + Copyright 2013 - 2022 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include "StaticSkuDataDxe.h"
> +#include <Library/UbaAcpiUpdateLib.h>
> +
> +#include "AmlOffsetTable.c" // Generated in PreBuild step
> +
> +#include <Library/HobLib.h>
> +#include <Guid/PlatformInfo.h>
> +
> +ACPI_FIX_UPDATE_TABLE FixupTableUpdate10nm =
> +{
> + PLATFORM_ACPI_FIX_UPDATE_SIGNATURE,
> + PLATFORM_ACPI_FIX_UPDATE_VERSION,
> + &DSDT_EPRP10NM_OffsetTable
> +};
> +
> +EFI_STATUS
> +InstallAcpiFixupTableData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> + )
> +{
> + EFI_STATUS Status = EFI_SUCCESS;
> + EFI_HOB_GUID_TYPE *GuidHob;
> + EFI_PLATFORM_INFO *PlatformInfo;
> + ACPI_FIX_UPDATE_TABLE *PtrTable;
> + UINT32 TableSize;
> +
> + GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
> + ASSERT (GuidHob != NULL);
> + if (GuidHob == NULL) {
> + return EFI_NOT_FOUND;
> + }
> + PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
> +
> + PtrTable = &FixupTableUpdate10nm;
> + TableSize = sizeof(FixupTableUpdate10nm);
> + DEBUG ((DEBUG_INFO, "UBA: Loading Acpi table for ICX\n"));
> +
> + Status = UbaConfigProtocol->AddData (
> + UbaConfigProtocol,
> + &gPlatformAcpiFixTableGuid,
> + PtrTable,
> + TableSize
> + );
> + return Status;
> +}
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c
> new file mode 100644
> index 0000000000..dc49390cb2
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/DeviceDataInstall.c
> @@ -0,0 +1,100 @@
> +/** @file
> + Device data installation.
> +
> + @copyright
> + Copyright 2014 - 2022 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include "StaticSkuDataDxe.h"
> +
> +#include <Library/UbaPirqUpdateLib.h>
> +#include <Library/UbaMpTableUpdateLib.h>
> +
> +#include <PlatPirqData.h>
> +#include <PlatDevData.h>
> +
> +#include <Library/HobLib.h>
> +#include <Guid/PlatformInfo.h>
> +
> +extern PLATFORM_PIRQ_DATA mPlatformPirqDataPlatformSRP10nm;
> +
> +PLATFORM_PIRQ_UPDATE_TABLE PirqUpdate10nm =
> +{
> + PLATFORM_PIRQ_UPDATE_SIGNATURE,
> + PLATFORM_PIRQ_UPDATE_VERSION,
> + &mPlatformPirqDataPlatformSRP10nm
> +};
> +
> +EFI_STATUS
> +InstallPirqData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> + )
> +{
> + EFI_STATUS Status = EFI_SUCCESS;
> + PLATFORM_PIRQ_UPDATE_TABLE *PtrTable;
> + UINT32 TableSize;
> + EFI_HOB_GUID_TYPE *GuidHob;
> + EFI_PLATFORM_INFO *PlatformInfo;
> +
> + GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
> + ASSERT (GuidHob != NULL);
> + if (GuidHob == NULL) {
> + return EFI_NOT_FOUND;
> + }
> + PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
> +
> + PtrTable = &PirqUpdate10nm;
> + TableSize = sizeof(PirqUpdate10nm);
> + DEBUG ((DEBUG_ERROR, "UBA: Loading Pirqupdate table for ICX\n"));
> +
> + Status = UbaConfigProtocol->AddData (
> + UbaConfigProtocol,
> + &gPlatformPirqConfigDataGuid,
> + PtrTable,
> + TableSize
> + );
> + return Status;
> +}
> +
> +extern DEVICE_DATA mDeviceDataPlatformSRP10nm;
> +
> +PLATFORM_MP_UPDATE_TABLE MpTableUpdate10nm =
> +{
> + PLATFORM_MP_TABLE_UPDATE_SIGNATURE,
> + PLATFORM_MP_TABLE_UPDATE_VERSION,
> + &mDeviceDataPlatformSRP10nm
> +};
> +
> +EFI_STATUS
> +InstallMpTableData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> + )
> +{
> + EFI_STATUS Status = EFI_SUCCESS;
> + PLATFORM_MP_UPDATE_TABLE *PtrTable;
> + UINT32 TableSize;
> + EFI_HOB_GUID_TYPE *GuidHob;
> + EFI_PLATFORM_INFO *PlatformInfo;
> +
> + GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
> + ASSERT (GuidHob != NULL);
> + if (GuidHob == NULL) {
> + return EFI_NOT_FOUND;
> + }
> + PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
> +
> + PtrTable = &MpTableUpdate10nm;
> + TableSize = sizeof(MpTableUpdate10nm);
> + DEBUG ((DEBUG_ERROR, "UBA: Loading MpTableupdate table for ICX\n"));
> +
> + Status = UbaConfigProtocol->AddData (
> + UbaConfigProtocol,
> + &gPlatformMpTableConfigDataGuid,
> + PtrTable,
> + TableSize
> + );
> +
> + return Status;
> +}
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c
> new file mode 100644
> index 0000000000..ed9f80734c
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/PlatformDeviceDataSRP10nm.c
> @@ -0,0 +1,110 @@
> +/** @file
> +
> + @copyright
> + Copyright 2017 - 2018 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include <PlatPirqData.h>
> +#include <PlatDevData.h>
> +#include <IndustryStandard/LegacyBiosMpTable.h>
> +
> +#ifndef V_INTEL_VID
> +#define V_INTEL_VID 0x8086
> +#endif // #ifndef V_INTEL_VID
> +
> +//
> +// Describes Local APICs' connections.
> +//
> +STATIC DEVICE_DATA_HW_LOCAL_INT DeviceDataHwLocalInt1[] = {
> + {
> + {{0},{{0xFF,0},{0xFF,0},{0xFF,0}}},
> + 0x00,
> + 0xff,
> + 0x00,
> + EfiLegacyMpTableEntryLocalIntTypeExtInt,
> + EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec,
> + EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec
> + },
> + {
> + {{0},{{0xFF,0},{0xFF,0},{0xFF,0}}},
> + 0x00,
> + 0xff,
> + 0x01,
> + EfiLegacyMpTableEntryLocalIntTypeInt,
> + EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec,
> + EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec
> + },
> +};
> +
> +//
> +// Describes system's address space mapping, specific to the system.
> +//
> +STATIC DEVICE_DATA_HW_ADDR_SPACE_MAPPING DeviceDataHwAddrSpace1[] = {
> + //
> + // Legacy IO addresses.
> + //
> + { {0}, EfiLegacyMpTableEntryExtSysAddrSpaceMappingIo, 0x0000, 0x1000 },
> +};
> +
> +//
> +// IRQ priority
> +//
> +STATIC EFI_LEGACY_IRQ_PRIORITY_TABLE_ENTRY IrqPriorityTable1[] = {
> + {11, 0},
> + {10, 0},
> + {9, 0},
> + {5, 0},
> + {0, 0},
> + {0, 0},
> + {0, 0}
> +};
> +
> +//
> +// Note : UpdateBusNumbers updates the bus numeber
> +//
> +STATIC EFI_LEGACY_PIRQ_TABLE PirqTableHead1 [] = {
> + {
> + {
> + EFI_PIRQ_TABLE_SIGNATURE,
> + 00,
> + 01,
> + 0000,
> + 00,
> + 00,
> + 0000,
> + V_INTEL_VID,
> + 30,
> + 00000000,
> + {00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00,
> + 00},
> + 00
> + }
> + }
> +};
> +
> +//
> +// Instantiation of the system device data.
> +//
> +DEVICE_DATA mDeviceDataPlatformSRP10nm = {
> + DeviceDataHwLocalInt1, sizeof (DeviceDataHwLocalInt1) / sizeof (DeviceDataHwLocalInt1[0]),
> + DeviceDataHwAddrSpace1, sizeof (DeviceDataHwAddrSpace1)/ sizeof (DeviceDataHwAddrSpace1[0])
> +};
> +
> +//
> +// Instantiation of platform PIRQ data.
> +//
> +PLATFORM_PIRQ_DATA mPlatformPirqDataPlatformSRP10nm = {
> + IrqPriorityTable1, sizeof(IrqPriorityTable1) / sizeof(IrqPriorityTable1[0]),
> + PirqTableHead1, sizeof(PirqTableHead1) / sizeof(PirqTableHead1[0])
> +};
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md
> new file mode 100644
> index 0000000000..2138810db4
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Readme.md
> @@ -0,0 +1,19 @@
> +# **Generating ACPI AML Offset table**
> +
> +The StaticSkuDataDxe driver includes AmlOffsetTable.c which contains the AML offset table. This Readme captures the build process for this file.
> +
> +edk2-platforms/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py drives the build since ACPI tables are expected to be board specific.
> +
> +The AmlOffsetTable.c file is generated in two key steps:
> +1. Generate the *Dsdt*.offsets.h where *Dsdt* is the DSDT ASL file name specific for this build. For WilsonCityRvp:
> + * The DSDT is WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.asl
> + * The generated file is Build/WhitleyOpenBoardPkg/DEBUG_VS2015x86/X64/WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets/AmlOffsets/OUTPUT/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.offset.h
> + * These are customized in the build_config.cfg file
> +2. Generat the AmlOffsetTable.c using the AmlGenOffset.py script from the MinPlatformPkg. For WilsonCityRvp:
Typo here. "Generat" should be "Generate".
> + * Script is at edk2-platforms/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py
> + * Input is Build/WhitleyOpenBoardPkg/DEBUG_VS2015x86/X64/WhitleyOpenBoardPkg/WilsonCityRvp/AmlOffsets/AmlOffsets/OUTPUT/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Dsdt/EPRPPlatform10nm.offset.h
> + * Output is edk2-platforms/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/AmlOffsetTable.c
> +
> +Common Issues:
> +* The same iasl compiler version must be used to build the AML offset table and to build the DSDT.
> +* The Board/*AmlOffsets*.dsc file name, Board/*AmlOffsets* directory name, Board/AmlOffsets/*AmlOffsets*.inf file name, and the BASE_NAME in *AmlOffsets*.inf must all match exactly.
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c
> new file mode 100644
> index 0000000000..c4f0102f59
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.c
> @@ -0,0 +1,60 @@
> +/** @file
> + UBA static sku data update dxe driver.
> +
> + @copyright
> + Copyright 2013 - 2014 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include "StaticSkuDataDxe.h"
> +
> +/**
> + The Driver Entry Point.
> +
> + The function is the driver Entry point.
> +
> + @param ImageHandle A handle for the image that is initializing this driver
> + @param SystemTable A pointer to the EFI system table
> +
> + @retval EFI_SUCCESS: Driver initialized successfully
> + @retval EFI_LOAD_ERROR: Failed to Initialize or has been loaded
> + @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +StaticSkuConfigDataDxeEntry (
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE *SystemTable
> +)
> +{
> + EFI_STATUS Status;
> + UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol = NULL;
> +
> + Status = gBS->LocateProtocol (
> + &gUbaConfigDatabaseProtocolGuid,
> + NULL,
> + &UbaConfigProtocol
> + );
> + if (EFI_ERROR(Status)) {
> + return Status;
> + }
> +
> + Status = InstallMpTableData (UbaConfigProtocol);
> + if (EFI_ERROR(Status)) {
> + return Status;
> + }
> +
> + Status = InstallPirqData (UbaConfigProtocol);
> + if (EFI_ERROR(Status)) {
> + return Status;
> + }
> +
> + Status = InstallAcpiFixupTableData (UbaConfigProtocol);
> + if (EFI_ERROR(Status)) {
> + return Status;
> + }
> +
> + return Status;
> +}
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h
> new file mode 100644
> index 0000000000..e54191d4f7
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.h
> @@ -0,0 +1,41 @@
> +/** @file
> + UBA static sku data update dxe driver.
> +
> + @copyright
> + Copyright 2013 - 2022 Intel Corporation. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _STATIC_SKU_DATA_DXE_H_
> +#define _STATIC_SKU_DATA_DXE_H_
> +
> +#include <Base.h>
> +#include <Uefi.h>
> +
> +#include <Library/UefiDriverEntryPoint.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/BaseLib.h>
> +#include <Library/BaseMemoryLib.h>
> +#include <Library/MemoryAllocationLib.h>
> +#include <Library/IoLib.h>
> +#include <UncoreCommonIncludes.h>
> +#include <Protocol/UbaCfgDb.h>
> +
> +EFI_STATUS
> +InstallMpTableData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> +);
> +
> +EFI_STATUS
> +InstallPirqData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> +);
> +
> +EFI_STATUS
> +InstallAcpiFixupTableData (
> + IN UBA_CONFIG_DATABASE_PROTOCOL *UbaConfigProtocol
> +);
> +
> +#endif // _STATIC_SKU_DATA_DXE_H_
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> new file mode 100644
> index 0000000000..97a1931c84
> --- /dev/null
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> @@ -0,0 +1,59 @@
> +## @file
> +# Static Board Data DXE Driver.
> +#
> +# @copyright
> +# Copyright 2018 - 2022 Intel Corporation. <BR>
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +
> +[Defines]
> + INF_VERSION = 0x00010005
> + BASE_NAME = StaticSkuDataDxeBaseline
> + FILE_GUID = 2C03C058-4305-7829-7E84-C7B3D6232F42
> + MODULE_TYPE = DXE_DRIVER
> + VERSION_STRING = 1.0
> +
> + ENTRY_POINT = StaticSkuConfigDataDxeEntry
> +
> +#
> +# The following information is for reference only and not required by the build tools.
> +#
> +# VALID_ARCHITECTURES = x64
> +#
> +
> +[Sources]
> + StaticSkuDataDxe.c
> + StaticSkuDataDxe.h
> + DeviceDataInstall.c
> + PlatformDeviceDataSRP10nm.c
> + AcpiStaticData.c
> +
> +[Packages]
> + MdePkg/MdePkg.dec
> + MdeModulePkg/MdeModulePkg.dec
> + WhitleySiliconPkg/SiliconPkg.dec
> + WhitleySiliconPkg/CpRcPkg.dec
> + WhitleyOpenBoardPkg/PlatformPkg.dec
> +
> +[LibraryClasses]
> + BaseLib
> + BaseMemoryLib
> + MemoryAllocationLib
> + UefiBootServicesTableLib
> + UefiDriverEntryPoint
> + UefiLib
> + DebugLib
> + IoLib
> + HobLib
> +
> +[Guids]
> + gEfiPlatformInfoGuid
> +
> +[Protocols]
> + gUbaConfigDatabaseProtocolGuid
> +
> +[Depex]
> + gEfiPlatformTypeWilsonCitySMTProtocolGuid OR
> + gEfiPlatformTypeWilsonCityRPProtocolGuid OR
> + gEfiPlatformTypeJunctionCityProtocolGuid
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
> index f37093bccd..48b26de427 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaRpBoards.dsc
> @@ -30,6 +30,11 @@ $(RP_PKG)/Uba/BoardInit/Pei/BoardInitPei.inf {
> }
>
> [Components.X64]
> +#
> +# Currently shared by all platforms
> +#
> +$(RP_PKG)/Uba/UbaMain/StaticSkuDataDxe/StaticSkuDataDxe.inf
> +
> #
> # Platform TypeWilsonCityRP
> #
> --
> 2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86468): https://edk2.groups.io/g/devel/message/86468
Mute This Topic: https://groups.io/mt/88979447/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.