From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"benjamin.doron00@gmail.com" <benjamin.doron00@gmail.com>
Cc: Jeremy Soller <jeremy@system76.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1] KabylakeOpenBoardPkg/GalagoPro3: Deduplicate PeiSiliconPolicyNotifyLib
Date: Fri, 13 Aug 2021 06:40:30 +0000 [thread overview]
Message-ID: <MWHPR1101MB21606BE363E2E5B28E7DCDC0CDFA9@MWHPR1101MB2160.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210804193122.4415-1-benjamin.doron00@gmail.com>
Hi Benjamin,
Please remember to CC the other KabylakeOpenBoardPkg maintainers. Jeremy is just a reviewer and is not able to approve patches himself.
Thanks,
Nate
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron
Sent: Wednesday, August 4, 2021 12:31 PM
To: devel@edk2.groups.io
Cc: Jeremy Soller <jeremy@system76.com>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] KabylakeOpenBoardPkg/GalagoPro3: Deduplicate PeiSiliconPolicyNotifyLib
GalagoPro3 board has a duplicate copy of PeiSiliconPolicyNotifyLib.
Remove it, and use the copy under KabylakeOpenBoardPkg/FspWrapper/ instead.
Cc: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
---
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c | 104 --------------------
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf | 44 ---------
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 2 +-
3 files changed, 1 insertion(+), 149 deletions(-)
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c
deleted file mode 100644
index 70a6b7e5d2a7..000000000000
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/** @file- This library implements constructor function to register notify call back- when policy PPI installed.--Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>-SPDX-License-Identifier: BSD-2-Clause-Patent--**/-#include <PiPei.h>-#include <Library/DebugLib.h>-#include <Library/MemoryAllocationLib.h>-#include <Library/PeiServicesLib.h>-#include <Library/SiPolicyLib.h>-#include <Library/ConfigBlockLib.h>--/**- Callback function to update policy when policy PPI installed.-- @param[in] PeiServices General purpose services available to every PEIM.- @param[in] NotifyDescriptor The notification structure this PEIM registered on install.- @param[in] Ppi The memory discovered PPI. Not used.-- @retval EFI_SUCCESS Succeeds.- @retval Others Error code returned by sub-functions.-**/-EFI_STATUS-EFIAPI-SiPreMemPolicyPpiNotify (- IN EFI_PEI_SERVICES **PeiServices,- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,- IN VOID *Ppi- )-{- EFI_STATUS Status;- SI_PREMEM_POLICY_PPI *SiPreMemPolicyPpi;- SA_MISC_PEI_PREMEM_CONFIG *MiscPeiPreMemConfig;-- DEBUG ((DEBUG_INFO, "SiPreMemPolicyPpiNotify() Start\n"));-- Status = PeiServicesLocatePpi (- &gSiPreMemPolicyPpiGuid,- 0,- NULL,- (VOID **)&SiPreMemPolicyPpi- );- ASSERT_EFI_ERROR (Status);- if (SiPreMemPolicyPpi != NULL) {- //- // Get requisite IP Config Blocks which needs to be used here- //- Status = GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gSaMiscPeiPreMemConfigGuid, (VOID *) &MiscPeiPreMemConfig);- ASSERT_EFI_ERROR (Status);-- //- // Update SpdAddressTable policy when it is installed.- //- if (MiscPeiPreMemConfig != NULL) {- MiscPeiPreMemConfig->SpdAddressTable[0] = PcdGet8 (PcdMrcSpdAddressTable0);- DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[0] 0x%x\n", MiscPeiPreMemConfig->SpdAddressTable[0]));- MiscPeiPreMemConfig->SpdAddressTable[1] = PcdGet8 (PcdMrcSpdAddressTable1);- DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[1] 0x%x\n", MiscPeiPreMemConfig->SpdAddressTable[1]));- MiscPeiPreMemConfig->SpdAddressTable[2] = PcdGet8 (PcdMrcSpdAddressTable2);- DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[2] 0x%x\n", MiscPeiPreMemConfig->SpdAddressTable[2]));- MiscPeiPreMemConfig->SpdAddressTable[3] = PcdGet8 (PcdMrcSpdAddressTable3);- DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[3] 0x%x\n", MiscPeiPreMemConfig->SpdAddressTable[3]));- }- }- return Status;-}--static EFI_PEI_NOTIFY_DESCRIPTOR mSiPreMemPolicyPpiNotifyList[] = {- {- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,- &gSiPreMemPolicyPpiGuid,- SiPreMemPolicyPpiNotify- }-};--/**- The library constructuor.- The function register a policy install notify callback.-- @param[in] ImageHandle The firmware allocated handle for the UEFI image.- @param[in] SystemTable A pointer to the EFI system table.-- @retval EFI_SUCCESS The function always return EFI_SUCCESS for now.- It will ASSERT on error for debug version.-**/-EFI_STATUS-EFIAPI-PeiPreMemSiliconPolicyNotifyLibConstructor (- IN EFI_PEI_FILE_HANDLE FileHandle,- IN CONST EFI_PEI_SERVICES **PeiServices- )-{- EFI_STATUS Status;- //- // Register call back after PPI produced- //- Status = PeiServicesNotifyPpi (mSiPreMemPolicyPpiNotifyList);- ASSERT_EFI_ERROR (Status);-- return EFI_SUCCESS;-}diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf
deleted file mode 100644
index 0fc857c41263..000000000000
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf
+++ /dev/null
@@ -1,44 +0,0 @@
-## @file-# Component information file for Silicon Policy Notify Library.-# This library implements constructor function to register notify call back-# when policy PPI installed.-#-# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>-#-# SPDX-License-Identifier: BSD-2-Clause-Patent-#-##--[Defines]- INF_VERSION = 0x00010005- BASE_NAME = PeiPreMemSiliconPolicyNotifyLib- FILE_GUID = 6D231E12-C088-47C8-8B16-61F07293EEF8- MODULE_TYPE = PEIM- VERSION_STRING = 1.0- LIBRARY_CLASS = NULL- CONSTRUCTOR = PeiPreMemSiliconPolicyNotifyLibConstructor--[LibraryClasses]- BaseLib--[Packages]- MdePkg/MdePkg.dec- KabylakeOpenBoardPkg/OpenBoardPkg.dec- KabylakeSiliconPkg/SiPkg.dec- IntelSiliconPkg/IntelSiliconPkg.dec--[Sources]- PeiPreMemSiliconPolicyNotifyLib.c--[Guids]- gSaMiscPeiPreMemConfigGuid--[Ppis]- gSiPreMemPolicyPpiGuid--[Pcd]- # SPD Address Table- gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable0- gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable1- gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable2- gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable3diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 302cb679b5eb..7f276d351280 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -301,7 +301,7 @@
# # Hook a library constructor to update some policy fields when policy is installed. #- NULL|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf+ NULL|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf } $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf --
2.31.1
-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78661): https://edk2.groups.io/g/devel/message/78661
Mute This Topic: https://groups.io/mt/84669971/1767664
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@intel.com] -=-=-=-=-=-=
next prev parent reply other threads:[~2021-08-13 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 19:31 [edk2-platforms][PATCH v1] KabylakeOpenBoardPkg/GalagoPro3: Deduplicate PeiSiliconPolicyNotifyLib Benjamin Doron
2021-08-13 6:38 ` [edk2-devel] " Nate DeSimone
2021-08-13 6:40 ` Nate DeSimone [this message]
2021-08-13 6:45 ` Nate DeSimone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MWHPR1101MB21606BE363E2E5B28E7DCDC0CDFA9@MWHPR1101MB2160.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox