Toggle navigation
:p
atchew
Login
Change Reset Type according to different Board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com> --- .../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(-) diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ BensonGlacierPostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ BensonGlacierPostMemInitCallback ( PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) BensonMultiPlatformInfoInit); // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_HARDRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); + + // // Add init steps here // // diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Ppi/BoardInitSignalling.h> #include "BoardInitMiscs.h" +#include <ScRegs/RegsPcu.h> VOID BensonGpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gSiPkgTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ LeafHillPostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ LeafHillPostMemInitCallback ( // Set init function PCD // PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) LeafHillMultiPlatformInfoInit); + + // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_FULLRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); // // Add init steps here diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Library/HobLib.h> #include <Library/TimerLib.h> #include <Guid/PlatformInfo_Aplk.h> +#include <ScRegs/RegsPcu.h> VOID LeafHillGpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ # # It will detect the board ID. # -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gSiPkgTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ MinnowBoard3PostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ MinnowBoard3PostMemInitCallback ( // Set init function PCD // PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) Minnow3MultiPlatformInfoInit); + + // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_FULLRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); // // Add init steps here diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Library/HobLib.h> #include <Library/TimerLib.h> #include <Guid/PlatformInfo_Aplk.h> +#include <ScRegs/RegsPcu.h> VOID Minnow3GpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ # 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.<BR> +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gSiPkgTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c @@ -XXX,XX +XXX,XX @@ PlatformUpdateTables ( case EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE: pFACP = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) Table; - pFACP->ResetValue = mSystemConfiguration.ResetSelect; + pFACP->ResetValue = (UINT8) PcdGet8 (PcdResetType); pFACP->Flags |= BIT10; DEBUG ((DEBUG_INFO, "FACP ResetValue = %x\n", pFACP->ResetValue)); diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ DxeVtdLib SteppingLib SeCLib + PcdLib [Guids] gACPIOSFRMfgStringVariableGuid @@ -XXX,XX +XXX,XX @@ gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress + gSiPkgTokenSpaceGuid.PcdResetType [Depex] gEfiAcpiSupportProtocolGuid AND diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi @@ -XXX,XX +XXX,XX @@ form formid = SYSTEM_COMPONENT_FORM_ID, option text = STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING), value = 3, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; endoneof; +suppressif TRUE; oneof varid = Setup.ResetSelect, prompt = STRING_TOKEN(STR_RESET_SELECT), help = STRING_TOKEN(STR_RESET_SELECT_HELP), option text = STRING_TOKEN(STR_WARM_RESET), value = 0x6, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; option text = STRING_TOKEN(STR_COLD_RESET), value = 0xE, flags = RESET_REQUIRED; endoneof; +endif; // Embedded Power Instrumentation oneof varid = Setup.EPIEnable, diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec index XXXXXXX..XXXXXXX 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec @@ -XXX,XX +XXX,XX @@ gEfiBxtTokenSpaceGuid.PcdSetCoreCount|0|UINT32|0x10000223 gEfiBxtTokenSpaceGuid.PcdVtdGfxBaseAddress|0xFED64000|UINT32|0x10000224 gSiPkgTokenSpaceGuid.PcdForceVolatileVariable|FALSE|BOOLEAN|0x30000012 + gSiPkgTokenSpaceGuid.PcdResetType|0x0E|UINT8|0x30000013 [PcdsFeatureFlag] gBxtRefCodePkgTokenSpaceGuid.PcdCeAtaSupport|FALSE|BOOLEAN|0x12 diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c @@ -XXX,XX +XXX,XX @@ /** @file Reset Architectural Protocol implementation. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ InitializeScReset ( mResetInstance->AcpiBar = (UINT16) PcdGet16 (PcdScAcpiIoPortBaseAddress); - mResetInstance->ResetSelect = (UINT8) GeneralConfig->ResetSelect; + mResetInstance->ResetSelect = (UINT8) PcdGet8 (PcdResetType); // // Make sure the Reset Architectural Protocol is not already installed in the system @@ -XXX,XX +XXX,XX @@ IntelScResetSystem ( case EfiResetCold: InitialData = V_RST_CNT_HARDSTARTSTATE; - OutputData = V_RST_CNT_HARDRESET; + OutputData = PcdGet8 (PcdResetType); break; case EfiResetShutdown: diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h index XXXXXXX..XXXXXXX 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h @@ -XXX,XX +XXX,XX @@ /** @file Header file definitions for SC reset. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ #include <Library/UefiRuntimeLib.h> #include "ScAccess.h" #include <Library/BaseLib.h> +#include <Library/PcdLib.h> // // Driver private data diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf index XXXXXXX..XXXXXXX 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf @@ -XXX,XX +XXX,XX @@ ## @file # Sc Reset driver. # -# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ [Pcd] gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress ## SOMETIMES_CONSUMES gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress ## SOMETIMES_CONSUMES + gSiPkgTokenSpaceGuid.PcdResetType [Depex] TRUE -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Change Reset Type according to different Board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com> --- .../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/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h | 3 ++- .../Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf | 2 ++ .../Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c | 2 +- .../Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 1 + .../Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c | 3 +-- .../Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi | 2 ++ Platform/BroxtonPlatformPkg/PlatformPkg.dec | 1 + .../BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c | 6 +++--- 19 files changed, 45 insertions(+), 10 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ BensonGlacierPostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ BensonGlacierPostMemInitCallback ( PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) BensonMultiPlatformInfoInit); // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_HARDRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); + + // // Add init steps here // // diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Ppi/BoardInitSignalling.h> #include "BoardInitMiscs.h" +#include <ScRegs/RegsPcu.h> VOID BensonGpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gPlatformModuleTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ LeafHillPostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ LeafHillPostMemInitCallback ( // Set init function PCD // PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) LeafHillMultiPlatformInfoInit); + + // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_FULLRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); // // Add init steps here diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Library/HobLib.h> #include <Library/TimerLib.h> #include <Guid/PlatformInfo_Aplk.h> +#include <ScRegs/RegsPcu.h> VOID LeafHillGpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ # # It will detect the board ID. # -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gPlatformModuleTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c @@ -XXX,XX +XXX,XX @@ MinnowBoard3PostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 ResetType; Status = PeiServicesLocatePpi ( &gBoardPostMemInitDoneGuid, @@ -XXX,XX +XXX,XX @@ MinnowBoard3PostMemInitCallback ( // Set init function PCD // PcdSet64 (PcdBoardPostMemInitFunc, (UINT64) (UINTN) Minnow3MultiPlatformInfoInit); + + // + // Set Reset Type according to different Board + // + ResetType = V_RST_CNT_FULLRESET; + PcdSet8 (PcdResetType, (UINT8) ResetType); // // Add init steps here diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h @@ -XXX,XX +XXX,XX @@ #include <Library/HobLib.h> #include <Library/TimerLib.h> #include <Guid/PlatformInfo_Aplk.h> +#include <ScRegs/RegsPcu.h> VOID Minnow3GpioTest (VOID); diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf @@ -XXX,XX +XXX,XX @@ # 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.<BR> +# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardId gPlatformModuleTokenSpaceGuid.PcdFabId + gPlatformModuleTokenSpaceGuid.PcdResetType [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c @@ -XXX,XX +XXX,XX @@ PlatformUpdateTables ( case EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE: pFACP = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) Table; - pFACP->ResetValue = mSystemConfiguration.ResetSelect; + pFACP->ResetValue = (UINT8) PcdGet8 (PcdResetType); pFACP->Flags |= BIT10; DEBUG ((DEBUG_INFO, "FACP ResetValue = %x\n", pFACP->ResetValue)); diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -XXX,XX +XXX,XX @@ DxeVtdLib SteppingLib SeCLib + PcdLib [Guids] gACPIOSFRMfgStringVariableGuid @@ -XXX,XX +XXX,XX @@ gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress + gPlatformModuleTokenSpaceGuid.PcdResetType [Depex] gEfiAcpiSupportProtocolGuid AND diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h @@ -XXX,XX +XXX,XX @@ /** @file Internal header file for Fsp Policy Initialization Library. - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ #include <Library/ConfigBlockLib.h> #include <Library/PeiScPolicyLib.h> #include <Library/MemoryAllocationLib.h> +#include <Library/PcdLib.h> #include <Guid/SetupVariable.h> #include <FspEas.h> #include <FspmUpd.h> diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf @@ -XXX,XX +XXX,XX @@ ConfigBlockLib PeiPolicyInitLib ScPlatformLib + PcdLib [Pcd] @@ -XXX,XX +XXX,XX @@ gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress gEfiBxtTokenSpaceGuid.PcdP2SBBaseAddress gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress + gPlatformModuleTokenSpaceGuid.PcdResetType [Ppis] gSiPolicyPpiGuid ## CONSUMES diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c @@ -XXX,XX +XXX,XX @@ PeiFspScPolicyInit ( // // Set ACPI and P2SB Base Addresses // - FspsUpd->FspsConfig.ResetSelect = SystemConfiguration->ResetSelect; + FspsUpd->FspsConfig.ResetSelect = (UINT8) PcdGet8 (PcdResetType); FspsUpd->FspsConfig.CRIDSettings = SystemConfiguration->CRIDSettings; // diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf @@ -XXX,XX +XXX,XX @@ gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress gEfiBxtTokenSpaceGuid.PcdP2SBBaseAddress gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress + gPlatformModuleTokenSpaceGuid.PcdResetType [FixedPcd] gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c @@ -XXX,XX +XXX,XX @@ UpdatePeiScPolicy ( GeneralConfig->AcpiBase = (UINT16) PcdGet16 (PcdScAcpiIoPortBaseAddress); GeneralConfig->P2sbBase = (UINT32) PcdGet32 (PcdP2SBBaseAddress); GeneralConfig->Crid = SystemConfiguration.CRIDSettings; - GeneralConfig->ResetSelect = SystemConfiguration.ResetSelect; - + GeneralConfig->ResetSelect = (UINT8) PcdGet8 (PcdResetType); HpetConfig->Enable = SystemConfiguration.Hpet; HpetConfig->Base = HPET_BASE_ADDRESS; HpetConfig->BdfValid = 0x01; diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi @@ -XXX,XX +XXX,XX @@ form formid = SYSTEM_COMPONENT_FORM_ID, option text = STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING), value = 3, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; endoneof; +suppressif TRUE; oneof varid = Setup.ResetSelect, prompt = STRING_TOKEN(STR_RESET_SELECT), help = STRING_TOKEN(STR_RESET_SELECT_HELP), option text = STRING_TOKEN(STR_WARM_RESET), value = 0x6, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; option text = STRING_TOKEN(STR_COLD_RESET), value = 0xE, flags = RESET_REQUIRED; endoneof; +endif; // Embedded Power Instrumentation oneof varid = Setup.EPIEnable, diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/BroxtonPlatformPkg/PlatformPkg.dec index XXXXXXX..XXXXXXX 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec @@ -XXX,XX +XXX,XX @@ gPlatformModuleTokenSpaceGuid.PcdUpdateFspmUpdFunc|0|UINT64|0x80000010 gPlatformModuleTokenSpaceGuid.PcdDramCreatePolicyDefaultsFunc|0|UINT64|0x80000011 gPlatformModuleTokenSpaceGuid.PcdGetBoardNameFunc|0|UINT64|0x80000012 + gPlatformModuleTokenSpaceGuid.PcdResetType|0x0E|UINT8|0x80000013 ## MemoryCheck value for checking memory before boot OS. ## To save the boot performance, the default MemoryCheck is set to 0. diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c index XXXXXXX..XXXXXXX 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c @@ -XXX,XX +XXX,XX @@ /** @file Reset Architectural Protocol implementation. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -XXX,XX +XXX,XX @@ IntelScResetSystem ( switch (ResetType) { case EfiResetWarm: InitialData = V_RST_CNT_HARDSTARTSTATE; - OutputData = mResetInstance->ResetSelect; + OutputData = V_RST_CNT_HARDRESET; if (mResetInstance->ResetSelect == V_RST_CNT_FULLRESET) { } break; case EfiResetCold: InitialData = V_RST_CNT_HARDSTARTSTATE; - OutputData = V_RST_CNT_HARDRESET; + OutputData = mResetInstance->ResetSelect; break; case EfiResetShutdown: -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel