forked from tianocore/edk2-platforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WhitleyOpenBoardPkg/AcpiPlatform: Add driver for publishing ACPI tables
AcpiPlatform DXE driver loads and patches ACPI tables before publishing. Cc: Nate DeSimone <[email protected]> Cc: Chasel Chiu <[email protected]> Signed-off-by: Isaac Oram <[email protected]> Reviewed-by: Nate DeSimone <[email protected]>
- Loading branch information
Showing
13 changed files
with
3,388 additions
and
6 deletions.
There are no files selected for viewing
754 changes: 754 additions & 0 deletions
754
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c
Large diffs are not rendered by default.
Oops, something went wrong.
117 changes: 117 additions & 0 deletions
117
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/** @file | ||
@copyright | ||
Copyright 1999 - 2020 Intel Corporation. <BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _ACPI_PLATFORM_H_ | ||
#define _ACPI_PLATFORM_H_ | ||
|
||
// | ||
// Statements that include other header files | ||
// | ||
#include <PiDxe.h> | ||
#include <PchAccess.h> | ||
#include <IndustryStandard/Acpi.h> | ||
#include <IndustryStandard/SerialPortConsoleRedirectionTable.h> | ||
#include <IndustryStandard/DmaRemappingReportingTable.h> | ||
#include <IndustryStandard/HighPrecisionEventTimerTable.h> | ||
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h> | ||
#include <IndustryStandard/Pci.h> | ||
#include <Library/AcpiPlatformLib.h> | ||
#include <Protocol/AcpiSystemDescriptionTable.h> | ||
#include <Protocol/GlobalNvsArea.h> | ||
#include <Protocol/IioUds.h> | ||
#include <Protocol/DmaRemap.h> | ||
#include <Protocol/PciIo.h> | ||
#include <Protocol/FirmwareVolume2.h> | ||
#include <Protocol/SerialIo.h> | ||
#include <Protocol/MpService.h> | ||
#include <Protocol/AcpiTable.h> | ||
#include <Protocol/GlobalNvsArea.h> | ||
#include <Library/BaseLib.h> | ||
#include <Library/UefiBootServicesTableLib.h> | ||
#include <Library/UefiRuntimeServicesTableLib.h> | ||
#include <Library/DebugLib.h> | ||
#include <Library/MemoryAllocationLib.h> | ||
#include <Library/DevicePathLib.h> | ||
#include <Library/BaseMemoryLib.h> | ||
#include <Library/HobLib.h> | ||
#include <Library/UefiLib.h> | ||
#include <Guid/PlatformInfo.h> | ||
#include <Guid/SetupVariable.h> | ||
#include <PchSetupVariable.h> | ||
#include <Guid/SocketVariable.h> | ||
#include <Guid/HobList.h> | ||
#include <Guid/MemoryMapData.h> | ||
#include <Protocol/PlatformType.h> | ||
#include <Protocol/CpuCsrAccess.h> | ||
#include <PpmPolicyPeiDxeCommon.h> | ||
#include <Acpi/Mcfg.h> | ||
#include <Acpi/Hpet.h> | ||
#include <Acpi/Srat.h> | ||
#include <Acpi/Slit.h> | ||
#include <Acpi/Migt.h> | ||
#include <Acpi/Msct.h> | ||
#include <Acpi/Bdat.h> | ||
#include <Acpi/Nfit.h> | ||
#include <Acpi/Pcat.h> | ||
#include "Platform.h" | ||
#include <AcpiVtd.h> | ||
#include <Protocol/Smbios.h> | ||
#include <IndustryStandard/SmBios.h> | ||
#include <Library/PchInfoLib.h> | ||
#include <Library/ReportStatusCodeLib.h> | ||
|
||
#include <SystemBoard.h> | ||
#include <PchAccess.h> | ||
#include <UncoreCommonIncludes.h> | ||
|
||
#include <SystemInfoVar.h> | ||
#include <Register/Cpuid.h> | ||
#include <Library/PlatformStatusCodes.h> | ||
#include <Protocol/DynamicSiLibraryProtocol.h> | ||
#include <Protocol/DynamicSiLibraryProtocol2.h> | ||
#include <Protocol/DmaRemap.h> | ||
|
||
#define RTC_ADDRESS_REGISTER_D 13 | ||
|
||
|
||
/** | ||
Entry point for Acpi platform driver. | ||
@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 | ||
AcpiPlatformEntryPoint ( | ||
IN EFI_HANDLE ImageHandle, | ||
IN EFI_SYSTEM_TABLE *SystemTable | ||
); | ||
|
||
EFI_STATUS | ||
LocateSupportProtocol ( | ||
IN EFI_GUID *Protocol, | ||
IN EFI_GUID gEfiAcpiMultiTableStorageGuid, | ||
OUT VOID **Instance, | ||
IN UINT32 Type | ||
); | ||
|
||
VOID | ||
AcpiVtdIntRemappingEnable ( | ||
VOID | ||
); | ||
|
||
EFI_STATUS | ||
AcpiVtdTablesInstall ( | ||
VOID | ||
); | ||
|
||
#endif // _ACPI_PLATFORM_H_ |
107 changes: 107 additions & 0 deletions
107
Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
## @file | ||
# | ||
# @copyright | ||
# Copyright 2009 - 2020 Intel Corporation. <BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = AcpiPlatform | ||
FILE_GUID = 87AB821C-79B8-4ef6-A913-21D22063F55F | ||
MODULE_TYPE = DXE_DRIVER | ||
VERSION_STRING = 1.0 | ||
ENTRY_POINT = AcpiPlatformEntryPoint | ||
|
||
[Sources] | ||
AcpiPlatform.c | ||
AcpiPlatform.h | ||
AcpiPlatformUtils.c | ||
AcpiPlatformUtils.h | ||
AcpiPlatformHooks.c | ||
AcpiPlatformHooks.h | ||
AcpiPlatformVTDHooks.c | ||
|
||
[Packages] | ||
WhitleyOpenBoardPkg/PlatformPkg.dec | ||
WhitleySiliconPkg/SiliconPkg.dec | ||
WhitleySiliconPkg/Cpu/CpuRcPkg.dec | ||
WhitleySiliconPkg/CpRcPkg.dec | ||
WhitleySiliconPkg/WhitleySiliconPkg.dec | ||
MdePkg/MdePkg.dec | ||
MdeModulePkg/MdeModulePkg.dec | ||
UefiCpuPkg/UefiCpuPkg.dec | ||
|
||
[LibraryClasses] | ||
UefiBootServicesTableLib | ||
UefiDriverEntryPoint | ||
BaseMemoryLib | ||
DebugLib | ||
UefiLib | ||
UefiRuntimeServicesTableLib | ||
HobLib | ||
SetupLib | ||
AcpiPlatformTableLib | ||
ReportStatusCodeLib | ||
PcdLib | ||
LocalApicLib | ||
|
||
[Protocols] | ||
gEfiMpServiceProtocolGuid | ||
gEfiIioUdsProtocolGuid | ||
gEfiGlobalNvsAreaProtocolGuid | ||
gEfiPciEnumerationCompleteProtocolGuid | ||
gEfiPciIoProtocolGuid | ||
gEfiFirmwareVolume2ProtocolGuid | ||
gEfiAcpiTableProtocolGuid # ALWAYS_CONSUMED; before was gEfiAcpiSupportProtocolGuid | ||
gEfiSerialIoProtocolGuid | ||
gDxeEnhancedSpeedstepProtocolGuid | ||
gEfiPlatformTypeProtocolGuid | ||
gDmaRemapProtocolGuid | ||
gEfiCrystalRidgeGuid | ||
gEfiSmbiosProtocolGuid | ||
gEfiPciRootBridgeIoProtocolGuid | ||
gAcpiPlatformProtocolGuid | ||
gDynamicSiLibraryProtocolGuid ## CONSUMES | ||
gDynamicSiLibraryProtocol2Guid ## CONSUMES | ||
|
||
[Guids] | ||
gEfiGlobalVariableGuid | ||
gEfiAcpiTableStorageGuid | ||
gEfiPmSsdtTableStorageGuid | ||
gEfiPcAnsiGuid | ||
gEfiVT100PlusGuid | ||
gEfiVT100Guid | ||
gEfiVTUTF8Guid | ||
gEfiHobListGuid | ||
gEfiPlatformInfoGuid | ||
gEfiSetupVariableGuid | ||
gEfiEndOfDxeEventGroupGuid | ||
gEfiEventExitBootServicesGuid | ||
gEfiSocketIioVariableGuid | ||
gEfiSocketMemoryVariableGuid | ||
gEfiSocketCommonRcVariableGuid | ||
gEfiSocketMpLinkVariableGuid | ||
gEfiSocketPowermanagementVarGuid | ||
gEfiSocketProcessorCoreVarGuid | ||
gPchInfoHobGuid ## CONSUMES | ||
|
||
[Pcd] | ||
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId | ||
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId | ||
gOemSkuTokenSpaceGuid.PcdOemTableIdXhci | ||
gPlatformTokenSpaceGuid.PcdDebugModeEnable ## CONSUMES | ||
|
||
[FixedPcd] | ||
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuSocketCount | ||
gEfiCpRcPkgTokenSpaceGuid.PcdMaxCpuCoreCount | ||
|
||
[Depex] | ||
gDynamicSiLibraryProtocolGuid AND | ||
gDynamicSiLibraryProtocol2Guid AND | ||
gDmaRemapProtocolGuid AND | ||
gEfiAcpiTableProtocolGuid AND | ||
gEfiMpServiceProtocolGuid AND | ||
gEfiIioSystemProtocolGuid AND | ||
gSmbiosMemInfoProtocolGuid |
Oops, something went wrong.