* [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type
@ 2017-09-12 2:54 lushifex
2017-09-12 2:56 ` Wei, David
0 siblings, 1 reply; 3+ messages in thread
From: lushifex @ 2017-09-12 2:54 UTC (permalink / raw)
To: edk2-devel; +Cc: david.wei
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 729a158..a4f3414 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
@@ -48,6 +48,7 @@ BensonGlacierPostMemInitCallback (
VOID *Instance;
UINT8 BoardId;
UINT8 FabId;
+ UINT8 ResetType;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -76,6 +77,12 @@ 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 870f9c3..c065ed2 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h
@@ -33,6 +33,7 @@
#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 def40bf..32849c0 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
@@ -61,6 +61,7 @@
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 501e810..e591b1d 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
@@ -56,6 +56,7 @@ LeafHillPostMemInitCallback (
VOID *Instance;
UINT8 BoardId;
UINT8 FabId;
+ UINT8 ResetType;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -82,6 +83,12 @@ 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 298613a..5b92f75 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h
@@ -22,6 +22,7 @@
#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 a613fda..3578d4b 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
@@ -3,7 +3,7 @@
#
# 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
@@ -59,6 +59,7 @@
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 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;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -82,6 +83,12 @@ 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 b00f53e..196d140 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h
@@ -22,6 +22,7 @@
#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 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.<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
@@ -57,6 +57,7 @@
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 3007132..d3c10b1 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
@@ -656,7 +656,7 @@ 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 31c2a77..e70b843 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -45,6 +45,7 @@
DxeVtdLib
SteppingLib
SeCLib
+ PcdLib
[Guids]
gACPIOSFRMfgStringVariableGuid
@@ -84,6 +85,7 @@
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 16822f6..9bd93d3 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi
@@ -45,12 +45,14 @@ 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 f17a3e0..69036e7 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec
@@ -332,6 +332,7 @@
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 2bac0a5..64598b8 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c
@@ -1,7 +1,7 @@
/** @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
@@ -114,7 +114,7 @@ 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
@@ -296,7 +296,7 @@ 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 0c90d11..dd27e6d 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.h
@@ -1,7 +1,7 @@
/** @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
@@ -30,6 +30,7 @@
#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 9e4a4df..51b973e 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.inf
@@ -1,7 +1,7 @@
## @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
@@ -52,6 +52,7 @@
[Pcd]
gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress ## SOMETIMES_CONSUMES
gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress ## SOMETIMES_CONSUMES
+ gSiPkgTokenSpaceGuid.PcdResetType
[Depex]
TRUE
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type
2017-09-12 2:54 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type lushifex
@ 2017-09-12 2:56 ` Wei, David
0 siblings, 0 replies; 3+ messages in thread
From: Wei, David @ 2017-09-12 2:56 UTC (permalink / raw)
To: Lu, ShifeiX A, edk2-devel@lists.01.org
Reviewed-by: zwei4 <david.wei@intel.com>
Thanks,
David Wei
> -----Original Message-----
> From: Lu, ShifeiX A
> Sent: Tuesday, September 12, 2017 10:54 AM
> To: edk2-devel@lists.01.org
> Cc: Wei, David <david.wei@intel.com>
> Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change
> Reset Type
>
> 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/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;
>
> Status = PeiServicesLocatePpi (
> &gBoardPostMemInitDoneGuid,
> @@ -76,6 +77,12 @@ 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/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 <Ppi/BoardInitSignalling.h>
>
> #include "BoardInitMiscs.h"
> +#include <ScRegs/RegsPcu.h>
>
> VOID BensonGpioTest (VOID);
>
> 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
>
> [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;
>
> Status = PeiServicesLocatePpi (
> &gBoardPostMemInitDoneGuid,
> @@ -82,6 +83,12 @@ 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/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 <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/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.<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
> @@ -59,6 +59,7 @@
> 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 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;
>
> Status = PeiServicesLocatePpi (
> &gBoardPostMemInitDoneGuid,
> @@ -82,6 +83,12 @@ 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 b00f53e..196d140 100644
> ---
> a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/
> BoardInit.h
> +++
> b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/
> BoardInit.h
> @@ -22,6 +22,7 @@
> #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 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.<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
> @@ -57,6 +57,7 @@
> gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc
> gPlatformModuleTokenSpaceGuid.PcdBoardId
> gPlatformModuleTokenSpaceGuid.PcdFabId
> + gSiPkgTokenSpaceGuid.PcdResetType
>
> [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 (
>
> 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/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
>
> [Guids]
> gACPIOSFRMfgStringVariableGuid
> @@ -84,6 +85,7 @@
> gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress
> gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
> + gSiPkgTokenSpaceGuid.PcdResetType
>
> [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 = 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 f17a3e0..69036e7 100644
> --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec
> +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec
> @@ -332,6 +332,7 @@
> gEfiBxtTokenSpaceGuid.PcdSetCoreCount|0|UINT32|0x10000223
>
> gEfiBxtTokenSpaceGuid.PcdVtdGfxBaseAddress|0xFED64000|UINT32|0x100
> 00224
>
> gSiPkgTokenSpaceGuid.PcdForceVolatileVariable|FALSE|BOOLEAN|0x30000
> 012
> + gSiPkgTokenSpaceGuid.PcdResetType|0x0E|UINT8|0x30000013
>
> [PcdsFeatureFlag]
>
> 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.
>
> - 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
> @@ -114,7 +114,7 @@ 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
> @@ -296,7 +296,7 @@ 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/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.
>
> - 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
> @@ -30,6 +30,7 @@
> #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/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.<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
> @@ -52,6 +52,7 @@
> [Pcd]
> gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress ##
> SOMETIMES_CONSUMES
> gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress ##
> SOMETIMES_CONSUMES
> + gSiPkgTokenSpaceGuid.PcdResetType
>
> [Depex]
> TRUE
> --
> 2.7.0.windows.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type
@ 2017-09-12 5:50 lushifex
0 siblings, 0 replies; 3+ messages in thread
From: lushifex @ 2017-09-12 5:50 UTC (permalink / raw)
To: edk2-devel; +Cc: david.wei
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 729a158..a4f3414 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
@@ -48,6 +48,7 @@ BensonGlacierPostMemInitCallback (
VOID *Instance;
UINT8 BoardId;
UINT8 FabId;
+ UINT8 ResetType;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -76,6 +77,12 @@ 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 870f9c3..c065ed2 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.h
@@ -33,6 +33,7 @@
#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 def40bf..4ce6ab2 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
@@ -61,6 +61,7 @@
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 501e810..e591b1d 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
@@ -56,6 +56,7 @@ LeafHillPostMemInitCallback (
VOID *Instance;
UINT8 BoardId;
UINT8 FabId;
+ UINT8 ResetType;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -82,6 +83,12 @@ 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 298613a..5b92f75 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.h
@@ -22,6 +22,7 @@
#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 a613fda..01931b8 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
@@ -3,7 +3,7 @@
#
# 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
@@ -59,6 +59,7 @@
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 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;
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -82,6 +83,12 @@ 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 b00f53e..196d140 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.h
@@ -22,6 +22,7 @@
#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 d7ba739..f066703 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.<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
@@ -57,6 +57,7 @@
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 3007132..d3c10b1 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
@@ -656,7 +656,7 @@ 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 31c2a77..5e876dc 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -45,6 +45,7 @@
DxeVtdLib
SteppingLib
SeCLib
+ PcdLib
[Guids]
gACPIOSFRMfgStringVariableGuid
@@ -84,6 +85,7 @@
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 e9eaa96..5bc2a08 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.h
@@ -1,7 +1,7 @@
/** @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
@@ -22,6 +22,7 @@
#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 fab0d00..b4099b2 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
@@ -70,6 +70,7 @@
ConfigBlockLib
PeiPolicyInitLib
ScPlatformLib
+ PcdLib
[Pcd]
@@ -87,6 +88,7 @@
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 5695821..cf3eef2 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c
@@ -216,7 +216,7 @@ 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 d913506..ea8d7fb 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
@@ -80,6 +80,7 @@
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 c98a8df..9d2c028 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c
@@ -381,8 +381,7 @@ 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 16822f6..9bd93d3 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SystemComponent.vfi
@@ -45,12 +45,14 @@ 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 b318b58..208f2a5 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec
@@ -178,6 +178,7 @@
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 2bac0a5..96dd4f7 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Reset/RuntimeDxe/ScReset.c
@@ -1,7 +1,7 @@
/** @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
@@ -289,14 +289,14 @@ 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-12 5:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 2:54 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change Reset Type lushifex
2017-09-12 2:56 ` Wei, David
-- strict thread matches above, loose matches on Subject: below --
2017-09-12 5:50 lushifex
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox