This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WhitleyOpenBoardPkg : Support for Aowanda Platform
- Created UBA for Aowanda platform - Disabled Intel ME IDE-R devices, KT devices to reduce BIOS POST time - Modified build configuration file to support Aowanda platform build Cc: Nate DeSimone <[email protected]> Cc: Isaac Oram <[email protected]> Cc: Manickavasakam Karpagavinayagam <[email protected]> Cc: Harikrishna Doppalapudi <[email protected]> Cc: Sureshkumar Ponnusamy <[email protected]> Cc: Zachary Bobroff <[email protected]> Signed-off-by: Sureshkumar Ponnusamy <[email protected]> Reviewed-by: Isaac Oram <[email protected]>
- Loading branch information
1 parent
3b896d1
commit e9c5be6
Showing
36 changed files
with
3,943 additions
and
6 deletions.
There are no files selected for viewing
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
47 changes: 47 additions & 0 deletions
47
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Library/IpmiPlatformHookLib/IpmiPlatformHookLib.c
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,47 @@ | ||
/** @file | ||
This file implements the IPMI Platform hook functions | ||
Copyright (c) 2021, American Megatrends International LLC. <BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <Uefi.h> | ||
#include <Ppi/DynamicSiLibraryPpi.h> | ||
#include <Library/PeiServicesLib.h> | ||
#include <Library/DebugLib.h> | ||
|
||
#define KCS_BASE_ADDRESS_MASK 0xFFF0 | ||
#define NUMBER_OF_BYTES_TO_DECODE 0x10 | ||
|
||
/** | ||
This function sets IO Decode Range in LPC registers | ||
@param[in] IpmiIoBase - IPMI Base IO address | ||
@retval EFI_SUCCESS - Operation success. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
PlatformIpmiIoRangeSet ( | ||
UINT16 IpmiIoBase | ||
) | ||
{ | ||
EFI_STATUS Status; | ||
DYNAMIC_SI_LIBARY_PPI *DynamicSiLibraryPpi; | ||
|
||
DynamicSiLibraryPpi = NULL; | ||
|
||
DEBUG ((DEBUG_INFO, "PlatformIpmiIoRangeSet IpmiIoBase %x\n", IpmiIoBase)); | ||
|
||
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi); | ||
if (EFI_ERROR (Status)) { | ||
DEBUG ((DEBUG_ERROR, "PeiServicesLocatePpi for gDynamicSiLibraryPpiGuid failed. Status %r\n", Status)); | ||
ASSERT_EFI_ERROR (Status); | ||
return Status; | ||
} | ||
|
||
DynamicSiLibraryPpi->PchLpcGenIoRangeSet ((IpmiIoBase & KCS_BASE_ADDRESS_MASK), NUMBER_OF_BYTES_TO_DECODE); | ||
return EFI_SUCCESS; | ||
} |
32 changes: 32 additions & 0 deletions
32
...orm/Intel/WhitleyOpenBoardPkg/Aowanda/Library/IpmiPlatformHookLib/IpmiPlatformHookLib.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,32 @@ | ||
## @file | ||
# Component description file for IPMI platform hook Library. | ||
# | ||
# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.<BR> | ||
# Copyright (c) 2021, American Megatrends International LLC.<BR> | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = IpmiPlatformHookLib | ||
FILE_GUID = A770BDB8-331A-4110-8B60-81FC17480B36 | ||
MODULE_TYPE = PEIM | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = IpmiPlatformHookLib | ||
|
||
[sources] | ||
IpmiPlatformHookLib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
WhitleySiliconPkg/WhitleySiliconPkg.dec | ||
|
||
[LibraryClasses] | ||
DebugLib | ||
|
||
[Ppis] | ||
gDynamicSiLibraryPpiGuid ## CONSUMES | ||
|
||
[Depex] | ||
gDynamicSiLibraryPpiGuid |
93 changes: 93 additions & 0 deletions
93
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Library/PeiPlatformHookLib/PeiPlatformHooklib.c
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,93 @@ | ||
/** @file | ||
PEI Library Functions. Initialize GPIOs | ||
Copyright 1999 - 2021 Intel Corporation. <BR> | ||
Copyright (c) 2021, American Megatrends International LLC. <BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <Uefi.h> | ||
#include <Guid/PlatformInfo.h> | ||
#include <Library/DebugLib.h> | ||
#include <Library/UbaGpioInitLib.h> | ||
#include <Library/PeiPlatformHooklib.h> | ||
#include <Library/PeiServicesLib.h> | ||
#include <Ppi/DynamicSiLibraryPpi.h> | ||
|
||
/** | ||
Configure GPIO | ||
@param[in] None | ||
@retval None | ||
**/ | ||
VOID | ||
GpioInit ( | ||
VOID | ||
) | ||
{ | ||
PlatformInitGpios (); | ||
} | ||
|
||
/** | ||
Disables ME PCI devices like IDE-R , KT | ||
@param[in] None | ||
@retval EFI_SUCCESS Operation success. | ||
**/ | ||
EFI_STATUS | ||
DisableMEDevices ( | ||
VOID | ||
) | ||
{ | ||
EFI_STATUS Status = EFI_SUCCESS; | ||
DYNAMIC_SI_LIBARY_PPI *DynamicSiLibraryPpi; | ||
|
||
DynamicSiLibraryPpi = NULL; | ||
|
||
DEBUG ((DEBUG_INFO, "DisableMEDevices\n")); | ||
|
||
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi); | ||
if (EFI_ERROR (Status)) { | ||
ASSERT_EFI_ERROR (Status); | ||
return Status; | ||
} | ||
|
||
// | ||
// Disable IDE-R | ||
// | ||
DynamicSiLibraryPpi->PchPcrAndThenOr32 ( | ||
PID_PSF1, | ||
(R_PCH_H_PCR_PSF1_T0_SHDW_IDER_REG_BASE + R_PCH_PSFX_PCR_T0_SHDW_PCIEN), | ||
(UINT32)~0, | ||
B_PCH_PSFX_PCR_T0_SHDW_PCIEN_FUNDIS | ||
); | ||
|
||
// | ||
// Disable KT | ||
// | ||
DynamicSiLibraryPpi->PchPcrAndThenOr32 ( | ||
PID_PSF1, | ||
(R_PCH_H_PCR_PSF1_T0_SHDW_KT_REG_BASE + R_PCH_PSFX_PCR_T0_SHDW_PCIEN), | ||
(UINT32)~0, | ||
B_PCH_PSFX_PCR_T0_SHDW_PCIEN_FUNDIS | ||
); | ||
return EFI_SUCCESS; | ||
} | ||
|
||
/** | ||
Configure GPIO and SIO | ||
@retval EFI_SUCCESS Operation success. | ||
**/ | ||
EFI_STATUS | ||
BoardInit ( | ||
) | ||
{ | ||
GpioInit (); | ||
DisableMEDevices (); | ||
|
||
return EFI_SUCCESS; | ||
} |
35 changes: 35 additions & 0 deletions
35
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Library/PeiPlatformHookLib/PeiPlatformHooklib.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,35 @@ | ||
## @file | ||
# | ||
# @copyright | ||
# Copyright 1999 - 2021 Intel Corporation. <BR> | ||
# Copyright (c) 2021, American Megatrends International LLC. <BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = PeiPlatformHookLib | ||
FILE_GUID = 6E9351C3-A17A-4ADF-8602-55B07962718F | ||
MODULE_TYPE = PEIM | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = PeiPlatformHookLib|PEIM PEI_CORE SEC | ||
|
||
[Sources] | ||
PeiPlatformHooklib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
WhitleyOpenBoardPkg/PlatformPkg.dec | ||
WhitleySiliconPkg/WhitleySiliconPkg.dec | ||
WhitleySiliconPkg/CpRcPkg.dec | ||
|
||
[LibraryClasses] | ||
DebugLib | ||
UbaGpioInitLib | ||
|
||
[Pcd] | ||
|
||
[Ppis] | ||
|
||
[Guids] |
82 changes: 82 additions & 0 deletions
82
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/PlatformPkg.dsc
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,82 @@ | ||
## @file | ||
# DSC file of Aowanda platform | ||
# | ||
# @copyright | ||
# Copyright 2008 - 2021 Intel Corporation. <BR> | ||
# Copyright (c) 2022, American Megatrends International LLC. <BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
|
||
################################################################################ | ||
# | ||
# Defines Section - statements that will be processed to create a Makefile. | ||
# | ||
################################################################################ | ||
[Defines] | ||
PEI_ARCH = IA32 | ||
DXE_ARCH = X64 | ||
|
||
!include WhitleyOpenBoardPkg/PlatformPkg.dsc | ||
|
||
[PcdsFixedAtBuild] | ||
gMinPlatformPkgTokenSpaceGuid.PcdBootStage|6 | ||
|
||
[PcdsFeatureFlag] | ||
!if $(gMinPlatformPkgTokenSpaceGuid.PcdBootStage) >= 5 | ||
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |TRUE | ||
gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |TRUE | ||
!else | ||
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |FALSE | ||
gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |FALSE | ||
!endif | ||
|
||
!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc | ||
|
||
[Defines] | ||
BOARD_NAME = Aowanda | ||
PLATFORM_NAME = $(BOARD_NAME) | ||
PLATFORM_GUID = 240D6B04-AFED-47E7-AB05-64B621A1112D | ||
FLASH_DEFINITION = $(RP_PKG)/$(BOARD_NAME)/PlatformPkg.fdf | ||
|
||
[PcdsFixedAtBuild] | ||
|
||
!if $(TARGET) == "RELEASE" | ||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0 | ||
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x03 | ||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE | ||
!else | ||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F # Enable asserts, prints, code, clear memory, and deadloops on asserts. | ||
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 | ||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE | ||
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x80200047 # Built in messages: Error, MTRR, info, load, warn, init | ||
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 # This is set to INT3 (0x2) for Simics source level debugging | ||
!endif | ||
gPlatformTokenSpaceGuid.PcdBoardId|0x26 | ||
|
||
[PcdsFixedAtBuild.X64] | ||
gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear|1900 | ||
gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|9999 | ||
|
||
[PcdsDynamicExHii] | ||
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5 # Variable: L"Timeout" | ||
|
||
[LibraryClasses.Common.PEI_CORE, LibraryClasses.Common.PEIM] | ||
PeiPlatformHookLib|$(RP_PKG)/$(BOARD_NAME)/Library/PeiPlatformHookLib/PeiPlatformHooklib.inf | ||
|
||
!if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE | ||
IpmiPlatformHookLib| $(RP_PKG)/$(BOARD_NAME)/Library/IpmiPlatformHookLib/IpmiPlatformHookLib.inf | ||
!endif | ||
|
||
[Components.IA32] | ||
$(RP_PKG)/Uba/BoardInit/Pei/BoardInitPei.inf { | ||
<LibraryClasses> | ||
NULL|$(RP_PKG)/$(BOARD_NAME)/Uba/TypeAowanda/Pei/PeiBoardInitLib.inf | ||
NULL|$(RP_PKG)/Uba/UbaMain/Common/Pei/PeiCommonBoardInitLib.inf | ||
} | ||
|
||
[Components.X64] | ||
$(RP_PKG)/$(BOARD_NAME)/Uba/TypeAowanda/Dxe/UsbOcUpdateDxe/UsbOcUpdateDxe.inf | ||
$(RP_PKG)/$(BOARD_NAME)/Uba/TypeAowanda/Dxe/IioCfgUpdateDxe/IioCfgUpdateDxe.inf | ||
$(RP_PKG)/$(BOARD_NAME)/Uba/TypeAowanda/Dxe/SlotDataUpdateDxe/SlotDataUpdateDxe.inf | ||
MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf |
Oops, something went wrong.