From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8BE6521CEB0F5 for ; Mon, 11 Sep 2017 19:53:45 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 11 Sep 2017 19:56:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,381,1500966000"; d="scan'208";a="1171315034" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 11 Sep 2017 19:56:41 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Sep 2017 19:56:41 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Sep 2017 19:56:40 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.168]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.219]) with mapi id 14.03.0319.002; Tue, 12 Sep 2017 10:56:39 +0800 From: "Wei, David" To: "Lu, ShifeiX A" , "edk2-devel@lists.01.org" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type Thread-Index: AQHTK3Jxu0UjGt63aUWpMOkin4lvT6KwjjaQ Date: Tue, 12 Sep 2017 02:56:38 +0000 Message-ID: <89954A0B46707A448411A627AD4EEE3468F7DE16@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 02:53:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: zwei4 Thanks, David Wei =20 > -----Original Message----- > From: Lu, ShifeiX A > Sent: Tuesday, September 12, 2017 10:54 AM > To: edk2-devel@lists.01.org > Cc: Wei, David > Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change > Reset Type >=20 > Change Reset Type according to different Board. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: lushifex > --- > .../Board/BensonGlacier/BoardInitPostMem/BoardInit.c | 7 += ++++++ > .../Board/BensonGlacier/BoardInitPostMem/BoardInit.h | 1 + > .../Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf | 1 + > .../BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c | 7 > +++++++ > .../BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h | 1 + > .../Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf | 3 += +- > .../Board/MinnowBoard3/BoardInitPostMem/BoardInit.c | 7 > +++++++ > .../Board/MinnowBoard3/BoardInitPostMem/BoardInit.h | 1 + > .../Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf | 3 > ++- > .../BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 2 > +- > .../Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 += + > .../Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi | > 2 ++ > Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec | 1 + > .../BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c | 6 += ++--- > .../BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h | 3 += +- > .../BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf | 3 += +- > 16 files changed, 42 insertions(+), 8 deletions(-) >=20 > diff --git > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.c > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.c > index 729a158..a4f3414 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.c > +++ > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.c > @@ -48,6 +48,7 @@ BensonGlacierPostMemInitCallback ( > VOID *Instance; > UINT8 BoardId; > UINT8 FabId; > + UINT8 ResetType; >=20 > Status =3D PeiServicesLocatePpi ( > &gBoardPostMemInitDoneGuid, > @@ -76,6 +77,12 @@ BensonGlacierPostMemInitCallback ( > PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) > BensonMultiPlatformInfoInit); >=20 > // > + // Set Reset Type according to different Board > + // > + ResetType =3D V_RST_CNT_HARDRESET; > + PcdSet8 (PcdResetType, (UINT8) ResetType); > + > + // > // Add init steps here > // > // > diff --git > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.h > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.h > index 870f9c3..c065ed2 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.h > +++ > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInit.h > @@ -33,6 +33,7 @@ > #include >=20 > #include "BoardInitMiscs.h" > +#include >=20 > VOID BensonGpioTest (VOID); >=20 > diff --git > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInitPostMem.inf > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInitPostMem.inf > index def40bf..32849c0 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInitPostMem.inf > +++ > b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/B > oardInitPostMem.inf > @@ -61,6 +61,7 @@ > gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc > gPlatformModuleTokenSpaceGuid.PcdBoardId > gPlatformModuleTokenSpaceGuid.PcdFabId > + gSiPkgTokenSpaceGuid.PcdResetType >=20 > [Guids] > gEfiPlatformInfoGuid > diff --git > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.c > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.c > index 501e810..e591b1d 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.c > +++ > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.c > @@ -56,6 +56,7 @@ LeafHillPostMemInitCallback ( > VOID *Instance; > UINT8 BoardId; > UINT8 FabId; > + UINT8 ResetType; >=20 > Status =3D PeiServicesLocatePpi ( > &gBoardPostMemInitDoneGuid, > @@ -82,6 +83,12 @@ LeafHillPostMemInitCallback ( > // Set init function PCD > // > PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) > LeafHillMultiPlatformInfoInit); > + > + // > + // Set Reset Type according to different Board > + // > + ResetType =3D V_RST_CNT_FULLRESET; > + PcdSet8 (PcdResetType, (UINT8) ResetType); >=20 > // > // Add init steps here > diff --git > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.h > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.h > index 298613a..5b92f75 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.h > +++ > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > t.h > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include >=20 > VOID LeafHillGpioTest (VOID); >=20 > diff --git > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > tPostMem.inf > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > tPostMem.inf > index a613fda..3578d4b 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > tPostMem.inf > +++ > b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardIni > tPostMem.inf > @@ -3,7 +3,7 @@ > # > # It will detect the board ID. > # > -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved. > +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the > BSD License > @@ -59,6 +59,7 @@ > gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc > gPlatformModuleTokenSpaceGuid.PcdBoardId > gPlatformModuleTokenSpaceGuid.PcdFabId > + gSiPkgTokenSpaceGuid.PcdResetType >=20 > [Guids] > gEfiPlatformInfoGuid > diff --git > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.c > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.c > index ac6bf58..ef14216 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.c > +++ > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.c > @@ -56,6 +56,7 @@ MinnowBoard3PostMemInitCallback ( > VOID *Instance; > UINT8 BoardId; > UINT8 FabId; > + UINT8 ResetType; >=20 > Status =3D PeiServicesLocatePpi ( > &gBoardPostMemInitDoneGuid, > @@ -82,6 +83,12 @@ MinnowBoard3PostMemInitCallback ( > // Set init function PCD > // > PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) > Minnow3MultiPlatformInfoInit); > + > + // > + // Set Reset Type according to different Board > + // > + ResetType =3D V_RST_CNT_FULLRESET; > + PcdSet8 (PcdResetType, (UINT8) ResetType); >=20 > // > // Add init steps here > diff --git > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.h > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.h > index b00f53e..196d140 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.h > +++ > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInit.h > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include >=20 > VOID Minnow3GpioTest (VOID); >=20 > diff --git > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInitPostMem.inf > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInitPostMem.inf > index d7ba739..f9dc676 100644 > --- > a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInitPostMem.inf > +++ > b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/ > BoardInitPostMem.inf > @@ -2,7 +2,7 @@ > # Board detected module for Intel(R) Atom(TM) x5 Processor Series. > # It will detect the board ID. > # > -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved. > +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the > BSD License > @@ -57,6 +57,7 @@ > gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc > gPlatformModuleTokenSpaceGuid.PcdBoardId > gPlatformModuleTokenSpaceGuid.PcdFabId > + gSiPkgTokenSpaceGuid.PcdResetType >=20 > [Guids] > gEfiPlatformInfoGuid > diff --git > a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rm.c > b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rm.c > index 3007132..d3c10b1 100644 > --- > a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rm.c > +++ > b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rm.c > @@ -656,7 +656,7 @@ PlatformUpdateTables ( >=20 > case EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE: > pFACP =3D (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) Table; > - pFACP->ResetValue =3D mSystemConfiguration.ResetSelect; > + pFACP->ResetValue =3D (UINT8) PcdGet8 (PcdResetType); > pFACP->Flags |=3D BIT10; > DEBUG ((DEBUG_INFO, "FACP ResetValue =3D %x\n", pFACP- > >ResetValue)); >=20 > diff --git > a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rmDxe.inf > b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rmDxe.inf > index 31c2a77..e70b843 100644 > --- > a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rmDxe.inf > +++ > b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatfo > rmDxe.inf > @@ -45,6 +45,7 @@ > DxeVtdLib > SteppingLib > SeCLib > + PcdLib >=20 > [Guids] > gACPIOSFRMfgStringVariableGuid > @@ -84,6 +85,7 @@ > gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress > gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress > gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress > + gSiPkgTokenSpaceGuid.PcdResetType >=20 > [Depex] > gEfiAcpiSupportProtocolGuid AND > diff --git > a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupD > xe/SystemComponent.vfi > b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetup > Dxe/SystemComponent.vfi > index 16822f6..9bd93d3 100644 > --- > a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupD > xe/SystemComponent.vfi > +++ > b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetup > Dxe/SystemComponent.vfi > @@ -45,12 +45,14 @@ form formid =3D SYSTEM_COMPONENT_FORM_ID, > option text =3D STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING), > value =3D 3, flags =3D MANUFACTURING | DEFAULT | RESET_REQUIRED; > endoneof; >=20 > +suppressif TRUE; > oneof varid =3D Setup.ResetSelect, > prompt =3D STRING_TOKEN(STR_RESET_SELECT), > help =3D STRING_TOKEN(STR_RESET_SELECT_HELP), > option text =3D STRING_TOKEN(STR_WARM_RESET), value =3D 0x6, flags = =3D > DEFAULT | MANUFACTURING | RESET_REQUIRED; > option text =3D STRING_TOKEN(STR_COLD_RESET), value =3D 0xE, flags = =3D > RESET_REQUIRED; > endoneof; > +endif; >=20 > // Embedded Power Instrumentation > oneof varid =3D Setup.EPIEnable, > diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec > b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec > index f17a3e0..69036e7 100644 > --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec > +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec > @@ -332,6 +332,7 @@ > gEfiBxtTokenSpaceGuid.PcdSetCoreCount|0|UINT32|0x10000223 >=20 > gEfiBxtTokenSpaceGuid.PcdVtdGfxBaseAddress|0xFED64000|UINT32|0x100 > 00224 >=20 > gSiPkgTokenSpaceGuid.PcdForceVolatileVariable|FALSE|BOOLEAN|0x30000 > 012 > + gSiPkgTokenSpaceGuid.PcdResetType|0x0E|UINT8|0x30000013 >=20 > [PcdsFeatureFlag] >=20 > gBxtRefCodePkgTokenSpaceGuid.PcdCeAtaSupport|FALSE|BOOLEAN|0x12 > diff --git > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.c > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.c > index 2bac0a5..64598b8 100644 > --- > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.c > +++ > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.c > @@ -1,7 +1,7 @@ > /** @file > Reset Architectural Protocol implementation. >=20 > - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
>=20 > This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > @@ -114,7 +114,7 @@ InitializeScReset ( >=20 > mResetInstance->AcpiBar =3D (UINT16) PcdGet16 > (PcdScAcpiIoPortBaseAddress); >=20 > - mResetInstance->ResetSelect =3D (UINT8) GeneralConfig->ResetSelect; > + mResetInstance->ResetSelect =3D (UINT8) PcdGet8 (PcdResetType); >=20 > // > // Make sure the Reset Architectural Protocol is not already installed= in the > system > @@ -296,7 +296,7 @@ IntelScResetSystem ( >=20 > case EfiResetCold: > InitialData =3D V_RST_CNT_HARDSTARTSTATE; > - OutputData =3D V_RST_CNT_HARDRESET; > + OutputData =3D PcdGet8 (PcdResetType); > break; >=20 > case EfiResetShutdown: > diff --git > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.h > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.h > index 0c90d11..dd27e6d 100644 > --- > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.h > +++ > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.h > @@ -1,7 +1,7 @@ > /** @file > Header file definitions for SC reset. >=20 > - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
>=20 > This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > @@ -30,6 +30,7 @@ > #include > #include "ScAccess.h" > #include > +#include >=20 > // > // Driver private data > diff --git > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.inf > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.inf > index 9e4a4df..51b973e 100644 > --- > a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.inf > +++ > b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScRes > et.inf > @@ -1,7 +1,7 @@ > ## @file > # Sc Reset driver. > # > -# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved. > +# Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the > BSD License > @@ -52,6 +52,7 @@ > [Pcd] > gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress ## > SOMETIMES_CONSUMES > gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress ## > SOMETIMES_CONSUMES > + gSiPkgTokenSpaceGuid.PcdResetType >=20 > [Depex] > TRUE > -- > 2.7.0.windows.1 >=20