Re: [edk2-devel] [PATCH v1] Maintainers.txt: Change SimicsOpenBoardPkg Maintainer
Reviewed-by: Prince Agyeman Prince -Original Message- From: devel@edk2.groups.io On Behalf Of Desimone, Nathaniel L Sent: Tuesday, November 2, 2021 3:07 PM To: devel@edk2.groups.io Cc: Agyeman, Prince ; Leif Lindholm ; Kinney, Michael D Subject: [edk2-devel] [PATCH v1] Maintainers.txt: Change SimicsOpenBoardPkg Maintainer To help keep edk2-platforms healthy, I would like to offer to maintain SimicsOpenBoardPkg, SimicsX58SktPkg, and SimicsIch10Pkg. The current maintainer for those packages has changed jobs and is no longer active in the community. Cc: Agyeman Prince Cc: Leif Lindholm Cc: Michael D Kinney Signed-off-by: Nate DeSimone --- Maintainers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index c839c71b22..8d9d454347 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -235,7 +235,7 @@ M: Chasel Chiu Platform/Intel/SimicsOpenBoardPkg F: Platform/Intel/SimicsOpenBoardPkg/ -M: Agyeman Prince +M: Nate DeSimone Platform/Intel/Tools F: Platform/Intel/Tools/ @@ -301,11 +301,11 @@ M: Chasel Chiu Silicon/Intel/SimicsX58SktPkg F: Silicon/Intel/SimicsX58SktPkg/ -M: Agyeman Prince +M: Nate DeSimone Silicon/Intel/SimicsIch10Pkg F: Silicon/Intel/SimicsIch10Pkg/ -M: Agyeman Prince +M: Nate DeSimone Silicon/Intel/Tools F: Silicon/Intel/Tools/ -- 2.27.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83358): https://edk2.groups.io/g/devel/message/83358 Mute This Topic: https://groups.io/mt/86778275/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] SimicsOpenBoardPkg: Update usage of functions to be removed
Reviewed-by: Prince Agyeman -Original Message- From: Zhang, Shenglei Sent: Tuesday, July 28, 2020 8:34 PM To: devel@edk2.groups.io Cc: Agyeman, Prince Subject: [PATCH] SimicsOpenBoardPkg: Update usage of functions to be removed REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2777 With some functions to be deprecated, their usage in platforms should also be updated. Cc: Agyeman Prince Signed-off-by: Shenglei Zhang --- .../Library/BoardBdsHookLib/BoardBdsHookLib.c| 2 +- .../Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c| 4 ++-- .../Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 6 +++--- .../Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c| 12 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c index 1058dbf3..ba4d2b02 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBds +++ HookLib.c @@ -1206,7 +1206,7 @@ VisitingFileSystemInstance ( NULL, ); - PcdSet64 (PcdEmuVariableEvent, (UINT64)(UINTN) mEmuVariableEvent); + PcdSet64S (PcdEmuVariableEvent, (UINT64)(UINTN) mEmuVariableEvent); return EFI_SUCCESS; } diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c index b7fd4d1f..c856ff44 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c @@ -669,9 +669,9 @@ ExecutePlatformConfig ( // // Pass the preferred resolution to GraphicsConsoleDxe via dynamic PCDs. // -PcdSet32 (PcdVideoHorizontalResolution, +PcdSet32S (PcdVideoHorizontalResolution, PlatformConfig.HorizontalResolution); -PcdSet32 (PcdVideoVerticalResolution, +PcdSet32S (PcdVideoVerticalResolution, PlatformConfig.VerticalResolution); } diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c index 60aa54be..127afffc 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c @@ -155,7 +155,7 @@ GetFirstNonAddress ( if (mBootMode != BOOT_ON_S3_RESUME) { DEBUG ((EFI_D_INFO, "%a: disabling 64-bit PCI host aperture\n", __FUNCTION__)); - PcdSet64 (PcdPciMmio64Size, 0); + PcdSet64S (PcdPciMmio64Size, 0); } // @@ -187,8 +187,8 @@ GetFirstNonAddress ( // the GCD memory space map through our PciHostBridgeLib instance; here we // only need to set the PCDs. // -PcdSet64 (PcdPciMmio64Base, Pci64Base); -PcdSet64 (PcdPciMmio64Size, Pci64Size); +PcdSet64S (PcdPciMmio64Base, Pci64Base); +PcdSet64S (PcdPciMmio64Size, Pci64Size); DEBUG ((EFI_D_INFO, "%a: Pci64Base=0x%Lx Pci64Size=0x%Lx\n", __FUNCTION__, Pci64Base, Pci64Size)); } diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c index 0bec76e4..6963f39a 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c @@ -257,8 +257,8 @@ MemMapInitialization ( // PciSize = 0xFC00 - PciBase; AddIoMemoryBaseSizeHob (PciBase, PciSize); - PcdSet64 (PcdPciMmio32Base, PciBase); - PcdSet64 (PcdPciMmio32Size, PciSize); + PcdSet64S (PcdPciMmio32Base, PciBase); PcdSet64S (PcdPciMmio32Size, + PciSize); AddIoMemoryBaseSizeHob (0xFEC0, SIZE_4KB); AddIoMemoryBaseSizeHob (0xFED0, SIZE_1KB); if (mHostBridgeDevId == INTEL_ICH10_DEVICE_ID) { @@ -300,8 +300,8 @@ MemMapInitialization ( PciIoBase, PciIoSize ); - PcdSet64 (PcdPciIoBase, PciIoBase); - PcdSet64 (PcdPciIoSize, PciIoSize); + PcdSet64S (PcdPciIoBase, PciIoBase); + PcdSet64S (PcdPciIoSize, PciIoSize); // // Add flash range. @@ -367,7 +367,7 @@ MiscInitialization ( ASSERT (FALSE); return; } - PcdSet16 (PcdSimicsX58HostBridgePciDevId, mHostBridgeDevId); + PcdSet16S (PcdSimicsX58HostBridgePciDevId, mHostBridgeDevId); // // If the appropriate IOspace enable bit is set, assume the ACPI PMBA @@ -483,7 +483,7 @@ ReserveEmuVariableNvStore ( VariableStore, (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize)) / 1024 )); - PcdSet64 (PcdEmuVariableNvStoreReserved, VariableStore); + PcdSet64S (PcdEmuVariableNvStoreReserved, VariableStore); } -- 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63590): https://edk2.groups.io/g/devel/message/63590 Mute This Topic: https://groups.io/mt/75858614/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.gro
Re: [edk2-devel] [PATCH 1/5] Platform/Intel/SimicsOpenBoardPkg: Change PCDs type about status code
Reviewed-by: Prince Agyeman -Original Message- From: Tan, Ming Sent: Tuesday, June 9, 2020 4:24 AM To: devel@edk2.groups.io Cc: Agyeman, Prince Subject: [PATCH 1/5] Platform/Intel/SimicsOpenBoardPkg: Change PCDs type about status code REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2791 Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory in MdeModulePkg.dec are changed, so change them from PcdsFeatureFlag to PcdsFixedAtBuild in dsc files. Cc: Agyeman Prince Signed-off-by: Ming Tan --- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index cd98d09f01..52cdf9ec0f 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds +++ c @@ -1,7 +1,7 @@ ## @file # PCD configuration build description file for the X58Ich10 board. #-# Copyright (c) 2019 Intel Corporation. All rights reserved. +# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent #@@ -37,12 +37,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|FALSE- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE-!if $(TARGET) == RELEASE- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugSupport|FALSE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE@@ -128,6 +122,12 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xc000 gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE+!if $(TARGET) == RELEASE+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif # DEBUG_INIT 0x0001 // Initialization # DEBUG_WARN 0x0002 // Warnings # DEBUG_LOAD 0x0004 // Load events-- 2.24.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61002): https://edk2.groups.io/g/devel/message/61002 Mute This Topic: https://groups.io/mt/74771803/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] IsaBus driver's usage
+ Ray and Hao who are the MdeModulePkg/Bus/ maintainers -Original Message- From: Philippe Mathieu-Daudé Sent: Thursday, May 28, 2020 1:28 AM To: devel@edk2.groups.io; tiger...@zhaoxin.com; Agyeman, Prince Subject: Re: [edk2-devel] IsaBus driver's usage +Agyeman Prince On 5/28/20 9:58 AM, Tiger Liu(BJ-RD) wrote: > Hi, expert: > I have a question about IsaBus driver. > > There is a isa bus driver in MdeModulePkg\Bus\Isa\IsaBusDxe. > But i find nobody use it anymore. > > Based on current edk2-platform samples, they just use SioDxe driver > plus Ps2Keyboard driver, not use IsaBus driver anymore. > > So when to use IsaBus driver? The Intel Simics platform maybe? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60459): https://edk2.groups.io/g/devel/message/60459 Mute This Topic: https://groups.io/mt/74517611/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Update return values of manifest_repo_list
Reviewed-by: Prince Agyeman -Original Message- From: Desimone, Ashley E Sent: Tuesday, May 12, 2020 11:45 AM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barkelew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Update return values of manifest_repo_list Update the manifest_repo_list property to return an empty list if no [manifest-repos] section was present in the config file. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/config/config_factory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edkrepo/config/config_factory.py b/edkrepo/config/config_factory.py index c0b9f68..116cb24 100644 --- a/edkrepo/config/config_factory.py +++ b/edkrepo/config/config_factory.py @@ -119,6 +119,8 @@ class BaseConfig(): """Returns a list of available manifest repos""" if self.cfg.has_section('manifest-repos'): return self.cfg.options('manifest-repos') +else: +return [] def manifest_repo_props(self, manifest_repo): """ -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59363): https://edk2.groups.io/g/devel/message/59363 Mute This Topic: https://groups.io/mt/74165643/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2 2/3] EdkRepo: Add edkrepo/common/workspace_maitenance/manifest_repos_maitenance
Hi Ashley, Comment below Prince -Original Message- From: Desimone, Ashley E Sent: Wednesday, April 22, 2020 2:35 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barkelew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH V2 2/3] EdkRepo: Add edkrepo/common/workspace_maitenance/manifest_repos_maitenance Add a directory to edkrepo/common to store workspace maitenance functionatlity. Add edkrepo/common/workspace_matenance/humble directory to store related strings and included manifest_repos_maitenance_humble.py Add edkrepo/common/workspace_maitenance/manifest_repos_maitenance.py to support the maitenance of multiple manifest repositories. Added pull_single_manifest_repo() to manifest_repos_maitenance.py Updated setup.py to include the new directories. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- .../humble/manifest_repos_maitenance_humble.py | 23 + .../manifest_repos_maitenance.py | 59 ++ setup.py | 5 +- 3 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 edkrepo/common/workspace_maitenance/humble/manifest_repos_maitenance_humble.py create mode 100644 edkrepo/common/workspace_maitenance/manifest_repos_maitenance.py diff --git a/edkrepo/common/workspace_maitenance/humble/manifest_repos_maitenance_humble.py b/edkrepo/common/workspace_maitenance/humble/manifest_repos_maitenance_humble.py new file mode 100644 index 000..ee7b4bb --- /dev/null +++ b/edkrepo/common/workspace_maitenance/humble/manifest_repos_maitenan +++ ce_humble.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# +## @file +# manifest_repos_mgmt_humble.py +# +# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent # + +''' Contains user facing strings for manifest_repos_mgmt.py ''' + +from colorama import Fore +from colorama import Style + +CLONE_SINGLE_MAN_REPO = 'Cloning global manifest repository to: {} from: {}' +SYNC_SINGLE_MAN_REPO = 'Syncing the global manifest repository: {}' +SINGLE_MAN_REPO_DIRTY = ('Uncommited changes present in the global manifest ' + 'repository: {} Resolve these changes and attempt your' + ' operation again.') +SINGLE_MAN_REPO_NOT_CFG_BRANCH = ('The current active branch, {}, is not the ' + 'specified branch for global manifst +repository: {}') SINGLE_MAN_REPO_CHECKOUT_CFG_BRANCH = 'Checking out the specified branch: {} prior to syncing' +SINGLE_MAN_REPO_MOVED = '{}{}WARNING:{}{} The global manifest +repository has moved. Backing up previous global manifest repository +to: {{}}{}\n'.format(Style.BRIGHT, Fore.RED, Style.RESET_ALL, Fore.RED, +Style.RESET_ALL) \ No newline at end of file diff --git a/edkrepo/common/workspace_maitenance/manifest_repos_maitenance.py b/edkrepo/common/workspace_maitenance/manifest_repos_maitenance.py new file mode 100644 index 000..8944492 --- /dev/null +++ b/edkrepo/common/workspace_maitenance/manifest_repos_maitenance.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +# +## @file +# manifest_repos_mgmt.py +# +# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent # + +import os +import traceback +import shutil + +import git +from git import Repo + +import edkrepo.config.config_factory as cfg from +edkrepo.common.edkrepo_exception import +EdkrepoUncommitedChangesException from edkrepo.common.progress_handler +import GitProgressHandler import +edkrepo.common.workspace_maitenance.humble.manifest_repos_maitenance_hu +mble as humble from +edkrepo.common.workspace_maitenance.workspace_maitenance import +generate_name_for_obsolete_backup + + +def pull_single_manifest_repo(url, branch, local_path, reset_hard=False): +''' +Clones or syncs a single global manifest repository as defined in either +the edkrepo.cfg or the edkrepo_user.cfg +''' +# If a relative path is used join to the edkrepo global data directory path +if not os.path.isabs(local_path): +local_path = os.path.join(cfg.get_edkrepo_global_data_directory(), local_path) +# Clone the repository if it does not exist locally +if not os.path.exists(local_path): +print(humble.CLONE_SINGLE_MAN_REPO.format(local_path, url)) +repo = Repo.clone_from(url, local_path, progress=GitProgressHandler(), branch=branch) +# Sync the repository if it exists locally +else: +repo = Repo(local_path) +if url in repo.remotes['origin'].urls: +if repo.is_dirty(untracked_files=True) and not reset_hard: +raise EdkrepoUncommitedChangesException(humble.SINGLE_MAN_REPO_DIRTY.format(local_path)) +elif repo.is_dirty(untracked_files=True) and reset_hard
Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Add missing import definition
Reviewed-by: Prince Agyeman -Original Message- From: Desimone, Ashley E Sent: Thursday, March 26, 2020 2:26 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barkelew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Add missing import definition Add the definition of PIN_FILE_HELP to checkout_pin_args.py to fix import error. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/commands/arguments/checkout_pin_args.py | 1 + 1 file changed, 1 insertion(+) diff --git a/edkrepo/commands/arguments/checkout_pin_args.py b/edkrepo/commands/arguments/checkout_pin_args.py index abd01b3..6020145 100644 --- a/edkrepo/commands/arguments/checkout_pin_args.py +++ b/edkrepo/commands/arguments/checkout_pin_args.py @@ -9,3 +9,4 @@ COMMAND_DESCRIPTION = ('Checks out the revisions described in a PIN file in ' 'an existing workpace of the same project') +PIN_FILE_HELP = ('The name of the pin file to checkout.') -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#56424): https://edk2.groups.io/g/devel/message/56424 Mute This Topic: https://groups.io/mt/72574577/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms] [PATCH 1/2] CoffeelakeSiliconPkg: Add Missing GUID
Hi Chasel, No specific BZ was filed for the missing GUID issue, though reported on this mailing list. Thanks Prince -Original Message- From: devel@edk2.groups.io On Behalf Of Chiu, Chasel Sent: Wednesday, February 26, 2020 1:16 AM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Desimone, Nathaniel L Subject: Re: [edk2-devel] [edk2-platforms] [PATCH 1/2] CoffeelakeSiliconPkg: Add Missing GUID Please add BZ in commit message, with this update: Reviewed-by: Chasel Chiu > -Original Message- > From: Agyeman, Prince > Sent: Wednesday, February 26, 2020 8:59 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > > Subject: [edk2-platforms] [PATCH 1/2] CoffeelakeSiliconPkg: Add > Missing GUID > > Added missing GUID gEfiMemoryTypeInformationGuid to > PeiPolicyUpdateLib.inf to fix VS2017 build issue > > Cc: Chasel Chiu > Cc: Nate DeSimone > > Signed-off-by: Prince Agyeman > --- > .../Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 1 + > 1 file changed, 1 insertion(+) > > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdat > eLi > b/PeiPolicyUpdateLib.inf > b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdat > eLi > b/PeiPolicyUpdateLib.inf > index e95c1b15c5..478e2d0512 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdat > eLi > b/PeiPolicyUpdateLib.inf > +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyU > +++ pd > +++ ateLib/PeiPolicyUpdateLib.inf > @@ -271,3 +271,4 @@ > [Guids] >gTianoLogoGuid## CONSUMES >gSiConfigGuid ## CONSUMES > + gEfiMemoryTypeInformationGuid ## CONSUMES > -- > 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54891): https://edk2.groups.io/g/devel/message/54891 Mute This Topic: https://groups.io/mt/71545949/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 1/2] CoffeelakeSiliconPkg: Add Missing GUID
Added missing GUID gEfiMemoryTypeInformationGuid to PeiPolicyUpdateLib.inf to fix VS2017 build issue Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf index e95c1b15c5..478e2d0512 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf @@ -271,3 +271,4 @@ [Guids] gTianoLogoGuid## CONSUMES gSiConfigGuid ## CONSUMES + gEfiMemoryTypeInformationGuid ## CONSUMES -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54826): https://edk2.groups.io/g/devel/message/54826 Mute This Topic: https://groups.io/mt/71545949/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 0/2] Add VS2017 Support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2408 The patch series add VS2017 build support to the edk2-plaforms/Intel boards Cc: Chasel Chiu Cc: Nate DeSimone Prince Agyeman (2): CoffeelakeSiliconPkg: Add Missing GUID CoffeelakeSiliconPkg: Add missing library .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 1 + .../Pch/Include/Library/GbeMdiLib.h | 53 ++- .../Pch/Include/Register/PchRegsLan.h | 14 +- .../Library/PeiDxeSmmGbeMdiLib/GbeMdiLib.c| 391 ++ .../PeiDxeSmmGbeMdiLib/PeiDxeSmmGbeMdiLib.inf | 32 ++ .../Pch/PchInit/Smm/PchInitSmm.inf| 1 + .../CoffeelakeSiliconPkg/SiPkgCommonLib.dsc | 4 +- 7 files changed, 493 insertions(+), 3 deletions(-) create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiDxeSmmGbeMdiLib/GbeMdiLib.c create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiDxeSmmGbeMdiLib/PeiDxeSmmGbeMdiLib.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54825): https://edk2.groups.io/g/devel/message/54825 Mute This Topic: https://groups.io/mt/71545948/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 2/2] CoffeelakeSiliconPkg: Add Missing Library
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2408 Added GbeMdiLib implementation and added additional registers definitions needed by GbeMdilib. This fixes the linker errors seen during VS2017 builds Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Pch/Include/Library/GbeMdiLib.h | 53 ++- .../Pch/Include/Register/PchRegsLan.h | 14 +- .../Library/PeiDxeSmmGbeMdiLib/GbeMdiLib.c| 391 ++ .../PeiDxeSmmGbeMdiLib/PeiDxeSmmGbeMdiLib.inf | 32 ++ .../Pch/PchInit/Smm/PchInitSmm.inf| 1 + .../CoffeelakeSiliconPkg/SiPkgCommonLib.dsc | 4 +- 6 files changed, 492 insertions(+), 3 deletions(-) create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiDxeSmmGbeMdiLib/GbeMdiLib.c create mode 100644 Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiDxeSmmGbeMdiLib/PeiDxeSmmGbeMdiLib.inf diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Library/GbeMdiLib.h b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Library/GbeMdiLib.h index a6ce032eba..280dee411f 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Library/GbeMdiLib.h +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Library/GbeMdiLib.h @@ -21,7 +21,7 @@ - Registers / bits of new devices introduced in a PCH generation will be just named as "_PCH_" without [generation_name] inserted. - Copyright (c) 2019 Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -29,7 +29,35 @@ #ifndef _GBE_MDI_LIB_H_ #define _GBE_MDI_LIB_H_ + +#define GBE_MAX_LOOP_TIME 4000 +#define GBE_ACQUIRE_MDIO_DELAY 50 +#define GBE_MDI_SET_PAGE_DELAY 4000 // 4 mSec delay after setting page + + +// +// Custom Mode Control PHY Address 01, Page 769, Register 16 +// +#define R_PHY_MDI_PAGE_769_REGISETER_16_CMC0x0010 +// +// Custom Mode Control +// Page 769, Register 16, BIT 10 +// 0 - normal MDIO frequency access +// 1 - reduced MDIO frequency access (slow mdio) +// required for read during cable disconnect +// +#define B_PHY_MDI_PAGE_769_REGISETER_16_CMC_MDIO_FREQ_ACCESSBIT10 + // +// LAN PHY MDI settings +// +#define B_PHY_MDI_READYBIT28 +#define B_PHY_MDI_READ BIT27 +#define B_PHY_MDI_WRITEBIT26 +// +// PHY SPECIFIC registers +// +#define B_PHY_MDI_PHY_ADDRESS_02 BIT22 // // PHY GENERAL registers // Registers 0 to 15 are defined by the specification @@ -37,8 +65,22 @@ // #define B_PHY_MDI_PHY_ADDRESS_01 BIT21 #define B_PHY_MDI_PHY_ADDRESS_MASK(BIT25 | BIT24 | BIT23 | BIT22 | BIT21) +// +// PHY Identifier Register 2 +// Bits [15:10] - PHY ID Number - The PHY identifier composed of bits 3 through 18 +// of the Organizationally Unique Identifier (OUI) +// Bits [9:4] - Device Model Number +// Bits [3:0] - Device Revision Number +// +#define R_PHY_MDI_GENEREAL_REGISTER_03_PHY_IDENTIFIER_2 0x0003 + #define MDI_REG_SHIFT(x) (x << 16) +#define B_PHY_MDI_PHY_REGISTER_MASK (BIT20 | BIT19 | BIT18 | BIT17 | BIT16) +#define R_PHY_MDI_PHY_REG_SET_ADDRESS 0x0011 // Used after new page setting #define R_PHY_MDI_PHY_REG_DATA_READ_WRITE 0x0012 +#define R_PHY_MDI_PHY_REG_SET_PAGE0x001F + +// // LAN PHY MDI registers and bits // @@ -131,6 +173,7 @@ **/ VOID +EFIAPI GbeMdiForceMACtoSMB ( IN UINT32 GbeBar ); @@ -144,6 +187,7 @@ GbeMdiForceMACtoSMB ( @retval EFI_TIMEOUT **/ EFI_STATUS +EFIAPI GbeMdiWaitReady ( IN UINT32 GbeBar ); @@ -160,6 +204,7 @@ GbeMdiWaitReady ( @retval EFI_TIMEOUT **/ EFI_STATUS +EFIAPI GbeMdiAcquireMdio ( IN UINT32 GbeBar ); @@ -170,6 +215,7 @@ GbeMdiAcquireMdio ( @param [in] GbeBar GbE MMIO space **/ VOID +EFIAPI GbeMdiReleaseMdio ( IN UINT32 GbeBar ); @@ -186,6 +232,7 @@ GbeMdiReleaseMdio ( @retval EFI_DEVICE_ERROR Returned if both attermps of setting page failed **/ EFI_STATUS +EFIAPI GbeMdiSetPage ( IN UINT32 GbeBar, IN UINT32 Page @@ -200,6 +247,7 @@ GbeMdiSetPage ( @return EFI_STATUS **/ EFI_STATUS +EFIAPI GbeMdiSetRegister ( IN UINT32 GbeBar, IN UINT32 Register @@ -219,6 +267,7 @@ GbeMdiSetRegister ( @retval EFI_INVALID_PARAMETER If Phy Address or Register validaton failed **/ EFI_STATUS +EFIAPI GbeMdiRead ( IN UINT32 GbeBar, IN UINT32 PhyAddress, @@ -239,6 +288,7 @@ GbeMdiRead ( @retval EFI_INVALID_PARAMETER If Phy Address or Register validaton failed **/ EFI_STATUS +EFIAPI GbeMdiWrite ( IN UINT32 GbeBar, IN UINT32 PhyAddress, @@ -257,6 +307,7 @@ GbeMdiWrite ( @return EFI_INVALID_PARAMETER When GbeBar is incorrect **/ EFI_STATUS +EFIAPI GbeMdiGetLanPhyRevision ( IN
[edk2-devel] [edk2-platforms] [PATCH v4 0/4] Add Initial Support for UP Xtreme
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2191 This patch series add the initial Up Xtreme board support to the WhiskeylakeOpenBoardPkg V4 Changes: - Removed MTRR configuration function - Rearranged FVs to improve boot time V3 Changes: - Updated copyright year - Added function to increase cache code size - Uncommmented the GPIO group tier configuration - Updated SPD table - Updated Readme.md reflect the Current Status V2 Changes: - Updated Readme.md to reflect the Current Status Current Status: 1. Basic boot to windows 10 (Home) and Ubuntu 18.04 from NVMe * UpXtreme: - Intel(R) Core(TM) i3-8145UE CPU @ 2.20GHz - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz - Intel(R) Celeron(R) CPU 4305UE 2. USB mass storage devices not detected in UEFI shell 3. Current builds on VS2015 Cc: Chasel Chiu Cc: Nate DeSimone Prince Agyeman (4): WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit WhiskeylakeOpenBoardPkg: Add UpXtreme board ID WhiskeylakeOpenBoardPkg/UpXtreme: Add Includes and Libraries WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files Platform/Intel/Readme.md | 19 +- .../Include/PlatformBoardId.h |6 +- .../PeiFspMiscUpdUpdateLib.c | 110 + .../PeiFspPolicyUpdateLib.c | 126 + .../PeiMiscPolicyUpdate.h | 25 + .../PeiPchPolicyUpdate.c | 300 ++ .../PeiPchPolicyUpdate.h | 28 + .../PeiPchPolicyUpdatePreMem.c| 39 + .../PeiSaPolicyUpdate.c | 158 + .../PeiSaPolicyUpdate.h | 45 + .../PeiSaPolicyUpdatePreMem.c | 124 + .../PeiSiliconPolicyUpdateLibFsp.inf | 144 + .../FspWrapperPlatformSecLib.c| 186 + .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 + .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h| 42 + .../Ia32/PeiCoreEntry.nasm| 130 + .../Ia32/SecEntry.nasm| 361 ++ .../Ia32/Stack.nasm | 72 + .../PlatformInit.c| 47 + .../SecFspWrapperPlatformSecLib.inf | 105 + .../SecGetPerformance.c | 89 + .../SecPlatformInformation.c | 78 + .../SecRamInitData.c | 55 + .../SecTempRamDone.c | 93 + .../UpXtreme/Include/Fdf/FlashMapInclude.fdf | 50 + .../Include/Library/PeiPlatformHookLib.h | 131 + .../UpXtreme/Include/Library/PeiPlatformLib.h | 38 + .../UpXtreme/Include/PlatformBoardConfig.h| 103 + .../UpXtreme/Include/PlatformInfo.h | 42 + .../Library/BaseFuncLib/BaseFuncLib.inf | 33 + .../UpXtreme/Library/BaseFuncLib/Gop.c| 38 + .../BaseGpioCheckConflictLib.c| 137 + .../BaseGpioCheckConflictLib.inf | 35 + .../BaseGpioCheckConflictLibNull.c| 37 + .../BaseGpioCheckConflictLibNull.inf | 32 + .../BasePlatformHookLib/BasePlatformHookLib.c | 143 + .../BasePlatformHookLib.inf | 45 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.c | 63 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.inf| 50 + .../SmmMultiBoardAcpiSupportLib.c | 82 + .../SmmMultiBoardAcpiSupportLib.inf | 50 + .../BoardAcpiLib/SmmSiliconAcpiEnableLib.c| 170 + .../BoardAcpiLib/SmmUpXtremeAcpiEnableLib.c | 40 + .../BoardInitLib/BoardFuncInitPreMem.c| 25 + .../Library/BoardInitLib/BoardInitLib.h | 20 + .../BoardInitLib/BoardPchInitPreMemLib.c | 375 ++ .../BoardInitLib/BoardSaConfigPreMem.h| 79 + .../BoardInitLib/BoardSaInitPreMemLib.c | 298 ++ .../Library/BoardInitLib/GpioTableDefault.c | 213 ++ .../Library/BoardInitLib/GpioTableUpXtreme.c | 217 ++ .../Library/BoardInitLib/PchHdaVerbTables.h | 3014 + .../BoardInitLib/PeiBoardInitPostMemLib.c | 40 + .../BoardInitLib/PeiBoardInitPostMemLib.inf | 57 + .../BoardInitLib/PeiBoardInitPreMemLib.c | 106 + .../BoardInitLib/PeiBoardInitPreMemLib.inf| 124 + .../PeiMultiBoardInitPostMemLib.c | 41 + .../PeiMultiBoardInitPostMemLib.inf | 202 ++ .../BoardInitLib/PeiMultiBoardInitPreMemLib.c | 83 + .../PeiMultiBoardInitPreMemLib.inf| 308 ++ .../Library/BoardInitLib/PeiUpXtremeDetect.c | 192 ++ .../BoardInitLib/PeiUpXtremeInitPostMemLib.c | 416 +++ .../BoardInitLib/PeiUpXtremeInitPreMemLib.c | 625 .../BoardInitLib/UpXtremeHsioPtssTables.c | 32 + .../Library/BoardInitLib/UpXtremeInit.h | 44 + .../Library/BoardInitLib/UpXtremeSpdTable.c | 86 + .../DxePolicyBoardConfig.h| 19 + .../DxePolicyBoardConfigLib.inf | 45 + .../DxeSaPolicyBoardConfig.c | 36 +
[edk2-devel] [edk2-platforms] [PATCH v4 2/4] WhiskeylakeOpenBoardPkg: Add UpXtreme board ID
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h index 3545b2a05c..a8ed470bcc 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h @@ -1,8 +1,8 @@ /** @file -Defines Platform BoardIds + Defines Whiskey Lake Platform Board IDs - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -21,9 +21,11 @@ Defines Platform BoardIds #define TypeTrad0x1 #define TypeUltUlx 0x2 +#define BoardIdUpXtreme 0x10 #define BoardIdWhiskeyLakeRvp 0x60 #define BoardIdUnknown1 0x #endif + -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54815): https://edk2.groups.io/g/devel/message/54815 Mute This Topic: https://groups.io/mt/71545526/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v4 1/4] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit
Removes BoardFuncInit related functionality in WhiskeylakeURvp. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Library/BoardInitLib/BoardFunc.c | 19 .../Library/BoardInitLib/BoardFunc.h | 20 - .../Library/BoardInitLib/BoardFuncInit.c | 26 - .../BoardInitLib/BoardFuncInitPreMem.c| 29 +-- .../BoardInitLib/BoardPchInitPreMemLib.c | 3 +- .../PeiMultiBoardInitPostMemLib.inf | 4 --- .../PeiWhiskeylakeURvpInitPostMemLib.c| 8 - .../PeiWhiskeylakeURvpInitPreMemLib.c | 10 +-- 8 files changed, 9 insertions(+), 110 deletions(-) delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c deleted file mode 100644 index 7a2fed9904..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c +++ /dev/null @@ -1,19 +0,0 @@ -/** @file - Board's PCD function hook. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ) -{ - return EFI_SUCCESS; -} - - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h deleted file mode 100644 index 9e0ff8d033..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h +++ /dev/null @@ -1,20 +0,0 @@ -/** @file - Header file for Board Hook function intance. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef _BOARD_FUNC_H_ -#define _BOARD_FUNC_H_ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ); - -#endif // _BOARD_FUNC_H_ - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c deleted file mode 100644 index b8c69166ed..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - Source code for the board configuration init function in Post Memory init phase. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "BoardFunc.h" - -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInit ( - IN UINT16 BoardId -) -{ - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c index 1944a02bf1..06ff64da8d 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c @@ -2,39 +2,24 @@ Source code for the board configuration init function in Post Memory init phase. - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include + // // Null function for nothing GOP VBT update. // VOID -GopVbtSpecificUpdateNull( +GopVbtSpecificUpdateNull ( IN CHILD_STRUCT **ChildStructPtr -); + ); + // // for CFL U DDR4 // VOID -CflUDdr4GopVbtSpecificUpdate( +CflUDdr4GopVbtSpecificUpdate ( IN CHILD_STRUCT **ChildStructPtr -); -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInitPreMem ( - IN UINT16 BoardId - ) -{ - - return EFI_SUCCESS; -} - - + ); diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c index 5305ec7f7c..1f778c4f7e 100644 ---
[edk2-devel] [edk2-platforms] [PATCH v3 0/4] Add Initial Support for UP Xtreme
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2191 This patch series add the initial Up Xtreme board support to the WhiskeylakeOpenBoardPkg V3 Changes: - Updated copyright year - Added function to increase cache code size - Uncommmented the GPIO group tier configuration - Updated SPD table - Updated Readme.md reflect the Current Status V2 Changes: - Updated Readme.md to reflect the Current Status Current Status: 1. Basic boot to windows 10 (Home) and Ubuntu 18.04 from NVMe * UpXtreme: - Intel(R) Core(TM) i3-8145UE CPU @ 2.20GHz - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 3. USB mass storage devices not detected in UEFI shell Cc: Chasel Chiu Cc: Nate DeSimone Prince Agyeman (4): WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit WhiskeylakeOpenBoardPkg: Add UpXtreme board ID WhiskeylakeOpenBoardPkg/UpXtreme: Add Includes and Libraries WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files Platform/Intel/Readme.md | 19 +- .../Include/PlatformBoardId.h |5 +- .../PeiFspMiscUpdUpdateLib.c | 110 + .../PeiFspPolicyUpdateLib.c | 126 + .../PeiMiscPolicyUpdate.h | 25 + .../PeiPchPolicyUpdate.c | 300 ++ .../PeiPchPolicyUpdate.h | 28 + .../PeiPchPolicyUpdatePreMem.c| 39 + .../PeiSaPolicyUpdate.c | 158 + .../PeiSaPolicyUpdate.h | 45 + .../PeiSaPolicyUpdatePreMem.c | 124 + .../PeiSiliconPolicyUpdateLibFsp.inf | 144 + .../FspWrapperPlatformSecLib.c| 186 + .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 + .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h| 42 + .../Ia32/PeiCoreEntry.nasm| 130 + .../Ia32/SecEntry.nasm| 361 ++ .../Ia32/Stack.nasm | 72 + .../PlatformInit.c| 47 + .../SecFspWrapperPlatformSecLib.inf | 105 + .../SecGetPerformance.c | 89 + .../SecPlatformInformation.c | 78 + .../SecRamInitData.c | 55 + .../SecTempRamDone.c | 93 + .../UpXtreme/Include/Fdf/FlashMapInclude.fdf | 51 + .../Include/Library/PeiPlatformHookLib.h | 131 + .../UpXtreme/Include/Library/PeiPlatformLib.h | 38 + .../UpXtreme/Include/PlatformBoardConfig.h| 103 + .../UpXtreme/Include/PlatformInfo.h | 42 + .../Library/BaseFuncLib/BaseFuncLib.inf | 33 + .../UpXtreme/Library/BaseFuncLib/Gop.c| 38 + .../BaseGpioCheckConflictLib.c| 137 + .../BaseGpioCheckConflictLib.inf | 35 + .../BaseGpioCheckConflictLibNull.c| 37 + .../BaseGpioCheckConflictLibNull.inf | 32 + .../BasePlatformHookLib/BasePlatformHookLib.c | 143 + .../BasePlatformHookLib.inf | 45 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.c | 63 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.inf| 50 + .../SmmMultiBoardAcpiSupportLib.c | 82 + .../SmmMultiBoardAcpiSupportLib.inf | 50 + .../BoardAcpiLib/SmmSiliconAcpiEnableLib.c| 170 + .../BoardAcpiLib/SmmUpXtremeAcpiEnableLib.c | 40 + .../BoardInitLib/BoardFuncInitPreMem.c| 25 + .../Library/BoardInitLib/BoardInitLib.h | 20 + .../BoardInitLib/BoardPchInitPreMemLib.c | 375 ++ .../BoardInitLib/BoardSaConfigPreMem.h| 79 + .../BoardInitLib/BoardSaInitPreMemLib.c | 298 ++ .../Library/BoardInitLib/GpioTableDefault.c | 213 ++ .../Library/BoardInitLib/GpioTableUpXtreme.c | 217 ++ .../Library/BoardInitLib/PchHdaVerbTables.h | 3014 + .../BoardInitLib/PeiBoardInitPostMemLib.c | 40 + .../BoardInitLib/PeiBoardInitPostMemLib.inf | 57 + .../BoardInitLib/PeiBoardInitPreMemLib.c | 106 + .../BoardInitLib/PeiBoardInitPreMemLib.inf| 124 + .../PeiMultiBoardInitPostMemLib.c | 41 + .../PeiMultiBoardInitPostMemLib.inf | 202 ++ .../BoardInitLib/PeiMultiBoardInitPreMemLib.c | 83 + .../PeiMultiBoardInitPreMemLib.inf| 308 ++ .../Library/BoardInitLib/PeiUpXtremeDetect.c | 192 ++ .../BoardInitLib/PeiUpXtremeInitPostMemLib.c | 416 +++ .../BoardInitLib/PeiUpXtremeInitPreMemLib.c | 659 .../BoardInitLib/UpXtremeHsioPtssTables.c | 32 + .../Library/BoardInitLib/UpXtremeInit.h | 44 + .../Library/BoardInitLib/UpXtremeSpdTable.c | 86 + .../DxePolicyBoardConfig.h| 19 + .../DxePolicyBoardConfigLib.inf | 45 + .../DxeSaPolicyBoardConfig.c | 36 + .../PeiPlatformHookLib/PeiPlatformHookLib.c | 298 ++ .../PeiPlatformHookLib/PeiPlatformHookLib.inf | 95 + .../PeiCpuPolicyBoardConfig.c | 49 +
[edk2-devel] [edk2-platforms] [PATCH v3 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Adds the DSC and build files necessary to build the UpXtreme board instance. Key files = * build_config.cfg - Board-specific build configuration file. * OpenBoardPkg.dsc - The UpXtreme board description file. * OpenBoardPkgPcd.dsc - Used for other PCD customization. * OpenBoardPkg.fdf - The UpXtreme board flash file. * OpenBoardPkgBuildOption.dsc - Sets build options Based on PCD values. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/Readme.md | 19 +- .../UpXtreme/OpenBoardPkg.dsc | 448 +++ .../UpXtreme/OpenBoardPkg.fdf | 708 ++ .../UpXtreme/OpenBoardPkgBuildOption.dsc | 154 .../UpXtreme/OpenBoardPkgPcd.dsc | 409 ++ .../UpXtreme/build_config.cfg | 35 + Platform/Intel/build.cfg | 3 +- 7 files changed, 1773 insertions(+), 3 deletions(-) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgBuildOption.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/build_config.cfg diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index 02d9517d19..4f68ed9737 100644 --- a/Platform/Intel/Readme.md +++ b/Platform/Intel/Readme.md @@ -59,6 +59,12 @@ A UEFI firmware implementation using MinPlatformPkg is constructed using the fol ### **Supported Hardware** + AAEON + +| Machine Name | Supported Chipsets | BoardPkg | Board Name | +||--|| +| UP Xtreme | Whiskey Lake | WhiskeylakeOpenBoardPkg | UpXtreme | + Intel ***Intel Reference and Validation Platform*** @@ -233,6 +239,9 @@ return back to the minimum platform caller. | || build settings, environment variables. | || | ||--WhiskeylakeOpenBoardPkg + | || |--UpXtreme + | || |---build_config.cfg: UpXtreme specific build + | || settings environment variables. | || |--WhiskeylakeURvp | || |---build_config.cfg: WhiskeylakeURvp specific build | || settings environment variables. @@ -254,8 +263,14 @@ return back to the minimum platform caller. 1. This firmware project has only been tested booting to Microsoft Windows 10 x64 and Ubuntu 17.10 with AHCI mode. **WhiskeylakeOpenBoardPkg** -1. This firmware project has only been tested booting to Microsoft Windows 10 x64 with AHCI mode and Integrated Graphic +1. This firmware project has mainly been tested booting to Microsoft Windows 10 x64 with AHCI mode and Integrated Graphic Device. +2. UP Xtreme boards might hang during Windows 10 boot. +3. The UP Xtreme boards below boot to x64 windows 10 home edition and Ubuntu 18.04 + * UP Xtreme Intel(R) Core(TM) i3-8145UE CPU @ 2.20GHz with 8GB RAM + * UP Xtreme Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz with 16GB RAM + * UP Xtreme Intel(R) Core(TM) i7-8665UE CPU @ 1.70GHz with 16GB RAM + * UP Xtreme Intel(R) Celeron(R) CPU 4305UE @ 2.00GHz with 4GB RAM ### **Package Builds** @@ -293,5 +308,5 @@ If you would like to help but are not sure where to start some areas currently i * Adding board ports for more motherboards and systems * Adding Clang support -Please feel free to contact Michael Kubacki (michael.a.kubacki at intel.com) and Isaac Oram (isaac.w.oram at intel.com) +Please feel free to contact Isaac Oram (isaac.w.oram at intel.com) if you would like to discuss contribution ideas. diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc new file mode 100644 index 00..2ab9cb03ea --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc @@ -0,0 +1,448 @@ +## @file +# The main build description file for the UpXtreme board. +# +# Copyright (c) 2020, Intel Corporation. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + DEFINE PLATFORM_PACKAGE = MinPlatformPkg + DEFINE
[edk2-devel] [edk2-platforms] [PATCH v3 2/4] WhiskeylakeOpenBoardPkg: Add UpXtreme board ID
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h index 3545b2a05c..4e8288b1f1 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h @@ -1,8 +1,8 @@ /** @file -Defines Platform BoardIds + Defines Whiskey Lake Platform Board IDs - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -21,6 +21,7 @@ Defines Platform BoardIds #define TypeTrad0x1 #define TypeUltUlx 0x2 +#define BoardIdUpXtreme 0x10 #define BoardIdWhiskeyLakeRvp 0x60 #define BoardIdUnknown1 0x -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54687): https://edk2.groups.io/g/devel/message/54687 Mute This Topic: https://groups.io/mt/71441916/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v3 1/4] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit
Removes BoardFuncInit related functionality in WhiskeylakeURvp. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Library/BoardInitLib/BoardFunc.c | 19 .../Library/BoardInitLib/BoardFunc.h | 20 - .../Library/BoardInitLib/BoardFuncInit.c | 26 - .../BoardInitLib/BoardFuncInitPreMem.c| 29 +-- .../BoardInitLib/BoardPchInitPreMemLib.c | 3 +- .../PeiMultiBoardInitPostMemLib.inf | 4 --- .../PeiWhiskeylakeURvpInitPostMemLib.c| 8 - .../PeiWhiskeylakeURvpInitPreMemLib.c | 10 +-- 8 files changed, 9 insertions(+), 110 deletions(-) delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c deleted file mode 100644 index 7a2fed9904..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c +++ /dev/null @@ -1,19 +0,0 @@ -/** @file - Board's PCD function hook. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ) -{ - return EFI_SUCCESS; -} - - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h deleted file mode 100644 index 9e0ff8d033..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h +++ /dev/null @@ -1,20 +0,0 @@ -/** @file - Header file for Board Hook function intance. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef _BOARD_FUNC_H_ -#define _BOARD_FUNC_H_ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ); - -#endif // _BOARD_FUNC_H_ - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c deleted file mode 100644 index b8c69166ed..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - Source code for the board configuration init function in Post Memory init phase. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "BoardFunc.h" - -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInit ( - IN UINT16 BoardId -) -{ - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c index 1944a02bf1..06ff64da8d 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c @@ -2,39 +2,24 @@ Source code for the board configuration init function in Post Memory init phase. - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include + // // Null function for nothing GOP VBT update. // VOID -GopVbtSpecificUpdateNull( +GopVbtSpecificUpdateNull ( IN CHILD_STRUCT **ChildStructPtr -); + ); + // // for CFL U DDR4 // VOID -CflUDdr4GopVbtSpecificUpdate( +CflUDdr4GopVbtSpecificUpdate ( IN CHILD_STRUCT **ChildStructPtr -); -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInitPreMem ( - IN UINT16 BoardId - ) -{ - - return EFI_SUCCESS; -} - - + ); diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c index 5305ec7f7c..1f778c4f7e 100644 ---
Re: [edk2-devel] [edk2-platforms] Building a platform: which edk2 revision to choose?
Hi Felix, Try building with VS2015. There's a known issue with VS2017 builds as documented here https://bugzilla.tianocore.org/show_bug.cgi?id=2408 Thanks Prince From: devel@edk2.groups.io On Behalf Of Felix Polyudov Sent: Friday, February 14, 2020 8:01 AM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Kubacki, Michael A ; Gao, Liming Subject: Re: [edk2-devel] [edk2-platforms] Building a platform: which edk2 revision to choose? I'm using the latest version for all the repositories: ed2 : f1d78c489a399 edk2-platofrms: 41c1d9ba33046637e edk2-non-osi: c10580aea501ee FSP : e6177bb3bb57747d I'm building the project using command "build_bios.py -p WhiskeylakeURvp -t VS2017 -r" Here is the error I'm getting: PeiPolicyUpdateLib.lib(PeiSaPolicyUpdatePreMem.obj) : error LNK2001: unresolved external symbol _gEfiMemoryTypeInformationGuid From: Agyeman, Prince [mailto:prince.agye...@intel.com] Sent: Thursday, February 13, 2020 8:16 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Felix Polyudov Cc: Kubacki, Michael A Subject: RE: [edk2-platforms] Building a platform: which edk2 revision to choose? Hi Felix, Can you include a log or details of the build error you're seeing ? Also what are the FSP , edk2-non-osi, edk2-platform and edk2 commit IDs you are using ? Thanks Prince Prince From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> mailto:devel@edk2.groups.io>> On Behalf Of Felix Polyudov Sent: Thursday, February 13, 2020 3:11 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Kubacki, Michael A mailto:michael.a.kuba...@intel.com>> Subject: [edk2-devel] [edk2-platforms] Building a platform: which edk2 revision to choose? I'm trying to build one of the board packages from the edk2-platform repository. (I'm building WhiskeylakeOpenBoardPkg, but I suspect the problem exists for most of the board packages). The build process fails (I'm using build instructions from https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel). I suspect this is happening because tip of the board package is not compatible with tip of the edk2 repo. Is there a defined way for me to figure out the latest working revisions of the edk2 repo (or the other 2 repos that are part of the project) that I should use? Thanks Felix P Please consider the environment before printing this email 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. P Please consider the environment before printing this email 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. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54460): https://edk2.groups.io/g/devel/message/54460 Mute This Topic: https://groups.io/mt/71255367/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms] Building a platform: which edk2 revision to choose?
Hi Felix, Can you include a log or details of the build error you're seeing ? Also what are the FSP , edk2-non-osi, edk2-platform and edk2 commit IDs you are using ? Thanks Prince Prince From: devel@edk2.groups.io On Behalf Of Felix Polyudov Sent: Thursday, February 13, 2020 3:11 PM To: devel@edk2.groups.io Cc: Kubacki, Michael A Subject: [edk2-devel] [edk2-platforms] Building a platform: which edk2 revision to choose? I'm trying to build one of the board packages from the edk2-platform repository. (I'm building WhiskeylakeOpenBoardPkg, but I suspect the problem exists for most of the board packages). The build process fails (I'm using build instructions from https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel). I suspect this is happening because tip of the board package is not compatible with tip of the edk2 repo. Is there a defined way for me to figure out the latest working revisions of the edk2 repo (or the other 2 repos that are part of the project) that I should use? Thanks Felix P Please consider the environment before printing this email 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. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54400): https://edk2.groups.io/g/devel/message/54400 Mute This Topic: https://groups.io/mt/71255367/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms] [PATCH 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files
Thanks Chasel, I have updated the readme.md in my v2 patch set and the BZ with the current status Prince -Original Message- From: Chiu, Chasel Sent: Thursday, February 13, 2020 12:22 AM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Desimone, Nathaniel L Subject: RE: [edk2-platforms] [PATCH 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files Hi Prince, Please see my comments inline. Thanks, Chasel > -Original Message- > From: Agyeman, Prince > Sent: Thursday, February 13, 2020 9:38 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > > Subject: [edk2-platforms] [PATCH 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: > Add DSC and build files > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 > > Adds the DSC and build files necessary to build the > UpXtreme board instance. > > Key files > = > * build_config.cfg - Board-specific build configuration file. > * OpenBoardPkg.dsc - The UpXtreme board description file. > * OpenBoardPkgPcd.dsc - Used for other PCD customization. > * OpenBoardPkg.fdf - The UpXtreme board flash file. > * OpenBoardPkgBuildOption.dsc - Sets build options Based > on PCD values. > > Co-authored-by: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone > Signed-off-by: Prince Agyeman > --- > Platform/Intel/Readme.md | 12 + > .../UpXtreme/OpenBoardPkg.dsc | 448 +++ > .../UpXtreme/OpenBoardPkg.fdf | 708 > ++ > .../UpXtreme/OpenBoardPkgBuildOption.dsc | 154 > .../UpXtreme/OpenBoardPkgPcd.dsc | 409 ++ > .../UpXtreme/build_config.cfg | 35 + > Platform/Intel/build.cfg | 1 + > 7 files changed, 1767 insertions(+) > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgBuildOpt > ion.dsc > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/build_config.cfg > > diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md > index 02d9517d19..81092633f7 100644 > --- a/Platform/Intel/Readme.md > +++ b/Platform/Intel/Readme.md > @@ -59,6 +59,12 @@ A UEFI firmware implementation using MinPlatformPkg > is constructed using the fol > > ### **Supported Hardware** > > + AAEON > + > +| Machine Name | Supported Chipsets > | BoardPkg | Board Name | > +|| > --|| > +| UP Xtreme | Whiskey Lake > | WhiskeylakeOpenBoardPkg | UpXtreme | > + > Intel > > ***Intel Reference and Validation Platform*** > @@ -233,6 +239,9 @@ return back to the minimum platform caller. >| || > build settings, environment variables. >| || >| ||--WhiskeylakeOpenBoardPkg > + | || |--UpXtreme > + | || |---build_config.cfg: > UpXtreme specific build > + | || > settings environment variables. >| || |--WhiskeylakeURvp >| || |---build_config.cfg: > WhiskeylakeURvp specific build >| || > settings environment variables. > @@ -256,6 +265,9 @@ return back to the minimum platform caller. > **WhiskeylakeOpenBoardPkg** > 1. This firmware project has only been tested booting to Microsoft Windows > 10 x64 with AHCI mode and Integrated Graphic > Device. > +2. UP Xtreme boards might hang during Windows 10 boot. > +3. Not all UP Xtreme boards are supported at this time, only the XXX model Basing on BZ, this XXX should be "SK Hynix memory", would you double check? > has been tested. Board-specific memory > + settings are needed to enable other models. > > ### **Package Builds** > > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc > b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc > new file mode 100644 > index 00..2ab9cb03ea > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc > @@ -0,0 +1,448 @@ > +## @file > +# The main build description file for the UpX
[edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add Initial Support for UP Xtreme
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2191 This patch series add the initial Up Xtreme board support to the WhiskeylakeOpenBoardPkg V2 Changes: - Updated Readme.md to reflect the Current Status Current Status: 1. Basic boot to windows 10 (Home) and Ubuntu 18.04 from NVMe * UpXtreme: - Intel(R) Core(TM) i3-8145UE CPU @ 2.20GHz - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 2. UpXtreme Intel(R) Celeron(R) CPU 4305UE @ 2.00GHz hangs during memory training 3. USB mass storage devices not detected in UEFI shell Prince Agyeman (4): WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit WhiskeylakeOpenBoardPkg: Add UpXtreme board ID WhiskeylakeOpenBoardPkg/UpXtreme: Add Includes and Libraries WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files Platform/Intel/Readme.md | 19 +- .../Include/PlatformBoardId.h |5 +- .../PeiFspMiscUpdUpdateLib.c | 110 + .../PeiFspPolicyUpdateLib.c | 126 + .../PeiMiscPolicyUpdate.h | 25 + .../PeiPchPolicyUpdate.c | 300 ++ .../PeiPchPolicyUpdate.h | 28 + .../PeiPchPolicyUpdatePreMem.c| 39 + .../PeiSaPolicyUpdate.c | 158 + .../PeiSaPolicyUpdate.h | 45 + .../PeiSaPolicyUpdatePreMem.c | 124 + .../PeiSiliconPolicyUpdateLibFsp.inf | 144 + .../FspWrapperPlatformSecLib.c| 186 + .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 40 + .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h| 42 + .../Ia32/PeiCoreEntry.nasm| 130 + .../Ia32/SecEntry.nasm| 361 ++ .../Ia32/Stack.nasm | 72 + .../PlatformInit.c| 47 + .../SecFspWrapperPlatformSecLib.inf | 105 + .../SecGetPerformance.c | 89 + .../SecPlatformInformation.c | 78 + .../SecRamInitData.c | 55 + .../SecTempRamDone.c | 93 + .../UpXtreme/Include/Fdf/FlashMapInclude.fdf | 51 + .../Include/Library/PeiPlatformHookLib.h | 131 + .../UpXtreme/Include/Library/PeiPlatformLib.h | 38 + .../UpXtreme/Include/PlatformBoardConfig.h| 103 + .../UpXtreme/Include/PlatformInfo.h | 42 + .../Library/BaseFuncLib/BaseFuncLib.inf | 33 + .../UpXtreme/Library/BaseFuncLib/Gop.c| 38 + .../BaseGpioCheckConflictLib.c| 137 + .../BaseGpioCheckConflictLib.inf | 35 + .../BaseGpioCheckConflictLibNull.c| 37 + .../BaseGpioCheckConflictLibNull.inf | 32 + .../BasePlatformHookLib/BasePlatformHookLib.c | 143 + .../BasePlatformHookLib.inf | 45 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.c | 63 + .../BoardAcpiLib/SmmBoardAcpiEnableLib.inf| 50 + .../SmmMultiBoardAcpiSupportLib.c | 82 + .../SmmMultiBoardAcpiSupportLib.inf | 50 + .../BoardAcpiLib/SmmSiliconAcpiEnableLib.c| 170 + .../BoardAcpiLib/SmmUpXtremeAcpiEnableLib.c | 40 + .../BoardInitLib/BoardFuncInitPreMem.c| 25 + .../Library/BoardInitLib/BoardInitLib.h | 20 + .../BoardInitLib/BoardPchInitPreMemLib.c | 383 +++ .../BoardInitLib/BoardSaConfigPreMem.h| 79 + .../BoardInitLib/BoardSaInitPreMemLib.c | 298 ++ .../Library/BoardInitLib/GpioTableDefault.c | 213 ++ .../Library/BoardInitLib/GpioTableUpXtreme.c | 217 ++ .../Library/BoardInitLib/PchHdaVerbTables.h | 3014 + .../BoardInitLib/PeiBoardInitPostMemLib.c | 40 + .../BoardInitLib/PeiBoardInitPostMemLib.inf | 57 + .../BoardInitLib/PeiBoardInitPreMemLib.c | 106 + .../BoardInitLib/PeiBoardInitPreMemLib.inf| 124 + .../PeiMultiBoardInitPostMemLib.c | 41 + .../PeiMultiBoardInitPostMemLib.inf | 202 ++ .../BoardInitLib/PeiMultiBoardInitPreMemLib.c | 83 + .../PeiMultiBoardInitPreMemLib.inf| 301 ++ .../Library/BoardInitLib/PeiUpXtremeDetect.c | 192 ++ .../BoardInitLib/PeiUpXtremeInitPostMemLib.c | 416 +++ .../BoardInitLib/PeiUpXtremeInitPreMemLib.c | 619 .../BoardInitLib/UpXtremeHsioPtssTables.c | 32 + .../Library/BoardInitLib/UpXtremeInit.h | 44 + .../Library/BoardInitLib/UpXtremeSpdTable.c | 87 + .../DxePolicyBoardConfig.h| 19 + .../DxePolicyBoardConfigLib.inf | 45 + .../DxeSaPolicyBoardConfig.c | 36 + .../PeiPlatformHookLib/PeiPlatformHookLib.c | 298 ++ .../PeiPlatformHookLib/PeiPlatformHookLib.inf | 95 + .../PeiCpuPolicyBoardConfig.c | 49 + .../PeiCpuPolicyBoardConfigPreMem.c | 29 + .../PeiMePolicyBoardConfig.c | 36 + .../PeiMePolicyBoardConfigPreMem.c| 37 +
[edk2-devel] [edk2-platforms] [PATCH v2 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Adds the DSC and build files necessary to build the UpXtreme board instance. Key files = * build_config.cfg - Board-specific build configuration file. * OpenBoardPkg.dsc - The UpXtreme board description file. * OpenBoardPkgPcd.dsc - Used for other PCD customization. * OpenBoardPkg.fdf - The UpXtreme board flash file. * OpenBoardPkgBuildOption.dsc - Sets build options Based on PCD values. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/Readme.md | 19 +- .../UpXtreme/OpenBoardPkg.dsc | 448 +++ .../UpXtreme/OpenBoardPkg.fdf | 708 ++ .../UpXtreme/OpenBoardPkgBuildOption.dsc | 154 .../UpXtreme/OpenBoardPkgPcd.dsc | 409 ++ .../UpXtreme/build_config.cfg | 35 + Platform/Intel/build.cfg | 1 + 7 files changed, 1772 insertions(+), 2 deletions(-) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgBuildOption.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/build_config.cfg diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index 02d9517d19..55cf02a8ca 100644 --- a/Platform/Intel/Readme.md +++ b/Platform/Intel/Readme.md @@ -59,6 +59,12 @@ A UEFI firmware implementation using MinPlatformPkg is constructed using the fol ### **Supported Hardware** + AAEON + +| Machine Name | Supported Chipsets | BoardPkg | Board Name | +||--|| +| UP Xtreme | Whiskey Lake | WhiskeylakeOpenBoardPkg | UpXtreme | + Intel ***Intel Reference and Validation Platform*** @@ -233,6 +239,9 @@ return back to the minimum platform caller. | || build settings, environment variables. | || | ||--WhiskeylakeOpenBoardPkg + | || |--UpXtreme + | || |---build_config.cfg: UpXtreme specific build + | || settings environment variables. | || |--WhiskeylakeURvp | || |---build_config.cfg: WhiskeylakeURvp specific build | || settings environment variables. @@ -254,8 +263,14 @@ return back to the minimum platform caller. 1. This firmware project has only been tested booting to Microsoft Windows 10 x64 and Ubuntu 17.10 with AHCI mode. **WhiskeylakeOpenBoardPkg** -1. This firmware project has only been tested booting to Microsoft Windows 10 x64 with AHCI mode and Integrated Graphic +1. This firmware project has mainly been tested booting to Microsoft Windows 10 x64 with AHCI mode and Integrated Graphic Device. +2. UP Xtreme boards might hang during Windows 10 boot. +3. Not all UP Xtreme boards are supported at this time. +* The model below boots to x64 windows 10 home edition and Ubuntu 18.04 + * Xtreme Intel(R) Core(TM) i3-8145UE CPU @ 2.20GHz with 8GB RAM + * Xtreme Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz with 16GB RAM +* Intel(R) Celeron(R) CPU 4305UE @ 2.00GHz with 4GB RAM hangs during memory initialization ### **Package Builds** @@ -293,5 +308,5 @@ If you would like to help but are not sure where to start some areas currently i * Adding board ports for more motherboards and systems * Adding Clang support -Please feel free to contact Michael Kubacki (michael.a.kubacki at intel.com) and Isaac Oram (isaac.w.oram at intel.com) +Please feel free to contact Isaac Oram (isaac.w.oram at intel.com) if you would like to discuss contribution ideas. diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc new file mode 100644 index 00..2ab9cb03ea --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc @@ -0,0 +1,448 @@ +## @file +# The main build description file for the UpXtreme board. +# +# Copyright (c) 2020, Intel Corporation. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + DEFINE PLATFORM_PACKAGE = MinPlatformPkg + DEFINE PLATFORM_SI_PACKAGE
[edk2-devel] [edk2-platforms] [PATCH v2 2/4] WhiskeylakeOpenBoardPkg: Add UpXtreme board ID
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h index 3545b2a05c..4e8288b1f1 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h @@ -1,8 +1,8 @@ /** @file -Defines Platform BoardIds + Defines Whiskey Lake Platform Board IDs - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -21,6 +21,7 @@ Defines Platform BoardIds #define TypeTrad0x1 #define TypeUltUlx 0x2 +#define BoardIdUpXtreme 0x10 #define BoardIdWhiskeyLakeRvp 0x60 #define BoardIdUnknown1 0x -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54378): https://edk2.groups.io/g/devel/message/54378 Mute This Topic: https://groups.io/mt/71247731/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v2 1/4] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit
Removes BoardFuncInit related functionality in WhiskeylakeURvp. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Library/BoardInitLib/BoardFunc.c | 19 .../Library/BoardInitLib/BoardFunc.h | 20 - .../Library/BoardInitLib/BoardFuncInit.c | 26 - .../BoardInitLib/BoardFuncInitPreMem.c| 29 +-- .../BoardInitLib/BoardPchInitPreMemLib.c | 3 +- .../PeiMultiBoardInitPostMemLib.inf | 4 --- .../PeiWhiskeylakeURvpInitPostMemLib.c| 8 - .../PeiWhiskeylakeURvpInitPreMemLib.c | 10 +-- 8 files changed, 9 insertions(+), 110 deletions(-) delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c deleted file mode 100644 index 7a2fed9904..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c +++ /dev/null @@ -1,19 +0,0 @@ -/** @file - Board's PCD function hook. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ) -{ - return EFI_SUCCESS; -} - - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h deleted file mode 100644 index 9e0ff8d033..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h +++ /dev/null @@ -1,20 +0,0 @@ -/** @file - Header file for Board Hook function intance. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef _BOARD_FUNC_H_ -#define _BOARD_FUNC_H_ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ); - -#endif // _BOARD_FUNC_H_ - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c deleted file mode 100644 index b8c69166ed..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - Source code for the board configuration init function in Post Memory init phase. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "BoardFunc.h" - -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInit ( - IN UINT16 BoardId -) -{ - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c index 1944a02bf1..06ff64da8d 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c @@ -2,39 +2,24 @@ Source code for the board configuration init function in Post Memory init phase. - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include + // // Null function for nothing GOP VBT update. // VOID -GopVbtSpecificUpdateNull( +GopVbtSpecificUpdateNull ( IN CHILD_STRUCT **ChildStructPtr -); + ); + // // for CFL U DDR4 // VOID -CflUDdr4GopVbtSpecificUpdate( +CflUDdr4GopVbtSpecificUpdate ( IN CHILD_STRUCT **ChildStructPtr -); -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInitPreMem ( - IN UINT16 BoardId - ) -{ - - return EFI_SUCCESS; -} - - + ); diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c index 5305ec7f7c..1f778c4f7e 100644 ---
[edk2-devel] [edk2-platforms] [PATCH 4/4] WhiskeylakeOpenBoardPkg/UpXtreme: Add DSC and build files
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Adds the DSC and build files necessary to build the UpXtreme board instance. Key files = * build_config.cfg - Board-specific build configuration file. * OpenBoardPkg.dsc - The UpXtreme board description file. * OpenBoardPkgPcd.dsc - Used for other PCD customization. * OpenBoardPkg.fdf - The UpXtreme board flash file. * OpenBoardPkgBuildOption.dsc - Sets build options Based on PCD values. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/Readme.md | 12 + .../UpXtreme/OpenBoardPkg.dsc | 448 +++ .../UpXtreme/OpenBoardPkg.fdf | 708 ++ .../UpXtreme/OpenBoardPkgBuildOption.dsc | 154 .../UpXtreme/OpenBoardPkgPcd.dsc | 409 ++ .../UpXtreme/build_config.cfg | 35 + Platform/Intel/build.cfg | 1 + 7 files changed, 1767 insertions(+) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgBuildOption.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/build_config.cfg diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index 02d9517d19..81092633f7 100644 --- a/Platform/Intel/Readme.md +++ b/Platform/Intel/Readme.md @@ -59,6 +59,12 @@ A UEFI firmware implementation using MinPlatformPkg is constructed using the fol ### **Supported Hardware** + AAEON + +| Machine Name | Supported Chipsets | BoardPkg | Board Name | +||--|| +| UP Xtreme | Whiskey Lake | WhiskeylakeOpenBoardPkg | UpXtreme | + Intel ***Intel Reference and Validation Platform*** @@ -233,6 +239,9 @@ return back to the minimum platform caller. | || build settings, environment variables. | || | ||--WhiskeylakeOpenBoardPkg + | || |--UpXtreme + | || |---build_config.cfg: UpXtreme specific build + | || settings environment variables. | || |--WhiskeylakeURvp | || |---build_config.cfg: WhiskeylakeURvp specific build | || settings environment variables. @@ -256,6 +265,9 @@ return back to the minimum platform caller. **WhiskeylakeOpenBoardPkg** 1. This firmware project has only been tested booting to Microsoft Windows 10 x64 with AHCI mode and Integrated Graphic Device. +2. UP Xtreme boards might hang during Windows 10 boot. +3. Not all UP Xtreme boards are supported at this time, only the XXX model has been tested. Board-specific memory + settings are needed to enable other models. ### **Package Builds** diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc new file mode 100644 index 00..2ab9cb03ea --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc @@ -0,0 +1,448 @@ +## @file +# The main build description file for the UpXtreme board. +# +# Copyright (c) 2020, Intel Corporation. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + DEFINE PLATFORM_PACKAGE = MinPlatformPkg + DEFINE PLATFORM_SI_PACKAGE = CoffeelakeSiliconPkg + DEFINE PLATFORM_SI_BIN_PACKAGE = CoffeelakeSiliconBinPkg + DEFINE PLATFORM_FSP_BIN_PACKAGE = CoffeeLakeFspBinPkg + DEFINE PLATFORM_BOARD_PACKAGE= WhiskeylakeOpenBoardPkg + DEFINE BOARD = UpXtreme + DEFINE PROJECT = $(PLATFORM_BOARD_PACKAGE)/$(BOARD) + DEFINE PEI_ARCH = IA32 + DEFINE DXE_ARCH = X64 + DEFINE TOP_MEMORY_ADDRESS= 0x0 + + # + # Default value for OpenBoardPkg.fdf use + # + DEFINE BIOS_SIZE_OPTION = SIZE_80 + + PLATFORM_NAME = $(PLATFORM_PACKAGE) + PLATFORM_GUID = A12B2802-BF37-4886-A307-C060F7929F8F + PLATFORM_VERSION= 0.1 + DSC_SPECIFICATION = 0x00010005 + OUTPUT_DIRECTORY= Build/$(PROJECT) +
[edk2-devel] [edk2-platforms] [PATCH 2/4] WhiskeylakeOpenBoardPkg: Add UpXtreme board ID
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2191 Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h index 3545b2a05c..4e8288b1f1 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Include/PlatformBoardId.h @@ -1,8 +1,8 @@ /** @file -Defines Platform BoardIds + Defines Whiskey Lake Platform Board IDs - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -21,6 +21,7 @@ Defines Platform BoardIds #define TypeTrad0x1 #define TypeUltUlx 0x2 +#define BoardIdUpXtreme 0x10 #define BoardIdWhiskeyLakeRvp 0x60 #define BoardIdUnknown1 0x -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54321): https://edk2.groups.io/g/devel/message/54321 Mute This Topic: https://groups.io/mt/71230115/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 1/4] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove BoardFuncInit
Removes BoardFuncInit related functionality in WhiskeylakeURvp. Co-authored-by: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Library/BoardInitLib/BoardFunc.c | 19 .../Library/BoardInitLib/BoardFunc.h | 20 - .../Library/BoardInitLib/BoardFuncInit.c | 26 - .../BoardInitLib/BoardFuncInitPreMem.c| 29 +-- .../BoardInitLib/BoardPchInitPreMemLib.c | 3 +- .../PeiMultiBoardInitPostMemLib.inf | 4 --- .../PeiWhiskeylakeURvpInitPostMemLib.c| 8 - .../PeiWhiskeylakeURvpInitPreMemLib.c | 10 +-- 8 files changed, 9 insertions(+), 110 deletions(-) delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h delete mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c deleted file mode 100644 index 7a2fed9904..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.c +++ /dev/null @@ -1,19 +0,0 @@ -/** @file - Board's PCD function hook. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ) -{ - return EFI_SUCCESS; -} - - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h deleted file mode 100644 index 9e0ff8d033..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFunc.h +++ /dev/null @@ -1,20 +0,0 @@ -/** @file - Header file for Board Hook function intance. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef _BOARD_FUNC_H_ -#define _BOARD_FUNC_H_ - -#include - -EFI_STATUS -PeiBoardSpecificInitPostMemNull ( - VOID - ); - -#endif // _BOARD_FUNC_H_ - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c deleted file mode 100644 index b8c69166ed..00 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInit.c +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - Source code for the board configuration init function in Post Memory init phase. - - - Copyright (c) 2019, Intel Corporation. All rights reserved. - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "BoardFunc.h" - -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInit ( - IN UINT16 BoardId -) -{ - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c index 1944a02bf1..06ff64da8d 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardFuncInitPreMem.c @@ -2,39 +2,24 @@ Source code for the board configuration init function in Post Memory init phase. - Copyright (c) 2019, Intel Corporation. All rights reserved. + Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include + // // Null function for nothing GOP VBT update. // VOID -GopVbtSpecificUpdateNull( +GopVbtSpecificUpdateNull ( IN CHILD_STRUCT **ChildStructPtr -); + ); + // // for CFL U DDR4 // VOID -CflUDdr4GopVbtSpecificUpdate( +CflUDdr4GopVbtSpecificUpdate ( IN CHILD_STRUCT **ChildStructPtr -); -/** - Board's PCD function hook init function for PEI post memory phase. - - @param[in] BoardId An unsigned integrer represent the board id. - - @retval EFI_SUCCESS The function completed successfully. -**/ -EFI_STATUS -BoardFunctionInitPreMem ( - IN UINT16 BoardId - ) -{ - - return EFI_SUCCESS; -} - - + ); diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/BoardPchInitPreMemLib.c index 5305ec7f7c..1f778c4f7e 100644 ---
[edk2-devel] [edk2-platforms] [PATCH] BoardModulePkg: Fix ECC Coding Style Issues
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2453 Fixed coding style issues as reported by the ECC tool Cc: Shenglei Zhang Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../BoardModulePkg/LegacySioDxe/ComponentName.h | 5 + .../BoardModulePkg/LegacySioDxe/LegacySioDxe.inf | 2 ++ .../Intel/BoardModulePkg/LegacySioDxe/SioChip.c | 5 +++-- .../Intel/BoardModulePkg/LegacySioDxe/SioDriver.c | 15 --- .../Library/BdsPs2KbcLib/BdsPs2KbcLib.c | 6 +++--- .../Library/BdsPs2KbcLib/BdsPs2KbcLib.h | 4 ++-- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h index 85ca348701..91bc245f3a 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h @@ -6,6 +6,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ +#ifndef _LEGACY_SIO_DXE_COMPONENT_NAME_H_ +#define _LEGACY_SIO_DXE_COMPONENT_NAME_H_ + /** Retrieves a Unicode string that is the user-readable name of the EFI Driver. @@ -85,3 +88,5 @@ SioComponentNameGetControllerName ( IN CHAR8 *Language, OUT CHAR16**ControllerName ); + +#endif diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf index 1d7cd92604..698d406450 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf @@ -44,6 +44,8 @@ SioDriver.c SioDriver.h ComponentName.c + ComponentName.h + Register.h [Pcd] gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c index b9a84ca51c..846dddf739 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c @@ -145,7 +145,7 @@ DEVICE_INFOmDeviceInfo[] = { /** - Gets the number of devices in Table of SIO Controllers mDeviceInfo + Gets the number of devices in Table of SIO Controllers mDeviceInfo. @retval Number of enabled devices in Table of SIO Controllers. **/ @@ -153,7 +153,8 @@ UINTN EFIAPI GetDeviceCount ( VOID -){ + ) +{ UINTNCount; // Get mDeviceInfo item count // -1 to account for for the end device info diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c index 5bfdc94681..484c53e953 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c @@ -118,13 +118,14 @@ BOOLEAN EFIAPI SioDeviceEnabled ( IN SIO_PCI_ISA_BRIDGE_DEVICE_INFO *CurrentDevice -){ -SIO_PCI_ISA_BRIDGE_DEVICE_INFO *Device = \ - (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice); -if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVICE_INFO)) == 0) { - return TRUE; -} -return FALSE; + ) +{ + SIO_PCI_ISA_BRIDGE_DEVICE_INFO *Device; + Device = (SIO_PCI_ISA_BRIDGE_DEVICE_INFO *) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice); + if(CompareMem (Device, CurrentDevice, sizeof (SIO_PCI_ISA_BRIDGE_DEVICE_INFO)) == 0) { +return TRUE; + } + return FALSE; } /** diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c index eff10bddb4..0cf4c4d262 100644 --- a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c +++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c @@ -65,7 +65,7 @@ DetectPs2Keyboard ( MicroSecondDelay (30); } - if (FoundPs2Kbc == FALSE) { + if (!FoundPs2Kbc) { return FALSE; } @@ -126,7 +126,7 @@ IsPs2KeyboardConnected ( BOOLEAN Result; Result = DetectPs2Keyboard (); - if (Result == FALSE) { + if (!Result) { // // If there is no ps2 keyboard detected for the 1st time, retry again. // @@ -138,7 +138,7 @@ IsPs2KeyboardConnected ( /** Updates the ConIn variable with Ps2 Keyboard device path, - if it doesn't already exists in ConIn and ConInDev + if it doesn't already exists in ConIn and ConInDev. **/ VOID AddPs2Keyboard ( diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h index d9a27e6681..a96d53b98d 100644 --- a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h +++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h @@ -6,8 +6,8 @@ **/ -#ifndef _PS2_KBC_LIB_H -#define _PS2_KBC_LIB_H +#ifndef _PS2_KBC_LIB_H_ +#define _PS2_KBC_LIB_H_ #include #include --
[edk2-devel] [edk2-platforms] [PATCH 11/11] SimicsOpenBoardPkg: Add Bds Hook Points
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added a DXE driver that registers the minimum platform BDS hook points, to BoardX58Ich10 board. These hooks are triggered on the BDS hook events What was done: * Included a board specific instance of BoardBdsHookLib and BoardBootManagerLib * Included Minplatforms PlatformBootManagerLib instance. This Library instance signals the Bds event groups * Included BoardBdsHookDxe to register the callbacks implemented in BoardBdsHookLib Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 10 +- .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 7576648d57..350a75a313 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -146,10 +146,17 @@ SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLib.inf [LibraryClasses.common.DXE_DRIVER] + + # + # Platform Package + # + PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf + ### # Board Package ### - PlatformBootManagerLib|$(BOARD_PKG)/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf + BoardBdsHookLib|$(BOARD_PKG)/Library/BoardBdsHookLib/BoardBdsHookLib.inf + BoardBootManagerLib|$(BOARD_PKG)/Library/BoardBootManagerLib/BoardBootManagerLib.inf [LibraryClasses.common.DXE_SMM_DRIVER] ### @@ -294,3 +301,4 @@ $(BOARD_PKG)/SimicsVideoDxe/SimicsVideoDxe.inf $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf index e0a1daddee..99bf607775 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf @@ -213,6 +213,7 @@ INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52233): https://edk2.groups.io/g/devel/message/52233 Mute This Topic: https://groups.io/mt/68590741/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 01/11] MinPlatformPkg: Add BDS Hook Point Guids
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added BDS hook point guids as defined in the Minimum Platform specification. These GUIDs shall be used in the identification of three of the BDS hook point event groups. These event groups are Before Console After Trusted, Before Console Before End Of Dxe and After Console Ready Before BootOption events. See https://edk2-docs.gitbooks.io/edk-ii-minimum-platform-specification, under Appendix A.3 BDS Hook Points, for more details Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 5 + 1 file changed, 5 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec index 7f74ac9380..5bec4eee3a 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec @@ -46,6 +46,11 @@ gDefaultDataFileGuid = {0x1ae42876, 0x008f, 0x4161, {0xb2, 0xb7, 0x1c, 0x0d, 0x15, 0xc5, 0xef, 0x43}} gDefaultDataOptSizeFileGuid = {0x003e7b41, 0x98a2, 0x4be2, {0xb2, 0x7a, 0x6c, 0x30, 0xc7, 0x65, 0x52, 0x25}} + # BDS Hook point event Guids + gBdsEventBeforeConsoleAfterTrustedConsoleGuid = {0x51e49ff5, 0x28a9, 0x4159, { 0xac, 0x8a, 0xb8, 0xc4, 0x88, 0xa7, 0xfd, 0xee}} + gBdsEventBeforeConsoleBeforeEndOfDxeGuid = {0xfcf26e41, 0xbda6, 0x4633, { 0xb5, 0x73, 0xd4, 0xb8, 0x0e, 0x6d, 0xd0, 0x78}} + gBdsEventAfterConsoleReadyBeforeBootOptionGuid = {0x8eb3d5dc, 0xf4e7, 0x4b57, { 0xa9, 0xe7, 0x27, 0x39, 0x10, 0xf2, 0x18, 0x9f}} + [LibraryClasses] PeiLib|Include/Library/PeiLib.h -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52223): https://edk2.groups.io/g/devel/message/52223 Mute This Topic: https://groups.io/mt/68590722/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 03/11] BoardModulePkg: Add BDS Hook DXE Driver
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 This is a sample/generic DXE driver that registers all the BDS hook points or callbacks as defined in BoardBdsHookLib. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../BoardBdsHookDxe/BoardBdsHookDxe.c | 121 ++ .../BoardBdsHookDxe/BoardBdsHookDxe.inf | 46 +++ 2 files changed, 167 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c create mode 100644 Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf diff --git a/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c new file mode 100644 index 00..88eb7d70e9 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c @@ -0,0 +1,121 @@ +/** @file + Bds Hook Point callbacks DXE driver + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +#include + +/** + Initialize DXE Platform. + + @param[in] ImageHandle Image handle of this driver. + @param[in] SystemTable Global system service table. + + @retval EFI_SUCCESS Initialization complete. + @exception EFI_UNSUPPORTED The chipset is unsupported by this driver. + @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the driver. + @retval EFI_DEVICE_ERROR Device error, driver exits abnormally. +**/ +EFI_STATUS +EFIAPI +BdsHookDxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_EVENT BeforeConsoleAfterTrustedConsoleEvent; + EFI_EVENT BeforeConsoleBeforeEndOfDxeEvent; + EFI_EVENT AfterConsoleReadyBeforeBootOptionEvent; + EFI_EVENT ReadyToBootEvent; + EFI_EVENT PciEnumCompleteEvent; + EFI_EVENT SmmReadyToLockEvent; + EFI_STATUS Status; + VOID*Registration; + + DEBUG ((DEBUG_INFO, "%a starts\n", __FUNCTION__ )); + + // + // Create event to set proper video resolution and text mode for internal shell. + // + Status = EfiCreateEventReadyToBootEx ( + TPL_CALLBACK, + BdsReadyToBootCallback, + NULL, + + ); + ASSERT_EFI_ERROR (Status); + + // + // Create PCI Enumeration Completed callback for BDS + // + PciEnumCompleteEvent = EfiCreateProtocolNotifyEvent ( + , + TPL_CALLBACK, + BdsPciEnumCompleteCallback, + NULL, + + ); + ASSERT (PciEnumCompleteEvent != NULL); + + // + // Create PCI Enumeration Completed callback for BDS + // + SmmReadyToLockEvent = EfiCreateProtocolNotifyEvent ( + , + TPL_CALLBACK, + BdsSmmReadyToLockCallback, + NULL, + + ); + ASSERT (SmmReadyToLockEvent != NULL); + + // + // Create BeforeConsoleAfterTrustedConsole event callback + // + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + BdsBeforeConsoleAfterTrustedConsoleCallback, + NULL, + , + + ); + ASSERT_EFI_ERROR (Status); + + // + // Create BeforeConsoleBeforeEndOfDxeGuid event callback + // + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + BdsBeforeConsoleBeforeEndOfDxeGuidCallback, + NULL, + , + + ); + ASSERT_EFI_ERROR (Status); + + // + // Create AfterConsoleReadyBeforeBootOption event callback + // + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + BdsAfterConsoleReadyBeforeBootOptionCallback, + NULL, + , + + ); + ASSERT_EFI_ERROR (Status); + + return Status; +} diff --git a/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf new file mode 100644 index 00..e3871d6dd4 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf @@ -0,0 +1,46 @@ +### @file +# Module Information file for the Bds Hook DXE driver. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BoardBdsHookDxe + FILE_GUID = EEA6491C-0DC5-48AB-B99D-CE77D14D43F2 + VERSION_STRING = 1.0
[edk2-devel] [edk2-platforms] [PATCH 06/11] BoardModulePkg: Add Generic BoardBootManagerLib
This library implements a generic PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which will be linked Minplatform's PlatformBootManager library instance. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../BoardBootManagerLib/BoardBootManager.c| 103 ++ .../BoardBootManagerLib.inf | 39 +++ .../BoardBootManagerLib.c | 2 +- 3 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManager.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManager.c b/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManager.c new file mode 100644 index 00..f6628d4125 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManager.c @@ -0,0 +1,103 @@ +/** @file + This file include board specific boot manager callbacks + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + + +#include +#include +#include +#include +#include +#include +#include +#include + + +BOOLEANmHotKeypressed = FALSE; +EFI_EVENT HotKeyEvent= NULL; +UINTN mBootMenuOptionNumber; + +/** + This function is called each second during the boot manager waits timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + UINT16 TimeoutRemain + ) +{ + EFI_STATUSStatus; + EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TxtInEx; + EFI_KEY_DATA KeyData; + BOOLEAN PausePressed; + + // + // Pause on PAUSE key + // + Status = gBS->HandleProtocol (gST->ConsoleInHandle, , (VOID **) ); + ASSERT_EFI_ERROR (Status); + + PausePressed = FALSE; + + while (TRUE) { +Status = TxtInEx->ReadKeyStrokeEx (TxtInEx, ); +if (EFI_ERROR (Status)) { + break; +} + +if (KeyData.Key.ScanCode == SCAN_PAUSE) { + PausePressed = TRUE; + break; +} + } + + // + // Loop until non-PAUSE key pressed + // + while (PausePressed) { +Status = TxtInEx->ReadKeyStrokeEx (TxtInEx, ); +if (!EFI_ERROR (Status)) { + DEBUG (( +DEBUG_INFO, "[PauseCallback] %x/%x %x/%x\n", +KeyData.Key.ScanCode, KeyData.Key.UnicodeChar, +KeyData.KeyState.KeyShiftState, KeyData.KeyState.KeyToggleState +)); + PausePressed = (BOOLEAN) (KeyData.Key.ScanCode == SCAN_PAUSE); +} + } +} + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ) +{ + EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION BootDeviceList; + CHAR16 OptionName[sizeof ("Boot")]; + + if (mBootMenuOptionNumber == LoadOptionNumberUnassigned) { +return; + } + UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", mBootMenuOptionNumber); + Status = EfiBootManagerVariableToLoadOption (OptionName, ); + if (EFI_ERROR (Status)) { +return; + } + for (;;) { +EfiBootManagerBoot (); + } +} diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf b/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf new file mode 100644 index 00..38ff52ca81 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf @@ -0,0 +1,39 @@ +## @file +# The module definition file for BoardBootManagerLib. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION= 0x00010005 + BASE_NAME = BoardBootManagerLib + FILE_GUID = E7512AE0-6CB1-47ED-B6FF-94A97A86BABB + MODULE_TYPE= DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = BoardBootManagerLib|DXE_DRIVER + + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 EBC +# + +[Sources] + BoardBootManager.c + +[LibraryClasses] + BaseLib + UefiBootServicesTableLib + DebugLib + UefiLib + HobLib + UefiBootManagerLib + TimerLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c
[edk2-devel] [edk2-platforms] [PATCH 05/11] MinPlatformPkg: Add BDS Hook Points
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added BDS hook points to the Minplatform boot manager library as defined in the Minimum Platfrom specifcations. Changes made: * Added functions to signal three BDS event groups. These event groups are BeforeConsoleAfterTrustedConsole, BeforeConsoleBeforeEndOfDxe and AfterConsoleReadyBeforeBootOption. * Removed BDS functionalities from the boot manager library. These functionalities will be added to callbacks a module in BoardModule, which will then register/hook to the BDS hook points See https://edk2-docs.gitbooks.io/edk-ii-minimum-platform-specification, under Appendix A.3 BDS Hook Points, for more details. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../DxePlatformBootManagerLib/BdsPlatform.c | 1262 ++--- .../DxePlatformBootManagerLib/BdsPlatform.h | 181 +-- .../DxePlatformBootManagerLib.inf | 51 +- .../DxePlatformBootManagerLib/MemoryTest.c| 83 -- .../PlatformBootOption.c | 559 5 files changed, 112 insertions(+), 2024 deletions(-) delete mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/MemoryTest.c delete mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/PlatformBootOption.c diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c index 491fb0f26f..31a9ef4a07 100644 --- a/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c @@ -1,130 +1,14 @@ /** @file This file include all platform action which can be customized by IBV/OEM. -Copyright (c) 2017, Intel Corporation. All rights reserved. +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "BdsPlatform.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -GLOBAL_REMOVE_IF_UNREFERENCED EFI_BOOT_MODE gBootMode; - -BOOLEAN gPPRequireUIConfirm; - -extern UINTN mBootMenuOptionNumber; - -GLOBAL_REMOVE_IF_UNREFERENCED USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = { - { -{ - MESSAGING_DEVICE_PATH, - MSG_USB_CLASS_DP, - { -(UINT8) (sizeof (USB_CLASS_DEVICE_PATH)), -(UINT8) ((sizeof (USB_CLASS_DEVICE_PATH)) >> 8) - } -}, -0x, // VendorId -0x, // ProductId -CLASS_HID,// DeviceClass -SUBCLASS_BOOT,// DeviceSubClass -PROTOCOL_KEYBOARD // DeviceProtocol - }, - gEndEntire -}; - -// -// Internal shell mode -// -GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellModeColumn; -GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellModeRow; -GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellHorizontalResolution; -GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellVerticalResolution; -// -// BDS Platform Functions -// - -BOOLEAN -IsMorBitSet ( - VOID - ) -{ - UINTN MorControl; - EFI_STATUSStatus; - UINTN DataSize; - - // - // Check if the MOR bit is set. - // - DataSize = sizeof (MorControl); - Status = gRT->GetVariable ( - MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, - , - NULL, - , - - ); - if (EFI_ERROR (Status)) { -DEBUG ((DEBUG_INFO, " PlatformBootMangerLib: gEfiMemoryOverwriteControlDataGuid doesn't exist!!***\n")); -MorControl = 0; - } else { -DEBUG ((DEBUG_INFO, " PlatformBootMangerLib: Get the gEfiMemoryOverwriteControlDataGuid = %x!!***\n", MorControl)); - } - - return (BOOLEAN) (MorControl & 0x01); -} - -VOID -DumpDevicePath ( - IN CHAR16 *Name, - IN EFI_DEVICE_PATH *DevicePath - ) -{ - CHAR16 *Str; - - Str = ConvertDevicePathToText(DevicePath, TRUE, TRUE); - DEBUG ((DEBUG_INFO, "%s: %s\n", Name, Str)); - if (Str != NULL) { -FreePool (Str); - } -} - -/** - An empty function to pass error checking of CreateEventEx (). - - This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error - checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0. - - @param Event Event whose notification function is being invoked. - @param Context The pointer to the notification function's context, -which is implementation-dependent. -**/ -VOID -EFIAPI -InternalBdsEmptyCallbackFuntion ( - IN EFI_EVENTEvent, - IN VOID *Context - ) -{ - return; -} +extern UINTN
[edk2-devel] [edk2-platforms] [PATCH 00/11] Add BDS Hook Points
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 This patch series implements BDS hook points as defined in the EDK II Minimum Platform Specification. For details, see https://edk2-docs.gitbooks.io/edk-ii-minimum-platform-specification/appendix_a_full_maps/a3_bds_hook_points.html What was done: * MinplatformPkg: Three BDS event group PCDs were added - gBdsEventBeforeConsoleAfterTrustedConsoleGuid - gBdsEventBeforeConsoleBeforeEndOfDxeGuid - gBdsEventAfterConsoleReadyBeforeBootOptionGuid * DxePlatformBootManager: MinplatformPkg's DxePlatformBootManager library instance was modified to signal the three newly added BDS events groups * BoardBdsHookLib: BDS event callback library was added. This library implements the callbacks for the three Bds event groups as well as callbacks for already existing gEfiEndOfDxeEventGroupGuid, gEfiPciEnumerationCompleteProtocolGuid and gEfiDxeSmmReadyToLockProtocolGuid event groups - A default implementation of the board BDS hook library was added to BoardModulePkg - A SimicOpenBoardPkg specific implementation of the Board BDS hook library was also added * BoardBdsHookDxe: A generic DXE driver that registers the callbacks implemented in the Board BDS hook library was added * BoardBootManagerLib: A board boot manager library was added. This library implements PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot needed by Minplatform's PlatformBootManager libary instance. - A null instance of this library was added to MinplatformPkg - A default instance of this library was added to BoardModulePkg - A SimicOpenBoardPkg instance was implemented * Support for the BDS Hook points were added to all the Minplatform boards Prince Agyeman (11): MinPlatformPkg: Add BDS Hook Point Guids BoardModulePkg: Add BDS Hook Library BoardModulePkg: Add BDS Hook DXE Driver MinPlatformPkg: Add BDS Board Boot Manager library MinPlatformPkg: Add BDS Hook Points BoardModulePkg: Add Generic BoardBootManagerLib KabylakeOpenBoardPkg: Add BDS Hook Dxe Driver WhiskeylakeOpenBoardPkg: Add BDS Hook Dxe Driver SimicsOpenBoardPkg: Add Bds Hook Library SimicsOpenBoardPkg: Add BDS Board Boot Manager library SimicsOpenBoardPkg: Add Bds Hook Points .../BoardBdsHookDxe/BoardBdsHookDxe.c | 121 ++ .../BoardBdsHookDxe/BoardBdsHookDxe.inf | 46 + .../Include/Library/BoardBdsHookLib.h | 100 + .../Library/BoardBdsHookLib/BoardBdsHook.h| 211 +++ .../Library/BoardBdsHookLib/BoardBdsHookLib.c | 1390 ++ .../BoardBdsHookLib/BoardBdsHookLib.inf | 95 + .../BoardBdsHookLib/BoardBootOption.c}| 87 +- .../BoardBdsHookLib/BoardMemoryTest.c}|4 +- .../BoardBootManagerLib/BoardBootManager.c| 103 ++ .../BoardBootManagerLib.inf | 39 + .../GalagoPro3/OpenBoardPkg.dsc |7 + .../GalagoPro3/OpenBoardPkg.fdf |1 + .../KabylakeRvp3/OpenBoardPkg.dsc |6 + .../KabylakeRvp3/OpenBoardPkg.fdf |1 + .../BoardBootManagerLib.c | 38 + .../BoardBootManagerLibNull.inf | 31 + .../DxePlatformBootManagerLib/BdsPlatform.c | 1262 + .../DxePlatformBootManagerLib/BdsPlatform.h | 181 +- .../DxePlatformBootManagerLib.inf | 51 +- .../Include/Library/BoardBootManagerLib.h | 39 + .../Intel/MinPlatformPkg/MinPlatformPkg.dec |5 + .../BoardX58Ich10/OpenBoardPkg.dsc| 10 +- .../BoardX58Ich10/OpenBoardPkg.fdf|1 + .../Library/BoardBdsHookLib/BoardBdsHook.h| 173 ++ .../Library/BoardBdsHookLib/BoardBdsHookLib.c | 1630 + .../BoardBdsHookLib/BoardBdsHookLib.inf | 81 + .../BoardBootManagerLib/BoardBootManager.c| 67 + .../BoardBootManagerLib.inf | 45 + .../WhiskeylakeURvp/OpenBoardPkg.dsc |4 + .../WhiskeylakeURvp/OpenBoardPkg.fdf |1 + 30 files changed, 4421 insertions(+), 1409 deletions(-) create mode 100644 Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c create mode 100644 Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BoardBdsHookLib.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf rename Platform/Intel/{MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/PlatformBootOption.c => BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c} (87%) rename Platform/Intel/{MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/MemoryTest.c => BoardModulePkg/Library/BoardBdsHookLib/BoardMemoryTest.c} (93%) create mode 100644
[edk2-devel] [edk2-platforms] [PATCH 02/11] BoardModulePkg: Add BDS Hook Library
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added a generic board BDS hook library that implements BDS hook points as defined in the Minimum platform specification. This library implements callbacks for the three MinPlatformPkg BDS event groups, namely gBdsEventBeforeConsoleAfterTrustedConsoleGuid, gBdsEventBeforeConsoleBeforeEndOfDxeGuid and gBdsEventAfterConsoleReadyBeforeBootOptionGuid. This Library also implements callbacks for pre-existing event groups: gEfiEndOfDxeEventGroupGuid, gEfiPciEnumerationCompleteProtocolGuid, gEfiDxeSmmReadyToLockProtocolGuid. These callbacks can be registered to their respective event groups, through other libraries or DXE drivers Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Include/Library/BoardBdsHookLib.h | 100 ++ .../Library/BoardBdsHookLib/BoardBdsHook.h| 211 +++ .../Library/BoardBdsHookLib/BoardBdsHookLib.c | 1390 + .../BoardBdsHookLib/BoardBdsHookLib.inf | 95 ++ .../Library/BoardBdsHookLib/BoardBootOption.c | 598 +++ .../Library/BoardBdsHookLib/BoardMemoryTest.c | 83 + 6 files changed, 2477 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BoardBdsHookLib.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardMemoryTest.c diff --git a/Platform/Intel/BoardModulePkg/Include/Library/BoardBdsHookLib.h b/Platform/Intel/BoardModulePkg/Include/Library/BoardBdsHookLib.h new file mode 100644 index 00..ba351b7bf4 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Library/BoardBdsHookLib.h @@ -0,0 +1,100 @@ +/** @file +Header file for BDS Hook Library + +Copyright (c) 2019, Intel Corporation. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _BDS_HOOK_LIB_H_ +#define _BDS_HOOK_LIB_H_ + +#include + + +/** + This is the callback function for Bds Ready To Boot event. + + @param Event Pointer to this event + @param Context Event hanlder private data + + @retval None. +**/ +VOID +EFIAPI +BdsReadyToBootCallback ( + IN EFI_EVENT Event, + IN VOID *Context + ); + + +/** + This is the callback function for Smm Ready To Lock event. + + @param[in] Event The Event this notify function registered to. + @param[in] ContextPointer to the context data registered to the Event. +**/ +VOID +EFIAPI +BdsSmmReadyToLockCallback ( + IN EFI_EVENTEvent, + IN VOID *Context + ); + + +/** + This is the callback function for PCI ENUMERATION COMPLETE. + + @param[in] Event The Event this notify function registered to. + @param[in] ContextPointer to the context data registered to the Event. +**/ +VOID +EFIAPI +BdsPciEnumCompleteCallback ( + IN EFI_EVENTEvent, + IN VOID *Context + ); + + +/** + Before console after trusted console event callback + + @param[in] Event The Event this notify function registered to. + @param[in] ContextPointer to the context data registered to the Event. +**/ +VOID +EFIAPI +BdsBeforeConsoleAfterTrustedConsoleCallback ( + IN EFI_EVENT Event, + IN VOID *Context + ); + + +/** + Before console before end of DXE event callback + + @param[in] Event The Event this notify function registered to. + @param[in] ContextPointer to the context data registered to the Event. +**/ +VOID +EFIAPI +BdsBeforeConsoleBeforeEndOfDxeGuidCallback ( + IN EFI_EVENT Event, + IN VOID *Context + ); + + +/** + After console ready before boot option event callback + + @param[in] Event The Event this notify function registered to. + @param[in] ContextPointer to the context data registered to the Event. +**/ +VOID +EFIAPI +BdsAfterConsoleReadyBeforeBootOptionCallback ( + IN EFI_EVENT Event, + IN VOID *Context + ); + +#endif diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook.h b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook.h new file mode 100644 index 00..748385499b --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook.h @@ -0,0 +1,211 @@ +/** @file + Header file for BDS Hook Library + +Copyright (c) 2019, Intel Corporation. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _BDS_HOOK_H_ +#define _BDS_HOOK_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include
[edk2-devel] [edk2-platforms] [PATCH 09/11] SimicsOpenBoardPkg: Add Bds Hook Library
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added Board BDS Hook library that implements simics specific Bds hook points or callbacks. Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../Library/BoardBdsHookLib/BoardBdsHook.h| 173 ++ .../Library/BoardBdsHookLib/BoardBdsHookLib.c | 1630 + .../BoardBdsHookLib/BoardBdsHookLib.inf | 81 + 3 files changed, 1884 insertions(+) create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHook.h create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHook.h b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHook.h new file mode 100644 index 00..fda41b1c97 --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHook.h @@ -0,0 +1,173 @@ +/** @file + Header file for the board board specific BDS hook library. + + Copyright (c) 2019 Intel Corporation. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _PLATFORM_SPECIFIC_BDS_PLATFORM_H_ +#define _PLATFORM_SPECIFIC_BDS_PLATFORM_H_ + + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +extern EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[]; +extern ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode; +extern ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode; +extern UART_DEVICE_PATH gUartDeviceNode; +extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode; + +#define PCI_DEVICE_PATH_NODE(Func, Dev) \ + { \ +{ \ + HARDWARE_DEVICE_PATH, \ + HW_PCI_DP, \ + { \ +(UINT8) (sizeof (PCI_DEVICE_PATH)), \ +(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \ + } \ +}, \ +(Func), \ +(Dev) \ + } + +#define PNPID_DEVICE_PATH_NODE(PnpId) \ + { \ +{ \ + ACPI_DEVICE_PATH, \ + ACPI_DP, \ + { \ +(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \ +(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \ + }, \ +}, \ +EISA_PNP_ID((PnpId)), \ +0 \ + } + +#define gPciIsaBridge \ + PCI_DEVICE_PATH_NODE(0, 0x1f) + +#define gP2PBridge \ + PCI_DEVICE_PATH_NODE(0, 0x1e) + +#define gPnpPs2Keyboard \ + PNPID_DEVICE_PATH_NODE(0x0303) + +#define gPnp16550ComPort \ + PNPID_DEVICE_PATH_NODE(0x0501) + +#define gUart \ + { \ +{ \ + MESSAGING_DEVICE_PATH, \ + MSG_UART_DP, \ + { \ +(UINT8) (sizeof (UART_DEVICE_PATH)), \ +(UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \ + } \ +}, \ +0, \ +115200, \ +8, \ +1, \ +1 \ + } + +#define gPcAnsiTerminal \ + { \ +{ \ + MESSAGING_DEVICE_PATH, \ + MSG_VENDOR_DP, \ + { \ +(UINT8) (sizeof (VENDOR_DEVICE_PATH)), \ +(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \ + } \ +}, \ +DEVICE_PATH_MESSAGING_PC_ANSI \ + } + +#define PCI_CLASS_SCC 0x07 +#define PCI_SUBCLASS_SERIAL0x00 +#define PCI_IF_16550 0x02 +#define IS_PCI_16550SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550) +#define IS_PCI_ISA_PDECODE(_p)IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0) + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + UINTN ConnectType; +} PLATFORM_CONSOLE_CONNECT_ENTRY; + +#define CONSOLE_OUT BIT0 +#define CONSOLE_IN BIT1 +#define STD_ERROR BIT2 +extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[]; + +// +// Platform BDS Functions +// + +VOID +PlatformInitializeConsole ( + IN PLATFORM_CONSOLE_CONNECT_ENTRY *PlatformConsole + ); + +/** + Use SystemTable ConOut to stop video based Simple Text Out consoles from going + to the video device. Put up LogoFile on every video device that is a console. + + @param[in] LogoFile The file name of logo to display on the center of the screen. + + @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed. + @retval EFI_UNSUPPORTED Logo not found. + +**/ +EFI_STATUS +EFIAPI +EnableBootLogo( + IN EFI_GUID *LogoFile +); + +#endif // _PLATFORM_SPECIFIC_BDS_PLATFORM_H_ diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c new file mode 100644 index 00..1058dbf3cf --- /dev/null +++
[edk2-devel] [edk2-platforms] [PATCH 07/11] KabylakeOpenBoardPkg: Add BDS Hook Dxe Driver
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added a DXE driver that registers the minimum platform BDS hook points for the GalagoPro3 and KabylakeRvp3 boards. These hooks are triggered on the BDS hook events What was done: * Included an instance of BoardBdsHookLib and BoardBootManagerLib from BoardModulePkg * Included BdsHookDxe to register the callbacks implemented in BoardBdsHookLib Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 7 +++ .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf | 1 + .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc | 6 ++ .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf | 1 + 4 files changed, 15 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index a39547f41f..bf63d53bef 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -201,6 +201,12 @@ TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.inf !endif + ### + # Board Package + ### + BoardBdsHookLib|BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf + BoardBootManagerLib|BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf + ### # Board-specific ### @@ -425,3 +431,4 @@ } !endif BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index da94ed0cd1..196f04c68d 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf @@ -341,6 +341,7 @@ INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf +INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf INF ShellPkg/Application/Shell/Shell.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc index 50be2bb624..044688ba4e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc @@ -241,6 +241,11 @@ !if $(TARGET) == DEBUG TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.inf !endif + ### + # Board Package + ### + BoardBdsHookLib|BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf + BoardBootManagerLib|BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf ### # Board-specific @@ -505,3 +510,4 @@ } !endif BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf index fc1c6a9c25..f2cfff1c7b 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf @@ -343,6 +343,7 @@ INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf +INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf INF ShellPkg/Application/Shell/Shell.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52226): https://edk2.groups.io/g/devel/message/52226 Mute This Topic: https://groups.io/mt/68590729/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 04/11] MinPlatformPkg: Add BDS Board Boot Manager library
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 As Minplatform's PlatformBootManager library instance implements event signals (as specified in the minimum platform specification) to trigger board actions, some of its functions namely PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot will not have events signaled for boards to take action. This library implements PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which will be linked to Minplatform's PlatformBootManager libary instance. Added is an interface/header file that defines the board boot manager library. Also added is a NULL implementation of the board boot manager library Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../BoardBootManagerLib.c | 38 ++ .../BoardBootManagerLibNull.inf | 31 +++ .../Include/Library/BoardBootManagerLib.h | 39 +++ 3 files changed, 108 insertions(+) create mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c new file mode 100644 index 00..46fce8f59f --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c @@ -0,0 +1,38 @@ +/** @file + This file include board specific boot manager callbacks + + Copyright (c) 2018, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include + +/** + This function is called each second during the boot manager waits timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + IN UINT16 TimeoutRemain + ) +{ + return; +} + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf new file mode 100644 index 00..084207b111 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf @@ -0,0 +1,31 @@ +## @file +# The module definition file for BoardBootManagerLib. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION= 0x00010005 + BASE_NAME = BoardBootManagerLib + FILE_GUID = 7BA684A4-5B32-4F0C-B0FF-581F143E606C + MODULE_TYPE= DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = BoardBootManagerLib|DXE_DRIVER + + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 EBC +# + +[Sources] + BoardBootManagerLib.c + + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h new file mode 100644 index 00..4240142073 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h @@ -0,0 +1,39 @@ +/** @file + Board Boot Manager library definition. A platform can implement + instances to support platform-specific behavior. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + +#ifndef __BOARD_BOOT_MANAGER_LIB_H_ +#define __BOARD_BOOT_MANAGER_LIB_H_ +#include + + +/** + This function is called each second during boot manager waits the timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + IN UINT16 TimeoutRemain + ); + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ); + +#endif -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52227): https://edk2.groups.io/g/devel/message/52227 Mute This Topic:
[edk2-devel] [edk2-platforms] [PATCH 10/11] SimicsOpenBoardPkg: Add BDS Board Boot Manager library
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 This library implements PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which can be linked Minplatform's PlatformBootManager libary instance. Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../BoardBootManagerLib/BoardBootManager.c| 67 +++ .../BoardBootManagerLib.inf | 45 + 2 files changed, 112 insertions(+) create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c new file mode 100644 index 00..58035f2766 --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c @@ -0,0 +1,67 @@ +/** @file + The Board Boot Manager Library implements BoardBootManagerWaitCallback + and BoardBootManagerUnableToBoot callback, which is linked to the + Platform Boot Manager Library + + Copyright (c) 2019 Intel Corporation. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + This function is called each second during the boot manager waits the + timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + UINT16 TimeoutRemain + ) +{ + EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White; + UINT16 Timeout; + + Timeout = PcdGet16 (PcdPlatformBootTimeOut); + + Black.Raw = 0x; + White.Raw = 0x00FF; + + BootLogoUpdateProgress ( +White.Pixel, +Black.Pixel, +L"Start boot option", +White.Pixel, +(Timeout - TimeoutRemain) * 100 / Timeout, +0 +); +} + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ) +{ + +} diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf new file mode 100644 index 00..20778981bc --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf @@ -0,0 +1,45 @@ +## @file +# Definition file for the Board Boot Manager Library. +# +# Copyright (c) 2019 Intel Corporation. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION= 0x00010005 + BASE_NAME = BoardBootManagerLib + FILE_GUID = EBBB176A-3883-4BA4-A74D-1510D0C35B37 + MODULE_TYPE= DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = BoardBootManagerLib|DXE_DRIVER + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 EBC +# + +[Sources] + BoardBootManager.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[LibraryClasses] + BaseLib + UefiBootServicesTableLib + DebugLib + UefiLib + HobLib + UefiBootManagerLib + TimerLib + BoardBootManagerLib + BootLogoLib + PcdLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52232): https://edk2.groups.io/g/devel/message/52232 Mute This Topic: https://groups.io/mt/68590740/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 08/11] WhiskeylakeOpenBoardPkg: Add BDS Hook Dxe Driver
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added a DXE driver that registers the minimum platform BDS hook points, to WhiskeylakeURvp board. These hooks are triggered on the BDS hook events What was done: * Included an instance of BdsHookLib and BoardBootManagerLib from BoardModulePkg * Included BdsHookDxe to register the callbacks implemented in BdsHookLib Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc | 4 .../WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + 2 files changed, 5 insertions(+) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc index 47e156be08..1a9e608bd6 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc @@ -224,6 +224,8 @@ ### DxePolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/Policy/Library/DxePolicyUpdateLib/DxePolicyUpdateLib.inf DxeTbtPolicyLib|$(PLATFORM_BOARD_PACKAGE)/Features/Tbt/Library/DxeTbtPolicyLib/DxeTbtPolicyLib.inf + BoardBdsHookLib|BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf + BoardBootManagerLib|BoardModulePkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf ### # Board-specific @@ -452,3 +454,5 @@ $(PLATFORM_BOARD_PACKAGE)/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf !endif BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf + diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf index f39b41b186..ad32268a82 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf @@ -346,6 +346,7 @@ INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf +INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf INF ShellPkg/Application/Shell/Shell.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52231): https://edk2.groups.io/g/devel/message/52231 Mute This Topic: https://groups.io/mt/68590738/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v2] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2409 Updated WhiskeylakeURvp PCDs to enable FSP/BL stack sharing. This fixes the boot failure seen with the latest Coffee Lake (CFL) FSP binary (v 7.0.68.41) Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index 906f7b7ade..cfe42883be 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc @@ -54,15 +54,14 @@ gSiPkgTokenSpaceGuid.PcdTsegSize|0x100 # - # FSP API mode does not share stack with the boot loader, - # so FSP needs more temporary memory for FSP heap + stack size. + # When sharing stack with boot loader, FSP only needs small temp ram for heap # - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 + # - # FSP API mode does not need to enlarge the boot loader stack size - # since the stacks are separate. + # Boot loader stack size has to be big enough to executing FSP # - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x2 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x28000 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x1000 -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52221): https://edk2.groups.io/g/devel/message/52221 Mute This Topic: https://groups.io/mt/68589828/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing
Thanks for clarifying. Yes the minimum stack size of 160KB works as well. I will update this patch Thanks Prince -Original Message- From: Desimone, Nathaniel L Sent: Friday, December 13, 2019 2:27 PM To: devel@edk2.groups.io; Desimone, Nathaniel L ; Agyeman, Prince Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Actually looking at the CoffeeLake FSP Integration Guide it states the minimum stack size to be 160KB (0x28000) so I guess a slight revision to my previous statement: gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x28000 Thanks, Nate -Original Message- From: devel@edk2.groups.io On Behalf Of Nate DeSimone Sent: Friday, December 13, 2019 2:14 PM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Hi Prince, Looking at your patch I see the following two changes: 1. Reduce FSP Temp Ram size from 152KB to 64KB: - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 This makes sense because now that the FSP is using the single stack it does not need as much temp ram. 2. Increase the size of the platform's PEI phase stack from 128KB to 256KB: - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x2 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x4 This also makes sense because the FSP is now running on the same stack as the rest of the platform code, so more space will be needed to run MRC. What I am questioning is if we really need 256KB? Looking at the numbers from before, it seems like MRC was running OK with only 152KB of stack space, does platform code really use that much stack space _at_the_same_time_ that MRC is running? Or maybe, the newer version of MRC uses more stack space now? The basic summary is... have you tried booting with gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x26000? Thanks, Nate -Original Message- From: Agyeman, Prince Sent: Friday, December 13, 2019 8:25 AM To: Desimone, Nathaniel L ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Hi Nate, Which 256KB are you referring to ? The temporary ram size was reduced from 152KB (0x26000) to 64KB (0x1) With stack sharing enabled in FSP, temp ram size of 0x26000 causes system to hang during memory training. - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize |0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 -Original Message- From: Desimone, Nathaniel L Sent: Thursday, December 12, 2019 3:07 PM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Hi Prince, Is 256KB really necessary? Could you try the 152KB (0x26000) that we had previously? Thanks, Nate -Original Message- From: Agyeman, Prince Sent: Wednesday, December 11, 2019 5:13 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Kubacki, Michael A Subject: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2409 Updated WhiskeylakeURvp PCDs to enable FSP/BL stack sharing. This fixes the boot failure seen with the latest Coffee Lake (CFL) FSP binary (v 7.0.68.41) Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index 906f7b7ade..b3e1da3970 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk +++ gPcd.dsc @@ -54,15 +54,14 @@ gSiPkgTokenSpaceGuid.PcdTsegSize|0x100 # - # FSP API mode does not share stack with the boot loader, - # so FSP needs more temporary memory for FSP heap + stack size. + # When sharing stack with boot loader, FSP only needs small temp ram + for heap # - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 + # - # FSP API mode does not need to enlarge the boot loader stack size - # since the stacks are separate. + # Boot loader stack size has to be big enough to executing FSP # - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x2 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x4
Re: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing
Hi Nate, Which 256KB are you referring to ? The temporary ram size was reduced from 152KB (0x26000) to 64KB (0x1) With stack sharing enabled in FSP, temp ram size of 0x26000 causes system to hang during memory training. - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize |0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 -Original Message- From: Desimone, Nathaniel L Sent: Thursday, December 12, 2019 3:07 PM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Hi Prince, Is 256KB really necessary? Could you try the 152KB (0x26000) that we had previously? Thanks, Nate -Original Message- From: Agyeman, Prince Sent: Wednesday, December 11, 2019 5:13 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Kubacki, Michael A Subject: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2409 Updated WhiskeylakeURvp PCDs to enable FSP/BL stack sharing. This fixes the boot failure seen with the latest Coffee Lake (CFL) FSP binary (v 7.0.68.41) Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index 906f7b7ade..b3e1da3970 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk +++ gPcd.dsc @@ -54,15 +54,14 @@ gSiPkgTokenSpaceGuid.PcdTsegSize|0x100 # - # FSP API mode does not share stack with the boot loader, - # so FSP needs more temporary memory for FSP heap + stack size. + # When sharing stack with boot loader, FSP only needs small temp ram + for heap # - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 + # - # FSP API mode does not need to enlarge the boot loader stack size - # since the stacks are separate. + # Boot loader stack size has to be big enough to executing FSP # - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x2 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x4 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x1000 -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52201): https://edk2.groups.io/g/devel/message/52201 Mute This Topic: https://groups.io/mt/68227150/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2409 Updated WhiskeylakeURvp PCDs to enable FSP/BL stack sharing. This fixes the boot failure seen with the latest Coffee Lake (CFL) FSP binary (v 7.0.68.41) Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index 906f7b7ade..b3e1da3970 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc @@ -54,15 +54,14 @@ gSiPkgTokenSpaceGuid.PcdTsegSize|0x100 # - # FSP API mode does not share stack with the boot loader, - # so FSP needs more temporary memory for FSP heap + stack size. + # When sharing stack with boot loader, FSP only needs small temp ram for heap # - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x1 + # - # FSP API mode does not need to enlarge the boot loader stack size - # since the stacks are separate. + # Boot loader stack size has to be big enough to executing FSP # - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x2 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x4 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x1000 -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52138): https://edk2.groups.io/g/devel/message/52138 Mute This Topic: https://groups.io/mt/68227150/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH] SimicsOpenBoardPkg: Replace CMOS Hardcoded Addresses
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2330 Changes: * Added CmosMap.h that defines CMOS addresses used in SimicsOpenBoardPkg as macros * Replaced hardcoded CMOS addresses with the macros defined in CmosMap.h Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../SimicsOpenBoardPkg/Include/CmosMap.h | 35 +++ .../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 23 .../SmbiosPlatformDxe/SmbiosPlatformDxe.c | 24 - .../SmbiosPlatformDxe/SmbiosPlatformDxe.h | 1 + 4 files changed, 68 insertions(+), 15 deletions(-) create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Include/CmosMap.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/Include/CmosMap.h b/Platform/Intel/SimicsOpenBoardPkg/Include/CmosMap.h new file mode 100644 index 00..3221ce9a5b --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Include/CmosMap.h @@ -0,0 +1,35 @@ +/** @file +Cmos address definition macros header file. + +Copyright (c) 2019, Intel Corporation. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _CMOS_MAP_H_ +#define _CMOS_MAP_H_ + +// +// CMOS 0x34/0x35 specifies the system memory above 16 MB. +// * CMOS(0x35) is the high byte +// * CMOS(0x34) is the low byte +// * The size is specified in 64kb chunks +// * Since this is memory above 16MB, the 16MB must be added +// into the calculation to get the total memory size. +// +#define CMOS_SYSTEM_MEM_ABOVE_16MB_LOW_BYTE 0x34 +#define CMOS_SYSTEM_MEM_ABOVE_16MB_HIGH_BYTE0x35 + +// +// CMOS 0x5b-0x5d specifies the system memory above 4GB MB. +// * CMOS(0x5d) is the most significant size byte +// * CMOS(0x5c) is the middle size byte +// * CMOS(0x5b) is the least significant size byte +// * The size is specified in 64kb chunks +// +#define CMOS_SYSTEM_MEM_ABOVE_4GB_LOW_BYTE 0x5b +#define CMOS_SYSTEM_MEM_ABOVE_4GB_MIDDLE_BYTE 0x5c +#define CMOS_SYSTEM_MEM_ABOVE_4GB_HIGH_BYTE 0x5d + + +#endif // _CMOS_MAP_H_ diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c index e547de0045..60aa54be9e 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c @@ -26,6 +26,8 @@ #include #include +#include + #include "Platform.h" UINT8 mPhysMemAddressWidth; @@ -74,24 +76,33 @@ X58TsegMbytesInitialization( return; } +/** + Get the system memory size below 4GB + @return The size of system memory below 4GB +**/ UINT32 GetSystemMemorySizeBelow4gb ( VOID ) { + UINT32 Size; // // CMOS 0x34/0x35 specifies the system memory above 16 MB. - // * CMOS(0x35) is the high byte - // * CMOS(0x34) is the low byte // * The size is specified in 64kb chunks // * Since this is memory above 16MB, the 16MB must be added // into the calculation to get the total memory size. // - return (UINT32) (((UINTN)CmosRead16 (0x34) << 16) + SIZE_16MB); + Size = (UINT32) ((CmosRead16 (CMOS_SYSTEM_MEM_ABOVE_16MB_LOW_BYTE) << 16) + + SIZE_16MB); + return Size; } +/** + Get the system memory size above 4GB + @return The size of system memory above 4GB +**/ STATIC UINT64 GetSystemMemorySizeAbove4gb ( @@ -100,12 +111,10 @@ GetSystemMemorySizeAbove4gb ( UINT32 Size; // // CMOS 0x5b-0x5d specifies the system memory above 4GB MB. - // * CMOS(0x5d) is the most significant size byte - // * CMOS(0x5c) is the middle size byte - // * CMOS(0x5b) is the least significant size byte // * The size is specified in 64kb chunks // - Size = (CmosRead16 (0x5c) << 8) + CmosRead8 (0x5b); + Size = (CmosRead16 (CMOS_SYSTEM_MEM_ABOVE_4GB_MIDDLE_BYTE) << 8) + + CmosRead8 (CMOS_SYSTEM_MEM_ABOVE_4GB_LOW_BYTE); return LShiftU64 (Size, 16); } diff --git a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c index 37c659e275..23b284d2fa 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c @@ -9,23 +9,33 @@ #include "SmbiosPlatformDxe.h" +/** + Get the system memory size below 4GB + @return The size of system memory below 4GB +**/ UINT32 GetSystemMemorySizeBelow4gb( VOID ) { + UINT32 Size; // // CMOS 0x34/0x35 specifies the system memory above 16 MB. - // * CMOS(0x35) is the high byte - // * CMOS(0x34) is the low byte // * The size is specified in 64kb chunks // * Since this is memory above 16MB, the 16MB must be added // into the calculation to get the total memory size. // - return (UINT32) (((UINTN) CmosRead16 (0x34) << 16) + SIZE_16MB); + Size = (UINT32) ((CmosRead16 (CMOS_SYSTEM_MEM_ABOVE_16MB_LOW_BYTE) << 16) + + SIZE_16MB); + return Size; } +/** + Get the system memory size
Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] Maintainers.txt: Update maintainers for Simics packages
Reviewed-by: Prince Agyeman -Original Message- From: Kubacki, Michael A Sent: Monday, November 25, 2019 4:17 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Agyeman, Prince Subject: [edk2-platforms][PATCH V1 1/1] Maintainers.txt: Update maintainers for Simics packages David Y Wei is no longer available as a maintainer. David is removed as a maintainer for the following packages: * Platform/Intel/SimicsOpenBoardPkg * Silicon/Intel/SimicsIch10Pkg * Silicon/Intel/SimicsX58SktPkg Cc: Nate DeSimone Cc: Agyeman Prince Signed-off-by: Michael Kubacki --- Maintainers.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index cb7ae0a95d..98373acc85 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -180,7 +180,6 @@ M: Nate DeSimone Platform/Intel/SimicsOpenBoardPkg F: Platform/Intel/SimicsOpenBoardPkg/ -M: Wei David Y M: Agyeman Prince Platform/Intel/Tools @@ -217,12 +216,10 @@ M: Sai Chaganty Silicon/Intel/SimicsX58SktPkg F: Silicon/Intel/SimicsX58SktPkg/ -M: Wei David Y M: Agyeman Prince Silicon/Intel/SimicsIch10Pkg F: Silicon/Intel/SimicsIch10Pkg/ -M: Wei David Y M: Agyeman Prince Silicon/Intel/Tools -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51257): https://edk2.groups.io/g/devel/message/51257 Mute This Topic: https://groups.io/mt/61951351/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH] BoardModulePkg: Remove unused variable
Removed unused variable 'RegEmptied' in BdsPs2KbcLib.c to avoid gcc 5 build error unused-but-set-variable. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c| 2 -- 1 file changed, 2 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c index 3a885e0d71..eff10bddb4 100644 --- a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c +++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c @@ -47,13 +47,11 @@ DetectPs2Keyboard ( ) { UINT32TimeOut; - UINT32RegEmptied; UINT8 Data; UINT32SumTimeOut; BOOLEAN FoundPs2Kbc; TimeOut = 0; - RegEmptied = 0; FoundPs2Kbc = FALSE; // -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50173): https://edk2.groups.io/g/devel/message/50173 Mute This Topic: https://groups.io/mt/45359163/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [Patch v2 5/9] BoardModulePkg: Added Pcds to Super I/O driver
Included PCDs to the Super I/O DXE driver, to allow the enable/disable of Ps2 keyboard/mouse, UART1 and UART2 ports. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../LegacySioDxe/LegacySioDxe.inf | 12 .../BoardModulePkg/LegacySioDxe/SioChip.c | 68 +-- .../BoardModulePkg/LegacySioDxe/SioChip.h | 8 +++ .../BoardModulePkg/LegacySioDxe/SioDriver.c | 40 +++ 4 files changed, 122 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf index f01f63e69e..ccddc97e91 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf @@ -34,6 +34,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + BoardModulePkg/BoardModulePkg.dec [Sources] SioChip.c @@ -44,6 +45,17 @@ SioDriver.h ComponentName.c +[Pcd] + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdUart1Enable + gBoardModulePkgTokenSpaceGuid.PcdUart1IrqMask + gBoardModulePkgTokenSpaceGuid.PcdUart1IoPort + gBoardModulePkgTokenSpaceGuid.PcdUart1Length + gBoardModulePkgTokenSpaceGuid.PcdUart2Enable + gBoardModulePkgTokenSpaceGuid.PcdUart2IrqMask + gBoardModulePkgTokenSpaceGuid.PcdUart2IoPort + gBoardModulePkgTokenSpaceGuid.PcdUart2Length + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice [Protocols] gEfiPciIoProtocolGuid ## CONSUMES gEfiDevicePathProtocolGuid## PRODUCES diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c index 81efe3c38b..e63977be60 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c @@ -19,12 +19,31 @@ ACPI_SIO_RESOURCES_IO_IRQ mCom1Resources = { { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, -0x3f8, -8 + FixedPcdGet16 (PcdUart1IoPort), + FixedPcdGet8 (PcdUart1Length) +}, +{ + { ACPI_IRQ_NOFLAG_DESCRIPTOR }, + FixedPcdGet16 (PcdUart1IrqMask) +}, +{ + ACPI_END_TAG_DESCRIPTOR, + 0 +} +}; + +// +// COM 2 UART Controller +// +ACPI_SIO_RESOURCES_IO_IRQ mCom2Resources = { + { +{ ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, +FixedPcdGet16 (PcdUart2IoPort), +FixedPcdGet8 (PcdUart2Length) }, { { ACPI_IRQ_NOFLAG_DESCRIPTOR }, -BIT4// IRQ4 +FixedPcdGet16 (PcdUart2IrqMask), }, { ACPI_END_TAG_DESCRIPTOR, @@ -74,6 +93,7 @@ ACPI_SIO_RESOURCES_IO_IRQ mMouseResources = { // Table of SIO Controllers // DEVICE_INFOmDeviceInfo[] = { +#if FixedPcdGet8 (PcdUart1Enable) == DEVICE_ENABLED { { EISA_PNP_ID(0x501), @@ -84,6 +104,20 @@ DEVICE_INFOmDeviceInfo[] = { { (ACPI_SMALL_RESOURCE_HEADER *) }, { (ACPI_SMALL_RESOURCE_HEADER *) } }, // COM 1 UART Controller +#endif +#if FixedPcdGet8 (PcdUart2Enable) == DEVICE_ENABLED + { +{ + EISA_PNP_ID(0x501), + 0 +}, +0, +RESOURCE_IO | RESOURCE_IRQ, +{ (ACPI_SMALL_RESOURCE_HEADER *) }, +{ (ACPI_SMALL_RESOURCE_HEADER *) } + }, // COM 2 UART Controller +#endif +#if FixedPcdGet8 (PcdPs2KbMsEnable) == DEVICE_ENABLED { { EISA_PNP_ID(0x303), @@ -103,10 +137,30 @@ DEVICE_INFOmDeviceInfo[] = { 0, // Cannot change resource { (ACPI_SMALL_RESOURCE_HEADER *) }, { (ACPI_SMALL_RESOURCE_HEADER *) } - } // PS/2 Mouse Controller + }, // PS/2 Mouse Controller +#endif + DEVICE_INFO_END }; + +/** + Gets the number of devices in Table of SIO Controllers mDeviceInfo + + @retval Number of enabled devices in Table of SIO Controllers. +**/ +UINTN +EFIAPI +GetDeviceCount ( + VOID +){ + UINTNCount; + // Get mDeviceInfo item count + // -1 to account for for the end device info + Count = ARRAY_SIZE (mDeviceInfo) - 1; + return Count; +} + /** Return the supported devices. @@ -128,7 +182,7 @@ DeviceGetList ( // // Allocate enough memory for simplicity // - DeviceCount = sizeof (mDeviceInfo) / sizeof (mDeviceInfo[0]); + DeviceCount = GetDeviceCount (); LocalDevices = AllocatePool (sizeof (EFI_SIO_ACPI_DEVICE_ID) * DeviceCount); ASSERT (LocalDevices != NULL); if (LocalDevices == NULL) { @@ -175,8 +229,10 @@ DeviceSearch ( ) { UINTN Index; + UINTN DeviceCount; - for (Index = 0; Index < sizeof (mDeviceInfo) / sizeof (mDeviceInfo[0]); Index++) { + DeviceCount = GetDeviceCount (); + for (Index = 0; Index < DeviceCount; Index++) { if (CompareMem (Device, [Index].Device, sizeof (*Device)) == 0) { return [Index]; } diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.h b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.h index 9322365923..afff6fe7b5 100644
[edk2-devel] [edk2-platforms] [Patch v2 8/9] SimicsOpenBoardPkg: Add Ps2 keyboard Support
Added BIOS keyboard support to BoardX58Ich10 * Included BoardModulePkg's generic Super I/O DXE driver * Configured Super I/O and Ps2 keyboard related PCD to enable Ps2 keyboard Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 2 ++ .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf | 1 + .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc| 6 ++ 3 files changed, 9 insertions(+) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index e0a02b4efc..7329b19e8e 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -283,3 +283,5 @@ $(BOARD_PKG)/SimicsDxe/SimicsDxe.inf $(BOARD_PKG)/SimicsVideoDxe/SimicsVideoDxe.inf $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf index 6dc7b4aa56..ef6b35c92f 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf @@ -212,6 +212,7 @@ INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf +INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index 0298e4b12d..cd95755f91 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc @@ -196,6 +196,12 @@ gMinPlatformPkgTokenSpaceGuid.PcdMaxCpuThreadCount|4 gMinPlatformPkgTokenSpaceGuid.PcdPcIoApicAddressBase|0xFEC01000 + ## + # Board Configuration + ## + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable|1 + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0x00, 0x00, 0x1F, 0x00} + [PcdsFixedAtBuild.X64] ## # Edk2 Configuration -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50024): https://edk2.groups.io/g/devel/message/50024 Mute This Topic: https://groups.io/mt/42928995/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [Patch v2 3/9] BoardModulePkg: Add Super I/O driver
Added a generic Super I/O driver that produces the Sio protocol. This driver was moved from the SimicsOpenBoardPkg. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dsc | 5 + .../LegacySioDxe/ComponentName.c | 173 + .../LegacySioDxe/ComponentName.h | 87 +++ .../LegacySioDxe/LegacySioDxe.inf | 51 ++ .../BoardModulePkg/LegacySioDxe/Register.h| 15 + .../BoardModulePkg/LegacySioDxe/SioChip.c | 270 .../BoardModulePkg/LegacySioDxe/SioChip.h | 185 ++ .../BoardModulePkg/LegacySioDxe/SioDriver.c | 600 ++ .../BoardModulePkg/LegacySioDxe/SioDriver.h | 133 .../BoardModulePkg/LegacySioDxe/SioService.c | 249 .../BoardModulePkg/LegacySioDxe/SioService.h | 143 + 11 files changed, 1911 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/Register.h create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.h create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.c create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioDriver.h create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioService.c create mode 100644 Platform/Intel/BoardModulePkg/LegacySioDxe/SioService.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc index 5ec68ceebf..5af26eb97e 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc @@ -32,6 +32,10 @@ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf [LibraryClasses.common.PEIM] FirmwareBootMediaLib|IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf @@ -76,6 +80,7 @@ [Components] BoardModulePkg/FirmwareBootMediaInfo/FirmwareBootMediaInfoPei.inf + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf BoardModulePkg/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c new file mode 100644 index 00..c9b3df0473 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c @@ -0,0 +1,173 @@ +/** @file + Component Name functions implementation for the Super I/O DXE driver. + + Copyright (c) 2013 - 2019 Intel Corporation. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include "SioDriver.h" + +/// +/// Component Name Protocol instance +/// +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL mSioComponentName = { + SioComponentNameGetDriverName, + SioComponentNameGetControllerName, + "eng" +}; + +/// +/// Component Name 2 Protocol instance +/// +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL mSioComponentName2 = { + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)SioComponentNameGetDriverName, + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)SioComponentNameGetControllerName, + "en" +}; + +/// +/// Table of driver names +/// +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioDriverNameTable[] = { + { +"eng;en", +L"Super I/O Driver" + }, + { +NULL, +NULL + } +}; + +/// +/// Table of Controller names +/// +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioControllerNameTable[] = { + { +"eng;en", +L"Super I/O Controller" + }, + { +NULL, +NULL + } +}; + +/** + Retrieves a Unicode string that is the user-readable name of the EFI Driver. + + @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. + @param Language A pointer to a three-character ISO 639-2 language identifier. + This is the language of the driver name that that the caller + is requesting, and it must match one of the languages specified + in SupportedLanguages. The number of languages supported by a + driver is up to the driver writer. + @param DriverName A pointer to the Unicode string to return. This Unicode string +
[edk2-devel] [edk2-platforms] [Patch v2 0/9] Enable Ps2 keyboard
This patch series enables BIOS Ps2 keyboard in GalagoPro3 Changes in v2: * fixed typos * fixed discriptions * broke patches down as per recommendation from Michael Kubacki * renamed the Ps2KbcLib to BdsPs2KbcLib * moved BdsPs2KbcLib to BoardModulePkg as it is generic and can be shared What was done in v1: Patch 0001 adds PCDs to BoardModulePkg that will enable/disable, describe Super I/O , Ps2 keyboard/mouse, uart1 and uart2 com ports Patch 0002 moves the generic Super I/O driver from SimicsOpenBoardPkg to BoardModulePkg in order for it to be shared. This driver publishes the gEfiSioProtocolGuid consumed by edk2's MdeModulePkg/Bus/Isa/Ps2KeyboardDxe driver to enable Ps2 keyboard functions in BIOS Patch 0003 adds PCDs defined in patch 0001 to enable/disable devices in the Super I/O driver added in patch 0002 Patch 0004 adds a Null Ps2 Library that adds Ps2 keyboard device path to ConIn and ConInDev Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Patch 0005 enables Ps2 keyboard in BIOS by setting Ps2 keyboard related PCDs Prince Agyeman (9): BoardModulePkg: Add gBoardModulePkgTokenSpaceGuid SimicsOpenBoardPkg: Remove Super I/O DXE driver BoardModulePkg: Add Super I/O driver BoardModulePkg: Add fix at build Pcds BoardModulePkg: Added Pcds to Super I/O driver BoardModulePkg: Add Ps2 Keyboard Library KabylakeOpenBoardPkg: Add Ps2 Keyboard Support SimicsOpenBoardPkg: Add Ps2 keyboard Support WhiskeylakeOpenBoardPkg: Add Ps2 Keyboard Support .../Intel/BoardModulePkg/BoardModulePkg.dec | 25 +++ .../Intel/BoardModulePkg/BoardModulePkg.dsc | 6 + .../LegacySioDxe/ComponentName.c | 2 +- .../LegacySioDxe/ComponentName.h | 2 +- .../LegacySioDxe/LegacySioDxe.inf | 17 +- .../LegacySioDxe/Register.h | 0 .../LegacySioDxe/SioChip.c| 70 +- .../LegacySioDxe/SioChip.h| 18 +- .../LegacySioDxe/SioDriver.c | 40 .../LegacySioDxe/SioDriver.h | 1 - .../LegacySioDxe/SioService.c | 0 .../LegacySioDxe/SioService.h | 2 +- .../Library/BdsPs2KbcLib/BdsPs2KbcLib.c | 202 ++ .../Library/BdsPs2KbcLib/BdsPs2KbcLib.h | 65 ++ .../Library/BdsPs2KbcLib/BdsPs2KbcLib.inf | 38 .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 +- .../DxeMultiBoardAcpiSupportLib.inf | 3 +- .../GalagoPro3/OpenBoardPkg.dsc | 7 + .../GalagoPro3/OpenBoardPkg.fdf | 2 + .../GalagoPro3/OpenBoardPkgPcd.dsc| 6 + .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 +- .../DxeMultiBoardAcpiSupportLib.inf | 3 +- .../KabylakeRvp3/OpenBoardPkg.dsc | 6 + .../KabylakeRvp3/OpenBoardPkg.fdf | 2 + .../KabylakeRvp3/OpenBoardPkgPcd.dsc | 7 + .../KabylakeOpenBoardPkg/OpenBoardPkg.dec | 2 - .../BoardX58Ich10/OpenBoardPkg.dsc| 3 +- .../BoardX58Ich10/OpenBoardPkg.fdf| 2 +- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 6 + .../WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec | 1 - .../WhiskeylakeURvp/OpenBoardPkg.dsc | 6 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 2 + .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 6 + 33 files changed, 523 insertions(+), 35 deletions(-) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.c (96%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.h (96%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/LegacySioDxe.inf (63%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/Register.h (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.c (75%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.h (90%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.c (88%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.h (95%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.h (97%) create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50016): https://edk2.groups.io/g/devel/message/50016 Mute This Topic: https://groups.io/mt/42928903/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [Patch v2 7/9] KabylakeOpenBoardPkg: Add Ps2 Keyboard Support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2228 What was done: * Added BDS Ps2 keyboard DXE driver. * Added Super I/O DXE driver to publish the SIO protocol needed by the Ps2 keyboard DXE driver. * Included a Ps2 Library to BdsDxe driver to add the Ps2 device path to ConIn and ConInDev variables * Configured the Super I/O Pci to Isa bridge bus, device, function device info PCD. This will help the Super I/O driver identify which bridge the Super I/O is connected to. * Removed duplicate Ps2 enable PCDs * Updated libraries to use Ps2 enable PCD defined in BoardModulePkg Signed-off-by: Prince Agyeman --- .../Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 ++- .../Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf | 3 ++- .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 7 +++ .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf | 2 ++ .../KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc| 6 ++ .../Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 ++- .../Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf | 3 ++- .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc | 6 ++ .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf | 2 ++ .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc | 7 +++ Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec | 2 -- 11 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf index a79bdcdbc6..35cd5c8fdb 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf @@ -33,9 +33,10 @@ MinPlatformPkg/MinPlatformPkg.dec KabylakeOpenBoardPkg/OpenBoardPkg.dec KabylakeSiliconPkg/SiPkg.dec + BoardModulePkg/BoardModulePkg.dec [Pcd] - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable gMinPlatformPkgTokenSpaceGuid.PcdPciExpNative gMinPlatformPkgTokenSpaceGuid.PcdNativeAspmEnable gMinPlatformPkgTokenSpaceGuid.PcdLowPowerS0Idle diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf index db8ba7a822..9fe27f9fda 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf @@ -34,9 +34,10 @@ MinPlatformPkg/MinPlatformPkg.dec KabylakeOpenBoardPkg/OpenBoardPkg.dec KabylakeSiliconPkg/SiPkg.dec + BoardModulePkg/BoardModulePkg.dec [Pcd] - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPciExpNative gKabylakeOpenBoardPkgTokenSpaceGuid.PcdNativeAspmEnable gKabylakeOpenBoardPkgTokenSpaceGuid.PcdLowPowerS0Idle diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index f59248bba4..55edc1a2f8 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -311,6 +311,11 @@ MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf + MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf{ + + NULL|BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf + } UefiCpuPkg/CpuDxe/CpuDxe.inf ShellPkg/Application/Shell/Shell.inf { @@ -408,3 +413,5 @@ !endif } !endif + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf + diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index 80efab1aad..d58466d390 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf @@ -335,6 +335,8 @@ INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf +INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF ShellPkg/Application/Shell/Shell.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
[edk2-devel] [edk2-platforms] [Patch v2 1/9] BoardModulePkg: Add gBoardModulePkgTokenSpaceGuid
Added gBoardModulePkgTokenSpaceGuid to BoardModulePkg Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/BoardModulePkg/BoardModulePkg.dec | 4 1 file changed, 4 insertions(+) diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec index f461cc7cab..8a811602e6 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -42,3 +42,7 @@ ## GUID to publish BIOS information HOB gBiosInfoGuid = { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 0x85} } + + ## {7F4EE1A3-C1F3-43E4-BA1A-39DCDE46C343} + gBoardModulePkgTokenSpaceGuid = { 0x7f4ee1a3, 0xc1f3, 0x43e4, { 0xba, 0x1a, 0x39, 0xdc, 0xde, 0x46, 0xc3, 0x43 } } + -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50017): https://edk2.groups.io/g/devel/message/50017 Mute This Topic: https://groups.io/mt/42928921/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [Patch v2 2/9] SimicsOpenBoardPkg: Remove Super I/O DXE driver
Removed the Super I/O DXE driver from SimicsOpenBoardPkg. This driver will be added to the BoardModulePky as it is generic and can be shared by other open board packages Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../BoardX58Ich10/OpenBoardPkg.dsc| 1 - .../BoardX58Ich10/OpenBoardPkg.fdf| 1 - .../LegacySioDxe/ComponentName.c | 173 - .../LegacySioDxe/ComponentName.h | 87 --- .../LegacySioDxe/LegacySioDxe.inf | 54 -- .../LegacySioDxe/Register.h | 15 - .../SimicsOpenBoardPkg/LegacySioDxe/SioChip.c | 272 .../SimicsOpenBoardPkg/LegacySioDxe/SioChip.h | 195 -- .../LegacySioDxe/SioDriver.c | 600 -- .../LegacySioDxe/SioDriver.h | 134 .../LegacySioDxe/SioService.c | 249 .../LegacySioDxe/SioService.h | 143 - 12 files changed, 1924 deletions(-) delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioDriver.h delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioService.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 78f1e80990..e0a02b4efc 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -280,7 +280,6 @@ ### $(BOARD_PKG)/AcpiTables/AcpiTables.inf $(BOARD_PKG)/AcpiTables/MinPlatformAcpiTables/AcpiPlatform.inf - $(BOARD_PKG)/LegacySioDxe/LegacySioDxe.inf $(BOARD_PKG)/SimicsDxe/SimicsDxe.inf $(BOARD_PKG)/SimicsVideoDxe/SimicsVideoDxe.inf $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf index 39226251a7..6dc7b4aa56 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf @@ -213,7 +213,6 @@ INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf -INF $(BOARD_PKG)/LegacySioDxe/LegacySioDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF $(BOARD_PKG)/SmbiosPlatformDxe/SmbiosPlatformDxe.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c b/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c deleted file mode 100644 index 4ba02f92c0..00 --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c +++ /dev/null @@ -1,173 +0,0 @@ -/** @file - Install Base and Size Info Ppi for Firmware Volume Recovery. - - Copyright (c) 2013 - 2019 Intel Corporation. All rights reserved. - - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "SioDriver.h" - -/// -/// Component Name Protocol instance -/// -GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL mSioComponentName = { - SioComponentNameGetDriverName, - SioComponentNameGetControllerName, - "eng" -}; - -/// -/// Component Name 2 Protocol instance -/// -GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL mSioComponentName2 = { - (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)SioComponentNameGetDriverName, - (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)SioComponentNameGetControllerName, - "en" -}; - -/// -/// Table of driver names -/// -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioDriverNameTable[] = { - { -"eng;en", -L"Super I/O Driver" - }, - { -NULL, -NULL - } -}; - -/// -/// Table of Controller names -/// -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSioControllerNameTable[] = { - { -"eng;en", -L"Super I/O Controller" - }, - { -NULL, -NULL - } -}; - -/** - Retrieves a Unicode string that is the user-readable name of the EFI Driver. - - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. - @param Language A pointer to a three-character ISO 639-2 language identifier. - This is the language of the driver name that that the caller
[edk2-devel] [edk2-platforms] [Patch v2 9/9] WhiskeylakeOpenBoardPkg: Add Ps2 Keyboard Support
What was done: * Added BDS Ps2 keyboard DXE driver. * Included Super I/O DXE driver to publish the SIO protocol needed by the Ps2 keyboard DXE driver. * Included a Ps2 Library to BdsDxe driver to add the Ps2 device path to ConIn and ConInDev variables * Configured the Super I/O Pci to Isa bridge bus, device, function device info PCD. This will help the Super I/O driver identify which bridge the Super I/O is connected to. * Removed duplicate Ps2 enable PCDs Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec | 1 - .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 ++ .../WhiskeylakeURvp/OpenBoardPkg.fdf| 2 ++ .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 6 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec b/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec index 34494d0168..fbb9549e44 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec @@ -271,7 +271,6 @@ gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdAcpiHibernate|1|UINT8|0x4003 gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdLowPowerS0Idle|0|UINT8|0x4004 gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdPciExpNative|0|UINT8|0x4005 gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdNativeAspmEnable|1|UINT8|0x4006 -gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdPs2KbMsEnable|0|UINT8|0x4009 gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDisableActiveTripPoints|1|UINT8|0x400A gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDisablePassiveTripPoints|0|UINT8|0x400B gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDisableCriticalTripPoints|1|UINT8|0x400C diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc index 8e0ea2d5ce..1c7c12696c 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc @@ -335,6 +335,11 @@ MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf + MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf{ + + NULL|BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf + } UefiCpuPkg/CpuDxe/CpuDxe.inf ShellPkg/Application/Shell/Shell.inf { @@ -428,3 +433,4 @@ !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE $(PLATFORM_BOARD_PACKAGE)/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf !endif + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf index 140e6260c9..8a4fd973b4 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf @@ -340,6 +340,8 @@ INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf +INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF ShellPkg/Application/Shell/Shell.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index adbd48f6d7..52471cb25b 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc @@ -296,6 +296,12 @@ gMinPlatformPkgTokenSpaceGuid.PcdTestPointIbvPlatformFeature|{0x03, 0x0F, 0x07, 0x1F, 0x1F, 0x0F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} !endif + ## + # Board Configuration + ## + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable|1 + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0x00, 0x00, 0x1F, 0x00} + [PcdsFixedAtBuild.IA32] ## # Edk2 Configuration -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50025): https://edk2.groups.io/g/devel/message/50025 Mute This Topic: https://groups.io/mt/42929001/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [Patch v2 6/9] BoardModulePkg: Add Ps2 Keyboard Library
Added a generic Ps2 keyboard library that adds ps2 device path to ConIn and ConInDev Uefi variables Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dsc | 1 + .../Library/BdsPs2KbcLib/BdsPs2KbcLib.c | 202 ++ .../Library/BdsPs2KbcLib/BdsPs2KbcLib.h | 65 ++ .../Library/BdsPs2KbcLib/BdsPs2KbcLib.inf | 38 4 files changed, 306 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.h create mode 100644 Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc index 5af26eb97e..bcc2dfbfeb 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc @@ -88,3 +88,4 @@ BoardModulePkg/Library/BiosIdLib/PeiBiosIdLib.inf BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFirmwareBootMediaInfoLib.inf + BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.inf diff --git a/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c new file mode 100644 index 00..3a885e0d71 --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Library/BdsPs2KbcLib/BdsPs2KbcLib.c @@ -0,0 +1,202 @@ +/** @file + Main file for Ps2 keyboard controller library. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "BdsPs2KbcLib.h" + +GLOBAL_REMOVE_IF_UNREFERENCED PLATFORM_KEYBOARD_DEVICE_PATH gKeyboardDevicePath = { + gPciRootBridge, + { +{ + HARDWARE_DEVICE_PATH, + HW_PCI_DP, + { +(UINT8) (sizeof (PCI_DEVICE_PATH)), +(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) + } +}, +0, // Function, patched in EnumPs2Keyboard +0 // Device, patched in EnumPs2Keyboard + }, + { +{ + ACPI_DEVICE_PATH, + ACPI_DP, + { +(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), +(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) + } +}, +EISA_PNP_ID(0x0303), +0 + }, + gEndEntire +}; + +/** + Check if PS2 keyboard is conntected, by sending ECHO command. + @retval TRUE if connected FALSE otherwise +**/ +BOOLEAN +DetectPs2Keyboard ( + VOID + ) +{ + UINT32TimeOut; + UINT32RegEmptied; + UINT8 Data; + UINT32SumTimeOut; + BOOLEAN FoundPs2Kbc; + + TimeOut = 0; + RegEmptied = 0; + FoundPs2Kbc = FALSE; + + // + // Wait for input buffer empty + // + for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) { +if ((IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x02) == 0) { + FoundPs2Kbc = TRUE; + break; +} +MicroSecondDelay (30); + } + + if (FoundPs2Kbc == FALSE) { +return FALSE; + } + + // + // Send echo command + // + IoWrite8 (KEYBOARD_8042_DATA_REGISTER, KBC_INPBUF_VIA60_KBECHO); + + // + // Init variables + // + FoundPs2Kbc = FALSE; + TimeOut = 0; + SumTimeOut = 0; + Data = 0; + + // + // Read from 8042 (multiple times if needed) + // until the expected value appears + // use SumTimeOut to control the iteration + // + while (1) { +// +// Perform a read +// +for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) { + if (IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x01) { +Data = IoRead8 (KEYBOARD_8042_DATA_REGISTER); +break; + } + MicroSecondDelay (30); +} + +SumTimeOut += TimeOut; + +if (Data == KBC_INPBUF_VIA60_KBECHO) { + FoundPs2Kbc = TRUE; + break; +} + +if (SumTimeOut >= PS2_KEYBOARD_WAITFORVALUE_TIMEOUT) { + break; +} + } + return FoundPs2Kbc; +} + +/** + Check if PS2 keyboard is conntected. If the result of first time is + error, it will retry again. + @retval TRUE if connected FALSE otherwise +**/ +BOOLEAN +IsPs2KeyboardConnected ( + VOID + ) +{ + BOOLEAN Result; + Result = DetectPs2Keyboard (); + + if (Result == FALSE) { +// +// If there is no ps2 keyboard detected for the 1st time, retry again. +// +Result = DetectPs2Keyboard (); + } + return Result; +} + + +/** + Updates the ConIn variable with Ps2 Keyboard device path, + if it doesn't already exists in ConIn and ConInDev +**/ +VOID +AddPs2Keyboard ( + VOID + ) +{ + SIO_PCI_ISA_BRIDGE_DEVICE_INFO *SioIsaInfo; + + DEBUG ((DEBUG_INFO, "[AddPs2Keyboard]\n")); + + SioIsaInfo = (SIO_PCI_ISA_BRIDGE_DEVICE_INFO*) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice); + + // + // patch IsaBridge device and and function + // + gKeyboardDevicePath.IsaBridge.Device = SioIsaInfo->Device; +
Re: [edk2-devel] [edk2-platforms] [PATCH 4/5] KabylakeOpenBoardPkg: Add Ps2 keyboard Null Library
Hi Chasel, I will fix the descriptions and typos as suggested in my v2 patch series. Thanks for the feedback! Prince -Original Message- From: Chiu, Chasel Sent: Monday, November 4, 2019 1:04 AM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Kubacki, Michael A ; Desimone, Nathaniel L Subject: RE: [edk2-platforms] [PATCH 4/5] KabylakeOpenBoardPkg: Add Ps2 keyboard Null Library Hi Prince, I added 3 questions below inline, please help to check them. Thanks! > -Original Message- > From: Agyeman, Prince > Sent: Saturday, November 2, 2019 3:51 AM > To: devel@edk2.groups.io > Cc: Kubacki, Michael A ; Chiu, Chasel > ; Desimone, Nathaniel L > > Subject: [edk2-platforms] [PATCH 4/5] KabylakeOpenBoardPkg: Add Ps2 > keyboard Null Library > > Added GalagoPro3 board ps2 keyboard library that adds ps2 device path > to ConIn and ConInDev Uefi variables > > Cc: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone > > Signed-off-by: Prince Agyeman > --- > .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c | 202 > ++ .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.h | > 65 ++ > .../Library/Ps2KbcLib/Ps2KbcLib.inf | 39 > 3 files changed, 306 insertions(+) > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2Kb > cLib.c > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2Kb > cLib.h > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2Kb > cLib.inf > > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2 > K > bcLib.c > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2 > KbcLib.c > new file mode 100644 > index 00..ac1563d3cd > --- /dev/null > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/P > +++ s2KbcLib.c > @@ -0,0 +1,202 @@ > +/** @file > + Main file for NULL named library for Ps2 keyboard controller librarr. I think this is not really a NULL library right? It actually does a lot real functionality. Also the typo "librarr" > + > + Copyright (c) 2019, Intel Corporation. All rights reserved. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include "Ps2KbcLib.h" > + > +GLOBAL_REMOVE_IF_UNREFERENCED PLATFORM_KEYBOARD_DEVICE_PATH > +gKeyboardDevicePath = { > + gPciRootBridge, > + { > +{ > + HARDWARE_DEVICE_PATH, > + HW_PCI_DP, > + { > +(UINT8) (sizeof (PCI_DEVICE_PATH)), > +(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) > + } > +}, > +0, // Function, patched in EnumPs2Keyboard > +0 // Device, patched in EnumPs2Keyboard > + }, > + { > +{ > + ACPI_DEVICE_PATH, > + ACPI_DP, > + { > +(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), > +(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) > + } > +}, > +EISA_PNP_ID(0x0303), > +0 > + }, > + gEndEntire > +}; > + > +/** > + Check if PS2 keyboard is conntected, by sending ECHO command. > + @retval TRUE if connected FALSE otherwise > +**/ > +BOOLEAN > +DetectPs2Keyboard ( > + VOID > + ) > +{ > + UINT32TimeOut; > + UINT32RegEmptied; > + UINT8 Data; > + UINT32SumTimeOut; > + BOOLEAN FoundPs2Kbc; > + > + TimeOut = 0; > + RegEmptied = 0; > + FoundPs2Kbc = FALSE; > + > + // > + // Wait for input buffer empty > + // > + for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) { > +if ((IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x02) == 0) { > + FoundPs2Kbc = TRUE; > + break; > +} > +MicroSecondDelay (30); > + } > + > + if (FoundPs2Kbc == FALSE) { > +return FALSE; > + } > + > + // > + // Send echo command > + // > + IoWrite8 (KEYBOARD_8042_DATA_REGISTER, > KBC_INPBUF_VIA60_KBECHO); > + > + // > + // Init variables > + // > + FoundPs2Kbc = FALSE; > + TimeOut = 0; > + SumTimeOut = 0; > + Data = 0; > + > + // > + // Read from 8042 (multiple times if needed) // until the expected > + value appears // use SumTimeOut to control the iteration // while > + (1) { > +// > +// Perform a read > +// > +for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) > { > + if (IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x01) { > +Data = IoRead8 (KEYBOARD_8042_DATA_REGISTER); > +break; > + } &g
[edk2-devel] [edk2-platforms] [PATCH v2] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2164 Replaced Cmos.c and Cmos.h with BoardModulePkg's Cmos library CmosAccessLib Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BoardInitLib/PeiX58Ich10InitPreMemLib.c | 46 --- .../BoardX58Ich10/OpenBoardPkg.dsc| 2 + .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c | 57 --- .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h | 50 .../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 19 +-- .../SimicsOpenBoardPkg/SimicsPei/Platform.c | 4 +- .../SimicsPei/SimicsPei.inf | 3 +- .../SmbiosPlatformDxe/SmbiosPlatformDxe.c | 38 + .../SmbiosPlatformDxe/SmbiosPlatformDxe.h | 1 + .../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 2 + 10 files changed, 14 insertions(+), 208 deletions(-) delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/PeiX58Ich10InitPreMemLib.c b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/PeiX58Ich10InitPreMemLib.c index c3a31ed426..325a341cdf 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/PeiX58Ich10InitPreMemLib.c +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/PeiX58Ich10InitPreMemLib.c @@ -20,52 +20,6 @@ #include "PeiX58Ich10InitLib.h" #include -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -CmosRead8( - IN UINTN Index - ) -{ - IoWrite8 (0x70, (UINT8)Index); - return IoRead8(0x71); -} - - -/** - Writes 8-bits of CMOS data. - - Writes 8-bits of CMOS data to the location specified by Index - with the value specified by Value and returns Value. - - @param Index The CMOS location to write. - @param Value The value to write to CMOS. - - @return The value written to CMOS. - -**/ -UINT8 -EFIAPI -CmosWrite8( - IN UINTN Index, - IN UINT8 Value - ) -{ - IoWrite8 (0x70, (UINT8)Index); - IoWrite8 (0x71, Value); - return Value; -} - EFI_STATUS EFIAPI diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 78f1e80990..9b9e088cbe 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -116,6 +116,8 @@ SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf + PlatformCmosAccessLib|BoardModulePkg/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf + CmosAccessLib|BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf [LibraryClasses.common.SEC] ### diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c deleted file mode 100644 index b34ba9283b..00 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file - PC/AT CMOS access routines - - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved. - - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "Cmos.h" -#include "Library/IoLib.h" - -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -CmosRead8 ( - IN UINTN Index - ) -{ - IoWrite8 (0x70, (UINT8) Index); - return IoRead8 (0x71); -} - - -/** - Writes 8-bits of CMOS data. - - Writes 8-bits of CMOS data to the location specified by Index - with the value specified by Value and returns Value. - - @param Index The CMOS location to write. - @param Value The value to write to CMOS. - - @return The value written to CMOS. - -**/ -UINT8 -EFIAPI -CmosWrite8 ( - IN UINTN Index, - IN UINT8 Value - ) -{ - IoWrite8 (0x70, (UINT8) Index); - IoWrite8 (0x71, Value); - return Value; -} - diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h deleted file mode 100644 index 07fa2e2d11..00 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file - PC/AT CMOS access routines - -
[edk2-devel] [edk2-platforms] [PATCH 4/5] KabylakeOpenBoardPkg: Add Ps2 keyboard Null Library
Added GalagoPro3 board ps2 keyboard library that adds ps2 device path to ConIn and ConInDev Uefi variables Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c | 202 ++ .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.h | 65 ++ .../Library/Ps2KbcLib/Ps2KbcLib.inf | 39 3 files changed, 306 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.h create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c new file mode 100644 index 00..ac1563d3cd --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c @@ -0,0 +1,202 @@ +/** @file + Main file for NULL named library for Ps2 keyboard controller librarr. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "Ps2KbcLib.h" + +GLOBAL_REMOVE_IF_UNREFERENCED PLATFORM_KEYBOARD_DEVICE_PATH gKeyboardDevicePath = { + gPciRootBridge, + { +{ + HARDWARE_DEVICE_PATH, + HW_PCI_DP, + { +(UINT8) (sizeof (PCI_DEVICE_PATH)), +(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) + } +}, +0, // Function, patched in EnumPs2Keyboard +0 // Device, patched in EnumPs2Keyboard + }, + { +{ + ACPI_DEVICE_PATH, + ACPI_DP, + { +(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), +(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) + } +}, +EISA_PNP_ID(0x0303), +0 + }, + gEndEntire +}; + +/** + Check if PS2 keyboard is conntected, by sending ECHO command. + @retval TRUE if connected FALSE otherwise +**/ +BOOLEAN +DetectPs2Keyboard ( + VOID + ) +{ + UINT32TimeOut; + UINT32RegEmptied; + UINT8 Data; + UINT32SumTimeOut; + BOOLEAN FoundPs2Kbc; + + TimeOut = 0; + RegEmptied = 0; + FoundPs2Kbc = FALSE; + + // + // Wait for input buffer empty + // + for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) { +if ((IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x02) == 0) { + FoundPs2Kbc = TRUE; + break; +} +MicroSecondDelay (30); + } + + if (FoundPs2Kbc == FALSE) { +return FALSE; + } + + // + // Send echo command + // + IoWrite8 (KEYBOARD_8042_DATA_REGISTER, KBC_INPBUF_VIA60_KBECHO); + + // + // Init variables + // + FoundPs2Kbc = FALSE; + TimeOut = 0; + SumTimeOut = 0; + Data = 0; + + // + // Read from 8042 (multiple times if needed) + // until the expected value appears + // use SumTimeOut to control the iteration + // + while (1) { +// +// Perform a read +// +for (TimeOut = 0; TimeOut < PS2_KEYBOARD_TIMEOUT; TimeOut += 30) { + if (IoRead8 (KEYBOARD_8042_STATUS_REGISTER) & 0x01) { +Data = IoRead8 (KEYBOARD_8042_DATA_REGISTER); +break; + } + MicroSecondDelay (30); +} + +SumTimeOut += TimeOut; + +if (Data == KBC_INPBUF_VIA60_KBECHO) { + FoundPs2Kbc = TRUE; + break; +} + +if (SumTimeOut >= PS2_KEYBOARD_WAITFORVALUE_TIMEOUT) { + break; +} + } + return FoundPs2Kbc; +} + +/** + Check if PS2 keyboard is conntected. If the result of first time is + error, it will retry again. + @retval TRUE if connected FALSE otherwise +**/ +BOOLEAN +IsPs2KeyboardConnected ( + VOID + ) +{ + BOOLEAN Result; + Result = DetectPs2Keyboard (); + + if (Result == FALSE) { +// +// If there is no ps2 keyboard detected for the 1st time, retry again. +// +Result = DetectPs2Keyboard (); + } + return Result; +} + + +/** + Updates the ConIn variable with Ps2 Keyboard device path, + if it doesn't already exists in ConIn and ConInDev +**/ +VOID +AddPs2Keyboard ( + VOID + ) +{ + SIO_PCI_ISA_BRIDGE_DEVICE_INFO *SioIsaInfo; + + DEBUG ((DEBUG_INFO, "[AddPs2Keyboard]\n")); + + SioIsaInfo = (SIO_PCI_ISA_BRIDGE_DEVICE_INFO*) FixedPcdGetPtr (PcdSuperIoPciIsaBridgeDevice); + + // + // patch IsaBridge device and and function + // + gKeyboardDevicePath.IsaBridge.Device = SioIsaInfo->Device; + gKeyboardDevicePath.IsaBridge.Function = SioIsaInfo->Funtion; + + // + // Append Ps2 Keyboard into "ConIn" + // + EfiBootManagerUpdateConsoleVariable (ConIn, (EFI_DEVICE_PATH_PROTOCOL *) , NULL); + + // + // Append Ps2 Keyboard into "ConInDev" + // + EfiBootManagerUpdateConsoleVariable (ConInDev, (EFI_DEVICE_PATH_PROTOCOL *) , NULL); +} + + +/** + Constructor for the Ps2 keyboard controller library. + + @param ImageHandlethe
[edk2-devel] [edk2-platforms] [PATCH 0/5] Enable Ps2 keyboard
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2228 This patch series enables BIOS Ps2 keyboard in GalagoPro3 What was done: Patch 0001 adds PCDs to BoardModulePkg that will enable/disable, describe Super I/O , Ps2 keyboard/mouse, uart1 and uart2 com ports Patch 0002 moves the generic Super I/O driver from SimicsOpenBoardPkg to BoardModulePkg in order for it to be shared. This driver publishes the gEfiSioProtocolGuid consumed by edk2's MdeModulePkg/Bus/Isa/Ps2KeyboardDxe driver to enable Ps2 keyboard functions in BIOS Patch 0003 adds PCDs defined in patch 0001 to enable/disable devices in the Super I/O driver added in patch 0002 Patch 0004 adds a Null Ps2 Library that adds Ps2 keyboard device path to ConIn and ConInDev Patch 0005 enables Ps2 keyboard in BIOS by setting Ps2 keyboard related PCDs Prince Agyeman (5): Platform/Intel: Add gBoardModulePkgTokenSpaceGuid Platform/Intel: Move Sio Dxe Driver BoardModulePkg: Added Pcds Sio Driver KabylakeOpenBoardPkg: Add Ps2 keyboard Null Library KabylakeOpenBoardPkg: Add Ps2 Keyboard Support .../Intel/BoardModulePkg/BoardModulePkg.dec | 25 +++ .../Intel/BoardModulePkg/BoardModulePkg.dsc | 1 + .../LegacySioDxe/ComponentName.c | 0 .../LegacySioDxe/ComponentName.h | 0 .../LegacySioDxe/LegacySioDxe.inf | 18 +- .../LegacySioDxe/Register.h | 0 .../LegacySioDxe/SioChip.c| 71 +- .../LegacySioDxe/SioChip.h| 18 +- .../LegacySioDxe/SioDriver.c | 42 +++- .../LegacySioDxe/SioDriver.h | 1 - .../LegacySioDxe/SioService.c | 0 .../LegacySioDxe/SioService.h | 0 .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 +- .../DxeMultiBoardAcpiSupportLib.inf | 3 +- .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c | 202 ++ .../GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.h | 65 ++ .../Library/Ps2KbcLib/Ps2KbcLib.inf | 39 .../GalagoPro3/OpenBoardPkg.dsc | 7 + .../GalagoPro3/OpenBoardPkg.fdf | 2 + .../GalagoPro3/OpenBoardPkgPcd.dsc| 6 + .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 +- .../DxeMultiBoardAcpiSupportLib.inf | 3 +- .../KabylakeRvp3/OpenBoardPkgPcd.dsc | 5 + .../KabylakeOpenBoardPkg/OpenBoardPkg.dec | 2 - .../BoardX58Ich10/OpenBoardPkg.dsc| 2 +- .../BoardX58Ich10/OpenBoardPkg.fdf| 2 +- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 6 + .../WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec | 1 - .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 5 + 29 files changed, 499 insertions(+), 33 deletions(-) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.h (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/LegacySioDxe.inf (63%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/Register.h (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.c (75%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.h (90%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.c (88%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.h (95%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.h (100%) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.h create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/Ps2KbcLib/Ps2KbcLib.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49837): https://edk2.groups.io/g/devel/message/49837 Mute This Topic: https://groups.io/mt/40479678/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 1/5] Platform/Intel: Add gBoardModulePkgTokenSpaceGuid
Added gBoardModulePkgTokenSpaceGuid to BoardModulePkg Added ps2 keyboard and Uart enable PCDs. Added PCDs to define IO ports for Uart1 and Uart2 Enabled KabylakeOpenBoardPkg and WhiskeylakeOpenBoardPkg boards to use the ps2 keyboard enable PCD. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 25 +++ .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 ++- .../DxeMultiBoardAcpiSupportLib.inf | 3 ++- .../GalagoPro3/OpenBoardPkgPcd.dsc| 5 .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 3 ++- .../DxeMultiBoardAcpiSupportLib.inf | 3 ++- .../KabylakeRvp3/OpenBoardPkgPcd.dsc | 5 .../KabylakeOpenBoardPkg/OpenBoardPkg.dec | 2 -- .../WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec | 1 - .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 5 10 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec index f461cc7cab..26e662f711 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -42,3 +42,28 @@ ## GUID to publish BIOS information HOB gBiosInfoGuid = { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 0x85} } + + ## {7F4EE1A3-C1F3-43E4-BA1A-39DCDE46C343} + gBoardModulePkgTokenSpaceGuid = { 0x7f4ee1a3, 0xc1f3, 0x43e4, { 0xba, 0x1a, 0x39, 0xdc, 0xde, 0x46, 0xc3, 0x43 } } + +[PcdsFixedAtBuild] + ## PcdPs2KbMsEnable 0x0:Disable, 0x1:Enable + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable|0x00|UINT8|0x0001 + + ## SuperIo Pci ISA Bridge info. It is an array that contains the Segment, Bus, Device and Function + # information describing the PCI Device Info. The first byte is the segment number, + # the second is the bus number, third byte is the device number, the fourth byte + # is the Function. + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0xFF, 0xFF, 0xFF, 0xFF}|VOID*|0x0002 + + ## PcdUart1Enable 0x0:Disable, 0x1:Enable + gBoardModulePkgTokenSpaceGuid.PcdUart1Enable|0x00|UINT8|0x0003 + gBoardModulePkgTokenSpaceGuid.PcdUart1IrqMask|0x0010|UINT16|0x0004 + gBoardModulePkgTokenSpaceGuid.PcdUart1IoPort|0x03F8|UINT16|0x0005 + gBoardModulePkgTokenSpaceGuid.PcdUart1Length|0x08|UINT8|0x0006 + + ## PcdUart2Enable 0x0:Disable, 0x1:Enable + gBoardModulePkgTokenSpaceGuid.PcdUart2Enable|0x00|UINT8|0x0007 + gBoardModulePkgTokenSpaceGuid.PcdUart2IrqMask|0x0008|UINT16|0x0008 + gBoardModulePkgTokenSpaceGuid.PcdUart2IoPort|0x02F8|UINT16|0x0009 + gBoardModulePkgTokenSpaceGuid.PcdUart2Length|0x08|UINT8|0x000A diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf index a79bdcdbc6..35cd5c8fdb 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf @@ -33,9 +33,10 @@ MinPlatformPkg/MinPlatformPkg.dec KabylakeOpenBoardPkg/OpenBoardPkg.dec KabylakeSiliconPkg/SiPkg.dec + BoardModulePkg/BoardModulePkg.dec [Pcd] - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable gMinPlatformPkgTokenSpaceGuid.PcdPciExpNative gMinPlatformPkgTokenSpaceGuid.PcdNativeAspmEnable gMinPlatformPkgTokenSpaceGuid.PcdLowPowerS0Idle diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf index db8ba7a822..9fe27f9fda 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf @@ -34,9 +34,10 @@ MinPlatformPkg/MinPlatformPkg.dec KabylakeOpenBoardPkg/OpenBoardPkg.dec KabylakeSiliconPkg/SiPkg.dec + BoardModulePkg/BoardModulePkg.dec [Pcd] - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable gKabylakeOpenBoardPkgTokenSpaceGuid.PcdPciExpNative gKabylakeOpenBoardPkgTokenSpaceGuid.PcdNativeAspmEnable gKabylakeOpenBoardPkgTokenSpaceGuid.PcdLowPowerS0Idle diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc index c68b8a49cf..4550a4e0b5 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc @@ -308,6 +308,11 @@ gMinPlatformPkgTokenSpaceGuid.PcdTestPointIbvPlatformFeature|{0x03,
[edk2-devel] [edk2-platforms] [PATCH 5/5] KabylakeOpenBoardPkg: Add Ps2 Keyboard Support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2228 Added Ps2Keyboard DXE driver. Added Sio dxe driver to publish the SIO protocol needed by the Ps2Keyboard DXE driver. Included a Ps2 null Library to BdsDxe driver to add the Ps2 device path to ConIn and ConInDev variables Configured the Super I/O Pci to Isa bridge bus, device, function device info PCD. This will help the Super I/O driver identify which bridge the Super I/O is connected to. Signed-off-by: Prince Agyeman --- .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 7 +++ .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf | 2 ++ .../KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc| 1 + 3 files changed, 10 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index f59248bba4..c6a0749458 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -311,6 +311,11 @@ MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf + MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf{ + + NULL|$(PROJECT)/Library/Ps2KbcLib/Ps2KbcLib.inf + } UefiCpuPkg/CpuDxe/CpuDxe.inf ShellPkg/Application/Shell/Shell.inf { @@ -408,3 +413,5 @@ !endif } !endif + + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index 80efab1aad..d58466d390 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf @@ -335,6 +335,8 @@ INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf +INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF ShellPkg/Application/Shell/Shell.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc index 4550a4e0b5..c6f5ae7534 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc @@ -312,6 +312,7 @@ # Board Configuration ## gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable|1 + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice|{0x00, 0x00, 0x1F, 0x00} [PcdsFixedAtBuild.IA32] ## -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49842): https://edk2.groups.io/g/devel/message/49842 Mute This Topic: https://groups.io/mt/40479687/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 2/5] Platform/Intel: Move Sio Dxe Driver
Moved LegacySioDxe from SimicsOpenBoardPkg to BoardModulePkg as LegacySioDxe is generic and can be shared between open board packages Removed unused libraries and functions in LegacySioDxe Pointed BoardX58Ich10 to the current LegacySioDxe location Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- Platform/Intel/BoardModulePkg/BoardModulePkg.dsc | 1 + .../LegacySioDxe/ComponentName.c | 0 .../LegacySioDxe/ComponentName.h | 0 .../LegacySioDxe/LegacySioDxe.inf | 3 --- .../LegacySioDxe/Register.h| 0 .../LegacySioDxe/SioChip.c | 2 -- .../LegacySioDxe/SioChip.h | 10 -- .../LegacySioDxe/SioDriver.c | 0 .../LegacySioDxe/SioDriver.h | 1 - .../LegacySioDxe/SioService.c | 0 .../LegacySioDxe/SioService.h | 0 .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 2 +- .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf | 2 +- 13 files changed, 3 insertions(+), 18 deletions(-) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/ComponentName.h (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/LegacySioDxe.inf (92%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/Register.h (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.c (94%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioChip.h (93%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioDriver.h (95%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.c (100%) rename Platform/Intel/{SimicsOpenBoardPkg => BoardModulePkg}/LegacySioDxe/SioService.h (100%) diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc index 5ec68ceebf..fffc135d75 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc @@ -76,6 +76,7 @@ [Components] BoardModulePkg/FirmwareBootMediaInfo/FirmwareBootMediaInfoPei.inf + BoardModulePkg/LegacySioDxe/LegacySioDxe.inf BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf BoardModulePkg/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c similarity index 100% rename from Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.c rename to Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.c diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h b/Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h similarity index 100% rename from Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/ComponentName.h rename to Platform/Intel/BoardModulePkg/LegacySioDxe/ComponentName.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf similarity index 92% rename from Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf rename to Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf index 275f36ca47..d606ba43dc 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/LegacySioDxe.inf +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf @@ -28,11 +28,8 @@ MemoryAllocationLib PcdLib DevicePathLib - IoLib UefiDriverEntryPoint UefiBootServicesTableLib - S3BootScriptLib - S3IoLib [Packages] MdePkg/MdePkg.dec diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h b/Platform/Intel/BoardModulePkg/LegacySioDxe/Register.h similarity index 100% rename from Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/Register.h rename to Platform/Intel/BoardModulePkg/LegacySioDxe/Register.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c similarity index 94% rename from Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c rename to Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c index b9a7b9cd24..81efe3c38b 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.c +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c @@ -7,9 +7,7 @@ **/ #include "SioDriver.h" -#include -LOCAL_IO_WRITE8mIoWrite8 = IoWrite8; // // System configuration (setup) information // diff --git a/Platform/Intel/SimicsOpenBoardPkg/LegacySioDxe/SioChip.h
[edk2-devel] [edk2-platforms] [PATCH 3/5] BoardModulePkg: Added Pcds Sio Driver
Included PCDs to the Sio dxe driver, to allow the enable/disable of Ps2 keyboard/mouse, UART1 and UART2 com ports. Renamed the Sio driver's base name Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../LegacySioDxe/LegacySioDxe.inf | 15 +++- .../BoardModulePkg/LegacySioDxe/SioChip.c | 69 +-- .../BoardModulePkg/LegacySioDxe/SioChip.h | 10 +++ .../BoardModulePkg/LegacySioDxe/SioDriver.c | 42 ++- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 6 ++ 5 files changed, 133 insertions(+), 9 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf index d606ba43dc..4ab01a6098 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/LegacySioDxe.inf @@ -10,7 +10,7 @@ [Defines] INF_VERSION= 0x00010017 - BASE_NAME = HitachiH8s2113Dxe + BASE_NAME = LegacySioDxe FILE_GUID = 7807E404-8281-4FF1-8457-0B54BABE263F VERSION_STRING = 1.0 MODULE_TYPE= UEFI_DRIVER @@ -34,6 +34,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + BoardModulePkg/BoardModulePkg.dec [Sources] SioChip.c @@ -44,6 +45,18 @@ SioDriver.h ComponentName.c +[Pcd] + gBoardModulePkgTokenSpaceGuid.PcdPs2KbMsEnable + gBoardModulePkgTokenSpaceGuid.PcdUart1Enable + gBoardModulePkgTokenSpaceGuid.PcdUart1IrqMask + gBoardModulePkgTokenSpaceGuid.PcdUart1IoPort + gBoardModulePkgTokenSpaceGuid.PcdUart1Length + gBoardModulePkgTokenSpaceGuid.PcdUart2Enable + gBoardModulePkgTokenSpaceGuid.PcdUart2IrqMask + gBoardModulePkgTokenSpaceGuid.PcdUart2IoPort + gBoardModulePkgTokenSpaceGuid.PcdUart2Length + gBoardModulePkgTokenSpaceGuid.PcdSuperIoPciIsaBridgeDevice + [Protocols] gEfiPciIoProtocolGuid ## CONSUMES gEfiDevicePathProtocolGuid## PRODUCES diff --git a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c index 81efe3c38b..09403a7354 100644 --- a/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c +++ b/Platform/Intel/BoardModulePkg/LegacySioDxe/SioChip.c @@ -19,12 +19,31 @@ ACPI_SIO_RESOURCES_IO_IRQ mCom1Resources = { { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, -0x3f8, -8 + FixedPcdGet16 (PcdUart1IoPort), + FixedPcdGet8 (PcdUart1Length) +}, +{ + { ACPI_IRQ_NOFLAG_DESCRIPTOR }, + FixedPcdGet16 (PcdUart1IrqMask) +}, +{ + ACPI_END_TAG_DESCRIPTOR, + 0 +} +}; + +// +// COM 2 UART Controller +// +ACPI_SIO_RESOURCES_IO_IRQ mCom2Resources = { + { +{ ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, +FixedPcdGet16 (PcdUart2IoPort), +FixedPcdGet8 (PcdUart2Length) }, { { ACPI_IRQ_NOFLAG_DESCRIPTOR }, -BIT4// IRQ4 +FixedPcdGet16 (PcdUart2IrqMask), }, { ACPI_END_TAG_DESCRIPTOR, @@ -70,10 +89,12 @@ ACPI_SIO_RESOURCES_IO_IRQ mMouseResources = { } }; + // // Table of SIO Controllers // DEVICE_INFOmDeviceInfo[] = { +#if FixedPcdGet8 (PcdUart1Enable) == DEVICE_ENABLED { { EISA_PNP_ID(0x501), @@ -84,6 +105,20 @@ DEVICE_INFOmDeviceInfo[] = { { (ACPI_SMALL_RESOURCE_HEADER *) }, { (ACPI_SMALL_RESOURCE_HEADER *) } }, // COM 1 UART Controller +#endif +#if FixedPcdGet8 (PcdUart2Enable) == DEVICE_ENABLED + { +{ + EISA_PNP_ID(0x501), + 0 +}, +0, +RESOURCE_IO | RESOURCE_IRQ, +{ (ACPI_SMALL_RESOURCE_HEADER *) }, +{ (ACPI_SMALL_RESOURCE_HEADER *) } + }, // COM 2 UART Controller +#endif +#if FixedPcdGet8 (PcdPs2KbMsEnable) == DEVICE_ENABLED { { EISA_PNP_ID(0x303), @@ -103,10 +138,28 @@ DEVICE_INFOmDeviceInfo[] = { 0, // Cannot change resource { (ACPI_SMALL_RESOURCE_HEADER *) }, { (ACPI_SMALL_RESOURCE_HEADER *) } - } // PS/2 Mouse Controller + }, // PS/2 Mouse Controller +#endif + DEVICE_INFO_END }; + +/** + Gets the number of devices in Table of SIO Controllers mDeviceInfo + + @retval Number of enabled devices in Table of SIO Controllers. +**/ +UINTN +EFIAPI +GetDeviceCount( + VOID +){ + UINTNCount; + Count = ARRAY_SIZE(mDeviceInfo) - 1; // -1 to account for for the end device info + return Count; +} + /** Return the supported devices. @@ -128,7 +181,7 @@ DeviceGetList ( // // Allocate enough memory for simplicity // - DeviceCount = sizeof (mDeviceInfo) / sizeof (mDeviceInfo[0]); + DeviceCount = GetDeviceCount(); LocalDevices = AllocatePool (sizeof (EFI_SIO_ACPI_DEVICE_ID) * DeviceCount); ASSERT (LocalDevices != NULL); if (LocalDevices == NULL) { @@ -157,7 +210,6 @@ SioInit ( VOID ) { - return EFI_SUCCESS; } @@ -175,8 +227,11 @@ DeviceSearch ( )
Re: [edk2-devel] [edk2-platforms: PATCH v3 6/6] SimicsOpenBoardPkg/BoardX58Ich10: Add SetCacheMtrrLib library class.
Reviewed-by: Prince Agyeman -Original Message- From: Chiu, Chasel Sent: Thursday, October 31, 2019 3:28 AM To: devel@edk2.groups.io Cc: Wei, David Y ; Agyeman, Prince Subject: [edk2-platforms: PATCH v3 6/6] SimicsOpenBoardPkg/BoardX58Ich10: Add SetCacheMtrrLib library class. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2314 Include SetCacheMtrrLib from MinPlatformPkg. Cc: Wei David Y Cc: Agyeman Prince Signed-off-by: Chasel Chiu --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 4f8ab4170d..8cad7b5b69 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -136,6 +136,7 @@ TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf !endif TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/PeiTestPointLib.inf + SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLib.inf [LibraryClasses.common.DXE_DRIVER] ### -- 2.13.3.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49778): https://edk2.groups.io/g/devel/message/49778 Mute This Topic: https://groups.io/mt/40108822/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2225 Currently, gcc 5 encounters an error "unused-but-set-variable" in BdsPlatform.c as a result of a Status variable not being used after it's set. This was fixed by printing the Status variable when EfiBootManagerDeleteLoadOptionVariable function encounters an error Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 4 1 file changed, 4 insertions(+) diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 7aa3860f75..a4b010be63 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -348,6 +348,10 @@ PlatformBootManagerBeforeConsole ( NvBootOptions = EfiBootManagerGetLoadOptions (, LoadOptionTypeBoot); for (Index = 0; Index < NvBootOptionCount; Index++) { Status = EfiBootManagerDeleteLoadOptionVariable (NvBootOptions[Index].OptionNumber, LoadOptionTypeBoot); +if(EFI_ERROR (Status)){ + DEBUG ((DEBUG_ERROR, + "%a: removing Boot#%04x %r\n", __FUNCTION__, (UINT32)NvBootOptions[Index].OptionNumber, Status)); +} } InstallDevicePathCallback (); -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49681): https://edk2.groups.io/g/devel/message/49681 Mute This Topic: https://groups.io/mt/39839161/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2164 Replaced Cmos.c and Cmos.h with BoardModulePkg's Cmos library CmosAccessLib Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BoardX58Ich10/OpenBoardPkg.dsc| 2 + .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c | 57 --- .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h | 50 .../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 4 +- .../SimicsOpenBoardPkg/SimicsPei/Platform.c | 4 +- .../SimicsPei/SimicsPei.inf | 3 +- 6 files changed, 8 insertions(+), 112 deletions(-) delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 4f8ab4170d..67f1680a4f 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -115,6 +115,8 @@ SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf + PlatformCmosAccessLib|BoardModulePkg/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf + CmosAccessLib|BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf [LibraryClasses.common.SEC] ### diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c deleted file mode 100644 index b34ba9283b..00 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file - PC/AT CMOS access routines - - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved. - - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include "Cmos.h" -#include "Library/IoLib.h" - -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -CmosRead8 ( - IN UINTN Index - ) -{ - IoWrite8 (0x70, (UINT8) Index); - return IoRead8 (0x71); -} - - -/** - Writes 8-bits of CMOS data. - - Writes 8-bits of CMOS data to the location specified by Index - with the value specified by Value and returns Value. - - @param Index The CMOS location to write. - @param Value The value to write to CMOS. - - @return The value written to CMOS. - -**/ -UINT8 -EFIAPI -CmosWrite8 ( - IN UINTN Index, - IN UINT8 Value - ) -{ - IoWrite8 (0x70, (UINT8) Index); - IoWrite8 (0x71, Value); - return Value; -} - diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h deleted file mode 100644 index 07fa2e2d11..00 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file - PC/AT CMOS access routines - - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved. - - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef __CMOS_H__ -#define __CMOS_H__ - -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -CmosRead8 ( - IN UINTN Index - ); - -/** - Writes 8-bits of CMOS data. - - Writes 8-bits of CMOS data to the location specified by Index - with the value specified by Value and returns Value. - - @param Index The CMOS location to write. - @param Value The value to write to CMOS. - - @return The value written to CMOS. - -**/ -UINT8 -EFIAPI -CmosWrite8 ( - IN UINTN Index, - IN UINT8 Value - ); - - -#endif - diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c index ee0eead5a8..4d16fd2fac 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c @@ -22,11 +22,11 @@ #include #include #include +#include #include #include #include "Platform.h" -#include "Cmos.h" UINT8 mPhysMemAddressWidth; @@ -105,7 +105,7 @@ GetSystemMemorySizeAbove4gb ( ) { UINT32 Size; - UINTN CmosIndex; + UINT8 CmosIndex; // // CMOS 0x5b-0x5d specifies the system memory above 4GB MB. diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c
[edk2-devel] [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Change Build Output Directory
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2250 Changed BoardX558ich10's build directory to Build/SimicsOpenBoardPkg/BoardX58Ich10 to align it with align with the other Intel board packages Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BoardX58Ich10/OpenBoardPkg.dsc | 13 +++-- .../BoardX58Ich10/OpenBoardPkg.fdf | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 4f8ab4170d..78f1e80990 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -20,16 +20,17 @@ DEFINE PCH_PKG = SimicsIch10Pkg DEFINE DXE_ARCH = X64 DEFINE PEI_ARCH = IA32 + DEFINE PROJECT = $(BOARD_PKG)/$(BOARD_NAME) PLATFORM_NAME = SimicsX58 PLATFORM_GUID = EE8EBB5A-CC95-412f-9987-2AF70F88B69A PLATFORM_VERSION = 0.1 DSC_SPECIFICATION = 0x00010005 - OUTPUT_DIRECTORY = Build/SimicsX58Ia32X64 + OUTPUT_DIRECTORY = Build/$(PROJECT) SUPPORTED_ARCHITECTURES= IA32|X64 BUILD_TARGETS = DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER = DEFAULT - FLASH_DEFINITION = $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkg.fdf + FLASH_DEFINITION = $(PROJECT)/OpenBoardPkg.fdf DEFINE SMM_REQUIRE = TRUE @@ -41,7 +42,7 @@ DEFINE NETWORK_ISCSI_ENABLE = FALSE DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE - !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc + !include $(PROJECT)/OpenBoardPkgPcd.dsc !include NetworkPkg/NetworkDefines.dsc.inc @@ -80,7 +81,7 @@ ### # Build Option Includes ### -!include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgBuildOption.dsc +!include $(PROJECT)/OpenBoardPkgBuildOption.dsc # @@ -175,11 +176,11 @@ # $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf { - BoardInitLib|$(BOARD_PKG)/$(BOARD_NAME)/Library/BoardInitLib/PeiBoardInitPreMemLib.inf + BoardInitLib|$(PROJECT)/Library/BoardInitLib/PeiBoardInitPreMemLib.inf } $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitPei/PlatformInitPostMem.inf { - BoardInitLib|$(BOARD_PKG)/$(BOARD_NAME)/Library/BoardInitLib/PeiBoardInitPostMemLib.inf + BoardInitLib|$(PROJECT)/Library/BoardInitLib/PeiBoardInitPostMemLib.inf } $(PLATFORM_PACKAGE)/PlatformInit/ReportFv/ReportFvPei.inf $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf index 0c27cb0ef2..39226251a7 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf @@ -13,7 +13,7 @@ # Build the variable store and the firmware code as one unified flash device # image. # -[FD.SIMICSX58IA32X64] +[FD.BOARDX58ICH10] BaseAddress = $(FW_BASE_ADDRESS) Size = $(FW_SIZE) ErasePolarity = 1 -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49607): https://edk2.groups.io/g/devel/message/49607 Mute This Topic: https://groups.io/mt/39638257/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v3 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2211 Added BIOS Info PEIM to publish Bios Info HOB. This PEIM currently publishes the microcode FV information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 49 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + 4 files changed, 145 insertions(+) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c new file mode 100644 index 00..578e66149e --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi and builds BiosInfo HOB . + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi and HOB successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf new file mode 100644 index 00..a9687d93de --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf @@ -0,0 +1,49 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + PcdLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + CoffeelakeSiliconPkg/SiPkg.dec + CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc index 423fa88c12..8e0ea2d5ce 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc @@ -314,6 +314,7
[edk2-devel] [edk2-platforms] [PATCH v3 1/4] BoardModulePkg: Add BIOS Info HOB
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2210 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2211 Added gBiosInfoGuid to be used in publishing the BIOS information HOB which is needed in FIT generation Also added the BIOS Info header file BiosInfo.h that defines the BIOS info struct and GUID Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Guid/BiosInfo.h| 61 +++ 2 files changed, 64 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec index f96fb09aa1..f461cc7cab 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -39,3 +39,6 @@ [Guids] ## Include Include/Guid/BiosId.h gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F, 0xE3, 0x3E, 0x28 } } + + ## GUID to publish BIOS information HOB + gBiosInfoGuid = { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 0x85} } diff --git a/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h b/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h new file mode 100644 index 00..d73409ea6f --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h @@ -0,0 +1,61 @@ +/** @file + Definitions and GUID for BIOS INFO. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _BIOS_INFO_H_ +#define _BIOS_INFO_H_ + +// +// BIOS INFO data structure +// This is self contained data structure for BIOS info for TXT +// +#pragma pack (1) +#define BIOS_INFO_SIGNATURE SIGNATURE_64 ('$', 'B', 'I', 'O', 'S', 'I', 'F', '$') +typedef struct { + UINT64Signature; + UINT32EntryCount; + UINT32Reserved; +//BIOS_INFO_STRUCT Struct[EntryCount]; +} BIOS_INFO_HEADER; + +// +// BIOS_INFO_STRUCT attributes +// bits[0:3] means general attributes +// bits[4:7] means type specific attributes +// +#define BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT 0x01 +#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB 0x20 + +typedef struct { + // + // FitTable entry type + // + UINT8Type; + // + // BIOS_INFO_STRUCT attributes + // + UINT8Attributes; + // + // FitTable entry version + // + UINT16 Version; + // + // FitTable entry real size + // + UINT32 Size; + // + // FitTable entry address + // + UINT64 Address; +} BIOS_INFO_STRUCT; + +extern EFI_GUID gBiosInfoGuid; + +#pragma pack () + +#endif -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49195): https://edk2.groups.io/g/devel/message/49195 Mute This Topic: https://groups.io/mt/34950129/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v3 0/4] Add FIT support using FitGen
Changes in v3: - Added PcdLib to BiosInfo.inf's LibraryClasses section - Cleaned up OpenBoardPkg.dscs for all three platforms - Added bugzilla references Changes in v2: - Moved BIOS Info PEIM to KabylakeOpenBoardPkg shared by both KabylakeRvp3, GalagoPro3 - Moved BIOS Info PEIM to WhiskeylakeOpenBoardPkg used by WhiskeylakeURvp - Moved BiosInfo.h to BoardModulePkg/Include/Guid - Fixed typos, cleaned up commit messages and comments Prince Agyeman (4): BoardModulePkg: Add BIOS Info HOB KabylakeOpenBoardPkg: Add BIOS Info PEIM WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Platform/Intel: Add FIT generation tool .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Guid/BiosInfo.h| 61 .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 49 ++ .../GalagoPro3/OpenBoardPkg.dsc | 1 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/OpenBoardPkg.dsc | 1 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 49 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 17 files changed, 416 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49194): https://edk2.groups.io/g/devel/message/49194 Mute This Topic: https://groups.io/mt/34950128/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v3 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2210 Added BIOS Info PEIM to KabylakeRvp3 and GalagoPro3 to publish the BIOS info HOB. This PEIM currently publishes the board's microcode region information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 49 ++ .../GalagoPro3/OpenBoardPkg.dsc | 1 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/OpenBoardPkg.dsc | 1 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + 6 files changed, 146 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c new file mode 100644 index 00..578e66149e --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi and builds BiosInfo HOB . + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi and HOB successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf new file mode 100644 index 00..e5e40144a6 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf @@ -0,0 +1,49 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + PcdLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + KabylakeSiliconPkg/SiPkg.dec + KabylakeFspBinPkg/KabylakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index b6f9807e7e..f59248bba4 100644 ---
[edk2-devel] [edk2-platforms] [PATCH v3 4/4] Platform/Intel: Add FIT generation tool
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2210 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2211 Added FitGen tool build and FIT generation to the BIOS build process. What was done: - Build the FIT generation tool - Added default/empty BIOS_INFO_GUID to the build.cfg - Added BIOS_INFO_GUID to GalagoPro3,KabylakeRvp3 and WhiskeylakeURvp's build_config.cfg This allows a board to specify the GUID associated with the BIOS Info PEIM to be used in the board's FIT generation. BIOS_INFO_GUID is passed as an argument to FitGen tool which allow the tool to locate the BIOS Info module to be used in FIT generation. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 +++ 5 files changed, 61 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg index 8c6c51abb4..458fe3d35d 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg index 78f808bfaf..f6ae4b342a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg @@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg index 1b0619bc1c..1dfe5ffd10 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 2040774d1b..6aee96694c 100644 --- a/Platform/Intel/build.cfg +++ b/Platform/Intel/build.cfg @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE REBUILD_MODE = BUILD_ROM_ONLY = NUMBER_OF_PROCESSORS = 0 +BIOS_INFO_GUID = [PLATFORMS] diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 46285df19a..ea098de705 100644 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None): if return_code != 0: build_failed(config) +# +# build platform silicon tools +# +# save the current workspace +saved_work_directory = config["WORKSPACE"] +# change the workspace to silicon tools directory +config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"], "Tools") + +command = ["nmake"] +if os.name == "posix": # linux +command = ["make"] +# add path to generated FitGen binary to +# environment path variable +config["PATH"] += os.pathsep + \ + os.path.join(config["BASE_TOOLS_PATH"], + "Source", "C", "bin") + +# build the silicon tools +_, _, result, return_code = execute_script(command, config, shell=shell) +if return_code != 0: +build_failed(config) + +# restore WORKSPACE environment variable +config["WORKSPACE"] = saved_work_directory + config["SILENT_MODE"] = 'TRUE' if silent else 'FALSE' print("==") @@ -404,6 +429,35 @@ def post_build(config): :returns: nothing """ print("Running post_build to complete the build process.") +board_fd = config["BOARD"].upper() +final_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", +"{}.fd".format(board_fd)) + +if config["BIOS_INFO_GUID"]: +# Generate the fit table +print("Generating FIT ...") +if os.path.isfile(final_fd): +temp_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", + "{}_.fd".format(board_fd)) +shell = True +command = ["FitGen", "-D", + final_fd, temp_fd, "-NA", + "-I", config["BIOS_INFO_GUID"]] + +
[edk2-devel] [edk2-platforms] [PATCH v2 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM
Added BIOS Info PEIM to publish Bios Info HOB. This PEIM currently publishes the microcode FV information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 48 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + 4 files changed, 144 insertions(+) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c new file mode 100644 index 00..578e66149e --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi and builds BiosInfo HOB . + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi and HOB successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf new file mode 100644 index 00..f268de00f5 --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf @@ -0,0 +1,48 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + CoffeelakeSiliconPkg/SiPkg.dec + CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc index 423fa88c12..3690069df4 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc @@ -314,6 +314,8 @@ $(PLATFORM_PACKAGE)/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf
[edk2-devel] [edk2-platforms] [PATCH v2 1/4] BoardModulePkg: Add BIOS Info HOB
Added gBiosInfoGuid to be used in publishing the BIOS information HOB which is needed in FIT generation Also added the BIOS Info header file BiosInfo.h that defines the BIOS info struct and GUID Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Guid/BiosInfo.h| 61 +++ 2 files changed, 64 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec index f96fb09aa1..f461cc7cab 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -39,3 +39,6 @@ [Guids] ## Include Include/Guid/BiosId.h gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F, 0xE3, 0x3E, 0x28 } } + + ## GUID to publish BIOS information HOB + gBiosInfoGuid = { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 0x85} } diff --git a/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h b/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h new file mode 100644 index 00..d73409ea6f --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h @@ -0,0 +1,61 @@ +/** @file + Definitions and GUID for BIOS INFO. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _BIOS_INFO_H_ +#define _BIOS_INFO_H_ + +// +// BIOS INFO data structure +// This is self contained data structure for BIOS info for TXT +// +#pragma pack (1) +#define BIOS_INFO_SIGNATURE SIGNATURE_64 ('$', 'B', 'I', 'O', 'S', 'I', 'F', '$') +typedef struct { + UINT64Signature; + UINT32EntryCount; + UINT32Reserved; +//BIOS_INFO_STRUCT Struct[EntryCount]; +} BIOS_INFO_HEADER; + +// +// BIOS_INFO_STRUCT attributes +// bits[0:3] means general attributes +// bits[4:7] means type specific attributes +// +#define BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT 0x01 +#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB 0x20 + +typedef struct { + // + // FitTable entry type + // + UINT8Type; + // + // BIOS_INFO_STRUCT attributes + // + UINT8Attributes; + // + // FitTable entry version + // + UINT16 Version; + // + // FitTable entry real size + // + UINT32 Size; + // + // FitTable entry address + // + UINT64 Address; +} BIOS_INFO_STRUCT; + +extern EFI_GUID gBiosInfoGuid; + +#pragma pack () + +#endif -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49030): https://edk2.groups.io/g/devel/message/49030 Mute This Topic: https://groups.io/mt/34551481/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add FIT support using FitGen
Changes in v2: - Moved BIOS Info PEIM to KabylakeOpenBoardPkg shared by both KabylakeRvp3, GalagoPro3 - Moved BIOS Info PEIM to WhiskeylakeOpenBoardPkg used by WhiskeylakeURvp - Moved BiosInfo.h to BoardModulePkg/Include/Guid - Fixed typos, cleaned up commit messages and comments Prince Agyeman (4): BoardModulePkg: Add BIOS Info HOB KabylakeOpenBoardPkg: Add BIOS Info PEIM WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Platform/Intel: Add FIT generation tool .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Guid/BiosInfo.h| 61 .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 48 ++ .../GalagoPro3/OpenBoardPkg.dsc | 3 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 48 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 17 files changed, 417 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49029): https://edk2.groups.io/g/devel/message/49029 Mute This Topic: https://groups.io/mt/34551480/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v2 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM
Added BIOS Info PEIM to KabylakeRvp3 and GalagoPro3 to publish the BIOS info HOB. This PEIM currently publishes the board's microcode region information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 +++ .../BiosInfo/BiosInfo.inf | 48 ++ .../GalagoPro3/OpenBoardPkg.dsc | 3 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + 6 files changed, 148 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c new file mode 100644 index 00..578e66149e --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi and builds BiosInfo HOB . + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi and HOB successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf new file mode 100644 index 00..94543408b1 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf @@ -0,0 +1,48 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + KabylakeSiliconPkg/SiPkg.dec + KabylakeFspBinPkg/KabylakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index b6f9807e7e..665597f79e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++
[edk2-devel] [edk2-platforms] [PATCH v2 4/4] Platform/Intel: Add FIT generation tool
Added FitGen tool build and FIT generation to the BIOS build process. What was done: - Build the FIT generation tool - Added default/empty BIOS_INFO_GUID to the build.cfg - Added BIOS_INFO_GUID to GalagoPro3,KabylakeRvp3 and WhiskeylakeURvp's build_config.cfg This allows a board to specify the GUID associated with the BIOS Info PEIM to be used in the board's FIT generation. BIOS_INFO_GUID is passed as an argument to FitGen tool which allow the tool to locate the BIOS Info module to be used in FIT generation. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 +++ 5 files changed, 61 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg index 8c6c51abb4..458fe3d35d 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg index 78f808bfaf..f6ae4b342a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg @@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg index 1b0619bc1c..1dfe5ffd10 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 2040774d1b..6aee96694c 100644 --- a/Platform/Intel/build.cfg +++ b/Platform/Intel/build.cfg @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE REBUILD_MODE = BUILD_ROM_ONLY = NUMBER_OF_PROCESSORS = 0 +BIOS_INFO_GUID = [PLATFORMS] diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 46285df19a..ea098de705 100644 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None): if return_code != 0: build_failed(config) +# +# build platform silicon tools +# +# save the current workspace +saved_work_directory = config["WORKSPACE"] +# change the workspace to silicon tools directory +config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"], "Tools") + +command = ["nmake"] +if os.name == "posix": # linux +command = ["make"] +# add path to generated FitGen binary to +# environment path variable +config["PATH"] += os.pathsep + \ + os.path.join(config["BASE_TOOLS_PATH"], + "Source", "C", "bin") + +# build the silicon tools +_, _, result, return_code = execute_script(command, config, shell=shell) +if return_code != 0: +build_failed(config) + +# restore WORKSPACE environment variable +config["WORKSPACE"] = saved_work_directory + config["SILENT_MODE"] = 'TRUE' if silent else 'FALSE' print("==") @@ -404,6 +429,35 @@ def post_build(config): :returns: nothing """ print("Running post_build to complete the build process.") +board_fd = config["BOARD"].upper() +final_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", +"{}.fd".format(board_fd)) + +if config["BIOS_INFO_GUID"]: +# Generate the fit table +print("Generating FIT ...") +if os.path.isfile(final_fd): +temp_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", + "{}_.fd".format(board_fd)) +shell = True +command = ["FitGen", "-D", + final_fd, temp_fd, "-NA", + "-I", config["BIOS_INFO_GUID"]] + +if os.name == "posix": # linux +shell = False + +_, _, result, return_code
Re: [edk2-devel] [edk2-platforms][PATCH V1 17/17] SimicsOpenBoardPkg: Assign unique token namespace
Reviewed-by: Prince Agyeman -Original Message- From: Kubacki, Michael A Sent: Monday, October 7, 2019 10:17 PM To: devel@edk2.groups.io Cc: Agyeman, Prince ; Wei, David Y Subject: [edk2-platforms][PATCH V1 17/17] SimicsOpenBoardPkg: Assign unique token namespace REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2249 PCDs declared in the SimicsOpenBoardPkg currently use the GUID gBoardModuleTokenSpaceGuid. The same name is used in other board packages and a package has been added called BoardModulePkg so this name is now misleading. This change assigns a unique GUID value and a name specific to the package to provide differentiation from PCDs in other board packages. Cc: Agyeman Prince Cc: Wei David Y Signed-off-by: Michael Kubacki --- Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec | 72 ++-- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc | 14 ++-- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf | 12 ++-- Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 14 ++-- Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiReportFvLib.inf | 10 +-- Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 10 +-- Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf | 18 ++--- Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf | 36 +- Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/SimicsVideoDxe.inf | 2 +- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/DecomprScratchEnd.fdf.inc | 6 +- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf.inc | 16 ++--- 11 files changed, 105 insertions(+), 105 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec b/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec index 40487820fa..421c464023 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec +++ b/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec @@ -17,57 +17,57 @@ Include [Guids] - gBoardModuleTokenSpaceGuid = {0xeed35f57, 0x4ff2, 0x4244, {0xb8, 0x3a, 0xea, 0x71, 0x5f, 0xd3, 0x59, 0xa5}} + gSimicsOpenBoardPkgTokenSpaceGuid = {0x75fd61da, 0x3931, 0x49aa, + {0x8f, 0x11, 0x18, 0x25, 0xf6, 0x31, 0x21, 0xd2}} gSimicsBoardConfigGuid = {0xeed35f57, 0x4ff2, 0x4244, {0xb8, 0x3a, 0xea, 0x71, 0x5f, 0xd3, 0x59, 0xa5}} [PcdsFixedAtBuild] - gBoardModuleTokenSpaceGuid.PcdSimicsPeiMemFvBase|0x0|UINT32|0 - gBoardModuleTokenSpaceGuid.PcdSimicsPeiMemFvSize|0x0|UINT32|1 - gBoardModuleTokenSpaceGuid.PcdSimicsDxeMemFvBase|0x0|UINT32|0x15 - gBoardModuleTokenSpaceGuid.PcdSimicsDxeMemFvSize|0x0|UINT32|0x16 + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsPeiMemFvBase|0x0|UINT32|0 + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsPeiMemFvSize|0x0|UINT32|1 + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsDxeMemFvBase|0x0|UINT32|0x1 + 5 + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsDxeMemFvSize|0x0|UINT32|0x1 + 6 #TODO: Remove these two when we integrate new PlatformPei - gBoardModuleTokenSpaceGuid.PcdSimicsMemFvBase|0x0080|UINT32|2 - gBoardModuleTokenSpaceGuid.PcdSimicsMemFvSize|0x0050|UINT32|3 + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsMemFvBase|0x0080|UINT32 + |2 + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsMemFvSize|0x0050|UINT32 + |3 - gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogBase|0x0|UINT32|0x8 - gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogSize|0x0|UINT32|0x9 - gBoardModuleTokenSpaceGuid.PcdSimicsFirmwareFdSize|0x0|UINT32|0xa - gBoardModuleTokenSpaceGuid.PcdSimicsFirmwareBlockSize|0|UINT32|0xb - gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageVariableBase|0x0|UINT32|0xc - gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageFtwSpareBase|0x0|UINT32|0xd - gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageFtwWorkingBase|0x0|UINT32|0xe - gBoardModuleTokenSpaceGuid.PcdSimicsFdBaseAddress|0x0|UINT32|0xf - gBoardModuleTokenSpaceGuid.PcdSimicsSecPageTablesBase|0x0|UINT32|0x11 - gBoardModuleTokenSpaceGuid.PcdSimicsSecPageTablesSize|0x0|UINT32|0x12 - gBoardModuleTokenSpaceGuid.PcdSimicsSecPeiTempRamBase|0x0|UINT32|0x13 - gBoardModuleTokenSpaceGuid.PcdSimicsSecPeiTempRamSize|0x0|UINT32|0x14 - gBoardModuleTokenSpaceGuid.PcdSimicsLockBoxStorageBase|0x0|UINT32|0x18 - gBoardModuleTokenSpaceGuid.PcdSimicsLockBoxStorageSize|0x0|UINT32|0x19 - gBoardModuleTokenSpaceGuid.PcdGuidedExtractHandlerTableSize|0x0|UINT32|0x1a - gBoardModuleTokenSpaceGuid.PcdSimicsDecompressionScratchEnd|0x0|UINT32|0x1f + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogBase| + 0x0|UINT32|0x8 + + gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogSize| + 0x0|UINT32|0x9
Re: [edk2-devel] [edk2-platforms][PATCH V1 16/17] SimicsOpenBoardPkg/BoardX58Ich10: DSC cleanup
Reviewed-by: Prince Agyeman -Original Message- From: Kubacki, Michael A Sent: Monday, October 7, 2019 10:17 PM To: devel@edk2.groups.io Cc: Agyeman, Prince ; Wei, David Y Subject: [edk2-platforms][PATCH V1 16/17] SimicsOpenBoardPkg/BoardX58Ich10: DSC cleanup REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2244 This change refactors OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc to consolidate redundant sections and better group file content to improve maintainability and readability. The same pattern made in this change for BoardX58Ich10 is being applied to all existing board packages in Platform/Intel to improve overall consistency. Cc: Agyeman Prince Cc: Wei David Y Signed-off-by: Michael Kubacki --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc| 282 +++-- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc | 418 +--- 2 files changed, 361 insertions(+), 339 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 40f864ae17..4f8ab4170d 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -1,6 +1,7 @@ ## @file +# The main build description file for the X58Ich10 board. # -# Copyright (c) 2019 Intel Corporation. All rights reserved. +# Copyright (c) 2019, Intel Corporation. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,7 +34,7 @@ DEFINE SMM_REQUIRE = TRUE # - #PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 platform + # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 + platform # DEFINE PLATFORMX64_ENABLE = TRUE DEFINE NETWORK_TLS_ENABLE = FALSE @@ -45,7 +46,7 @@ # -# SKU Identification section - list of all SKU IDs supported by this Platform. +# SKU Identification section - list of all SKU IDs supported by this board. # [SkuIds] @@ -53,173 +54,232 @@ # -# Library Class section - list of all Library Classes needed by this Platform. +# Includes section - other DSC file contents included for this board build. # - !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc - !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc - !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc - !include $(PCH_PKG)/IchCommonLib.dsc +### +# Library Includes +### +!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc +!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc +!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc +!include $(PCH_PKG)/IchCommonLib.dsc + +### +# Component Includes +### +[Components.IA32] +!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiInclude.dsc +!include $(SKT_PKG)/SktPkgPei.dsc + +[Components.X64] +!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc +!include AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc + +### +# Build Option Includes +### +!include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgBuildOption.dsc + +### +# +# +# Library Class section - list of all Library Classes needed by this board. +# +### +# [LibraryClasses] - ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf + ### + # Edk2 Packages + ### BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf + + CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull + /CpuExceptionHandlerLibNull.inf + S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScr + iptLib.inf SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf + + # + # Platform Package + # + + AslUpdateLib|$(PLATFORM_PACKAGE)/Acpi/Library/DxeAslUpdateLib/DxeAslUp + dateLib.inf + BoardInitLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/BoardInitLibNull + /BoardInitLibNull.inf + PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSim + ple/PciSegmentInfoLibSimple.inf + TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu + ll/TestPointCheckLibNull.inf
Re: [edk2-devel] [edk2-platforms][PATCH V1 15/17] SimicsOpenBoardPkg/BoardX58Ich10: Remove OpenBoardPkgConfig.dsc
Reviewed-by: Prince Agyeman -Original Message- From: Kubacki, Michael A Sent: Monday, October 7, 2019 10:17 PM To: devel@edk2.groups.io Cc: Agyeman, Prince ; Wei, David Y Subject: [edk2-platforms][PATCH V1 15/17] SimicsOpenBoardPkg/BoardX58Ich10: Remove OpenBoardPkgConfig.dsc REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2244 The location for PCD configuration is currently inconsistent in SimicsOpenBoardPkg. A large set of FeaturePCD definitions are in OpenBoardPkgConfig.dsc while other PCD definitions (including FeaturePCD) are located in OpenBoardPkgPcd.dsc. This change consolidates PCD configuration for the BoardX58Ich10 board to OpenBoardPkgPcd.dsc and removes OpenBoardPkgConfig.dsc. Cc: Agyeman Prince Cc: Wei David Y Signed-off-by: Michael Kubacki --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 1 - Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc | 56 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc| 43 +++ 3 files changed, 43 insertions(+), 57 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index be29737c16..40f864ae17 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -40,7 +40,6 @@ DEFINE NETWORK_ISCSI_ENABLE = FALSE DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE - !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc !include NetworkPkg/NetworkDefines.dsc.inc diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc deleted file mode 100644 index 75de60e5bc..00 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc +++ /dev/null @@ -1,56 +0,0 @@ -## @file -# -# Copyright (c) 2019 Intel Corporation. All rights reserved. -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -# -# TRUE is ENABLE. FALSE is DISABLE. -# - -[PcdsFixedAtBuild] - gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4 - -[PcdsFeatureFlag] - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - - !if $(TARGET) == DEBUG -gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE - !else -gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE - !endif - - gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE - - gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable|TRUE - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable|TRUE - diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index 3bf10ee524..ad5e0c5a38 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds +++ c @@ -11,7 +11,50 @@ # Pcd Section - list of all EDK II PCD Entries defined by this Platform # +[PcdsFixedAtBuild] + gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4 + [PcdsFeatureFlag.common] + gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE + +!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1 + gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE +!endif + +!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2 + gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdStopAfte
Re: [edk2-devel] [edk2-platforms][PATCH V1 14/17] SimicsOpenBoardPkg/BoardX58Ich10: Relocate DSC includes
Reviewed-by: Prince Agyeman -Original Message- From: Kubacki, Michael A Sent: Monday, October 7, 2019 10:17 PM To: devel@edk2.groups.io Cc: Agyeman, Prince ; Wei, David Y Subject: [edk2-platforms][PATCH V1 14/17] SimicsOpenBoardPkg/BoardX58Ich10: Relocate DSC includes This change moves the following DSC file includes to the top of the OpenBoardPkg.dsc file. This is to improve visibility and align placement of the include with other board DSC files. * OpenBoardPkgConfig.dsc * OpenBoardPkgPcd.dsc * CorePeiLib.dsc * CoreDxeLib.dsc Cc: Agyeman Prince Cc: Wei David Y Signed-off-by: Michael Kubacki --- Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 21 +++- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 59e13154a7..be29737c16 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -39,7 +39,11 @@ DEFINE NETWORK_TLS_ENABLE = FALSE DEFINE NETWORK_ISCSI_ENABLE = FALSE DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE + + !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc + !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc !include NetworkPkg/NetworkDefines.dsc.inc + # # SKU Identification section - list of all SKU IDs supported by this Platform. @@ -54,12 +58,9 @@ # -[PcdsFeatureFlag] - # - # Platform On/Off features are defined here - # - !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc + !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc + !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc !include $(PCH_PKG)/IchCommonLib.dsc [LibraryClasses] @@ -76,17 +77,13 @@ SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf PciSegmentInfoLib|MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf - - !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc - S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf AslUpdateLib|MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf + [LibraryClasses.common.SEC] ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf -[LibraryClasses.common.PEI_CORE] - [LibraryClasses.common.PEIM] PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf @@ -97,16 +94,12 @@ !endif TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf - !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc - [LibraryClasses.common.DXE_DRIVER] PlatformBootManagerLib|$(BOARD_PKG)/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf [LibraryClasses.common.DXE_SMM_DRIVER] SpiFlashCommonLib|$(PCH_PKG)/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf - !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc - [Components.IA32] $(BOARD_PKG)/SecCore/SecMain.inf { -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48617): https://edk2.groups.io/g/devel/message/48617 Mute This Topic: https://groups.io/mt/34439450/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This PEIM currently publishs the board's microcode region info. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../KabylakeRvp3/BiosInfo/BiosInfo.c | 93 +++ .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++ .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + 4 files changed, 144 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c new file mode 100644 index 00..6a058a0fc2 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi. + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf new file mode 100644 index 00..94543408b1 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf @@ -0,0 +1,48 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + KabylakeSiliconPkg/SiPkg.dec + KabylakeFspBinPkg/KabylakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc index 7090852192..ef69a19aa4 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc @@ -324,6 +324,8 @@ } !endif +
[edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool
Added fit generation tool to the build process. What was done: Added BIOS_INFO_GUID to the build.cfg Added BIOS_INFO_GUID to GalagoPro3, KabylakeRvp3 and WhiskeylakeURvp build_config.cfg This allows the boards to specify the GUID associated with the its Bios Info PEIM BIOS_INFO_GUID is passed as an argument to FitGen in the FIT table generation process Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 +++ 5 files changed, 61 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg index 8c6c51abb4..3f64239a29 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg index 78f808bfaf..f6ae4b342a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg @@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg index 1b0619bc1c..1dfe5ffd10 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg FSP_BINARY_BUILD = FALSE FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE +BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 2040774d1b..6aee96694c 100644 --- a/Platform/Intel/build.cfg +++ b/Platform/Intel/build.cfg @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE REBUILD_MODE = BUILD_ROM_ONLY = NUMBER_OF_PROCESSORS = 0 +BIOS_INFO_GUID = [PLATFORMS] diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 46285df19a..ea098de705 100644 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None): if return_code != 0: build_failed(config) +# +# build platform silicon tools +# +# save the current workspace +saved_work_directory = config["WORKSPACE"] +# change the workspace to silicon tools directory +config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"], "Tools") + +command = ["nmake"] +if os.name == "posix": # linux +command = ["make"] +# add path to generated FitGen binary to +# environment path variable +config["PATH"] += os.pathsep + \ + os.path.join(config["BASE_TOOLS_PATH"], + "Source", "C", "bin") + +# build the silicon tools +_, _, result, return_code = execute_script(command, config, shell=shell) +if return_code != 0: +build_failed(config) + +# restore WORKSPACE environment variable +config["WORKSPACE"] = saved_work_directory + config["SILENT_MODE"] = 'TRUE' if silent else 'FALSE' print("==") @@ -404,6 +429,35 @@ def post_build(config): :returns: nothing """ print("Running post_build to complete the build process.") +board_fd = config["BOARD"].upper() +final_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", +"{}.fd".format(board_fd)) + +if config["BIOS_INFO_GUID"]: +# Generate the fit table +print("Generating FIT ...") +if os.path.isfile(final_fd): +temp_fd = os.path.join(config["BUILD_DIR_PATH"], "FV", + "{}_.fd".format(board_fd)) +shell = True +command = ["FitGen", "-D", + final_fd, temp_fd, "-NA", + "-I", config["BIOS_INFO_GUID"]] + +if os.name == "posix": # linux +shell = False + +_, _, result, return_code = execute_script(command, config, shell=shell) +if return_code != 0: +print("Error while generating fit") +else: +
[edk2-devel] [edk2-platforms] [PATCH 0/5] Add FIT support using FitGen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2210 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2211 This series of patches 1. Add the generation of the FitGen tool to build_bios.py 2. Add Firmware Interface Table (FIT) to the final images of: a. KabylakeOpenBoardPkg/KabylakeRvp3 b. KabylakeOpenBoardPkg/GalagoPro3 c. WhiskeylakeOpenBoardPkg/WhiskeylakeURvp What each patch does: 0001-BoardModulePkg-Add-bios-info-HOB: Adds the gBiosInfoGuid and the Bios Info struct for the Bios info HOB 0002-KabylakeOpenBoardPkg-KabylakeRvp3-Add-BIOS-Info-PEIM, 0003-KabylakeOpenBoardPkg-GalagoPro3-Add-BiosInfo-PEIM, 0004-WhiskeylakeOpenBoardPkg-Add-BIOS-INFO-PEIM: Patches 0002,0003,0004 add bios info PEIM to KabylakeRvp3, GalagoPro3 and WhiskeylakeURvp boards respectively 0005-Platform-Intel-Add-FIT-generation-tool Adds the FitGen tool binary and FIT generation to the BIOS build process. Prince Agyeman (5): BoardModulePkg: Add bios info HOB KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM Platform/Intel: Add FIT generation tool .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Library/BiosInfo.h | 62 + .../GalagoPro3/BiosInfo/BiosInfo.c| 92 ++ .../GalagoPro3/BiosInfo/BiosInfo.inf | 48 ++ .../GalagoPro3/OpenBoardPkg.dsc | 2 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/BiosInfo/BiosInfo.c | 93 +++ .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++ .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../WhiskeylakeURvp/BiosInfo/BiosInfo.c | 93 +++ .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 19 files changed, 557 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48454): https://edk2.groups.io/g/devel/message/48454 Mute This Topic: https://groups.io/mt/34386696/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 4/5] WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM
Added BIOS info PEIM to publish Bios Info HOB. This PEIM currently publishes the microcode FV info. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/BiosInfo/BiosInfo.c | 93 +++ .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + 4 files changed, 144 insertions(+) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c new file mode 100644 index 00..6a058a0fc2 --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c @@ -0,0 +1,93 @@ +/** @file + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi. + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf new file mode 100644 index 00..f268de00f5 --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf @@ -0,0 +1,48 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7 + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + CoffeelakeSiliconPkg/SiPkg.dec + CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc index eea809140c..00a89f4507 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc +++
[edk2-devel] [edk2-platforms] [PATCH 1/5] BoardModulePkg: Add bios info HOB
Added gBiosInfoGuid to be used to publish BIOS information HOB which is needed in FIT generation Also added the Bios Info header file BiosInfo.h Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Library/BiosInfo.h | 62 +++ 2 files changed, 65 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec index 6f13945ca8..035427b2f5 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -36,3 +36,6 @@ [Guids] ## Include Include/Guid/BiosId.h gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F, 0xE3, 0x3E, 0x28 } } + + ## GUID to publish BIOS information HOB + gBiosInfoGuid = { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 0x85} } diff --git a/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h new file mode 100644 index 00..bba1c07bff --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h @@ -0,0 +1,62 @@ +/** @file + + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _BIOS_INFO_H_ +#define _BIOS_INFO_H_ + +// +// BIOS INFO data structure +// This is self contained data structure for BIOS info for TXT +// +#pragma pack (1) +#define BIOS_INFO_SIGNATURE SIGNATURE_64 ('$', 'B', 'I', 'O', 'S', 'I', 'F', '$') +typedef struct { + UINT64Signature; + UINT32EntryCount; + UINT32Reserved; +//BIOS_INFO_STRUCT Struct[EntryCount]; +} BIOS_INFO_HEADER; + +// +// BIOS_INFO_STRUCT attributes +// bits[0:3] means general attributes +// bits[4:7] means type specific attributes +// +#define BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT 0x01 +#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB 0x20 + +typedef struct { + // + // FitTable entry type + // + UINT8Type; + // + // BIOS_INFO_STRUCT attributes + // + UINT8Attributes; + // + // FitTable entry version + // + UINT16 Version; + // + // FitTable entry real size + // + UINT32 Size; + // + // FitTable entry address + // + UINT64 Address; +} BIOS_INFO_STRUCT; + +extern EFI_GUID gBiosInfoGuid; + +#pragma pack () + +#endif -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48455): https://edk2.groups.io/g/devel/message/48455 Mute This Topic: https://groups.io/mt/34386697/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 3/5] KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM
Added BiosInfo PEIM to publish the Bios Info HOB. Currently this PEIM publishes one Bios Info entry which is the microcode region information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../GalagoPro3/BiosInfo/BiosInfo.c| 92 +++ .../GalagoPro3/BiosInfo/BiosInfo.inf | 48 ++ .../GalagoPro3/OpenBoardPkg.dsc | 2 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + 4 files changed, 143 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c new file mode 100644 index 00..4db9d4685c --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c @@ -0,0 +1,92 @@ +/** @file + Driver for BIOS Info support. + +Copyright (c) 2019, Intel Corporation. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent +**/ +#include +#include +#include +#include +#include +#include +#include +#include + +#define INDEXPORT_TO_ADDRESS(x) (x) +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) + +// +// Internal +// +#pragma pack (1) + +typedef struct { + BIOS_INFO_HEADER Header; + BIOS_INFO_STRUCT Entry[1]; +} BIOS_INFO; +#pragma pack () + +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo = { + { +BIOS_INFO_SIGNATURE, +1, +0, + }, + { +{ + FIT_TYPE_01_MICROCODE, + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, + 0x0100, + FixedPcdGet32 (PcdFlashMicrocodeFvSize), + FixedPcdGet32 (PcdFlashMicrocodeFvBase) +} + } +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mBiosInfoPpiList = { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + , + +}; + +/** + Installs BiosInfo Ppi. + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS Install the BiosInfo Ppi successfully. + +**/ +EFI_STATUS +EFIAPI +BiosInfoEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + VOID*HobData; + + // + // Install PPI, so that other PEI module can add dependency. + // + Status = PeiServicesInstallPpi (); + ASSERT_EFI_ERROR (Status); + + // + // Build hob, so that DXE module can also get the data. + // + HobData = BuildGuidHob (, sizeof (mBiosInfo)); + ASSERT (HobData != NULL); + if (HobData == NULL) { +return EFI_OUT_OF_RESOURCES; + } + CopyMem (HobData, , sizeof (mBiosInfo)); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf new file mode 100644 index 00..a0e18cff9c --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf @@ -0,0 +1,48 @@ +### @file +# Module Information description file for BIOS Info Driver +# +# Copyright (c) 2019, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +### + +[Defines] + INF_VERSION= 0x00010017 + BASE_NAME = BiosInfo + FILE_GUID = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F + VERSION_STRING = 1.0 + MODULE_TYPE= PEIM + ENTRY_POINT= BiosInfoEntryPoint +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + HobLib + BaseMemoryLib + DebugLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + KabylakeSiliconPkg/SiPkg.dec + KabylakeFspBinPkg/KabylakeFspBinPkg.dec + BoardModulePkg/BoardModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES + +[Sources] + BiosInfo.c + +[Guids] + gBiosInfoGuid ## PRODUCES + +[Depex] + TRUE diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index d67e0cc000..64e25168c7 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -244,6 +244,8 @@ }
[edk2-devel] [PATCH v2 2/3] SimicsOpenBoardPkg: Fix GCC build issues
From: "Agyeman, Prince" Removed unused functions in secMain.c REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2162 Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../PlatformBootManagerLib/BdsPlatform.c | 38 --- .../SimicsOpenBoardPkg/SecCore/SecMain.c | 23 --- 2 files changed, 61 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 117c72b35f..953a4a6c15 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -316,12 +316,6 @@ ConnectRootBridge ( IN VOID*Context ); -STATIC -VOID -SaveS3BootScript ( - VOID - ); - // // BDS Platform Functions // @@ -1296,38 +1290,6 @@ PlatformBdsConnectSequence ( PciAcpiInitialization (); } -/** - Save the S3 boot script. - - Note that DxeSmmReadyToLock must be signaled after this function returns; - otherwise the script wouldn't be saved actually. -**/ -STATIC -VOID -SaveS3BootScript ( - VOID - ) -{ - EFI_STATUS Status; - EFI_S3_SAVE_STATE_PROTOCOL *BootScript; - STATIC CONST UINT8 Info[] = { 0xDE, 0xAD, 0xBE, 0xEF }; - - Status = gBS->LocateProtocol (, NULL, - (VOID **) ); - ASSERT_EFI_ERROR (Status); - - // - // Despite the opcode documentation in the PI spec, the protocol - // implementation embeds a deep copy of the info in the boot script, rather - // than storing just a pointer to runtime or NVS storage. - // - Status = BootScript->Write(BootScript, EFI_BOOT_SCRIPT_INFORMATION_OPCODE, - (UINT32) sizeof Info, - (EFI_PHYSICAL_ADDRESS)(UINTN) ); - ASSERT_EFI_ERROR (Status); -} - - /** Do the platform specific action after the console is ready diff --git a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c index 5cbb47687b..4514641b46 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c @@ -495,29 +495,6 @@ FindPeiCoreImageBaseInFv ( return EFI_SUCCESS; } - -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -STATIC -UINT8 -CmosRead8 ( - IN UINTNIndex - ) -{ - IoWrite8 (0x70, (UINT8) Index); - return IoRead8 (0x71); -} - - STATIC BOOLEAN IsS3Resume ( -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47130): https://edk2.groups.io/g/devel/message/47130 Mute This Topic: https://groups.io/mt/34105604/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 3/3] SimicsIch10Pkg: Fix GCC build issues
From: "Agyeman, Prince" Removed Status variable as the SmmClear function always returns EFI_SUCCESS. Refer to the Smmclear function for details Removed SpiBaseAddress variable as this address was never used in the SendSpiCmd function. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2162 Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c | 3 --- .../SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c | 7 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c index bd08b2453b..3e7dffedfb 100644 --- a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c +++ b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c @@ -637,7 +637,6 @@ SendSpiCmd ( EFI_STATUS Status; UINT32 Index; SPI_INSTANCE*SpiInstance; - UINTN SpiBaseAddress; UINTN PchSpiBar0; UINT32 HardwareSpiAddr; UINT32 FlashRegionSize; @@ -648,9 +647,7 @@ SendSpiCmd ( Status= EFI_SUCCESS; SpiInstance = SPI_INSTANCE_FROM_SPIPROTOCOL (This); - SpiBaseAddress= SpiInstance->PchSpiBase; PchSpiBar0= AcquireSpiBar0 (SpiInstance); - SpiBaseAddress= SpiInstance->PchSpiBase; ABase = SpiInstance->PchAcpiBase; // diff --git a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c index 268b04d25a..cc2d00b785 100644 --- a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c +++ b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c @@ -131,7 +131,6 @@ SmmControl2DxeTrigger ( IN UINTNActivationInterval OPTIONAL ) { - EFI_STATUS Status; // // No support for queued or periodic activation. // @@ -141,7 +140,7 @@ SmmControl2DxeTrigger ( /// /// Clear any pending the APM SMI /// - Status = SmmClear(); + SmmClear(); // // The so-called "Advanced Power Management Status Port Register" is in fact // a generic data passing register, between the caller and the SMI @@ -181,8 +180,6 @@ SmmControl2DxeClear ( IN BOOLEAN Periodic OPTIONAL ) { - EFI_STATUS Status; - if (Periodic) { return EFI_INVALID_PARAMETER; } @@ -201,7 +198,7 @@ SmmControl2DxeClear ( // // So, nothing to do here. // - Status = SmmClear(); + SmmClear(); return EFI_SUCCESS; } -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47132): https://edk2.groups.io/g/devel/message/47132 Mute This Topic: https://groups.io/mt/34105606/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 1/3] AdvancedFeaturePkg: Fix GCC build
From: "Agyeman, Prince" Changed include file name Smbios.h to SmBios.h to fix gcc file not found build issue, due to case sensitive file names in Linux REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2162 Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h index e278a4ed18..944946b5b8 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h +++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h @@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include -#include +#include #include #include #include -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47131): https://edk2.groups.io/g/devel/message/47131 Mute This Topic: https://groups.io/mt/34105605/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 0/3] Fix SimicsOpenBoardPkg GCC Build
What changed from v1: * Added detailed commit messages This patch series fix gcc build issues seen in SimicsOpenBoardPkg. Patches were tested on GCC 5 Agyeman, Prince (3): AdvancedFeaturePkg: Fix GCC build SimicsOpenBoardPkg: Fix GCC build issues SimicsIch10Pkg: Fix GCC build issues .../Smbios/SmbiosBasicDxe/SmbiosBasic.h | 2 +- .../PlatformBootManagerLib/BdsPlatform.c | 38 --- .../SimicsOpenBoardPkg/SecCore/SecMain.c | 23 --- .../BasePchSpiCommonLib/SpiCommon.c | 3 -- .../SmmControl/RuntimeDxe/SmmControl2Dxe.c| 7 +--- 5 files changed, 3 insertions(+), 70 deletions(-) -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47129): https://edk2.groups.io/g/devel/message/47129 Mute This Topic: https://groups.io/mt/34105603/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 2/3] SimicsOpenBoardPkg: Fix GCC build issues
Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../PlatformBootManagerLib/BdsPlatform.c | 38 --- .../SimicsOpenBoardPkg/SecCore/SecMain.c | 23 --- 2 files changed, 61 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 117c72b35f..953a4a6c15 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -316,12 +316,6 @@ ConnectRootBridge ( IN VOID*Context ); -STATIC -VOID -SaveS3BootScript ( - VOID - ); - // // BDS Platform Functions // @@ -1296,38 +1290,6 @@ PlatformBdsConnectSequence ( PciAcpiInitialization (); } -/** - Save the S3 boot script. - - Note that DxeSmmReadyToLock must be signaled after this function returns; - otherwise the script wouldn't be saved actually. -**/ -STATIC -VOID -SaveS3BootScript ( - VOID - ) -{ - EFI_STATUS Status; - EFI_S3_SAVE_STATE_PROTOCOL *BootScript; - STATIC CONST UINT8 Info[] = { 0xDE, 0xAD, 0xBE, 0xEF }; - - Status = gBS->LocateProtocol (, NULL, - (VOID **) ); - ASSERT_EFI_ERROR (Status); - - // - // Despite the opcode documentation in the PI spec, the protocol - // implementation embeds a deep copy of the info in the boot script, rather - // than storing just a pointer to runtime or NVS storage. - // - Status = BootScript->Write(BootScript, EFI_BOOT_SCRIPT_INFORMATION_OPCODE, - (UINT32) sizeof Info, - (EFI_PHYSICAL_ADDRESS)(UINTN) ); - ASSERT_EFI_ERROR (Status); -} - - /** Do the platform specific action after the console is ready diff --git a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c index 5cbb47687b..4514641b46 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c +++ b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c @@ -495,29 +495,6 @@ FindPeiCoreImageBaseInFv ( return EFI_SUCCESS; } - -/** - Reads 8-bits of CMOS data. - - Reads the 8-bits of CMOS data at the location specified by Index. - The 8-bit read value is returned. - - @param Index The CMOS location to read. - - @return The value read. - -**/ -STATIC -UINT8 -CmosRead8 ( - IN UINTNIndex - ) -{ - IoWrite8 (0x70, (UINT8) Index); - return IoRead8 (0x71); -} - - STATIC BOOLEAN IsS3Resume ( -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47057): https://edk2.groups.io/g/devel/message/47057 Mute This Topic: https://groups.io/mt/34086418/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 3/3] SimicsIch10Pkg: Fix GCC build issues
Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c | 3 --- .../SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c | 7 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c index bd08b2453b..3e7dffedfb 100644 --- a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c +++ b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c @@ -637,7 +637,6 @@ SendSpiCmd ( EFI_STATUS Status; UINT32 Index; SPI_INSTANCE*SpiInstance; - UINTN SpiBaseAddress; UINTN PchSpiBar0; UINT32 HardwareSpiAddr; UINT32 FlashRegionSize; @@ -648,9 +647,7 @@ SendSpiCmd ( Status= EFI_SUCCESS; SpiInstance = SPI_INSTANCE_FROM_SPIPROTOCOL (This); - SpiBaseAddress= SpiInstance->PchSpiBase; PchSpiBar0= AcquireSpiBar0 (SpiInstance); - SpiBaseAddress= SpiInstance->PchSpiBase; ABase = SpiInstance->PchAcpiBase; // diff --git a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c index 268b04d25a..cc2d00b785 100644 --- a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c +++ b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c @@ -131,7 +131,6 @@ SmmControl2DxeTrigger ( IN UINTNActivationInterval OPTIONAL ) { - EFI_STATUS Status; // // No support for queued or periodic activation. // @@ -141,7 +140,7 @@ SmmControl2DxeTrigger ( /// /// Clear any pending the APM SMI /// - Status = SmmClear(); + SmmClear(); // // The so-called "Advanced Power Management Status Port Register" is in fact // a generic data passing register, between the caller and the SMI @@ -181,8 +180,6 @@ SmmControl2DxeClear ( IN BOOLEAN Periodic OPTIONAL ) { - EFI_STATUS Status; - if (Periodic) { return EFI_INVALID_PARAMETER; } @@ -201,7 +198,7 @@ SmmControl2DxeClear ( // // So, nothing to do here. // - Status = SmmClear(); + SmmClear(); return EFI_SUCCESS; } -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47055): https://edk2.groups.io/g/devel/message/47055 Mute This Topic: https://groups.io/mt/34086416/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 1/3] AdvancedFeaturePkg: Fix GCC build
Cc: David Wei Cc: Liming Gao Cc: Ankit Sinha Cc: Agyeman Prince Cc: Kubacki Michael A Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h index e278a4ed18..944946b5b8 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h +++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h @@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include -#include +#include #include #include #include -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47056): https://edk2.groups.io/g/devel/message/47056 Mute This Topic: https://groups.io/mt/34086417/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH 0/3] Fix SimicsOpenBoardPkg GCC Build
This patch series fix gcc build issues seen in SimicsOpenBoardPkg. Patches were tested on GCC 5 Prince Agyeman (3): AdvancedFeaturePkg: Fix GCC build SimicsOpenBoardPkg: Fix GCC build issues SimicsIch10Pkg: Fix GCC build issues .../Smbios/SmbiosBasicDxe/SmbiosBasic.h | 2 +- .../PlatformBootManagerLib/BdsPlatform.c | 38 --- .../SimicsOpenBoardPkg/SecCore/SecMain.c | 23 --- .../BasePchSpiCommonLib/SpiCommon.c | 3 -- .../SmmControl/RuntimeDxe/SmmControl2Dxe.c| 7 +--- 5 files changed, 3 insertions(+), 70 deletions(-) -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47054): https://edk2.groups.io/g/devel/message/47054 Mute This Topic: https://groups.io/mt/34086415/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH v2] ClevoOpenBoardPkg: Fix GCC5 build issue
From: Agyeman Fixed GPIO table missing curly brackets Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Cc: Chasel Chiu CC: Dandan Bi Signed-off-by: Agyeman --- .../N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c index c99b83753f..27f70df001 100644 --- a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c +++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c @@ -155,7 +155,7 @@ GPIO_INIT_CONFIG mGpioTableN1xxWU[] = {GPIO_SKL_LP_GPP_C16, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutLow, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C0_SDA {GPIO_SKL_LP_GPP_C17, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C0_SCL {GPIO_SKL_LP_GPP_C18, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C1_SDA - {GPIO_SKL_LP_GPP_C19, GpioPadModeGpio, GpioHostOwnAcpi,GpioDirInInv, GpioOutDefault, GpioIntLevel | GpioIntSci, GpioHostDeepReset, GpioTermNone}, //I2C1_SCL + {GPIO_SKL_LP_GPP_C19, {GpioPadModeGpio,GpioHostOwnAcpi,GpioDirInInv, GpioOutDefault, GpioIntLevel | GpioIntSci, GpioHostDeepReset, GpioTermNone}}, //I2C1_SCL {GPIO_SKL_LP_GPP_C20, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirDefault, GpioOutLow, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_RXD {GPIO_SKL_LP_GPP_C21, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirDefault, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_TXD {GPIO_SKL_LP_GPP_C22, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_RTSB -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46818): https://edk2.groups.io/g/devel/message/46818 Mute This Topic: https://groups.io/mt/33140162/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] [PATCH] ClevoOpenBoardPkg: Fix GCC5 build issue
From: Agyeman Fixed GPIO table missing curly brackets Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Cc: Chasel Chiu CC: Dandan Bi Signed-off-by: Prince Agyeman --- .../N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c index c99b83753f..aa2c770729 100644 --- a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c +++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c @@ -155,7 +155,7 @@ GPIO_INIT_CONFIG mGpioTableN1xxWU[] = {GPIO_SKL_LP_GPP_C16, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutLow, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C0_SDA {GPIO_SKL_LP_GPP_C17, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C0_SCL {GPIO_SKL_LP_GPP_C18, {GpioPadModeGpio,GpioHostOwnGpio,GpioDirOut, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //I2C1_SDA - {GPIO_SKL_LP_GPP_C19, GpioPadModeGpio, GpioHostOwnAcpi,GpioDirInInv, GpioOutDefault, GpioIntLevel | GpioIntSci, GpioHostDeepReset, GpioTermNone}, //I2C1_SCL + {GPIO_SKL_LP_GPP_C19, {GpioPadModeGpio, GpioHostOwnAcpi, GpioDirInInv, GpioOutDefault, GpioIntLevel | GpioIntSci, GpioHostDeepReset, GpioTermNone}}, //I2C1_SCL {GPIO_SKL_LP_GPP_C20, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirDefault, GpioOutLow, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_RXD {GPIO_SKL_LP_GPP_C21, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirDefault, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_TXD {GPIO_SKL_LP_GPP_C22, {GpioPadModeNative1, GpioHostOwnDefault, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}}, //UART2_RTSB -- 2.19.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46724): https://edk2.groups.io/g/devel/message/46724 Mute This Topic: https://groups.io/mt/33129653/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-platforms] ClevoOpenBoardPkg: Update board gpios
Updated board GPIOS Cc: Liming Gao Cc: David Y Wei Cc: Michael Kubacki Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Agyeman --- .../Library/BoardInitLib/N1xxWUGpioTable.c| 329 +- 1 file changed, 165 insertions(+), 164 deletions(-) diff --git a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c index d055fda8c3..c99b83753f 100644 --- a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c +++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c @@ -20,170 +20,171 @@ SPDX-License-Identifier: BSD-2-Clause-Patent GPIO_INIT_CONFIG mGpioTableN1xxWU[] = { -//skip for eSPI function {GPIO_SKL_LP_GPP_A0, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//H_RCIN_N -//skip for eSPI function {GPIO_SKL_LP_GPP_A1, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//LPC_AD0_ESPI_IO0 -//skip for eSPI function {GPIO_SKL_LP_GPP_A2, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//LPC_AD1_ESPI_IO1 -//skip for eSPI function {GPIO_SKL_LP_GPP_A3, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//LPC_AD2_ESPI_IO2 -//skip for eSPI function {GPIO_SKL_LP_GPP_A4, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//LPC_AD3_ESPI_IO3 -//skip for eSPI function {GPIO_SKL_LP_GPP_A5, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//LPC_FRAME_ESPI_CS_N -//skip for eSPI function {GPIO_SKL_LP_GPP_A6, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//INT_SERIRQ - {GPIO_SKL_LP_GPP_A7, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirOut, GpioOutHigh,GpioIntDis, GpioHostDeepReset, GpioTermNone}},//PM_SLP_S0ix_R_N -// skip for PM_CLKRUN_N {GPIO_SKL_LP_GPP_A8, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//PM_CLKRUN_N -//skip for eSPI function{GPIO_SKL_LP_GPP_A9, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//LPC_CLK_ESPI_CLK -// skip for PCH_CLK_PCI_TPM {GPIO_SKL_LP_GPP_A10, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//PCH_CLK_PCI_TPM - {GPIO_SKL_LP_GPP_A11, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirIn, GpioOutDefault, GpioIntLevel | GpioIntApic, GpioHostDeepReset, GpioTermNone}},//EC_HID_INTR - {GPIO_SKL_LP_GPP_A12, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirOut, GpioOutLow,GpioIntDis, GpioResumeReset, GpioTermNone}},//M.2_WWAN_GNSS_UART_RST_N -//skip for SUS_PWR_ACK_R {GPIO_SKL_LP_GPP_A13, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//SUS_PWR_ACK_R -//skip for eSPI function{GPIO_SKL_LP_GPP_A14, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//PM_SUS_STAT_ESPI_RST_N -//skip for SUSACK_R_N {GPIO_SKL_LP_GPP_A15, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermWpd20K}},//SUSACK_R_N - {GPIO_SKL_LP_GPP_A16, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirIn, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//SD_1P8_SEL - {GPIO_SKL_LP_GPP_A17, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//SD_PWR_EN_N - {GPIO_SKL_LP_GPP_A18, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//ISH_GP_0_SENSOR - {GPIO_SKL_LP_GPP_A19, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//ISH_GP_1_SENSOR - {GPIO_SKL_LP_GPP_A20, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//ISH_GP_2_SENSOR - {GPIO_SKL_LP_GPP_A21, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone, GpioOutDefault, GpioIntDis, GpioHostDeepReset, GpioTermNone}},//GNSS_CHUB_IRQ - {GPIO_SKL_LP_GPP_A22, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirOut, GpioOutHigh,GpioIntDis, GpioHostDeepReset, GpioTermNone}},//FPS_SLP_N - {GPIO_SKL_LP_GPP_A23, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirIn, GpioOutDefault, GpioIntLevel | GpioIntApic, GpioHostDeepReset, GpioTermNone}},//FPS_DRDY - {GPIO_SKL_LP_GPP_B0, {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone,