Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
WhitleyOpenBoardPkg : Support for Aowanda Platform
Browse files Browse the repository at this point in the history
  - 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
sureshkumarpami authored and iworam committed Jun 3, 2022
1 parent 3b896d1 commit e9c5be6
Show file tree
Hide file tree
Showing 36 changed files with 3,943 additions and 6 deletions.
16 changes: 16 additions & 0 deletions Platform/Intel/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ A UEFI firmware implementation using MinPlatformPkg is constructed using the fol

| Machine Name | Supported Chipsets | BoardPkg | Board Name |
----------------------------------------|--------------------------------------------|------------------------------|--------------------|
| Aowanda | IceLake-SP (Xeon Scalable) | WhitleyOpenBoardPkg | Aowanda |
| Junction City | IceLake-SP (Xeon Scalable) | WhitleyOpenBoardPkg | JunctionCity |
| Mt. Olympus | Purley | PurleyOpenBoardPkg | BoardMtOlympus |
| TiogaPass | Purley | PurleyOpenBoardPkg | BoardTiogaPass |
Expand Down Expand Up @@ -276,6 +277,11 @@ return back to the minimum platform caller.
| | | build settings, environment variables.
| | |
| | |------WhitleyOpenBoardPkg
| | | |------Aowanda
| | | | |---build_config.cfg: Aowanda specific build
| | | | | settings environment variables.
| | | | |---build_board.py: Board-specific pre-build,
| | | | build, post-build and clean functions.
| | | |------CooperCityRvp
| | | | |---build_config.cfg: CooperCityRvp specific build
| | | | | settings environment variables.
Expand Down Expand Up @@ -406,6 +412,16 @@ For PurleyOpenBoardPkg (TiogaPass)
5. Connected PCIE Network card and made sure PCIE card detected in POST and in OS
6. Verified TPM offboard chip detection

**Aowanda**
1. This firmware project has been tested booting to UEFI shell
2. Installed and booted to RHEL 8.3 using M2 SSD disk
3. Installed and booted to Windows 2019 using M2 SSD disk
4. Verified TPM chip detection

Note:
For the network boot using the onboard Intel network card, please download the UEFI UNDI driver (E9712X3.efi) from https://www.intel.com/content/www/us/en/download/15755/intel-ethernet-connections-boot-utility-preboot-images-and-efi-drivers.html
and include it in PlatformPkg.fdf.

### **Package Builds**

In some cases, such as BoardModulePkg, a package may provide a set of functionality that is included in other
Expand Down
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;
}
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
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;
}
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 Platform/Intel/WhitleyOpenBoardPkg/Aowanda/PlatformPkg.dsc
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
Loading

0 comments on commit e9c5be6

Please sign in to comment.