From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by mx.groups.io with SMTP id smtpd.web12.14085.1628105494002511365 for ; Wed, 04 Aug 2021 12:31:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HeVIdnA8; spf=pass (domain: gmail.com, ip: 209.85.222.170, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qk1-f170.google.com with SMTP id z24so3874539qkz.7 for ; Wed, 04 Aug 2021 12:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D7qu5Ri47gq1LWQQd3+ULwjPF8VYmBya900SqrlOZe4=; b=HeVIdnA8TnUyqoyUjpgXFQTS4C+izTMhStOuOBvwBzu715Qw6fgb8PMGzIiR/Dlnii shgRumjrp77tzHzKvnFjwYjVok7FcZ6BXhX/PqNxDx4JvHsN3ddOoOGi/5LW8JYx7CQz D8iT/4BZCC5YbNysxyWvEWZov54keT4E8uHZi5mByq4aBK2yi3eJQ+fzgUxtQw8NV0X1 PdWaqqqLNdGI45K/Q+gKeqRZyr5WC6dZ8nkNB2x9GqL0v/9FGTqoPNS2kLUCkLYzCxZV FyeSMnNJTp1FCaxacs6gjho8/gTkmBZHGt0A8hpy4kx2x2ZPjcwjOLFp8Lgh5QMWR2/6 hNEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D7qu5Ri47gq1LWQQd3+ULwjPF8VYmBya900SqrlOZe4=; b=NSfi1pQ+gXABdqX59VKKKZWjqU+jFEOcilLeLPGXZy4OUWCpN7JCmXPHtzypalgLGj 0bF2Y2FG5gQEQYSduLilBCPayWamQGuLP3hHL+XVEDfmmC6CKQACpnZKJ9SJ2KoZr89g j4px6YfNTspr8P6P2ahqItstnuZCZJxgrCUBijOlDe2tEVE+kiVtXzjWjl/nR3DXJIKq 6ic4k6i3zOognsGMKBf2lqkbTSgiTtEFPpVGgSwb7Dv02rbrkCdU3MtDYm3JI5t8eIM1 q8P0tdzofzuH6tFVNORGhmt55w1SiKRjqGkb8c06UY89ZjCCrWtXIHnLQHyY5wmPDZwU YS7g== X-Gm-Message-State: AOAM532RAvi2XHWlSQqOaS+yz1idxzpwcx4z3Gg8lslQC0epID2i7Sdg j3J+SVkMQ6CL9cctLKAwbwRbLwCsiGQ= X-Google-Smtp-Source: ABdhPJykGbq576EKcgssxYDqkYHpsiXKsyytz1+Thi5TFyXLPvP/MMtRo6+VNafwk2Ip1ZYk6wX3Rw== X-Received: by 2002:a37:8044:: with SMTP id b65mr1086076qkd.150.1628105493060; Wed, 04 Aug 2021 12:31:33 -0700 (PDT) Return-Path: Received: from benjamind-benjamindomain.. ([2607:f2c0:e98c:24:3070:df1c:bdc9:1783]) by smtp.gmail.com with ESMTPSA id q11sm1738891qkm.56.2021.08.04.12.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 12:31:32 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Jeremy Soller Subject: [edk2-platforms][PATCH v1] KabylakeOpenBoardPkg/GalagoPro3: Deduplicate PeiSiliconPolicyNotifyLib Date: Wed, 4 Aug 2021 15:31:22 -0400 Message-Id: <20210804193122.4415-1-benjamin.doron00@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable GalagoPro3 board has a duplicate copy of PeiSiliconPolicyNotifyLib. Remove it, and use the copy under KabylakeOpenBoardPkg/FspWrapper/ instead. Cc: Jeremy Soller Signed-off-by: Benjamin Doron --- Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSilic= onPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c | 104 ---------------= ----- Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSilic= onPolicyNotifyLib/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/Libr= ary/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c b/Platform/= Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNo= tifyLib/PeiPreMemSiliconPolicyNotifyLib.c deleted file mode 100644 index 70a6b7e5d2a7..000000000000 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.c +++ /dev/null @@ -1,104 +0,0 @@ -/** @file=0D - This library implements constructor function to register notify call bac= k=0D - when policy PPI installed.=0D -=0D -Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
=0D -SPDX-License-Identifier: BSD-2-Clause-Patent=0D -=0D -**/=0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -/**=0D - Callback function to update policy when policy PPI installed.=0D -=0D - @param[in] PeiServices General purpose services available to ev= ery PEIM.=0D - @param[in] NotifyDescriptor The notification structure this PEIM reg= istered on install.=0D - @param[in] Ppi The memory discovered PPI. Not used.=0D -=0D - @retval EFI_SUCCESS Succeeds.=0D - @retval Others Error code returned by sub-functions.=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -SiPreMemPolicyPpiNotify (=0D - IN EFI_PEI_SERVICES **PeiServices,=0D - IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,=0D - IN VOID *Ppi=0D - )=0D -{=0D - EFI_STATUS Status;=0D - SI_PREMEM_POLICY_PPI *SiPreMemPolicyPpi;=0D - SA_MISC_PEI_PREMEM_CONFIG *MiscPeiPreMemConfig;=0D -=0D - DEBUG ((DEBUG_INFO, "SiPreMemPolicyPpiNotify() Start\n"));=0D -=0D - Status =3D PeiServicesLocatePpi (=0D - &gSiPreMemPolicyPpiGuid,=0D - 0,=0D - NULL,=0D - (VOID **)&SiPreMemPolicyPpi=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D - if (SiPreMemPolicyPpi !=3D NULL) {=0D - //=0D - // Get requisite IP Config Blocks which needs to be used here=0D - //=0D - Status =3D GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gSaMiscPeiPreM= emConfigGuid, (VOID *) &MiscPeiPreMemConfig);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - //=0D - // Update SpdAddressTable policy when it is installed.=0D - //=0D - if (MiscPeiPreMemConfig !=3D NULL) {=0D - MiscPeiPreMemConfig->SpdAddressTable[0] =3D PcdGet8 (PcdMrcSpdAddres= sTable0);=0D - DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[0] 0x%x\n"= , MiscPeiPreMemConfig->SpdAddressTable[0]));=0D - MiscPeiPreMemConfig->SpdAddressTable[1] =3D PcdGet8 (PcdMrcSpdAddres= sTable1);=0D - DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[1] 0x%x\n"= , MiscPeiPreMemConfig->SpdAddressTable[1]));=0D - MiscPeiPreMemConfig->SpdAddressTable[2] =3D PcdGet8 (PcdMrcSpdAddres= sTable2);=0D - DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[2] 0x%x\n"= , MiscPeiPreMemConfig->SpdAddressTable[2]));=0D - MiscPeiPreMemConfig->SpdAddressTable[3] =3D PcdGet8 (PcdMrcSpdAddres= sTable3);=0D - DEBUG ((DEBUG_INFO, "MiscPeiPreMemConfig->SpdAddressTable[3] 0x%x\n"= , MiscPeiPreMemConfig->SpdAddressTable[3]));=0D - }=0D - }=0D - return Status;=0D -}=0D -=0D -static EFI_PEI_NOTIFY_DESCRIPTOR mSiPreMemPolicyPpiNotifyList[] =3D {=0D - {=0D - EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMIN= ATE_LIST,=0D - &gSiPreMemPolicyPpiGuid,=0D - SiPreMemPolicyPpiNotify=0D - }=0D -};=0D -=0D -/**=0D - The library constructuor.=0D - The function register a policy install notify callback.=0D -=0D - @param[in] ImageHandle The firmware allocated handle for the UEFI= image.=0D - @param[in] SystemTable A pointer to the EFI system table.=0D -=0D - @retval EFI_SUCCESS The function always return EFI_SUCCESS for= now.=0D - It will ASSERT on error for debug version.= =0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -PeiPreMemSiliconPolicyNotifyLibConstructor (=0D - IN EFI_PEI_FILE_HANDLE FileHandle,=0D - IN CONST EFI_PEI_SERVICES **PeiServices=0D - )=0D -{=0D - EFI_STATUS Status;=0D - //=0D - // Register call back after PPI produced=0D - //=0D - Status =3D PeiServicesNotifyPpi (mSiPreMemPolicyPpiNotifyList);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - return EFI_SUCCESS;=0D -}=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Libr= ary/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf b/Platfor= m/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicy= NotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf deleted file mode 100644 index 0fc857c41263..000000000000 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf +++ /dev/null @@ -1,44 +0,0 @@ -## @file=0D -# Component information file for Silicon Policy Notify Library.=0D -# This library implements constructor function to register notify call bac= k=0D -# when policy PPI installed.=0D -#=0D -# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
=0D -#=0D -# SPDX-License-Identifier: BSD-2-Clause-Patent=0D -#=0D -##=0D -=0D -[Defines]=0D - INF_VERSION =3D 0x00010005=0D - BASE_NAME =3D PeiPreMemSiliconPolicyNotifyLib=0D - FILE_GUID =3D 6D231E12-C088-47C8-8B16-61F07293EEF8= =0D - MODULE_TYPE =3D PEIM=0D - VERSION_STRING =3D 1.0=0D - LIBRARY_CLASS =3D NULL=0D - CONSTRUCTOR =3D PeiPreMemSiliconPolicyNotifyLibConstr= uctor=0D -=0D -[LibraryClasses]=0D - BaseLib=0D -=0D -[Packages]=0D - MdePkg/MdePkg.dec=0D - KabylakeOpenBoardPkg/OpenBoardPkg.dec=0D - KabylakeSiliconPkg/SiPkg.dec=0D - IntelSiliconPkg/IntelSiliconPkg.dec=0D -=0D -[Sources]=0D - PeiPreMemSiliconPolicyNotifyLib.c=0D -=0D -[Guids]=0D - gSaMiscPeiPreMemConfigGuid=0D -=0D -[Ppis]=0D - gSiPreMemPolicyPpiGuid=0D -=0D -[Pcd]=0D - # SPD Address Table=0D - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable0=0D - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable1=0D - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable2=0D - gKabylakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable3=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.ds= c 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 @@ #=0D # Hook a library constructor to update some policy fields when policy = is installed.=0D #=0D - NULL|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMem= SiliconPolicyNotifyLib.inf=0D + NULL|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyNoti= fyLib/PeiPreMemSiliconPolicyNotifyLib.inf=0D }=0D $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMe= m.inf=0D =0D --=20 2.31.1