From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mx.groups.io with SMTP id smtpd.web09.2363.1662486190522809487 for ; Tue, 06 Sep 2022 10:43:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Rys/LZXv; spf=pass (domain: gmail.com, ip: 209.85.222.179, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qk1-f179.google.com with SMTP id i9so2783947qka.0 for ; Tue, 06 Sep 2022 10:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=Xxp1q2ZDF87g7pVjy3BG5UENazWGTaxLubXb4icUPqM=; b=Rys/LZXvILFBN7jd7exQFX17wu/YcJPoCWnIQaKFYvmsogPaVHjRoExq5M9+Ttg/y4 pdcwNaWpUklEWXzanVGewMYwXcWOmDodjlnQiG9Gfd6Ttk26AGfvJHL5Lpnoyb1FhUSA zXrcfrGadaR4XfoYI2c4xR8HFlZbLLF3A09fuhZsMs4U4Sgopr8aJ7Vxiwdx7l+3niCb oFU0rnliQttFdbioU5taOPM46gICp6FzgeEJz3BE//Xj2PFQxQtw8tfpcdW18J0raoGq d25CC+VJEb9TlNWhBueTOJW0X40nnvjXBBxnEu302zGnneJYzobe+glrwahI5oVcGzrO MH8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=Xxp1q2ZDF87g7pVjy3BG5UENazWGTaxLubXb4icUPqM=; b=p8JU0BugwW7cxVgeLZAadbhKTCIJVv58pAH4579MKeaNbaCXD6bhzlHe85O4kpb/Ga LvAT8qtp6/e72sa2udZLfWwUpE3RUUi/QyrBxPDjh+lHU8Pa3vsf0Ucd0ZInkgdES1Tz FKVrehwX0drya/CJr0d+mNURZQncJWZ0rUElztw+4yk84YU5gIN/y17DJQzm0gWJWivC +ijCTBuXajtvOtOGXwOhqhfr3TjHMxr2/A1Kz1Wh9nePdxNuK2Tiyodq6Bu4vtStkZqR 9TMpsYdHVr/JxCa06xNIFHWpTu+1sfthVLVbzLhtpxf2WxD61F2EmjqjtUQLNzyODWlt 7Vpg== X-Gm-Message-State: ACgBeo1ODLPn2SB3MG1xnTLfvKI7tIl9C3yS+m0anOpGgYX1Y/bCnSYt C0OzADvoZLjziqE2f0lUvZ9HtBHli97Dgw== X-Google-Smtp-Source: AA6agR5ORgmzdNZkZMjLKGpgrk6ZcQpIs6YnZ0b0ml4yE4mep53CwBJd51dkd7rbCCAlHY2i0MsKfg== X-Received: by 2002:a05:620a:294c:b0:6bc:1d0d:d873 with SMTP id n12-20020a05620a294c00b006bc1d0dd873mr37300086qkp.355.1662486189303; Tue, 06 Sep 2022 10:43:09 -0700 (PDT) Return-Path: Received: from aturtleortwo-benjamindomain.. ([2607:f2c0:e98c:e:b132:3785:fa38:a51]) by smtp.gmail.com with ESMTPSA id bi3-20020a05620a318300b006b61b2cb1d2sm11221482qkb.46.2022.09.06.10.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:43:08 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Isaac Oram , Chasel Chiu , Nate DeSimone Subject: [edk2-devel][edk2-platforms][PATCH v1 1/7] KabylakeOpenBoardPkg/AspireVn7Dash572G: Cleanup library includes Date: Tue, 6 Sep 2022 13:42:52 -0400 Message-Id: X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Remove unused includes, LibraryClasses and update a comment or two. Cc: Sai Chaganty Cc: Isaac Oram Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Benjamin Doron --- .../PcieDeviceTable.c | 1 - .../PeiBoardPolicyUpdate.c | 6 ++++-- .../PeiPchPolicyUpdate.h | 3 ++- .../PeiPchPolicyUpdatePreMem.c | 1 - .../PeiSiliconPolicyUpdateLibFsp.inf | 5 ++--- .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 5 +---- .../SmmAspireVn7Dash572GAcpiEnableLib.c | 9 +++++---- .../BoardAcpiLib/SmmBoardAcpiEnableLib.inf | 3 ++- .../Library/BoardEcLib/EcCommands.c | 14 ++++++++------ .../AspireVn7Dash572GHdaVerbTables.c | 3 ++- .../BoardInitLib/PeiAspireVn7Dash572GInitLib.h | 3 +-- .../PeiAspireVn7Dash572GInitPreMemLib.c | 18 +++++++++--------- .../BoardInitLib/PeiBoardInitPostMemLib.inf | 4 +--- .../BoardInitLib/PeiBoardInitPreMemLib.inf | 5 +---- .../AspireVn7Dash572G/OpenBoardPkg.fdf | 3 ++- .../OpenBoardPkgBuildOption.dsc | 4 ++-- .../DxeGopPolicyInit.h | 3 --- .../DxeSaPolicyInit.h | 3 --- .../DxeSiliconPolicyUpdateLib.c | 3 +-- .../DxeSiliconPolicyUpdateLib.inf | 2 ++ 20 files changed, 45 insertions(+), 53 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapp= er/Library/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c b/Platform/Intel/= KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPolicyU= pdateLibFsp/PcieDeviceTable.c index 205ca581c6f3..537fb5c8e4f4 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/=0D =0D #include "PeiPchPolicyUpdate.h"=0D -#include =0D =0D #define PCI_CLASS_NETWORK 0x02=0D #define PCI_CLASS_NETWORK_ETHERNET 0x00=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapp= er/Library/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c b/Platform/I= ntel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPo= licyUpdateLibFsp/PeiBoardPolicyUpdate.c index 81cd8b940f05..452c961b17ac 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c @@ -12,14 +12,16 @@ #include =0D #include =0D =0D -/* TODO:=0D +/*=0D + * TODO:=0D * - Validate PCH Sample policies: only SA one used by default.=0D * - Remove likely fuse-disabled devices when reset handling is committed?= =0D * - Remove duplicate policy=0D * - Consider updating some policies, rather than overriding. This could= be factored into=0D * BoardInitLib for deduplication=0D * - Copy initialised array, where sane=0D - * - Set IgdDvmt50PreAlloc? */=0D + * - Set IgdDvmt50PreAlloc?=0D + */=0D =0D #define SA_VR 0=0D #define IA_VR 1=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapp= er/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h b/Platform/Int= el/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPoli= cyUpdateLibFsp/PeiPchPolicyUpdate.h index 5e720b0041e8..134188698077 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h @@ -17,10 +17,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D -#include =0D =0D #include =0D #include =0D #include =0D =0D +#include =0D +=0D #endif=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapp= er/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c b/Platfo= rm/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSilic= onPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c index 2bc142c0e5ff..28e4e45375c2 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c @@ -9,7 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "PeiPchPolicyUpdate.h"=0D #include =0D #include =0D -#include =0D #include =0D #include =0D #include =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapp= er/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf b/= Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/Pe= iSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf index eac9344b0aa2..0e1b42c20cd8 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf @@ -62,19 +62,18 @@ =0D [LibraryClasses.IA32]=0D FspWrapperApiLib=0D - FspWrapperPlatformLib=0D BaseMemoryLib=0D DebugLib=0D - HobLib=0D IoLib=0D PcdLib=0D MmPciLib=0D - ConfigBlockLib=0D + PciLib=0D PeiSaPolicyLib=0D PchInfoLib=0D PchHsioLib=0D PchPcieRpLib=0D SiPolicyLib=0D + MemoryAllocationLib=0D PeiLib=0D =0D [Pcd]=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardAcpiLib/DxeBoardAcpiTableLib.inf b/Platform/Intel/KabylakeOpenBoardPkg= /AspireVn7Dash572G/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf index 0d8264554734..660afe9292ec 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeBoardAcpiTableLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeBoardAcpiTableLib.inf @@ -22,10 +22,7 @@ #=0D =0D [LibraryClasses]=0D - BaseLib=0D - IoLib=0D - PciLib=0D - AslUpdateLib=0D + PcdLib=0D EcLib=0D =0D [Packages]=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardAcpiLib/SmmAspireVn7Dash572GAcpiEnableLib.c b/Platform/Intel/KabylakeO= penBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/SmmAspireVn7Dash572GAcpi= EnableLib.c index 69e9c928ff69..fa2ed9745ea6 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmAspireVn7Dash572GAcpiEnableLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmAspireVn7Dash572GAcpiEnableLib.c @@ -2,6 +2,7 @@ Acer Aspire VN7-572G SMM Board ACPI Enable library=0D =0D Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -20,8 +21,8 @@ AspireVn7Dash572GBoardEnableAcpi ( EFI_STATUS Status;=0D =0D /* Tests at runtime show this re-enables charging and battery reporting= =0D - * - Obtained somewhere from somewhere in vendor's SmmKbcDriver (or RtKb= cDriver).=0D - * Further reversing will be performed */=0D + * - Obtained from somewhere in vendor's SmmKbcDriver.=0D + * Further information is needed */=0D Status =3D SendEcCommand (0xE9); /* Vendor implements using ACPI "CMDB"= register" */=0D if (EFI_ERROR (Status)) {=0D DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __FUNCTION= __));=0D @@ -48,8 +49,8 @@ AspireVn7Dash572GBoardDisableAcpi ( EFI_STATUS Status;=0D =0D /* Tests at runtime show this disables charging and battery reporting=0D - * - Obtained somewhere from somewhere in vendor's SmmKbcDriver (or RtKb= cDriver).=0D - * Further reversing will be performed */=0D + * - Obtained from somewhere in vendor's SmmKbcDriver.=0D + * Further information is needed */=0D Status =3D SendEcCommand (0xE9); /* Vendor implements using ACPI "CMDB"= register" */=0D if (EFI_ERROR (Status)) {=0D DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __FUNCTION= __));=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardAcpiLib/SmmBoardAcpiEnableLib.inf b/Platform/Intel/KabylakeOpenBoardPk= g/AspireVn7Dash572G/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf index 63a54e1830a5..5db00224dfce 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmBoardAcpiEnableLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmBoardAcpiEnableLib.inf @@ -23,9 +23,10 @@ =0D [LibraryClasses]=0D BaseLib=0D + DebugLib=0D EcLib=0D IoLib=0D - PciLib=0D + PcdLib=0D MmPciLib=0D PchCycleDecodingLib=0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardEcLib/EcCommands.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash= 572G/Library/BoardEcLib/EcCommands.c index 6e752b4e227e..54cfaba47b1b 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c @@ -13,7 +13,8 @@ #include =0D #include =0D =0D -/* Notes:=0D +/*=0D + * Notes:=0D * - ACPI "CMDB": Writing to this offset is equivalent to sending commands= .=0D * The CMDx bytes contain the command parameters.=0D *=0D @@ -21,9 +22,10 @@ * - Commands: 0x58, 0xE1 and 0xE2=0D * - 0x51, 0x52: EC flash write?=0D * - ACPI CMDB: 0x63 and 0x64, 0xC7=0D - * - 0x0B: Flash write (Boolean argument? Set in offset 0x0B?)=0D + * - 0x0B: Flash lock/write (Set offset 0x0B?)=0D + * - Key/recovery detection?=0D *=0D - * Reversing vendor's protocols:=0D + * Vendor's protocols:=0D * - Only read and write are used.=0D * - Query, ACPI "CMDB" processing and command 58 are unused.=0D * - Equivalent KbcPeim is an unused PPI.=0D @@ -32,9 +34,9 @@ */=0D =0D #define EC_INDEX_IO_PORT 0x1200=0D -#define EC_INDEX_IO_HIGH_ADDR_PORT EC_INDEX_IO_PORT+1=0D -#define EC_INDEX_IO_LOW_ADDR_PORT EC_INDEX_IO_PORT+2=0D -#define EC_INDEX_IO_DATA_PORT EC_INDEX_IO_PORT+3=0D +#define EC_INDEX_IO_HIGH_ADDR_PORT (EC_INDEX_IO_PORT + 1)=0D +#define EC_INDEX_IO_LOW_ADDR_PORT (EC_INDEX_IO_PORT + 2)=0D +#define EC_INDEX_IO_DATA_PORT (EC_INDEX_IO_PORT + 3)=0D =0D /**=0D Reads a byte of EC RAM.=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/AspireVn7Dash572GHdaVerbTables.c b/Platform/Intel/KabylakeOpen= BoardPkg/AspireVn7Dash572G/Library/BoardInitLib/AspireVn7Dash572GHdaVerbTab= les.c index 0573736060fa..cc7369f3484c 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/AspireVn7Dash572GHdaVerbTables.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/AspireVn7Dash572GHdaVerbTables.c @@ -2,6 +2,7 @@ HDA Verb table for Acer Aspire VN7-572G=0D =0D Copyright (c) 2017, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -9,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _ASPIRE_VN7_572G_HDA_VERB_TABLES_H_=0D #define _ASPIRE_VN7_572G_HDA_VERB_TABLES_H_=0D =0D -#include =0D +#include =0D =0D HDAUDIO_VERB_TABLE HdaVerbTableAlc255AspireVn7Dash572G =3D HDAUDIO_VERB_TA= BLE_INIT (=0D //=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GInitLib.h b/Platform/Intel/KabylakeOpenBoa= rdPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GInitLib.h index 83789c90becf..51a7b714c463 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitLib.h +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitLib.h @@ -8,10 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _PEI_ASPIRE_VN7_572G_BOARD_INIT_LIB_H_=0D #define _PEI_ASPIRE_VN7_572G_BOARD_INIT_LIB_H_=0D =0D -#include =0D +#include =0D #include =0D #include =0D -#include =0D #include =0D #include =0D #include =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GInitPreMemLib.c b/Platform/Intel/KabylakeO= penBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GInit= PreMemLib.c index 1b4c6b484b43..d0125ebdbcb2 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPreMemLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPreMemLib.c @@ -1,6 +1,7 @@ /** @file=0D =0D Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -8,7 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D -#include =0D #include =0D #include =0D #include =0D @@ -16,7 +16,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D -#include =0D =0D #include =0D #include =0D @@ -47,12 +46,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 RcompTargetAs= pireVn7Dash572G[SA_MRC_M #define DGPU_HOLD_RST GPIO_SKL_LP_GPP_B4 /* Active low */=0D #define DGPU_PWR_EN GPIO_SKL_LP_GPP_B21 /* Active low */=0D =0D -EFI_STATUS=0D -EFIAPI=0D -AspireVn7Dash572GBoardDetect (=0D - VOID=0D - );=0D -=0D /**=0D Aspire VN7-572G board configuration init function for PEI pre-memory pha= se.=0D =0D @@ -75,7 +68,7 @@ AspireVn7Dash572GInitPreMem ( //=0D PcdSet8S (PcdSaMiscUserBd, 5); // ULT/ULX/Mobile Halo=0D PcdSet8S (PcdMrcCaVrefConfig, 2); // DDR4: "VREF_CA to CH_A and VREF_DQ= _B to CH_B"=0D - // TODO: Clear Dq/Dqs?=0D + // TODO: Search vendor FW for Dq/Dqs. Unnecessary if FSP detects LPDDR=0D PcdSetBoolS (PcdMrcDqPinsInterleaved, TRUE);=0D =0D PcdSet32S (PcdMrcRcompResistor, (UINTN) RcompResistorAspireVn7Dash572G);= =0D @@ -241,9 +234,16 @@ AspireVn7Dash572GBoardInitAfterMemoryInit ( if (EFI_ERROR (Status)) {=0D DEBUG ((DEBUG_WARN, "Failed to enable LGMR. Were ACPI tables built for= LGMR memory map?\n"));=0D }=0D +=0D return EFI_SUCCESS;=0D }=0D =0D +EFI_STATUS=0D +EFIAPI=0D +AspireVn7Dash572GBoardDetect (=0D + VOID=0D + );=0D +=0D EFI_STATUS=0D EFIAPI=0D AspireVn7Dash572GBoardDebugInit (=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiBoardInitPostMemLib.inf b/Platform/Intel/KabylakeOpenBoardP= kg/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPostMemLib.inf index c8c49fa20dcc..7b68f66ac78b 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPostMemLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPostMemLib.inf @@ -10,7 +10,7 @@ [Defines]=0D INF_VERSION =3D 0x00010005=0D BASE_NAME =3D PeiBoardPostMemInitLib=0D - FILE_GUID =3D 7fcc3900-d38d-419f-826b-72481e8b5509= =0D + FILE_GUID =3D 7FCC3900-D38D-419F-826B-72481E8B5509= =0D MODULE_TYPE =3D BASE=0D VERSION_STRING =3D 1.0=0D LIBRARY_CLASS =3D BoardInitLib=0D @@ -18,8 +18,6 @@ [LibraryClasses]=0D BaseLib=0D DebugLib=0D - BaseMemoryLib=0D - MemoryAllocationLib=0D PcdLib=0D SiliconInitLib=0D PchCycleDecodingLib=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiBoardInitPreMemLib.inf b/Platform/Intel/KabylakeOpenBoardPk= g/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.inf index c53114e15450..a3164870ef9b 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPreMemLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPreMemLib.inf @@ -10,7 +10,7 @@ [Defines]=0D INF_VERSION =3D 0x00010005=0D BASE_NAME =3D PeiBoardInitPreMemLib=0D - FILE_GUID =3D ec3675bc-1470-417d-826e-37378140213d= =0D + FILE_GUID =3D EC3675BC-1470-417D-826E-37378140213D= =0D MODULE_TYPE =3D BASE=0D VERSION_STRING =3D 1.0=0D LIBRARY_CLASS =3D BoardInitLib=0D @@ -18,8 +18,6 @@ [LibraryClasses]=0D BaseLib=0D DebugLib=0D - BaseMemoryLib=0D - MemoryAllocationLib=0D PcdLib=0D SiliconInitLib=0D TimerLib=0D @@ -30,7 +28,6 @@ EcLib=0D BoardEcLib=0D GpioLib=0D - PeiLib=0D PeiServicesLib=0D PchPmcLib=0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardP= kg.fdf index 864d5561d7d8..b59d9a4f24e1 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkg.fdf @@ -279,7 +279,7 @@ INF IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim= .inf INF $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPost= Mem.inf=0D =0D !if gSiPkgTokenSpaceGuid.PcdPeiDisplayEnable =3D=3D TRUE=0D -FILE FREEFORM =3D 4ad46122-ffeb-4a52-bfb0-518cfca02db0 {=0D +FILE FREEFORM =3D 4AD46122-FFEB-4A52-BFB0-518CFCA02DB0 {=0D SECTION RAW =3D $(BOARD)/Vbt.bin=0D SECTION UI =3D "Vbt"=0D }=0D @@ -346,6 +346,7 @@ APRIORI DXE { INF UefiCpuPkg/CpuDxe/CpuDxe.inf=0D INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf=0D =0D +# TODO: Add NvmExpressDxe if supporting Newgate and RayleighSLS=0D INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf=0D INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoar= dPkgBuildOption.dsc b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G= /OpenBoardPkgBuildOption.dsc index b1a04c474845..6e2053d67734 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgBui= ldOption.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/OpenBoardPkgBui= ldOption.dsc @@ -84,6 +84,7 @@ DEFINE DSC_PLTPKG_FEATURE_BUILD_OPTIONS =3D $(DSC_PLTPKG_= FEATURE_BUILD_OPTIONS) $( DEFINE DSC_PLTPKG_FEATURE_BUILD_OPTIONS =3D $(DSC_PLTPKG_FEATURE_BUILD_OPT= IONS) $(DSC_ACPI_BUILD_OPTIONS) $(UP_SERVER_SUPPORT_BUILD_OPTIONS) $(USBTYP= EC_BUILD_OPTION) $(SINITBIN_BUILD_OPTION) $(MINTREE_FLAG_BUILD_OPTION)=0D =0D # FIXME: $(DSC_PLTPKG_FEATURE_BUILD_OPTIONS) is passed multiple times=0D +# BUGBUG: `-Wl,--allow-multiple-definition` breaks CLANG build=0D [BuildOptions.Common.EDKII]=0D =0D #=0D @@ -141,8 +142,7 @@ MSFT: *_*_X64_ASLCC_FLAGS =3D $(DSC_PLTPKG_FEATURE_= BUILD_OPTIONS) MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096=0D GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000=0D =0D -# FIXME: Protection broken, but works on UefiPayload, and not related to=0D -# FspWrapperNotifyDxe. Cannot be related to SMM?=0D +# FIXME: Protection broken, yet works on UefiPayload. Consider diffing mod= ule/library include lists (unrelated to FspWrapperNotifyDxe).=0D # Force PE/COFF sections to be aligned at 4KB boundaries to support NX pro= tection=0D [BuildOptions.common.EDKII.DXE_DRIVER, BuildOptions.common.EDKII.DXE_CORE,= BuildOptions.common.EDKII.UEFI_DRIVER, BuildOptions.common.EDKII.UEFI_APPL= ICATION]=0D #MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/L= ibrary/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h b/Platform/Intel/Kabyla= keOpenBoardPkg/AspireVn7Dash572G/Policy/Library/DxeSiliconPolicyUpdateLib/D= xeGopPolicyInit.h index 63cad5e3753f..56cab1df9b1d 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h @@ -9,11 +9,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define _GOP_POLICY_INIT_DXE_H_=0D =0D #include =0D -#include =0D #include =0D -#include =0D #include =0D -#include =0D #include =0D #include =0D #include =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/L= ibrary/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h b/Platform/Intel/Kabylak= eOpenBoardPkg/AspireVn7Dash572G/Policy/Library/DxeSiliconPolicyUpdateLib/Dx= eSaPolicyInit.h index 801387b9476f..88a507547f69 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h @@ -8,12 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _SA_POLICY_INIT_DXE_H_=0D #define _SA_POLICY_INIT_DXE_H_=0D =0D -#include =0D -#include =0D #include =0D #include =0D #include =0D -#include =0D =0D #include =0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/L= ibrary/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c b/Platform/Int= el/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/DxeSiliconPolicyUp= dateLib/DxeSiliconPolicyUpdateLib.c index 6298bb53e65d..6840531da986 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c @@ -1,14 +1,13 @@ /** @file=0D =0D Copyright (c) 2017, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D =0D #include =0D #include =0D -#include =0D -#include =0D #include =0D #include =0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/L= ibrary/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf b/Platform/I= ntel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/DxeSiliconPolicy= UpdateLib/DxeSiliconPolicyUpdateLib.inf index 63ac194cd0d5..989796cf8244 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf @@ -17,6 +17,8 @@ =0D [LibraryClasses]=0D BaseLib=0D + BaseMemoryLib=0D + UefiBootServicesTableLib=0D PcdLib=0D DebugLib=0D ConfigBlockLib=0D --=20 2.37.2