summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryqian4 <yi.qian@intel.com>2019-02-02 07:43:30 +0300
committerzwei4 <david.wei@intel.com>2019-02-02 08:13:18 +0300
commit1b924f57b511694ce7fed5ebac79ad910fb10926 (patch)
tree22449d84d90ae4bfdc7ade8586a35bfecdce7db7
parent7bd60303d1a1ea90ca5080aaf9455bb2fe54c039 (diff)
downloadedk2-platforms-devel-IntelAtomProcessorE3900.tar.xz
edk2-platforms/devel-IntelAtomProcessorE3900: Enable tracehubdevel-IntelAtomProcessorE3900
https://bugzilla.tianocore.org/show_bug.cgi?id=1508 Expose npk related setup options and convey right settings to fsp upd for tracehub enabling. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yi Qian <yi.qian@intel.com> CC: David Wei <david.wei@intel.com> CC: Zailiang Sun <zailiang.sun@intel.com>
-rw-r--r--Platform/BroxtonPlatformPkg/BuildBxtBios.bat4
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h19
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c43
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/DebugConfig.vfi141
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.unibin306466 -> 320330 bytes
5 files changed, 192 insertions, 15 deletions
diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
index 9bd71198e5..492eb1cd3c 100644
--- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
+++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
@@ -523,7 +523,7 @@ if not exist "%STITCH_PATH%\FlashMap.h" (
call :FindVariableInFile _PCD_VALUE_PcdFlashNvStorageSize 3 NvStorageSize "%STITCH_PATH%\FlashMap.h"
:: Find image offset as opposed to memory offset
del /f /q temp.pcd >NUL 2>&1
- PowerShell ([uint32]$env:NvStorageBase - [uint32]$env:BaseAddress) > temp.pcd
+ PowerShell ([uint64]$env:NvStorageBase - [uint64]$env:BaseAddress) > temp.pcd
set /p VpdOffset=<temp.pcd
del /f /q temp.pcd >NUL 2>&1
:: Force the variables we care about into DEC string format
@@ -566,7 +566,7 @@ if not exist "%WORKSPACE%\%PLATFORM_PATH%\PlatformDsc\Defines.dsc" (
echo - BLD_IBBM_SIZE = %BldIbbmSize%
:: Find magic number
del /f /q temp.pcd >NUL 2>&1
- PowerShell ([uint32]$env:CarBaseAddress + [uint32]$env:BldRamDataSize + [uint32]$env:FspRamDataSize + [uint32]$env:FspEmpDataSize + [uint32]$env:BldIbbmSize) > temp.pcd
+ PowerShell ([uint64]$env:CarBaseAddress + [uint64]$env:BldRamDataSize + [uint64]$env:FspRamDataSize + [uint64]$env:FspEmpDataSize + [uint64]$env:BldIbbmSize) > temp.pcd
set /p FspBaseAddress=<temp.pcd
del /f /q temp.pcd >NUL 2>&1
call :ForceToHex FspBaseAddress
diff --git a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
index 2d81068778..de4c70d819 100644
--- a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
+++ b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
@@ -908,6 +908,25 @@ typedef struct {
UINT8 PkgCStateDemotion;
UINT8 PkgCStateUnDemotion;
+ //
+ // NPK debug Options
+ //
+ UINT8 NpkEn;
+ UINT8 FwTraceEn;
+ UINT8 FwTraceDestination;
+ UINT8 RecoverDump;
+ UINT32 Msc0Size;
+ UINT8 Msc0Wrap;
+ UINT32 Msc1Size;
+ UINT8 Msc1Wrap;
+ UINT8 PtiMode;
+ UINT8 PtiTraining;
+ UINT8 PtiSpeed;
+ UINT8 NpkDCIEn;
+ UINT8 PunitMlvl;
+ UINT8 PmcMlvl;
+ UINT8 SwTraceEn;
+
UINT8 ProcTraceMemSize;
UINT8 ProcTraceEnable;
UINT8 ProcTraceOutputScheme;
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c
index 2fb3bd9d3e..0863706645 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c
@@ -155,19 +155,36 @@ PeiFspSaPolicyInitPreMem (
FspmUpd->FspmConfig.Igd = SystemConfiguration->Igd;
FspmUpd->FspmConfig.PrimaryVideoAdaptor = SystemConfiguration->PrimaryVideoAdaptor;
- FspmUpd->FspmConfig.FwTraceEn = 1;
- FspmUpd->FspmConfig.FwTraceDestination = 4;
- FspmUpd->FspmConfig.RecoverDump = 0;
- FspmUpd->FspmConfig.Msc0Size = 0;
- FspmUpd->FspmConfig.Msc0Wrap = 1;
- FspmUpd->FspmConfig.Msc1Size = 0;
- FspmUpd->FspmConfig.Msc1Wrap = 1;
- FspmUpd->FspmConfig.PtiMode = 1;
- FspmUpd->FspmConfig.PtiTraining = 0;
- FspmUpd->FspmConfig.PtiSpeed = 2;
- FspmUpd->FspmConfig.PunitMlvl = 1;
- FspmUpd->FspmConfig.PmcMlvl = 1;
- FspmUpd->FspmConfig.SwTraceEn = 0;
+ FspmUpd->FspmConfig.NpkEn = SystemConfiguration->NpkEn; ///< 0-disabled, 1-enabled, 2-debugger, 3-auto
+ FspmUpd->FspmConfig.FwTraceEn = SystemConfiguration->FwTraceEn;
+ FspmUpd->FspmConfig.FwTraceDestination = SystemConfiguration->FwTraceDestination;
+ FspmUpd->FspmConfig.RecoverDump = SystemConfiguration->RecoverDump;
+ FspmUpd->FspmConfig.Msc0Size = SystemConfiguration->Msc0Size;
+ FspmUpd->FspmConfig.Msc0Wrap = SystemConfiguration->Msc0Wrap;
+ FspmUpd->FspmConfig.Msc1Size = SystemConfiguration->Msc1Size;
+ FspmUpd->FspmConfig.Msc1Wrap = SystemConfiguration->Msc1Wrap;
+ FspmUpd->FspmConfig.PtiMode = SystemConfiguration->PtiMode;
+ FspmUpd->FspmConfig.PtiTraining = SystemConfiguration->PtiTraining;
+ FspmUpd->FspmConfig.PtiSpeed = SystemConfiguration->PtiSpeed;
+ FspmUpd->FspmConfig.PunitMlvl = SystemConfiguration->PunitMlvl;
+ FspmUpd->FspmConfig.PmcMlvl = SystemConfiguration->PmcMlvl;
+ FspmUpd->FspmConfig.SwTraceEn = SystemConfiguration->SwTraceEn;
+
+ DEBUG ((DEBUG_INFO, "NpkEn: %x\n", FspmUpd->FspmConfig.NpkEn));
+ DEBUG ((DEBUG_INFO, "FwTraceEn: %x\n", FspmUpd->FspmConfig.FwTraceEn));
+ DEBUG ((DEBUG_INFO, "FwTraceDestination: %x\n", FspmUpd->FspmConfig.FwTraceDestination));
+ DEBUG ((DEBUG_INFO, "RecoverDump: %x\n", FspmUpd->FspmConfig.RecoverDump));
+ DEBUG ((DEBUG_INFO, "Msc0Size: %x\n", FspmUpd->FspmConfig.Msc0Size));
+ DEBUG ((DEBUG_INFO, "Msc0Wrap: %x\n", FspmUpd->FspmConfig.Msc0Wrap));
+ DEBUG ((DEBUG_INFO, "Msc1Size: %x\n", FspmUpd->FspmConfig.Msc1Size));
+ DEBUG ((DEBUG_INFO, "Msc1Wrap: %x\n", FspmUpd->FspmConfig.Msc1Wrap));
+ DEBUG ((DEBUG_INFO, "PtiMode: %x\n", FspmUpd->FspmConfig.PtiMode));
+ DEBUG ((DEBUG_INFO, "PtiTraining: %x\n", FspmUpd->FspmConfig.PtiTraining));
+ DEBUG ((DEBUG_INFO, "PtiSpeed: %x\n", FspmUpd->FspmConfig.PtiSpeed));
+ DEBUG ((DEBUG_INFO, "PunitMlvl: %x\n", FspmUpd->FspmConfig.PunitMlvl));
+ DEBUG ((DEBUG_INFO, "PmcMlvl: %x\n", FspmUpd->FspmConfig.PmcMlvl));
+ DEBUG ((DEBUG_INFO, "SwTraceEn: %x\n", FspmUpd->FspmConfig.SwTraceEn));
+
}
DEBUG ((DEBUG_INFO, "Wrapper-PeiFspSaPolicyInitPreMem - End\n"));
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/DebugConfig.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/DebugConfig.vfi
index 235ce44371..16460a71ac 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/DebugConfig.vfi
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/DebugConfig.vfi
@@ -159,6 +159,147 @@ form formid = DEBUG_CONFIGURATION_FORM_ID,
flags = INTERACTIVE,
key = 0x1239; //KEY_DATA_CLEAR_KEYS;
+ subtitle text = STRING_TOKEN(STR_NULL_STRING);
+
+ goto DEBUG_NPK_FORM_ID,
+ prompt = STRING_TOKEN(STR_DEBUG_NPK_TITLE),
+ help = STRING_TOKEN(STR_DEBUG_NPK_HELP);
endform;
+ //
+ // NPK Configuration
+ //
+ form formid = DEBUG_NPK_FORM_ID,
+ title = STRING_TOKEN(STR_DEBUG_NPK_TITLE);
+
+ oneof varid = Setup.NpkEn,
+ prompt = STRING_TOKEN(STR_NPK_ENABLE_PROMPT),
+ help = STRING_TOKEN(STR_NPK_ENABLE_HELP),
+ option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUGGER), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_AUTO), value = 3, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+
+ suppressif ideqval Setup.NpkEn == 2;
+
+ oneof varid = Setup.FwTraceEn,
+ prompt = STRING_TOKEN(STR_NPK_FWEN_PROMPT),
+ help = STRING_TOKEN(STR_NPK_FWEN_HELP),
+ option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.SwTraceEn,
+ prompt = STRING_TOKEN(STR_NPK_SWEN_PROMPT),
+ help = STRING_TOKEN(STR_NPK_SWEN_HELP),
+ option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.FwTraceDestination,
+ prompt = STRING_TOKEN(STR_NPK_FWDESTINATION_PROMPT),
+ help = STRING_TOKEN(STR_NPK_FWDESTINATION_HELP),
+ option text = STRING_TOKEN(STR_MEMORY0), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_PTI), value = 4, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_USB3), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_BSSB), value = 3, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.RecoverDump,
+ prompt = STRING_TOKEN(STR_NPK_RECOVERY_DUMP_PROMPT),
+ help = STRING_TOKEN(STR_NPK_RECOVERY_DUMP_HELP),
+ option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.Msc0Size,
+ prompt = STRING_TOKEN(STR_NPK_MSC0SIZE_PROMPT),
+ help = STRING_TOKEN(STR_NPK_MSC0SIZE_HELP),
+ option text = STRING_TOKEN(STR_NONE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_1MB), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_8MB), value = 8, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_64MB), value = 64, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_128MB), value = 128, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_256MB), value = 256, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_512MB), value = 512, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_1GB), value = 1024, flags = RESET_REQUIRED;
+ endoneof;
+ oneof varid = Setup.Msc0Wrap,
+ prompt = STRING_TOKEN(STR_NPK_MSC0WRAP_PROMPT),
+ help = STRING_TOKEN(STR_NPK_MSC0WRAP_HELP),
+ option text = STRING_TOKEN(STR_NOWRAP), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_WRAP), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+ oneof varid = Setup.Msc1Size,
+ prompt = STRING_TOKEN(STR_NPK_MSC1SIZE_PROMPT),
+ help = STRING_TOKEN(STR_NPK_MSC1SIZE_HELP),
+ option text = STRING_TOKEN(STR_NONE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_1MB), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_8MB), value = 8, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_64MB), value = 64, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_128MB), value = 128, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_256MB), value = 256, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_512MB), value = 512, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_1GB), value = 1024, flags = RESET_REQUIRED;
+ endoneof;
+ oneof varid = Setup.Msc1Wrap,
+ prompt = STRING_TOKEN(STR_NPK_MSC1WRAP_PROMPT),
+ help = STRING_TOKEN(STR_NPK_MSC1WRAP_HELP),
+ option text = STRING_TOKEN(STR_NOWRAP), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_WRAP), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.PtiMode,
+ prompt = STRING_TOKEN(STR_NPK_PTIMODE_PROMPT),
+ help = STRING_TOKEN(STR_NPK_PTIMODE_HELP),
+ option text = STRING_TOKEN(STR_OFF), value = 4, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_X4), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_X8), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_X16), value = 8, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.PtiTraining,
+ prompt = STRING_TOKEN(STR_NPK_PTITRAINING_PROMPT),
+ help = STRING_TOKEN(STR_NPK_PTITRAINING_HELP),
+ option text = STRING_TOKEN(STR_OFF), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_1), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_2), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_3), value = 3, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_4), value = 4, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_5), value = 5, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_6), value = 6, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.PtiSpeed,
+ prompt = STRING_TOKEN(STR_NPK_PTISPEED_PROMPT),
+ help = STRING_TOKEN(STR_NPK_PTISPEED_HELP),
+ option text = STRING_TOKEN(STR_FULL), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_HALF), value = 1, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_QUARTER), value = 2, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.PunitMlvl,
+ prompt = STRING_TOKEN(STR_PUINT_MESSAGE_LEVEL_PROMPT),
+ help = STRING_TOKEN(STR_PUINT_MESSAGE_LEVEL_HELP),
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_0), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_1), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_2), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_3), value = 3, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_4), value = 4, flags = RESET_REQUIRED;
+ endoneof;
+
+ oneof varid = Setup.PmcMlvl,
+ prompt = STRING_TOKEN(STR_PMC_MESSAGE_LEVEL_PROMPT),
+ help = STRING_TOKEN(STR_PMC_MESSAGE_LEVEL_HELP),
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_0), value = 0, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_1), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_2), value = 2, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_3), value = 3, flags = RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_DEBUG_MESSAGE_LEVEL_4), value = 4, flags = RESET_REQUIRED;
+ endoneof;
+
+ endif;
+
+ endform; //End of DEBUG_NPK_FORM_ID
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
index bb53da2818..3debc2856a 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
Binary files differ