From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by mx.groups.io with SMTP id smtpd.web12.2348.1662486198003762239 for ; Tue, 06 Sep 2022 10:43:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eH9N71R4; spf=pass (domain: gmail.com, ip: 209.85.222.174, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qk1-f174.google.com with SMTP id g21so8730644qka.5 for ; Tue, 06 Sep 2022 10:43:17 -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=z79mFP/7jIAoustHt6vupxkbKECSNO/WsEgATAzpF0A=; b=eH9N71R4jmK+gJZJXjSmX2Dz+a2dxkZI7eYohW608xhGgI29ztS6wbZX6wX1jzfCbu R52qw0Rkw+tvPzbsO+vJC22I+7bgmHTCsxTOUY48aqrx8R0mAs4HObq+Cg0wHLbBynAC 6P3AL4VlzgGl5kOK4plOZ9xrPTKiFK5TBocZel6efo55YN1I3ts1mLQM0osDTN3PsRI5 Mqrvh5/wbYOk9iKw/X9Q5jkeFCESQXwRXHFgJh9lE6GDhIv8fdTfswP0GVC4UG1vm0NJ hbe2afQHGPULYVb0BBmyubc6tlw/wCk9g8svGPRCF8Uz9EQDGde79G9fAUCopQfpve/S HKlw== 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=z79mFP/7jIAoustHt6vupxkbKECSNO/WsEgATAzpF0A=; b=fhMqK+bGr9hfSgaPa074Fi2VBc2rhc9wjr6npAAMySQiw54o7H7167E6K30NS7mAov DayCRXBS+42OkoMpzE/h6sZlkhcVcdbSE7DFs7IhbdyEx3vBX+UKA6ZXc4j547LAXaLu dOCJUTSe3fpHz20p9kTMGO+m2lnmXtdUAZGvZM5c7f4uqnThe5AGthW79rcEQiARw4Kn QMCcnJAUZcm+h7yzZrCqtJZvCnbNrNGhWjdqdY91GyMVLcJkmDJYTLm0S+igEOheTGCQ g+/lYaw9h5YG4F0iBlWCCArZAQL2on+pGynpnl6ECx9iPrNdVs0lcoVNzvrd9GYMPIjc m+2Q== X-Gm-Message-State: ACgBeo3F1+7312hu4y2nc/rRe8EIbMKeYISimwO/FwQgMBcbPDBtib3/ Lw1A3xfH1h9fBRRR3CF9v3VmUC9oUOT4mA== X-Google-Smtp-Source: AA6agR5CFaS6+M+f4mvnJb9i1FUtu93b3BSJpWT7E98X4hZW9bnnN1d8YbV5OSrNIFI5RsWJ/QzHVQ== X-Received: by 2002:ae9:e404:0:b0:6bb:d8c0:381c with SMTP id q4-20020ae9e404000000b006bbd8c0381cmr37213502qkc.459.1662486196655; Tue, 06 Sep 2022 10:43:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:43:16 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Isaac Oram , Nate DeSimone , Chasel Chiu Subject: [edk2-devel][edk2-platforms][PATCH v1 7/7] KabylakeOpenBoardPkg/AspireVn7Dash572G: Align DEBUG() use Date: Tue, 6 Sep 2022 13:42:58 -0400 Message-Id: <015f0d3f13746835ca8d6299f858fc352132a4e6.1662485273.git.benjamin.doron00@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Benjamin Doron --- .../DxeAspireVn7Dash572GAcpiTableLib.c | 5 ++++ .../BoardAcpiLib/DxeBoardAcpiTableLib.inf | 1 + .../SmmAspireVn7Dash572GAcpiEnableLib.c | 8 ++++- .../Library/BoardEcLib/EcCommands.c | 16 +++++----- .../Library/BoardInitLib/DxeBoardConfigHii.c | 8 ++--- .../Library/BoardInitLib/DxeBoardInitLib.c | 23 +++++++++------ .../PeiAspireVn7Dash572GInitPostMemLib.c | 29 ++++++++++++++----- .../PeiAspireVn7Dash572GInitPreMemLib.c | 20 ++++++++++--- .../BoardInitLib/PeiBoardInitPreMemLib.c | 2 ++ .../DxeSiliconPolicyUpdateLib.c | 6 ++-- 10 files changed, 80 insertions(+), 38 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardAcpiLib/DxeAspireVn7Dash572GAcpiTableLib.c b/Platform/Intel/KabylakeOp= enBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/DxeAspireVn7Dash572GAcpiT= ableLib.c index 131e6460279a..994f18b2dc0e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeAspireVn7Dash572GAcpiTableLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeAspireVn7Dash572GAcpiTableLib.c @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D +#include =0D #include =0D #include =0D #include =0D @@ -23,6 +24,8 @@ AspireVn7Dash572GUpdateGlobalNvs ( EFI_STATUS Status;=0D UINT8 PowerRegister;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D //=0D // Allocate and initialize the NVS area for SMM and ASL communication.=0D //=0D @@ -57,6 +60,8 @@ AspireVn7Dash572GUpdateGlobalNvs ( mGlobalNvsArea.Area->Ps2KbMsEnable =3D PcdGet8 (PcdPs2KbMsEnable);= =0D =0D mGlobalNvsArea.Area->BoardId =3D (UINT8) LibPcdGetSku ();=0D +=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D EFI_STATUS=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardAcpiLib/DxeBoardAcpiTableLib.inf b/Platform/Intel/KabylakeOpenBoardPkg= /AspireVn7Dash572G/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf index 660afe9292ec..dc5bc80d0380 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeBoardAcpiTableLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/DxeBoardAcpiTableLib.inf @@ -23,6 +23,7 @@ =0D [LibraryClasses]=0D PcdLib=0D + DebugLib=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 fa2ed9745ea6..22c9c76a62e0 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmAspireVn7Dash572GAcpiEnableLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAc= piLib/SmmAspireVn7Dash572GAcpiEnableLib.c @@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/=0D =0D #include =0D -#include =0D +#include =0D #include =0D #include =0D =0D @@ -20,6 +20,8 @@ AspireVn7Dash572GBoardEnableAcpi ( {=0D EFI_STATUS Status;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D /* Tests at runtime show this re-enables charging and battery reporting= =0D * - Obtained from somewhere in vendor's SmmKbcDriver.=0D * Further information is needed */=0D @@ -36,6 +38,7 @@ AspireVn7Dash572GBoardEnableAcpi ( }=0D =0D /* TODO: Set touchpad GPP owner to ACPI? */=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D =0D return EFI_SUCCESS;=0D }=0D @@ -48,6 +51,8 @@ AspireVn7Dash572GBoardDisableAcpi ( {=0D EFI_STATUS Status;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D /* Tests at runtime show this disables charging and battery reporting=0D * - Obtained from somewhere in vendor's SmmKbcDriver.=0D * Further information is needed */=0D @@ -64,6 +69,7 @@ AspireVn7Dash572GBoardDisableAcpi ( }=0D =0D /* TODO: Set touchpad GPP owner to GPIO? */=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D =0D return EFI_SUCCESS;=0D }=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardEcLib/EcCommands.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash= 572G/Library/BoardEcLib/EcCommands.c index 182cda6f1933..24737d9ecb90 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c @@ -65,19 +65,19 @@ EcCmd90Read ( =0D Status =3D SendEcCommand (0x90);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x90) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0x90) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D =0D Status =3D SendEcData (Address);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D =0D Status =3D ReceiveEcData (Data);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D return EFI_SUCCESS;=0D @@ -103,19 +103,19 @@ EcCmd91Write ( =0D Status =3D SendEcCommand (0x91);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x91) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0x91) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D =0D Status =3D SendEcData (Address);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D =0D Status =3D SendEcData (Data);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcData(Data) failed!\n", __FUNCTION__))= ;=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcData(Data) failed!\n", __FUNCTION__)= );=0D return Status;=0D }=0D return EFI_SUCCESS;=0D @@ -144,13 +144,13 @@ EcCmd94Query ( =0D Status =3D SendEcCommand (0x94);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x94) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0x94) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D =0D Status =3D ReceiveEcData (Data);=0D if (EFI_ERROR (Status)) {=0D - DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION_= _));=0D + DEBUG ((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION= __));=0D return Status;=0D }=0D return EFI_SUCCESS;=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/DxeBoardConfigHii.c b/Platform/Intel/KabylakeOpenBoardPkg/Aspi= reVn7Dash572G/Library/BoardInitLib/DxeBoardConfigHii.c index 437d31698f7d..2c302684913a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardConfigHii.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardConfigHii.c @@ -261,7 +261,7 @@ InstallBoardConfigHiiForm ( UINTN DataSize;=0D BOOLEAN ActionFlag;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D //=0D // Install Device Path and Config Access protocols to driver handle=0D @@ -335,7 +335,7 @@ InstallBoardConfigHiiForm ( =0D FreePool (ConfigRequestHdr);=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D /**=0D @@ -350,7 +350,7 @@ UninstallBoardConfigHiiForm ( {=0D EFI_STATUS Status;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D //=0D // Uninstall Device Path and Config Access protocols=0D @@ -370,5 +370,5 @@ UninstallBoardConfigHiiForm ( //=0D HiiRemovePackages (gBoardConfigPrivate.HiiHandle);=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/DxeBoardInitLib.c b/Platform/Intel/KabylakeOpenBoardPkg/Aspire= Vn7Dash572G/Library/BoardInitLib/DxeBoardInitLib.c index cc99240b5aaa..af91034d4701 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardInitLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardInitLib.c @@ -1,8 +1,8 @@ /** @file=0D Aspire VN7-572G Board Initialization DXE library=0D =0D - Copyright (c) 2021, Baruch Binyamin Doron=0D Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D + Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -33,7 +33,7 @@ EcSendTime ( INTN Index;=0D UINT8 EcResponse;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D Status =3D gRT->GetTime (&EfiTime, NULL);=0D if (EFI_ERROR (Status)) {=0D @@ -61,7 +61,7 @@ EcSendTime ( DEBUG ((DEBUG_INFO, "EC: response 0x%x\n", EcResponse));=0D }=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D /**=0D @@ -76,7 +76,7 @@ EcRequestsTime ( {=0D UINT8 Dat;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D /* This is executed as protocol notify in vendor's RtKbcDriver when *Com= monService=0D * protocol is installed. Effectively, this code could execute from the = entrypoint */=0D @@ -85,7 +85,7 @@ EcRequestsTime ( EcSendTime ();=0D }=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D /**=0D @@ -113,6 +113,8 @@ EcResetSystemHook ( IN VOID *ResetData OPTIONAL=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D // If boolean PCD tokens 0xBD, 0xBE and 0xBF are set in vendor FW,=0D // OEM also sends command 0x5A with argument 0xAA via ACPI "CMDB" method= and stalls for=0D // 100000, then sets ResetType to EfiResetShutdown.=0D @@ -126,6 +128,8 @@ EcResetSystemHook ( // Now OEM calls function offset 2 in ACER_BOOT_DEVICE_SERVICE_PROTOCO= L_GUID.=0D // TODO: What does this do?=0D }=0D +=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D VOID=0D @@ -148,7 +152,7 @@ BoardInitAfterPciEnumeration ( {=0D EFI_STATUS Status;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D // Send EC the present time, if requested=0D EcRequestsTime ();=0D @@ -164,7 +168,7 @@ BoardInitAfterPciEnumeration ( =0D InstallBoardConfigHiiForm ();=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -180,6 +184,7 @@ BoardInitReadyToBoot ( VOID=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -203,7 +208,7 @@ BoardInitEndOfFirmware ( {=0D EFI_STATUS Status;=0D =0D - DEBUG ((DEBUG_INFO, "%a() Starts\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D // Remove ResetSystem callback. ACPI will be notifying EC of events=0D if (mResetNotify !=3D NULL) {=0D @@ -214,6 +219,6 @@ BoardInitEndOfFirmware ( =0D UninstallBoardConfigHiiForm ();=0D =0D - DEBUG ((DEBUG_INFO, "%a() Ends\n", __FUNCTION__));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GInitPostMemLib.c b/Platform/Intel/Kabylake= OpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GIni= tPostMemLib.c index 77722f5d6062..2ad2dd866829 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPostMemLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPostMemLib.c @@ -1,6 +1,7 @@ /** @file=0D =0D Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2021, Baruch Binyamin Doron
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -34,28 +35,32 @@ EcInit ( VOID=0D )=0D {=0D + EFI_STATUS Status;=0D EFI_BOOT_MODE BootMode;=0D - UINT8 PowerRegister;=0D + UINT8 PowerState;=0D UINT8 OutData;=0D UINT16 ABase;=0D UINT16 Pm1Sts;=0D UINT32 GpeSts;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D /* This is called via a "$FNC" in a PeiOemModule pointer table, with "$D= PX" on SiInit */=0D IoWrite8 (0x6C, 0x5A); // 6Ch is the EC sideband port=0D - PeiServicesGetBootMode (&BootMode);=0D + Status =3D PeiServicesGetBootMode (&BootMode);=0D + ASSERT_EFI_ERROR (Status);=0D if (BootMode =3D=3D BOOT_ON_S3_RESUME) {=0D /* "MLID" in LGMR-based memory map is equivalent to "ELID" in EC-based= =0D * memory map. Vendor firmware accesses through LGMR; remapped=0D * - EcCmd* function calls will not remapped */=0D - EcRead (0x70, &PowerRegister);=0D - if (!(PowerRegister & BIT1)) { // Lid is closed=0D + EcRead (0x70, &PowerState);=0D + if (!(PowerState & BIT1)) { // Lid is closed=0D EcCmd90Read (0x0A, &OutData);=0D if (!(OutData & BIT1)) {=0D EcCmd91Write (0x0A, OutData | BIT1);=0D }=0D =0D - /* Clear events and go back to sleep */=0D + /* Clear below events and go back to sleep */=0D PchAcpiBaseGet (&ABase);=0D /* Clear ABase PM1_STS - RW/1C set bits */=0D Pm1Sts =3D IoRead16 (ABase + R_PCH_ACPI_PM1_STS);=0D @@ -78,6 +83,8 @@ EcInit ( CpuDeadLoop ();=0D }=0D }=0D +=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D /**=0D @@ -105,15 +112,15 @@ GpioInitPostMem ( {=0D EFI_STATUS Status;=0D =0D - DEBUG ((DEBUG_INFO, "GpioInitPostMem() Start\n"));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D Status =3D GpioConfigurePads (mGpioTableAspireVn7Dash572GSize, mGpioTabl= eAspireVn7Dash572G);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "Failed to configure early GPIOs!\n"));=0D + DEBUG ((DEBUG_ERROR, "Failed to configure GPIOs!\n"));=0D return EFI_DEVICE_ERROR;=0D }=0D =0D - DEBUG ((DEBUG_INFO, "GpioInitPostMem() End\n"));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -128,6 +135,8 @@ AspireVn7Dash572GBoardInitBeforeSiliconInit ( VOID=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D GpioInitPostMem ();=0D AspireVn7Dash572GInit ();=0D =0D @@ -136,6 +145,7 @@ AspireVn7Dash572GBoardInitBeforeSiliconInit ( ///=0D LateSiliconInit ();=0D =0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -150,7 +160,10 @@ AspireVn7Dash572GBoardInitAfterSiliconInit ( VOID=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D EcInit ();=0D =0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GInitPreMemLib.c b/Platform/Intel/KabylakeO= penBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GInit= PreMemLib.c index d0125ebdbcb2..5be644fa72ae 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPreMemLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPreMemLib.c @@ -106,7 +106,7 @@ GpioInitPreMem ( {=0D EFI_STATUS Status;=0D =0D - DEBUG ((DEBUG_INFO, "GpioInitPreMem() Start\n"));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D Status =3D GpioConfigurePads (mGpioTableAspireVn7Dash572G_earlySize, mGp= ioTableAspireVn7Dash572G_early);=0D if (EFI_ERROR (Status)) {=0D @@ -114,7 +114,7 @@ GpioInitPreMem ( return EFI_DEVICE_ERROR;=0D }=0D =0D - DEBUG ((DEBUG_INFO, "GpioInitPreMem() End\n"));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -129,7 +129,7 @@ DgpuPowerOn ( {=0D UINT32 OutputVal;=0D =0D - DEBUG ((DEBUG_INFO, "DgpuPowerOn() Start\n"));=0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D =0D GpioGetOutputValue (DGPU_PRESENT, &OutputVal);=0D if (!OutputVal) {=0D @@ -146,7 +146,7 @@ DgpuPowerOn ( GpioSetOutputValue (DGPU_PWR_EN, 1); // Deassert dGPU_PWR_EN#=0D }=0D =0D - DEBUG ((DEBUG_INFO, "DgpuPowerOn() End\n"));=0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D }=0D =0D /**=0D @@ -182,6 +182,8 @@ AspireVn7Dash572GBoardInitBeforeMemoryInit ( {=0D EFI_STATUS Status;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D Status =3D GpioInitPreMem ();=0D if (!EFI_ERROR (Status)) {=0D DgpuPowerOn ();=0D @@ -206,6 +208,8 @@ AspireVn7Dash572GBoardInitBeforeMemoryInit ( Status =3D PchInitializeReset ();=0D ASSERT_EFI_ERROR (Status);=0D =0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D +=0D return EFI_SUCCESS;=0D }=0D =0D @@ -222,6 +226,8 @@ AspireVn7Dash572GBoardInitAfterMemoryInit ( {=0D EFI_STATUS Status;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D // BUGBUG: Workaround for a misbehaving system firmware not setting goId= le=0D // - Based on prior investigation for coreboot, I suspect FSP=0D if ((MmioRead32 (0xFED40044) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) =3D= =3D 0) {=0D @@ -235,6 +241,8 @@ AspireVn7Dash572GBoardInitAfterMemoryInit ( DEBUG ((DEBUG_WARN, "Failed to enable LGMR. Were ACPI tables built for= LGMR memory map?\n"));=0D }=0D =0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D +=0D return EFI_SUCCESS;=0D }=0D =0D @@ -252,6 +260,8 @@ AspireVn7Dash572GBoardDebugInit ( {=0D UINT16 ABase;=0D =0D + DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));=0D +=0D ///=0D /// Do Early PCH init=0D ///=0D @@ -272,6 +282,8 @@ AspireVn7Dash572GBoardDebugInit ( DEBUG ((DEBUG_INFO, "ABase PM1_EN=3D 0x%x\n", IoRead16 (ABase + R_PCH_AC= PI_PM1_EN)));=0D DEBUG ((DEBUG_INFO, "ABase PM1_CNT=3D 0x%x\n", IoRead32 (ABase + R_PCH_A= CPI_PM1_CNT)));=0D =0D + DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));=0D +=0D return EFI_SUCCESS;=0D }=0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiBoardInitPreMemLib.c b/Platform/Intel/KabylakeOpenBoardPkg/= AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.c index 5f89d87e71f8..9a1b6bf47f0e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPreMemLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiBoardInitPreMemLib.c @@ -86,6 +86,7 @@ BoardInitBeforeTempRamExit ( VOID=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));=0D return EFI_SUCCESS;=0D }=0D =0D @@ -95,5 +96,6 @@ BoardInitAfterTempRamExit ( VOID=0D )=0D {=0D + DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));=0D return EFI_SUCCESS;=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 6840531da986..ef04ea2feebf 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c @@ -60,12 +60,10 @@ SiliconPolicyUpdateLate ( Status =3D gBS->LocateProtocol (&gGopPolicyProtocolGuid, NULL, (VOID **)= &GopPolicy);=0D if (!EFI_ERROR (Status)) {=0D Status =3D GopPolicy->GetVbtData (&VbtAddress, &VbtSize);=0D - if (!EFI_ERROR (Status) && GraphicsDxeConfig !=3D NULL) {=0D + if (!EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_INFO, "Located VBT at 0x%x with size 0x%x\n", VbtAddre= ss, VbtSize));=0D GraphicsDxeConfig->VbtAddress =3D VbtAddress;=0D GraphicsDxeConfig->Size =3D VbtSize;=0D - DEBUG ((DEBUG_INFO, "Located VBT at 0x%x with size 0x%x\n", VbtAddre= ss, VbtSize));=0D - } else {=0D - DEBUG ((DEBUG_ERROR, "No VBT found, or Policy =3D=3D NULL; Status - = %r\n", Status));=0D }=0D }=0D =0D --=20 2.37.2