Re: [edk2] [PATCH V3 15/17] QuarkMin: Use merged variable driver for emulated NV mode
Reviewed-by: Kelly Steele > -Original Message- > From: Zeng, Star > Sent: January 15, 2019 02:30 > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Kinney, Michael D > ; Steele, Kelly > Subject: [PATCH V3 15/17] QuarkMin: Use merged variable driver for > emulated NV mode > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323 > Merge EmuVariable and Real variable driver. > > The real variable driver has been updated to support emulated > variable NV mode and the EmuVariableRuntimeDxe will be removed > later, so use merged variable driver for emulated NV mode. > > Cc: Michael D Kinney > Cc: Kelly Steele > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > QuarkPlatformPkg/QuarkMin.dsc | 8 ++-- > QuarkPlatformPkg/QuarkMin.fdf | 4 ++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/QuarkPlatformPkg/QuarkMin.dsc > b/QuarkPlatformPkg/QuarkMin.dsc > index d7a25686a30b..bf3a9a8bfd0e 100644 > --- a/QuarkPlatformPkg/QuarkMin.dsc > +++ b/QuarkPlatformPkg/QuarkMin.dsc > @@ -2,7 +2,7 @@ > # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices. > # > # This package provides Clanton Peak CRB platform specific modules. > -# Copyright (c) 2013 - 2018 Intel Corporation. > +# Copyright (c) 2013 - 2019 Intel Corporation. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD > License > @@ -342,6 +342,10 @@ [PcdsFixedAtBuild] > !endif >gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x2000 > > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x1 > 000 > + # > + # Make VariableRuntimeDxe work at emulated non-volatile variable mode. > + # > + > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE >## RTC Update Timeout Value, need to increase timeout since also ># waiting for RTC to be busy. > > gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout|5000 > 00 > @@ -553,7 +557,7 @@ [Components.IA32] >MdeModulePkg/Universal/Metronome/Metronome.inf >MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf >MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > - > MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime > Dxe.inf > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf >MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCoun > terRuntimeDxe.inf > > MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntime > Dxe.inf > diff --git a/QuarkPlatformPkg/QuarkMin.fdf > b/QuarkPlatformPkg/QuarkMin.fdf > index b793fbd9a340..6e5545c16d3b 100644 > --- a/QuarkPlatformPkg/QuarkMin.fdf > +++ b/QuarkPlatformPkg/QuarkMin.fdf > @@ -2,7 +2,7 @@ > # FDF file of Clanton Peak CRB platform with 32-bit DXE > # > # This package provides QuarkNcSocId platform specific modules. > -# Copyright (c) 2013 - 2017 Intel Corporation. > +# Copyright (c) 2013 - 2019 Intel Corporation. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD > License > @@ -388,7 +388,7 @@ [FV.FVMAIN] > INF MdeModulePkg/Universal/Metronome/Metronome.inf > INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > -INF > MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime > Dxe.inf > +INF > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > INF > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > INF > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCoun > terRuntimeDxe.inf > INF > MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntime > Dxe.inf > -- > 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Cleanup build scripts
>From f30cb7012687d09144ddeef1ad03a5571181757d Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Wed, 3 Oct 2018 09:35:00 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Cleanup build scripts Removed unused variables from exit routine. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- Platform/BroxtonPlatformPkg/BuildBxtBios.bat | 1 - Platform/BroxtonPlatformPkg/BuildIFWI.bat| 1 - 2 files changed, 2 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat index cdf666a7a4..3c0565e3ed 100644 --- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat @@ -742,6 +742,5 @@ echo See EDK2.log for more details echo %date% %time% ( EndLocal - set BiosVersion=%BiosVersion% exit /b %ExitCode% ) diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPlatformPkg/BuildIFWI.bat index 78cdac5111..5566e211ee 100644 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat @@ -244,6 +244,5 @@ set exitCode=1 :Exit ( EndLocal - set Arch=%Arch% exit /b %exitCode% ) -- 2.11.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Fix Type-C video
>From a5d80c8322c30e09a92c0b88cdcec66ee612546f Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Wed, 3 Oct 2018 09:38:36 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Fix Type-C video Enabled Type-C video thru the VBT. Corrected the Type-C debug code and removed the call to the Type-C debug code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../BoardInitPostMem/BoardInitMiscs.c | 5 - .../MinnowBoard3Module/BoardInitPostMem/TypeC.c| 77 ++-- .../MinnowBoard3Module/BoardInitPostMem/TypeC.h| 133 ++--- .../Board/MinnowBoard3Module/Vbt/VbtBxtMipi.bin| Bin 5632 -> 5632 bytes 4 files changed, 130 insertions(+), 85 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardInitMiscs.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardInitMiscs.c index 99e643f792..4e708e8793 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardInitMiscs.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardInitMiscs.c @@ -128,11 +128,6 @@ Minnow3ModuleMultiPlatformInfoInit ( Status = Minnow3ModuleInitializeBoardOemId (PeiServices, PlatformInfoHob); Status = Minnow3ModuleInitializeBoardSsidSvid (PeiServices, PlatformInfoHob); - // - // TypeC MUX AUX mode - // - MB3SetupTypecMuxAux (); - return EFI_SUCCESS; } diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/TypeC.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/TypeC.c index 7b8d56ab48..12153ab6b0 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/TypeC.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/TypeC.c @@ -16,18 +16,20 @@ #include "TypeC.h" static MUX_PROGRAMMING_TABLE mMB3MuxTable[] = { - // Address RegisterData String - // - {A_GENERAL, R_FIRMWARE_VERSION, MUX_TABLE_NULL, "Firmware Version Number"}, - {A_STATUS, R_CC_STATUS_1, MUX_TABLE_NULL, "CC_Status_1"}, - {A_STATUS, R_CC_STATUS_2, MUX_TABLE_NULL, "CC_Status_2"}, - {A_STATUS, R_CC_STATUS_3, MUX_TABLE_NULL, "CC_Status_3"}, - {A_STATUS, R_MUX_HPD_ASSERT, MUX_TABLE_NULL, "MUX_In_HPD_Assertion"}, - {A_STATUS, R_MUX_STATUS, MUX_TABLE_NULL, "MUX Status"}, - {A_STATUS, R_MUX_DP_TRAINING, MUX_TABLE_NULL, "MUX_DP_Training_Disable"}, - {A_STATUS, R_MUX_DP_AUX_INTERCEPT, MUX_TABLE_NULL, "MUX_DP_AUX_Interception_Disable"}, - {A_STATUS, R_MUX_DP_EQ_CONFIG, MUX_TABLE_NULL, "MUX_DP_EQ_Configuration"}, - {A_STATUS, R_MUX_DP_OUTPUT_CONFIG, MUX_TABLE_NULL, "MUX_DP_Output_Configuration"} + // Address RegisterDataOrgData String + //== + {A_STATUS, R_FIRMWARE_VERSION, MUX_TABLE_NULL, 0x00,"Firmware Version Number"}, // 0x00 + {A_STATUS, R_CC_STATUS,MUX_TABLE_NULL, 0x00,"CC_Status"}, // 0x01 + {A_MUX, R_CC_STATUS_1, MUX_TABLE_NULL, 0x00,"CC_Status 1"}, // 0x02 + {A_MUX, R_CC_STATUS_2, MUX_TABLE_NULL, 0x00,"CC_Status 2"}, // 0x03 + {A_MUX, R_CC_STATUS_3, MUX_TABLE_NULL, 0x00,"CC_Status 3"}, // 0x04 + {A_MUX, R_MUX_STATUS, MUX_TABLE_NULL, 0x00,"MUX_Status"}, // 0x05 + {A_MUX, R_MUX_USB_STATUS, MUX_TABLE_NULL, 0x00,"MUX USB Status"}, // 0x06 + {A_MUX, R_MUX_HPD_ASSERT, MUX_TABLE_NULL, 0x00, "MUX_In_HPD_Assertion"},// 0x07 + {A_MUX, R_MUX_DP_TRAINING, MUX_TABLE_NULL, 0x00, "MUX_DP_Training_Disable"}, // 0x08 + {A_MUX, R_MUX_DP_AUX_INTERCEPT, MUX_TABLE_NULL, 0x00, "MUX_DP_AUX_Interception_Disable"}, // 0x09 + {A_MUX, R_MUX_DP_EQ_CONFIG, MUX_TABLE_NULL, 0x00, "MUX_DP_EQ_Configuration"}, // 0x0A + {A_MUX, R_MUX_DP_OUTPUT_CONFIG, MUX_TABLE_NULL, 0x00, "MUX_DP_Output_Configuration"} // 0x0B }; VOID @@ -162,6 +164,7 @@ MB3ReadMux ( RetryCount = MUX_RETRY_COUNT; do { +MicroSecondDelay (MUX_I2C_DELAY); *Data = 0x00; Status = ByteReadI2C (PARADE_MUX_I2C_BUS, SlaveAddress, Offset, 1, Data); } while ((RetryCount-- > 0) && (EFI_ERROR (Status))); @@ -182,6 +185,7 @@ MB3WriteMux ( RetryCount = MUX_RETRY_COUNT; do { +MicroSecondDelay (MUX_I2C_DELAY); Status = ByteWriteI2C (PARADE_MUX_I2C_BUS, SlaveAddress, Offset, 1, Data); } while ((RetryCount-- > 0) && (EFI_ERROR (Status))); @@ -204,15 +208,19 @@ MB3DumpMux ( // Loop thru device and dump it all
Re: [edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Shift EEPROM PEI files
| W_GPIO_146 | W_GPIO_147 | W_GPIO_148 | W_GPIO_149 | W_OSC_CLK_OUT_0 | W_PMU_AC_PRESENT | W_PMU_BATLOW_B| W_PMU_PLTRST_B|W_PMU_SLP_S3_B | End of array marker | +gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList | {0x08, 0x05, 0xC0, 0x00, 0x70, 0x05, 0xC0, 0x00, 0x78, 0x05, 0xC0, 0x00, 0x80, 0x05, 0xC0, 0x00, 0x88, 0x05, 0xC0, 0x00, 0x90, 0x05, 0xC0, 0x00, 0x98, 0x05, 0xC0, 0x00, 0xA0, 0x05, 0xC0, 0x00, 0xA8, 0x05, 0xC0, 0x00, 0xB0, 0x05, 0xC0, 0x00, 0xB8, 0x05, 0xC0, 0x00, 0xC0, 0x05, 0xC0, 0x00, 0xC8, 0x05, 0xC0, 0x00, 0xD0, 0x05, 0xC0, 0x00, 0xE0, 0x05, 0xC0, 0x00, 0xF0, 0x05, 0xC0, 0x00, 0xF8, 0x05, 0xC0, 0x00, 0x00, 0x06, 0xC0, 0x00, 0x08, 0x06, 0xC0, 0x00, 0x30, 0x05, 0xC4, 0x00, 0x48, 0x05, 0xC4, 0x00, 0x50, 0x05, 0xC4, 0x00, 0x58, 0x05, 0xC4, 0x00, 0x60, 0x05, 0xC4, 0x00, 0x68, 0x05, 0xC4, 0x00, 0x80, 0x05, 0xC4, 0x00, 0x88, 0x05, 0xC4, 0x00, 0x98, 0x05, 0xC4, 0x00, 0x60, 0x06, 0xC4, 0x00, 0x60, 0x06, 0xC4, 0x00, 0x68, 0x06, 0xC4, 0x00, 0x70, 0x06, 0xC4, 0x00, 0x78, 0x06, 0xC4, 0x00, 0x80, 0x06, 0xC4, 0x00, 0xA8, 0x06, 0xC4, 0x00, 0xB0, 0x06, 0xC4, 0x00, 0xB8, 0x06, 0xC4, 0x00, 0xC0, 0x06, 0xC4, 0x00, 0xD8, 0x06, 0xC4, 0x00, 0xE8, 0 x06, 0xC4, 0x00, 0xF0, 0x06, 0xC4, 0x00, 0xF8, 0x06, 0xC4, 0x00, 0x00, 0x07, 0xC4, 0x00, 0x08, 0x07, 0xC4, 0x00, 0x18, 0x07, 0xC4, 0x00, 0x20, 0x07, 0xC4, 0x00, 0x10, 0x05, 0xC5, 0x00, 0x18, 0x05, 0xC5, 0x00, 0x20, 0x05, 0xC5, 0x00, 0x30, 0x05, 0xC5, 0x00, 0x38, 0x05, 0xC5, 0x00, 0x68, 0x05, 0xC5, 0x00, 0x70, 0x05, 0xC5, 0x00, 0xA8, 0x05, 0xC5, 0x00, 0xB0, 0x05, 0xC5, 0x00, 0xB8, 0x05, 0xC5, 0x00, 0xC0, 0x05, 0xC5, 0x00, 0xC8, 0x05, 0xC5, 0x00, 0xD0, 0x05, 0xC5, 0x00, 0x30, 0x06, 0xC5, 0x00, 0x38, 0x06, 0xC5, 0x00, 0x40, 0x06, 0xC5, 0x00, 0x48, 0x06, 0xC5, 0x00, 0x50, 0x06, 0xC5, 0x00, 0x58, 0x06, 0xC5, 0x00, 0x70, 0x06, 0xC5, 0x00, 0x78, 0x06, 0xC5, 0x00, 0x80, 0x06, 0xC5, 0x00, 0x88, 0x06, 0xC5, 0x00, 0xA0, 0x06, 0xC5, 0x00, 0xA8, 0x06, 0xC5, 0x00, 0xB0, 0x06, 0xC5, 0x00, 0xB8, 0x06, 0xC5, 0x00, 0x10, 0x05, 0xC7, 0x00, 0x18, 0x05, 0xC7, 0x00, 0x40, 0x05, 0xC7, 0x00, 0x48, 0x05, 0xC7, 0x00, 0x50, 0x05, 0xC7, 0x00, 0x58, 0x05, 0xC7, 0x00, 0x60, 0x05, 0xC7, 0x00, 0x68, 0x05, 0xC7, 0x 00, 0x80, 0x05, 0xC7, 0x00, 0x88, 0x05, 0xC7, 0x00, 0x90, 0x05, 0xC7, 0x00, 0x98, 0x05, 0xC7, 0x00, 0xF0, 0x05, 0xC7, 0x00, 0x18, 0x06, 0xC7, 0x00, 0x20, 0x06, 0xC7, 0x00, 0x28, 0x06, 0xC7, 0x00, 0x48, 0x06, 0xC7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF} + !endif Thanks, Kelly From: Wei, David Sent: September 26, 2018 07:53 To: Steele, Kelly ; edk2-devel@lists.01.org Cc: Guo, Mang Subject: RE: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Shift EEPROM PEI files Hi Kelly, Does this PCD contain board specific value? If it is board specific, could you rename it to reflect which board is using this PCD? My another concern is: It is a little hard to read the data structure of this large PCD array. Is there any reason why we do not define it in C file. My understanding is that this kind of GPIO information should be under "Board" folder. +#| SW_GPIO_206 | SW_GPIO_166 | SW_GPIO_167 | SW_GPIO_168 | SW_GPIO_169 | SW_GPIO_170 | SW_GPIO_171 | SW_GPIO_172 | SW_GPIO_173 | SW_GPIO_174 | SW_GPIO_175 | SW_GPIO_176 | SW_GPIO_177 | SW_GPIO_178 | SW_GPIO_186 | SW_GPIO_183 | SW_SMB_ALERTB | SW_SMB_CLK | SW_SMB_DATA | NW_GPIO_193 | NW_GPIO_196 | NW_GPIO_197 | NW_GPIO_198 | NW_GPIO_199 | NW_GPIO_200 | NW_GPIO_203 | NW_GPIO_204 | NW_PMC_SPI_FS1 | NW_GPIO_84 | NW_GPIO_84 | NW_GPIO_85 | NW_GPIO_86 | NW_GPIO_87 | NW_GPIO_88 | NW_GPIO_97 | NW_GPIO_98 | NW_GPIO_99 | NW_GPIO_100 | NW_GPIO_103 | NW_GPIO_104 | NW_GPIO_105 | NW_GPIO_106 | NW_GPIO_109 | NW_GPIO_110 | NW_GPIO_112 | NW_GPIO_113 | N_GPIO_2| N_GPIO_3| N_GPIO_4| N_GPIO_6| N_GPIO_7| N_GPIO_13 | N_GPIO_14 | N_GPIO_21 | N_GPIO_22 | N_GPIO_23 | N_GPIO_24 | N_GPIO_25 | N_GPIO_26 | N_GPIO_38 | N_GPIO_39 | N_GPIO_40 | N_GPIO_41 | N_GPIO_42 | N_GPIO_43 | N_GPIO_46 | N_GPIO_47 | N_GPIO_48 | N_GPIO_49 | N_GPIO_64 | N_GPIO_65 |N_GPIO_66 |N_GPIO_67 | W_GPIO_126 |
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Shift EEPROM PEI files
>From 1ae6e8934e17e0a0d20d169551d852cf3e8a1227 Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:14:02 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Shift EEPROM PEI files Shifted the EEPROM PEI files into their own folders to help organize the code better. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../EepromBinary/Docs/HowtoCreateTheEepromBinary.pdf | Bin 307112 -> 0 bytes .../Eeprom/EepromDataLib/EEPROM/{ => Pei}/HobDataPei.c | 0 .../Features/Eeprom/EepromDataLib/EepromDataLib.inf| 1 + .../Features/Eeprom/EepromDataLib/EepromDataPeiLib.inf | 9 + ...promDataNullPeiLib.inf => EepromDataPeiNullLib.inf} | 2 +- .../Eeprom/EepromDataLib/FV/{ => Pei}/GetImagePei.c| 0 .../Eeprom/EepromDataLib/Memory/{ => Pei}/HobDataPei.c | 0 .../EepromDataLib/{ => Pei}/MemoryAllocationPei.c | 2 ++ .../PlatformDsc/PcdsFixedAtBuild.dsc | 16 9 files changed, 21 insertions(+), 9 deletions(-) delete mode 100644 Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Docs/HowtoCreateTheEepromBinary.pdf rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/{ => Pei}/HobDataPei.c (100%) rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/{EepromDataNullPeiLib.inf => EepromDataPeiNullLib.inf} (94%) rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/{ => Pei}/GetImagePei.c (100%) rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memory/{ => Pei}/HobDataPei.c (100%) rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/{ => Pei}/MemoryAllocationPei.c (95%) diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Docs/HowtoCreateTheEepromBinary.pdf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Docs/HowtoCreateTheEepromBinary.pdf deleted file mode 100644 index 84f6e594539fb8224493acd57ee41207cf0bee5e.. diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/Pei/HobDataPei.c similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/Pei/HobDataPei.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.inf index 0ce2aaf9a6..a88d8fd1df 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.inf @@ -34,6 +34,7 @@ DebugLib EepromPlatformLib HobLib + I2cLib MemoryAllocationLib PcdLib PrintLib diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiLib.inf index de14765a7b..9d7462194d 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiLib.inf @@ -34,6 +34,7 @@ DebugLib EepromPlatformLib HobLib + I2cLib PcdLib PeiServicesLib PrintLib @@ -57,16 +58,16 @@ EepromDataLib.c EepromDataLib.h EepromDataLibConstructor.c - MemoryAllocationPei.c EEPROM/EepromDataEepromLib.c EEPROM/EepromDataEepromLib.h - EEPROM/HobDataPei.c + EEPROM/Pei/HobDataPei.c FV/EepromDataFvLib.c FV/EepromDataFvLib.h - FV/GetImagePei.c + FV/Pei/GetImagePei.c Memory/EepromDataMemoryLib.c Memory/EepromDataMemoryLib.h - Memory/HobDataPei.c + Memory/Pei/HobDataPei.c Null/EepromDataNullLib.c Null/EepromDataNullLib.h + Pei/MemoryAllocationPei.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataNullPeiLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiNullLib.inf similarity index 94% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataNullPeiLib.inf rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiNullLib.inf index 456d75dbb0..48e2b8f5ea 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataNullPeiLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataPeiNullLib.inf @@ -40,7 +40,7 @@ EepromDataLib.c EepromDataLib.h EepromDataNullLibConstructor.c - MemoryAllocationPei.c Null/EepromDataNullLib.c Null/EepromDataNullLib.h + Pei/MemoryAllocationPei.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/GetImagePei.c
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Dynamic debug UART
>From f91d7f365c00f2c16c82431d407f6b63e23e3a5b Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:09:13 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Dynamic debug UART Went from a static build time PCD to using the UART scrathpad registers to determine the current debug UART. This allows the specific board files to update the debug UART assignment during runtime. The default debug UART is still determined through a static PCD. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../AuroraGlacier/BoardInitPreMem/BoardInit.c | 8 +- .../AuroraGlacier/BoardInitPreMem/BoardInit.h | 1 + .../BoardInitPreMem/BoardInitPreMem.inf| 1 + .../BensonGlacier/BoardInitPreMem/BoardInit.c | 6 +- .../BensonGlacier/BoardInitPreMem/BoardInit.h | 1 + .../BoardInitPreMem/BoardInitPreMem.inf| 3 +- .../Board/LeafHill/BoardInitPreMem/BoardInit.c | 5 +- .../LeafHill/BoardInitPreMem/BoardInitPreMem.inf | 3 +- .../Board/MinnowBoard3/BoardInitPreMem/BoardInit.c | 5 +- .../BoardInitPreMem/BoardInitPreMem.inf| 3 +- .../MinnowBoard3Module/BoardInitPreMem/BoardInit.c | 14 +- .../BoardInitPreMem/BoardInitPreMem.inf| 2 +- .../Board/UP2/BoardInitPreMem/BoardInit.c | 3 + .../Board/UP2/BoardInitPreMem/BoardInitPreMem.inf | 1 + .../Common/Console/LpssUartSerialDxe/Serial.c | 6 +- .../Library/BaseSerialPortLib/BaseSerialPortLib.c | 340 ++--- .../BaseSerialPortLib/BaseSerialPortLibNoInit.c| 226 +- .../BroxtonPlatformPkg/PlatformDsc/Components.dsc | 1 + .../PlatformDsc/PcdsFixedAtBuild.dsc | 10 +- Platform/BroxtonPlatformPkg/PlatformPkg.dec| 16 +- .../Include/Library/ScSerialIoUartLib.h| 23 +- .../PeiDxeSmmPchSerialIoUartLib.c | 80 - 22 files changed, 189 insertions(+), 569 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.c index 3304f54131..08975f204e 100644 --- a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.c @@ -71,16 +71,18 @@ AuroraGlacierPreMemInit ( return EFI_SUCCESS; } + PchSetDebugPort (2); + DEBUG ((EFI_D_INFO, "This is Aurora Glacier board.\n")); - - + + Status = AuroraGetFabId (PeiServices, ); if (FabId == FAB_ID_B) { DEBUG ((EFI_D_INFO, "This is Aurora Glacier FAB B.\n")); } else if (FabId == FAB_ID_A) { DEBUG ((EFI_D_INFO, "This is Aurora Glacier FAB A.\n")); } - + PcdSet8 (PcdBoardId, BoardId); PcdSet8 (PcdFabId, FabId); diff --git a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.h index 472a7f97a6..2313e5e6f6 100644 --- a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInit.h @@ -29,6 +29,7 @@ #include #include #include +#include #include diff --git a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInitPreMem.inf b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInitPreMem.inf index 53312b7f01..a22d570f4c 100644 --- a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInitPreMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPreMem/BoardInitPreMem.inf @@ -30,6 +30,7 @@ [LibraryClasses] PeiServicesLib PcdLib + PchSerialIoUartLib [Packages] MdePkg/MdePkg.dec diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c index d44e824728..ef8c0894e7 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c @@ -71,15 +71,17 @@ BensonGlacierPreMemInit ( return EFI_SUCCESS; } + PchSetDebugPort (2); + DEBUG ((EFI_D_INFO, "This is Benson Glacier board.\n")); - + Status = BensonGetFabId (PeiServices, ); if (FabId == FAB_ID_B) { DEBUG ((EFI_D_INFO, "This is Benson Glacier FAB B.\n")); } else if (FabId == FAB_ID_A) { DEBUG ((EFI_D_INFO, "This is Benson Glacier FAB A.\n")); } - + PcdSet8 (PcdBoardId, BoardId); PcdSet8 (PcdFabId, FabId); diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h index 833bf558bf..63221148f9 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h @@
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Add Fab C GPIO support
>From 873dd2d29b9e0aede07749713314ee5ac8bca9c3 Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:18:59 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Add Fab C GPIO support Sync the Fab C GPIO changes from the EEPROM image into the firmware so that the EEPROM image is optional for the MB3 Module Fab C. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../BoardInitPostMem/BoardGpios.c | 11 ++- .../BoardInitPostMem/BoardGpios.h | 79 ++ .../Common/Include/Guid/PlatformInfo_Aplk.h| 13 +++- 3 files changed, 85 insertions(+), 18 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.c index 569f566401..2227c77f23 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.c @@ -181,11 +181,14 @@ Minnow3ModuleMultiPlatformGpioProgram ( // // PAD programming // -DEBUG ((DEBUG_INFO, "%a(#%4d) - PAD programming, Board ID: 0x%X\n", __FUNCTION__, __LINE__, PlatformInfoHob->BoardId)); +DEBUG ((DEBUG_INFO, "%a(#%4d) - PAD programming, Board ID: 0x%X Fab ID: 0x%X\n", __FUNCTION__, __LINE__, PlatformInfoHob->BoardId, PlatformInfoHob->BoardRev)); GpioPadConfigTable (sizeof (mMinnow3Module_GpioInitData_N) / sizeof (mMinnow3Module_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N); GpioPadConfigTable (sizeof (mMinnow3Module_GpioInitData_NW) / sizeof (mMinnow3Module_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW); GpioPadConfigTable (sizeof (mMinnow3Module_GpioInitData_W) / sizeof (mMinnow3Module_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W); GpioPadConfigTable (sizeof (mMinnow3Module_GpioInitData_SW) / sizeof (mMinnow3Module_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW); +if (PlatformInfoHob->BoardRev == FAB_ID_C) { + GpioPadConfigTable (sizeof (mMinnow3Module_GpioInitData_FabC) / sizeof (mMinnow3Module_GpioInitData_FabC[0]), mMinnow3Module_GpioInitData_FabC); +} DEBUG ((DEBUG_INFO, "%a(#%4d) - PAD programming done\n", __FUNCTION__, __LINE__)); // @@ -199,11 +202,15 @@ Minnow3ModuleMultiPlatformGpioProgram ( // // Dump GPIO tables // -DEBUG ((DEBUG_INFO, "%a(#%4d) - Dump Community pad registers, Board ID: 0x%X\n", __FUNCTION__, __LINE__, PlatformInfoHob->BoardId)); +DEBUG ((DEBUG_INFO, "%a(#%4d) - Dump Community pad registers, Board ID: 0x%X Fab ID: 0x%X\n", __FUNCTION__, __LINE__, PlatformInfoHob->BoardId, PlatformInfoHob->BoardRev)); DumpGpioPadTable (sizeof (mMinnow3Module_GpioInitData_N) / sizeof (mMinnow3Module_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N); DumpGpioPadTable (sizeof (mMinnow3Module_GpioInitData_NW) / sizeof (mMinnow3Module_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW); DumpGpioPadTable (sizeof (mMinnow3Module_GpioInitData_W) / sizeof (mMinnow3Module_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W); DumpGpioPadTable (sizeof (mMinnow3Module_GpioInitData_SW) / sizeof (mMinnow3Module_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW); +if (PlatformInfoHob->BoardRev == FAB_ID_C) { + DEBUG ((DEBUG_INFO, "\n\n%a(#%4d) - Dumping Fab C specific changes...\n", __FUNCTION__, __LINE__)); + DumpGpioPadTable (sizeof (mMinnow3Module_GpioInitData_FabC) / sizeof (mMinnow3Module_GpioInitData_FabC[0]), mMinnow3Module_GpioInitData_FabC); +} // // Now program any EEPROM defined GPIOs diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.h index 754b3c5a3c..956f6a4b48 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem/BoardGpios.h @@ -146,7 +146,7 @@ BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_N[] = // // North West Community // -BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_NW [] = +BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_NW[] = { // // Group Pin#: pad_name, PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger, Wake_Enabled, Term_H_L,Inverted,GPI_ROUT,IOSstae, IOSTerm, MMIO_Offset, Community @@ -233,7 +233,7 @@ BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_NW [] = // // West Community // -BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_W [] = +BXT_GPIO_PAD_INIT mMinnow3Module_GpioInitData_W[] = { // // Group Pin#: pad_name, PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger,Wake_Enabled, Term_H_L, Inverted,GPI_ROUT,IOSstae, IOSTerm,
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Flag after GPIO init
>From b4b50a16977879f664fe93c1fd8355ac5df012c3 Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:20:56 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Flag after GPIO init Need to prevent modifying the SoC PADs after GPIO init in the I2C code so I added a PCD flag for this purpose. While in the I2C library, I cleaned it up. This still leaves a brief window from after GPIO init and when the flag gets set for the I2C library to modify the SoC I2C PADs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../PlatformPostMemPei/PlatformInit.c | 16 +- .../PlatformPostMemPei/PlatformPostMemPei.inf | 5 +- Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec | 7 +- .../SouthCluster/Include/Library/I2cLib.h | 10 +- .../SouthCluster/Include/ScRegs/RegsI2c.h | 2 +- .../SouthCluster/Library/I2cLib/I2cLib.c | 277 + .../SouthCluster/Library/I2cLib/I2cLib.h | 11 +- .../SouthCluster/Library/I2cLib/I2cLib.inf | 1 + 8 files changed, 202 insertions(+), 127 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c index acaaebbfbb..eceecdf730 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c @@ -280,7 +280,7 @@ BXTPolicyInit ( PeiGetSectionFromFv (PeiLogoGuid, , ); if (Buffer == NULL) { -DEBUG (( DEBUG_ERROR, "Could not locate PeiLogo")); +DEBUG ((DEBUG_ERROR, "Could not locate PeiLogo")); } // @@ -290,7 +290,7 @@ BXTPolicyInit ( PeiGetSectionFromFv (VbtGuid, , ); if (Buffer == NULL) { -DEBUG (( DEBUG_ERROR, "Could not locate VBT")); +DEBUG ((DEBUG_ERROR, "Could not locate VBT")); } @@ -330,7 +330,7 @@ ConfigurePmicIMON ( StallCount = 0; while (StallCount < 1000) { -Data = MmioRead32 (MchBar + R_BIOS_MAILBOX_INTERFACE); +Data = MmioRead32 (MchBar + R_BIOS_MAILBOX_INTERFACE); if ((Data & BIT31) == BIT31) { MicroSecondDelay (1); } else { @@ -355,7 +355,7 @@ ConfigurePmicIMON ( if ((PkgPwrSKU & 0x07FFF) >= 0x0903){ MmioWrite32 ( (MchBar + R_BIOS_MAILBOX_DATA), 0xe8330466); MmioWrite32 ( (MchBar + R_BIOS_MAILBOX_INTERFACE), 0x801d); - } else { + } else { MmioWrite32 ( (MchBar + R_BIOS_MAILBOX_DATA), 0xed3303b3); MmioWrite32 ( (MchBar + R_BIOS_MAILBOX_INTERFACE), 0x801d); } @@ -412,7 +412,7 @@ PlatformInitEntryPoint ( } PWM_Fan_Start (); - + ConfigurePmicIMON(); // @@ -422,7 +422,11 @@ PlatformInitEntryPoint ( if (BoardPostMemInitFunc != NULL) { BoardPostMemInitFunc (PeiServices, PlatformInfo); } - // MultiPlatformInfoInit(PeiServices, PlatformInfo); + + // + // Set PCD flag to indicate that we have performed the GPIO initialization + // + PcdSetBool (PcdAfterGpioInitFlag, TRUE); // // Set the new boot mode diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf index c7c0f4dfe3..4a50131764 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf @@ -1,7 +1,7 @@ ## @file # Component description file for PlatformInit module. # -# Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved. +# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -31,8 +31,8 @@ [Packages] MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec BroxtonPlatformPkg/PlatformPkg.dec + MdeModulePkg/MdeModulePkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec BroxtonSiPkg/BroxtonSiPkg.dec UefiCpuPkg/UefiCpuPkg.dec @@ -123,6 +123,7 @@ gPlatformModuleTokenSpaceGuid.PcdBoardPostMemInitFunc gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid gPlatformModuleTokenSpaceGuid.PcdOemLogoFileGuid + gSiPkgTokenSpaceGuid.PcdAfterGpioInitFlag [Depex] gDramPolicyPpiGuid diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec index 05508a4c18..ee8124270f 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec @@ -5,7 +5,7 @@ # DSC and EDK II INF files to generate AutoGen.c and AutoGen.h files # for the EDK II build infrastructure. # -# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved. +# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved. # # This
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] FDF has unused PCDs
>From 64a0e3c16bcc91be85e368ad3150a340628a9fcc Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:17:09 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] FDF has unused PCDs There were several PCDs that were not being used in the FDF. Removed them and fixed up FvCallback.c to not use an additional 2 so they could be removed as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 6 +- .../PlatformPreMemPei/FvCallback.c | 104 - .../PlatformPreMemPei/PlatformPreMemPei.inf| 4 +- Platform/BroxtonPlatformPkg/PlatformPkg.dec| 10 +- Platform/BroxtonPlatformPkg/PlatformPkg.fdf| 41 +++- .../SouthCluster/ScInit/Dxe/ScInitDxe.inf | 6 +- 6 files changed, 75 insertions(+), 96 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf index acb5a84bbf..8725527563 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf @@ -1,7 +1,7 @@ ## @file # Module Infomation file for PEI PeiPolicyUpdateLib Library. # -# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved. +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -86,8 +86,4 @@ [FixedPcd] gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize gPlatformModuleTokenSpaceGuid.PcdFlashAreaBaseAddress - gPlatformModuleTokenSpaceGuid.PcdFlashIbbRegionMappedBase - gPlatformModuleTokenSpaceGuid.PcdFlashIbbRegionSize - gPlatformModuleTokenSpaceGuid.PcdFlashObbRegionMappedBase - gPlatformModuleTokenSpaceGuid.PcdFlashObbRegionSize diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c index 02cda154b8..f87845bdbf 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c @@ -46,11 +46,11 @@ PrintSetupVariableData ( for (Index = 0; Index < DataSize; Index++) { if (Index % 0x10 == 0) { - DEBUG ((EFI_D_INFO, "\n%08X:", Index)); + DEBUG ((DEBUG_INFO, "\n%08X:", Index)); } -DEBUG ((EFI_D_INFO, " %02X", *Data8++)); +DEBUG ((DEBUG_INFO, " %02X", *Data8++)); } - DEBUG ((EFI_D_INFO, "\n")); + DEBUG ((DEBUG_INFO, "\n")); } @@ -81,7 +81,7 @@ CreateDefaultVariableHob ( return EFI_INVALID_PARAMETER; } - DEBUG ((EFI_D_INFO, "Total size requested for HOB = %d.\n", (sizeof (VARIABLE_STORE_HEADER) + DefaultVariableDataSize + HEADER_ALIGNMENT - 1))); + DEBUG ((DEBUG_INFO, "Total size requested for HOB = %d.\n", (sizeof (VARIABLE_STORE_HEADER) + DefaultVariableDataSize + HEADER_ALIGNMENT - 1))); VariableStoreHeaderHob = (VARIABLE_STORE_HEADER *) BuildGuidHob (>Signature, sizeof (VARIABLE_STORE_HEADER) + DefaultVariableDataSize + HEADER_ALIGNMENT - 1); @@ -90,7 +90,7 @@ CreateDefaultVariableHob ( return EFI_OUT_OF_RESOURCES; } - DEBUG ((EFI_D_INFO, "Default HOB allocated at 0x%x\n", VariableStoreHeaderHob)); + DEBUG ((DEBUG_INFO, "Default HOB allocated at 0x%x\n", VariableStoreHeaderHob)); // // Copy the variable store header to the beginning of the HOB @@ -148,27 +148,27 @@ CreateVariableHobs ( VARIABLE_HEADER *LastVariableStoreVariableHeader = NULL; SYSTEM_CONFIGURATION *SystemConfiguration = NULL; - DEBUG ((EFI_D_INFO, "Loading variable defaults from NvStorage...\n")); - DEBUG ((EFI_D_INFO, " NvStorageHeader at 0x%x\n", NvStorageFvHeader)); + DEBUG ((DEBUG_INFO, "Loading variable defaults from NvStorage...\n")); + DEBUG ((DEBUG_INFO, " NvStorageHeader at 0x%x\n", NvStorageFvHeader)); if (NvStorageFvHeader == NULL \ || NvStorageFvHeader->Signature != EFI_FVH_SIGNATURE \ || !CompareGuid (, >FileSystemGuid)) { -DEBUG ((EFI_D_ERROR, " NvStorage FV passed to gather setup defaults is invalid!\n")); +DEBUG ((DEBUG_ERROR, " NvStorage FV passed to gather setup defaults is invalid!\n")); return EFI_INVALID_PARAMETER; } VariableStoreBase = (EFI_PHYSICAL_ADDRESS) ((UINTN) NvStorageFvHeader + (UINTN)(NvStorageFvHeader->HeaderLength)); VariableStoreHeader = (VARIABLE_STORE_HEADER *) (UINTN) VariableStoreBase; - DEBUG ((EFI_D_INFO, " VariableStoreHeader at 0x%x. VariableStoreSize = %d\n", VariableStoreHeader, (UINTN) VariableStoreHeader->Size)); + DEBUG ((DEBUG_INFO,
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update platform ID
>From 3584ac675af11249d5e9aa525288ff5b8efa Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Fri, 21 Sep 2018 11:23:08 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update platform ID Since no platform uses PMIC_PWRGOOD to determine platform ID, I removed it from the platform ID code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../BoardInitPreMem/BoardInitMiscs.c | 2 +- .../BoardInitPreMem/PlatformId.c | 174 +++-- .../BoardInitPreMem/PlatformId.h | 16 +- 3 files changed, 99 insertions(+), 93 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c index 8d8db8131e..6cd4bdf18f 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c @@ -166,7 +166,7 @@ Mb3MUpdateFspmUpd ( // // Translate into Memory Type // - MemoryType = (UINT8) ((HwconfStraps & HWCONF_MEMORY_MASK) >> HWCONF_MEMORY); + MemoryType = (UINT8) ((HwconfStraps & MB3M_HWCONF_MEMORY_MASK) >> MB3M_HWCONF_MEMORY); if (MemoryType == 0) { DEBUG ((DEBUG_INFO, " MB3 Module - SPD based memory init requested, but converted into Memory Profile type #4!\n")); MemoryType = 4; // LPDDR4 16Gbit 4 channels diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c index f81a1bffcf..558627cdbf 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c @@ -19,96 +19,102 @@ #include #include "PlatformId.h" -PAD_ID_INFO gRawBoardIdPadInfo[] = { +PAD_ID_INFO gMB3MRawBoardIdPadInfo[] = { {NW_PMIC_STDBY, EnPd, P_20K_L}, // bit 0 {NW_GPIO_213, EnPd, P_20K_L}, // bit 1 {NW_PMIC_RESET_B, EnPd, P_20K_L}, // bit 2 - {NW_PMIC_PWRGOOD, EnPd, P_20K_L}, // bit 3 - {N_GPIO_27, EnPd, P_20K_L}, // bit 4 - {N_GPIO_72, EnPd, P_20K_L}, // bit 5 - {N_GPIO_64, EnPd, P_20K_L} // bit 6 + {N_GPIO_27, EnPd, P_20K_L}, // bit 3 + {N_GPIO_72, EnPd, P_20K_L}, // bit 4 + {N_GPIO_64, EnPd, P_20K_L} // bit 5 }; // -// MinnowBoard v3 = 0x0017 -//=== -// NW_PMIC_STDBY - BOARD_ID0 - 10k PU -> 1 xxx1 -// NW_GPIO_213 - BOARD_ID1 - 10k PU -> 1 xx1x -// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1 x1xx -// NW_PMIC_PWRGOOD - - 10k PD -> 0 0xxx -// N_GPIO_27 - BOARD_ID3 - 10k PU -> 1 xxx1 -// N_GPIO_72 - - Float -> 0 xx0x -// N_GPIO_64 - - Float -> 0 x0xx -//=== 00010111b - -// Benson Glacier = 0x0024 -//=== -// NW_PMIC_STDBY - BOARD_ID0 - 10k PD -> 0 xxx0 -// NW_GPIO_213 - BOARD_ID1 - 10k PD -> 0 xx0x -// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1 x1xx -// NW_PMIC_PWRGOOD - - Float -> 0 0xxx -// N_GPIO_27 - - Float -> 0 xxx0 -// N_GPIO_72 - BOARD_ID3 - 10k PU -> 1 xx1x -// N_GPIO_64 - - Float -> 0 x0xx -//=== 00100100b - -// Aurora Glacier = 0x0026 -//=== -// NW_PMIC_STDBY - BOARD_ID0 - 10k PD -> 0 xxx0 -// NW_GPIO_213 - BOARD_ID1 - 10k PU -> 1 xx1x -// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1 x1xx -// NW_PMIC_PWRGOOD - - Float -> 0 0xxx -// N_GPIO_27 - - Float -> 0 xxx0 -// N_GPIO_72 - BOARD_ID3 - 10k PU -> 1 xx1x -// N_GPIO_64 - - Float -> 0 x0xx -//=== 00100110b - -// MinnowBoard v3 Module = 0x0040 -//=== -// NW_PMIC_STDBY - - Float -> 0 xxx0 -// NW_GPIO_213 - - Float -> 0 xx0x -// NW_PMIC_RESET_B - - Float -> 0 x0xx -// NW_PMIC_PWRGOOD - - Float -> 0 0xxx -// N_GPIO_27 - - Float -> 0 xxx0 -// N_GPIO_72 - - Float -> 0 xx0x -// N_GPIO_64 - - 10k PU -> 1 x1xx -//=== 0100b - -// LeafHill = 0x0047 -//=== -// NW_PMIC_STDBY - BOARD_ID0 - 10k PU -> 1 xxx1 -// NW_GPIO_213 - BOARD_ID1 - 10k PU -> 1 xx1x -// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1 x1xx -// NW_PMIC_PWRGOOD - BOARD_ID3 - 10k PD -> 0 0xxx -// N_GPIO_27
[edk2] [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Clean up build scripts
>From 62aef5b6fdb4e85878bafed4ab9c41631689b69d Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Thu, 20 Sep 2018 10:47:06 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Clean up build scripts Went thru the build scripts and cleaned them up. There was a couple of "magic" numbers being used in BuildBxtBios.bat that are derived from defines.dsc. I switched from "magic" numbers to parsing defines.dsc to use what is set there. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- BuildBIOS.bat| 12 +- Platform/BroxtonPlatformPkg/BuildBxtBios.bat | 232 - Platform/BroxtonPlatformPkg/BuildIFWI.bat| 497 ++- 3 files changed, 410 insertions(+), 331 deletions(-) diff --git a/BuildBIOS.bat b/BuildBIOS.bat index d8275aca14..500c2244c9 100644 --- a/BuildBIOS.bat +++ b/BuildBIOS.bat @@ -34,13 +34,14 @@ echo Call Build Script of Broxton if not exist Platform\%PlatformName%PlatformPkg\BuildIFWI.bat ( echo Platform %PlatformName%PlatformPkg does not exist - echo. & echo Error - Unsupported Platform name: %1 + echo. & echo Error - Unsupported Platform name: %1 echo. goto Usage ) -echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% /fspw MINN %BuildTarget% -call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% /fspw MINN %BuildTarget% +echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% /fspw MINN %BuildTarget% +call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% /fspw MINN %BuildTarget% +set ExitCode=%ErrorLevel% goto Exit @@ -75,4 +76,7 @@ echo%thisscript% /vs13 /LH /B /x64 Broxton Debug set exitCode=1 :Exit -exit /b %exitCode% +( + EndLocal + exit /b %exitCode% +) diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat index 9858ceae58..2bc2556a8a 100644 --- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat @@ -73,8 +73,9 @@ set FSP_BIN_PKG_NAME=BroxtonFspBinPkg set STITCH_PATH=%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Stitch set ResetVectorPath=%WORKSPACE%\%PLATFORM_RC_PACKAGE%\Cpu\ResetVector -PATH=%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\GenBiosId;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 -PATH=%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\FCE;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 +PATH=%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\FCE +PATH=%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\GenBiosId +PATH=%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 ::** :: Parse command line arguments @@ -268,8 +269,8 @@ if "%Arch%"=="IA32" ( echo DEFINE X64_CONFIG = TRUE >> %Build_Macros% ) -echo DEFINE UP2_BOARD= %UP2_BOARD% >> %Build_Macros% -echo DEFINE MINNOW3_MODULE_BOARD = %MINNOW3_MODULE_BOARD%>> %Build_Macros% +echo DEFINE UP2_BOARD = %UP2_BOARD% >> %Build_Macros% +echo DEFINE MINNOW3_MODULE_BOARD= %MINNOW3_MODULE_BOARD%>> %Build_Macros% ::Stage of copy of BiosId.env in Conf/ with Platform_Type and Build_Target values removed @@ -288,43 +289,63 @@ if /i "%~2" == "RELEASE" ( echo BUILD_TYPE = D >> Conf\BiosId.env ) -if %BoardId%==BG ( - if %FabId%==B ( +if "%BoardId%" == "BG" ( + if "%FabId%" == "A" ( +echo BOARD_REV = A >> Conf\BiosId.env + ) else if "%FabId%" == "B" ( echo BOARD_REV = B >> Conf\BiosId.env ) else ( -echo BOARD_REV = A >> Conf\BiosId.env +echo ERROR: Benson Glacier currently only supports Board Fab A & B^^^! +goto BldFail ) ) -if %BoardId%==AG ( - echo BOARD_REV = A >> Conf\BiosId.env +if "%BoardId%" == "AG" ( + if "%FabId%" == "A" ( +echo BOARD_REV = A >> Conf\BiosId.env + ) else ( +echo ERROR: Aurora Glacier currently only supports Board Fab A^^^! +goto BldFail + ) ) -if %BoardId%==MN ( - if %FabId%==B ( +if "%BoardId%" == "MN" ( + if "%FabId%" == "A" ( +echo BOARD_REV = A >> Conf\BiosId.env + ) else if "%FabId%" == "B" ( echo BOARD_REV = B >> Conf\BiosId.env ) else ( -echo BOARD_REV = A >> Conf\BiosId.env +echo ERROR: Minnow Baord v3 currently only supports Board Fab A & B^^^! +goto BldFail ) ) -if %BoardId%==MX ( - if %FabId%==C ( +if "%BoardId%" == "MX" ( + if "%FabId%" == "A" ( +echo BOARD_REV = A >> Conf\BiosId.env + ) else if "%FabId%" == "C" ( echo BOARD_REV = C >> Conf\BiosId.env ) else ( -echo BOARD_REV = A >> Conf\BiosId.env +echo ERROR: Minnow Baord v3 Module currently only supports Board Fab A, B & C^^^! +goto BldFail ) ) -if %BoardId%==LH ( - if %FabId%==D ( +if "%BoardId%" == "LH" ( + if "%FabId%" == "D" ( echo BOARD_REV = D >> Conf\BiosId.env + ) else ( +echo ERROR: Leaf Hill currently only
Re: [edk2] [Patch 0/5] Add multi-cert PcdPkcs7CertBufferXdr
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> Thanks, Kelly > -Original Message- > From: Kinney, Michael D > Sent: March 12, 2018 12:30 > To: edk2-devel@lists.01.org > Cc: Sean Brogan <sean.bro...@microsoft.com>; Zhu, Yonghong > <yonghong@intel.com>; Gao, Liming <liming@intel.com>; Zhang, > Chao B <chao.b.zh...@intel.com>; Yao, Jiewen <jiewen@intel.com>; > Steele, Kelly <kelly.ste...@intel.com>; Wei, David <david@intel.com>; > Guo, Mang <mang@intel.com>; Kinney, Michael D > <michael.d.kin...@intel.com> > Subject: [Patch 0/5] Add multi-cert PcdPkcs7CertBufferXdr > > https://bugzilla.tianocore.org/show_bug.cgi?id=890 > https://bugzilla.tianocore.org/show_bug.cgi?id=891 > > * Update BinToPcd to support multiple one or more -i INPUTFILE arguments > * Update BinToPcd to support -x, --xdr flags to encode PCD using the > Variable-Length Opaque Data of RFC 4506 External Data Representation > Standard (XDR). > * Add PcdPkcs7CertBufferXdr that supports one or more PKCS7 certificates > encoded using the Variable-Length Opaque Data format of RFC 4506 > External > Data Representation Standard (XDR). > * Use both PcdPkcs7CertBuffer and PcdPkcs7CertBufferXdr to authenticate > capsules. > * Evaluate both PcdPkcs7CertBuffer and PcdPkcs7CertBufferXdr for the use > of the test key. > > Branch for review: > https://github.com/mdkinney/edk2/tree/Bug_890_891_BinToPcdMultipleIn > putFiles > > Cc: Sean Brogan <sean.bro...@microsoft.com> > Cc: Yonghong Zhu <yonghong@intel.com> > Cc: Liming Gao <liming@intel.com> > Cc: Chao Zhang <chao.b.zh...@intel.com> > Cc: Jiewen Yao <jiewen@intel.com> > Cc: Kelly Steele <kelly.ste...@intel.com> > Cc: David Wei <david@intel.com> > Cc: Mang Guo <mang@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> > > Kinney, Michael D (4): > BaseTools/BinToPcd: Add support for multiple binary input files > SecurityPkg: Add PcdPkcs7CertBufferXdr > SecurityPkg/EdkiiSystemCapsuleLib: Use PcdPkcs7CertBufferXdr > QuarkPlatformPkg/PlatformBootManagerLib: Check PcdPkcs7CertBufferXdr > > Michael D Kinney (1): > Vlv2TbltDevicePkg/PlatformBootManagerLib: Check PcdPkcs7CertBufferXdr > > BaseTools/Scripts/BinToPcd.py | 83 > ++ > .../PlatformBootManagerLib/PlatformBootManager.c | 51 - > .../PlatformBootManagerLib.inf | 3 +- > SecurityPkg/SecurityPkg.dec| 8 +++ > SecurityPkg/SecurityPkg.uni| 6 ++ > .../EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c | 77 > +--- > .../EdkiiSystemCapsuleLib.inf | 3 +- > .../Library/PlatformBdsLib/BdsPlatform.c | 57 ++- > .../Library/PlatformBdsLib/PlatformBdsLib.inf | 22 +++--- > 9 files changed, 258 insertions(+), 52 deletions(-) > > -- > 2.14.2.windows.3 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/2] QuarkPlatformPkg: Use DpDynamicCommand to replace PerformancePkg/dp
Reviewed-by: Steele, Kelly <kelly.ste...@intel.com> My only comment is the fix in Quark.fdf, line #575: # File System Modules # -!if $(PERFORMANCE_ENABLE) -INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf -!else +!if not $(PERFORMANCE_ENABLE) INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf INF FatPkg/EnhancedFatDxe/Fat.inf !endif I would suggest going with the following to keep with the style present in the rest of the file: # File System Modules # !if $(PERFORMANCE_ENABLE) -INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf !else INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf INF FatPkg/EnhancedFatDxe/Fat.inf !endif Thanks, Kelly -Original Message- From: Ni, Ruiyu Sent: November 29, 2017 00:15 To: edk2-devel@lists.01.org Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Steele, Kelly <kelly.ste...@intel.com> Subject: [PATCH 2/2] QuarkPlatformPkg: Use DpDynamicCommand to replace PerformancePkg/dp Remove FvSimpleFileSystemDxe from Quark.dsc/fdf because it's not needed by using DpDynamicCommand driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Kelly Steele <kelly.ste...@intel.com> --- QuarkPlatformPkg/Quark.dsc| 15 +++ QuarkPlatformPkg/Quark.fdf| 16 +--- QuarkPlatformPkg/QuarkMin.dsc | 13 - QuarkPlatformPkg/QuarkMin.fdf | 12 4 files changed, 32 insertions(+), 24 deletions(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 025653eee5..5624451e12 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -163,6 +163,9 @@ [LibraryClasses] PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf !endif + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf + FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -864,9 +867,6 @@ [Components.IA32] MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/EnhancedFatDxe/Fat.inf -!if $(PERFORMANCE_ENABLE) - MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf -!endif # # Capsule update @@ -887,10 +887,11 @@ [Components.IA32] # Performance Application # !if $(PERFORMANCE_ENABLE) - PerformancePkg/Dp_App/Dp.inf { + ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { + + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE - ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf - FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf + + PerformanceLib|MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerform + anceLib.inf } !endif @@ -910,8 +911,6 @@ [Components.IA32] NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf - ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf - FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf diff --git a/QuarkPlatformPkg/Quark.fdf b/QuarkPlatformPkg/Quark.fdf index 19533b2281..5abe3b6f31 100644 --- a/QuarkPlatformPkg/Quark.fdf +++ b/QuarkPlatformPkg/Quark.fdf @@ -2,7 +2,7 @@ # FDF file of Clanton Peak CRB platform with 32-bit DXE # # This package provides QuarkNcSocId platform specific modules. -# Copyright (c) 2013 - 2016 Intel Corporation. +# Copyright (c) 2013 - 2017 Intel Corporation. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -574,14 +574,19 @@ [FV.FVMAIN] # # File System Modules # -!if $(PERFORMANCE_ENABLE) -INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf -!else +!if not $(PERFORMANCE_ENABLE) INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf INF FatPkg/EnhancedFatDxe/Fat.inf !endif +# +# Performance Application +# +!if $(PERFORMANCE_ENABLE) +INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf +!endif + # # Trusted Platform Module # @@ -677,9 +682,6 @@ [FV.PAYLOAD] # Shell and Applications # INF RuleOverride = TIANOC
Re: [edk2] [Patch] QuarkPlatformPkg/PlatformBootManagerLib: Update boot mode handling
Reviewed-by: Steele, Kelly <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: November 08, 2017 14:48 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch] QuarkPlatformPkg/PlatformBootManagerLib: Update boot mode handling https://bugzilla.tianocore.org/show_bug.cgi?id=768 Update and simplify boot mode handling logic. This includes performing minimum connects for the following boot modes: BOOT_ASSUMING_NO_CONFIGURATION_CHANGES BOOT_WITH_MINIMAL_CONFIGURATION BOOT_ON_S4_RESUME Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> --- .../PlatformBootManagerLib/PlatformBootManager.c | 30 +- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 3c21318069..53391c6077 100644 --- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManage +++ r.c @@ -2,7 +2,7 @@ This file include all platform action which can be customized by IBV/OEM. -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -354,9 +354,17 @@ PlatformBootManagerAfterConsole ( } BootMode = GetBootModeHob(); + + DEBUG((DEBUG_INFO, "PlatformBootManagerAfterConsole(): BootMode = + %02x\n", BootMode)); + switch (BootMode) { + case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: + case BOOT_WITH_MINIMAL_CONFIGURATION: + case BOOT_ON_S4_RESUME: +EfiBootManagerRefreshAllBootOption (); +break; + case BOOT_ON_FLASH_UPDATE: -DEBUG((DEBUG_INFO, "Capsule Mode detected\n")); if (FeaturePcdGet(PcdSupportUpdateCapsuleReset)) { EfiBootManagerConnectAll (); EfiBootManagerRefreshAllBootOption (); @@ -374,15 +382,6 @@ PlatformBootManagerAfterConsole ( } break; - case BOOT_IN_RECOVERY_MODE: -DEBUG((DEBUG_INFO, "Recovery Mode detected\n")); -// Passthrough - - case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: - case BOOT_WITH_MINIMAL_CONFIGURATION: - case BOOT_WITH_FULL_CONFIGURATION: - case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: - case BOOT_WITH_DEFAULT_SETTINGS: default: EfiBootManagerConnectAll (); EfiBootManagerRefreshAllBootOption (); @@ -390,14 +389,9 @@ PlatformBootManagerAfterConsole ( // // Sync ESRT Cache from FMP Instance on demand after Connect All // -if ((BootMode != BOOT_ASSUMING_NO_CONFIGURATION_CHANGES) && -(BootMode != BOOT_WITH_MINIMAL_CONFIGURATION) && -(BootMode != BOOT_ON_S4_RESUME)) { - if (EsrtManagement != NULL) { -EsrtManagement->SyncEsrtFmp(); - } +if (EsrtManagement != NULL) { + EsrtManagement->SyncEsrtFmp(); } - break; } -- 2.14.2.windows.3 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] QuarkPlatformPkg/Readme.md: Fix markdown format issue
Reviewed-by: Steele, Kelly <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: November 08, 2017 15:59 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch] QuarkPlatformPkg/Readme.md: Fix markdown format issue https://bugzilla.tianocore.org/show_bug.cgi?id=769 Remove extra carriage return that causes formatting issues. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md index aa9d9856bd..126de6937b 100644 --- a/QuarkPlatformPkg/Readme.md +++ b/QuarkPlatformPkg/Readme.md @@ -244,8 +244,7 @@ Enable UEFI Secure Boot features: Enable UEFI Secure Boot and Measured Boot using Atmel I2C TPM hardware device: -```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D UEFI_SECURE_BOOT --D MEASURED_BOOT_ENABLE -D TPM_12_HARDWARE=ATMEL_I2C``` +```build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc -D +UEFI_SECURE_BOOT -D MEASURED_BOOT_ENABLE -D +TPM_12_HARDWARE=ATMEL_I2C``` ## **FLASH Update using DediProg SF100** -- 2.14.2.windows.3 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/2] QuarkSocPkg/MemoryInit: Remove use of memset()/memcpy()
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: August 09, 2017 12:40 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Gao, Liming <liming@intel.com> Subject: [Patch 1/2] QuarkSocPkg/MemoryInit: Remove use of memset()/memcpy() Map the use of memset() and memcpy() to the BaseMemoryLib functions ZeroMem(), SetMem(), and CopyMem(). This fixes GCC build issues with this module. With the remap of the functions, the [BuildOptions] MSFT CC_FLAGS to enable /Oi can also be removed, so the MSFT and GCC builds behave the same. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> --- QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf | 6 +- QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit_utils.h | 10 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf index 78821f59a3..05766133ed 100644 --- a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf +++ b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf @@ -1,7 +1,7 @@ ## @file # This is the Memory Initialization Driver for Quark # -# Copyright (c) 2013-2015 Intel Corporation. +# Copyright (c) 2013-2017 Intel Corporation. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -74,7 +74,3 @@ [Depex] TRUE - -[BuildOptions] - # /Oi option to use the intrinsic memset function in source code. - MSFT:*_*_*_CC_FLAGS = /Oi diff --git a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit_utils.h b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit_utils.h index 04c59f5af0..dcc40c7782 100644 --- a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit_utils.h +++ b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit_utils.h @@ -1,6 +1,6 @@ / * - * Copyright (c) 2013-2015 Intel Corporation. + * Copyright (c) 2013-2017 Intel Corporation. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License @@ -90,8 +90,12 @@ void restore_timings(MRCParams_t *mrc_params); void default_timings(MRCParams_t *mrc_params); #ifndef SIM -void *memset(void *d, int c, size_t n); -void *memcpy(void *d, const void *s, size_t n); +// +// Map memset() and memcpy() to BaseMemoryLib functions // #include + #define memset(d,c,n) ((c) == 0) ? ZeroMem +((d), (n)) : SetMem ((d), (n), (c)) #define memcpy(d,s,n) CopyMem ((d), +(s), (n)) #endif #endif // _MEMINIT_UTILS_H_ -- 2.13.1.windows.2 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 2/2] QuarkPlatformPkg/Readme.md: edk2-non-osi directory layout
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: August 09, 2017 12:40 To: edk2-devel@lists.01.org Cc: Leif Lindholm <leif.lindh...@linaro.org>; Steele, Kelly <kelly.ste...@intel.com> Subject: [Patch 2/2] QuarkPlatformPkg/Readme.md: edk2-non-osi directory layout The following commit moved the QuarkSocBinPkg from the root directory to the the Silicon/Intel directory. https://github.com/tianocore/edk2-non-osi/commit/182e85d04566800fe188de4b1c30a50533dd74b7 The following updates are made to Readme.md: * PACKAGES_PATH setting for edk2-non-osi directory changes * Remove use of edk2-FatPkg repository * Remove use of edk2-BaseTools-win32 repository * Run python build tools from sources Cc: Leif Lindholm <leif.lindh...@linaro.org> Cc: Kelly Steele <kelly.ste...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Readme.md | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md index f925f9ef27..aa9d9856bd 100644 --- a/QuarkPlatformPkg/Readme.md +++ b/QuarkPlatformPkg/Readme.md @@ -46,12 +46,12 @@ - Install * ASL compiler: Available from http://www.acpica.org - Install into ```C:\ASL``` to match default tools_def.txt configuration. +* Python 2.7: Available from http://www.python.org Create a new directory for an EDK II WORKSPACE. The code block below shows the GIT clone operations required to pull the EDK II -source tree, the FatPkg sources, the pre-built versions of BaseTools as WIN32 -binaries, and the edk2-non-osi repository that provides a binary file for the +source tree and the edk2-non-osi repository that provides a binary file +for the Quark Remote Management Unit (RMU). Next it sets environment variables that must be set before running @@ -60,6 +60,8 @@ the EDK II [Multiple Workspace]( https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace) feature is used. +Next, the EDK II BaseTools required to build firmware images are built. + Next, the ```edksetup.bat``` file is run to complete the initialization of an EDK II build environment. Two example build commands are shown. The first one in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI firmware image that is @@ -69,16 +71,17 @@ image that is useful for initial power-on and debug of new features. ```cmd git clone https://github.com/tianocore/edk2.git -git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg -git clone https://github.com/tianocore/edk2-BaseTools-win32.git git clone https://github.com/tianocore/edk2-non-osi.git +set PYTHON_HOME=c:\Python27 set WORKSPACE=%CD% -set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi -set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32 +set +PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi\Silicon\Intel +set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools +cd %WORKSPACE%\edk2 -cd edk2 -edksetup.bat +BaseTools\toolsetup.bat Rebuild + +edksetup.bat Rebuild build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/QuarkMin.dsc @@ -91,12 +94,13 @@ build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/QuarkMin.dsc * GIT client * GCC 4.9 compiler * ASL compiler: Available from http://www.acpica.org. +* Python 2.7 Create a new directory for an EDK II WORKSPACE. The code block below shows the GIT clone operations required to pull the EDK II -source tree, the FatPkg sources, and the edk2-non-osi repository that provides a -binary file for the Quark Remote Management Unit (RMU). +source tree and the edk2-non-osi repository that provides a binary file +for the Quark Remote Management Unit (RMU). Next it sets environment variables that must be set before running ```edksetup.bat```. Since content is being pulled from multiple repositories, @@ -106,7 +110,7 @@ feature is used. Next, the EDK II BaseTools required to build firmware images are built. -Next, the ```edksetup.bat``` file is run to complete the initialization of an +Next, the ```edksetup.sh``` file is run to complete the initialization +of an EDK II build environment. Two example build commands are shown. The first one in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI firmware image that is able to boot the built-in UEFI Shell and Linux from a micro SD FLASH card. The @@ -115,17 +119,15 @@ image that is useful for initial power-on and debug of new features. ```sh git clone https://github.com/tianocore/edk2.git -git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg git clone https://github.com/tianocore/edk2-non-osi.git export WORKSPACE=$PWD -export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-non-osi +export +PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-non-osi/Silicon/Intel e
Re: [edk2] [Patch 0/2] Update Quark for edk2-non-osi changes
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: August 09, 2017 12:40 To: edk2-devel@lists.01.org Cc: Leif Lindholm <leif.lindh...@linaro.org>; Steele, Kelly <kelly.ste...@intel.com>; Gao, Liming <liming@intel.com> Subject: [Patch 0/2] Update Quark for edk2-non-osi changes Update PACKAGES_PATH requirements Readme.md to match the new directory structure in the edk2-non-osi repository and update instructions to run python-based build tools from sources and remove edk2-FatPkg repository. Also fix GCC compatibility issues from use of memset() in the MemoryInit module in the QuarkSocPkg that were discovered when verifying the Linux/GCC build instructions. Cc: Leif Lindholm <leif.lindh...@linaro.org> Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Michael D Kinney (2): QuarkSocPkg/MemoryInit: Remove use of memset()/memcpy() QuarkPlatformPkg/Readme.md: edk2-non-osi directory layout QuarkPlatformPkg/Readme.md | 34 -- .../MemoryInit/Pei/MemoryInitPei.inf | 6 +--- .../MemoryInit/Pei/meminit_utils.h | 10 +-- 3 files changed, 26 insertions(+), 24 deletions(-) -- 2.13.1.windows.2 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/5] QuarkPlatformPkg: Fix BOOT_IN_RECOVERY_MODE issues
Entire patch reviewed. Looks good to me. Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Steele, Kelly > Sent: October 07, 2016 12:27 > To: Kinney, Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org > Subject: RE: [Patch 0/5] QuarkPlatformPkg: Fix BOOT_IN_RECOVERY_MODE > issues > > > > Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > > > > > > -Original Message- > > From: Kinney, Michael D > > Sent: October 06, 2016 12:12 > > To: edk2-devel@lists.01.org > > Cc: Steele, Kelly <kelly.ste...@intel.com> > > Subject: [Patch 0/5] QuarkPlatformPkg: Fix BOOT_IN_RECOVERY_MODE issues > > > > This patch series addresses the following 3 issues in Bugzilla: > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=137 > > https://bugzilla.tianocore.org/show_bug.cgi?id=138 > > https://bugzilla.tianocore.org/show_bug.cgi?id=139 > > > > It also removes a function and library that are no longer used. > > > > Cc: Kelly Steele <kelly.ste...@intel.com> > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> > > > > Michael Kinney (5): > > QuarkPlatformPkg/ForceRecovery: Add UEFI application to force recovery > > QuarkPlatformPkg/PlatformInit: Fix recovery detection issues > > QuarkPlatformPkg/PlatformHelperLib: Remove > PlatformDebugPortGetChar8() > > QuarkPlatformPkg: Add ForceRecovery UEFI application > > QuarkPlatformPkg/RecoveryOemHookLib: Remove RecoveryOemHookLib > > > > .../Application/ForceRecovery/ForceRecovery.c | 53 ++ > > .../Application/ForceRecovery/ForceRecovery.inf| 39 +++ > > .../Include/Library/PlatformHelperLib.h| 16 +-- > > .../Include/Library/RecoveryOemHookLib.h | 45 - > > .../Library/PlatformHelperLib/PlatformHelperLib.c | 27 - > > .../Library/RecoveryOemHookLib/CommonHeader.h | 30 -- > > .../RecoveryOemHookLib/RecoveryOemHookLib.c| 61 --- > > .../RecoveryOemHookLib/RecoveryOemHookLib.inf | 49 - > > .../Platform/Pei/PlatformInit/BootMode.c | 89 ++-- > > .../Platform/Pei/PlatformInit/CommonHeader.h | 4 +- > > .../Platform/Pei/PlatformInit/MrcWrapper.c | 112 > > + > > .../Platform/Pei/PlatformInit/MrcWrapper.h | 11 +- > > .../Platform/Pei/PlatformInit/PlatformEarlyInit.c | 67 +++- > > .../Pei/PlatformInit/PlatformEarlyInit.inf | 1 - > > QuarkPlatformPkg/Quark.dsc | 6 +- > > QuarkPlatformPkg/QuarkMin.dsc | 1 - > > 16 files changed, 196 insertions(+), 415 deletions(-) > > create mode 100644 > > QuarkPlatformPkg/Application/ForceRecovery/ForceRecovery.c > > create mode 100644 > > QuarkPlatformPkg/Application/ForceRecovery/ForceRecovery.inf > > delete mode 100644 > > QuarkPlatformPkg/Include/Library/RecoveryOemHookLib.h > > delete mode 100644 > > QuarkPlatformPkg/Library/RecoveryOemHookLib/CommonHeader.h > > delete mode 100644 > > QuarkPlatformPkg/Library/RecoveryOemHookLib/RecoveryOemHookLib.c > > delete mode 100644 > > QuarkPlatformPkg/Library/RecoveryOemHookLib/RecoveryOemHookLib.inf > > > > -- > > 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/2] QuarkSocPkg/QncSmmDispatcher: Fix SMI Handler ASSERTs()
Entire patch reviewed. Looks good to me. Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Steele, Kelly > Sent: October 07, 2016 12:09 > To: Kinney, Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org > Subject: RE: [Patch 0/2] QuarkSocPkg/QncSmmDispatcher: Fix SMI Handler > ASSERTs() > > > > Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > > > > > -Original Message- > > From: Kinney, Michael D > > Sent: October 05, 2016 11:29 > > To: edk2-devel@lists.01.org > > Cc: Steele, Kelly <kelly.ste...@intel.com> > > Subject: [Patch 0/2] QuarkSocPkg/QncSmmDispatcher: Fix SMI Handler > > ASSERTs() > > > > This series fixes the following two issues: > > > > QuarkSocPkg QncSmmDispatcher passes incorrect context to SMI handler > > https://bugzilla.tianocore.org/show_bug.cgi?id=136 > > > > QuarkSockg Use after free in QNCSmmCoreDispatcher > > https://bugzilla.tianocore.org/show_bug.cgi?id=51 > > > > These issues can be reproduced using the unit test available in the > > following > > branch that registers a periodic SMI that is triggered every 8 seconds and > > unregisters itself after the periodic SMI handler has been triggered 4 > > times. > > > > https://github.com/mdkinney/edk2/tree/Bug51/Reproduce > > > > Cc: Kelly Steele <kelly.ste...@intel.com> > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> > > > > Michael Kinney (2): > > QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers > > QuarkSocPkg/QncSmmDispatcher: Fix use after free issue > > > > .../QncSmmDispatcher/QNC/QNCSmmPeriodicTimer.c | 4 +- > > .../Smm/DxeSmm/QncSmmDispatcher/QNCSmm.h | 9 ++-- > > .../Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c | 51 > > +- > > 3 files changed, 49 insertions(+), 15 deletions(-) > > > > -- > > 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/5] QuarkPlatformPkg: Fix BOOT_IN_RECOVERY_MODE issues
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Kinney, Michael D > Sent: October 06, 2016 12:12 > To: edk2-devel@lists.01.org > Cc: Steele, Kelly <kelly.ste...@intel.com> > Subject: [Patch 0/5] QuarkPlatformPkg: Fix BOOT_IN_RECOVERY_MODE issues > > This patch series addresses the following 3 issues in Bugzilla: > > https://bugzilla.tianocore.org/show_bug.cgi?id=137 > https://bugzilla.tianocore.org/show_bug.cgi?id=138 > https://bugzilla.tianocore.org/show_bug.cgi?id=139 > > It also removes a function and library that are no longer used. > > Cc: Kelly Steele <kelly.ste...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> > > Michael Kinney (5): > QuarkPlatformPkg/ForceRecovery: Add UEFI application to force recovery > QuarkPlatformPkg/PlatformInit: Fix recovery detection issues > QuarkPlatformPkg/PlatformHelperLib: Remove PlatformDebugPortGetChar8() > QuarkPlatformPkg: Add ForceRecovery UEFI application > QuarkPlatformPkg/RecoveryOemHookLib: Remove RecoveryOemHookLib > > .../Application/ForceRecovery/ForceRecovery.c | 53 ++ > .../Application/ForceRecovery/ForceRecovery.inf| 39 +++ > .../Include/Library/PlatformHelperLib.h| 16 +-- > .../Include/Library/RecoveryOemHookLib.h | 45 - > .../Library/PlatformHelperLib/PlatformHelperLib.c | 27 - > .../Library/RecoveryOemHookLib/CommonHeader.h | 30 -- > .../RecoveryOemHookLib/RecoveryOemHookLib.c| 61 --- > .../RecoveryOemHookLib/RecoveryOemHookLib.inf | 49 - > .../Platform/Pei/PlatformInit/BootMode.c | 89 ++-- > .../Platform/Pei/PlatformInit/CommonHeader.h | 4 +- > .../Platform/Pei/PlatformInit/MrcWrapper.c | 112 > + > .../Platform/Pei/PlatformInit/MrcWrapper.h | 11 +- > .../Platform/Pei/PlatformInit/PlatformEarlyInit.c | 67 +++- > .../Pei/PlatformInit/PlatformEarlyInit.inf | 1 - > QuarkPlatformPkg/Quark.dsc | 6 +- > QuarkPlatformPkg/QuarkMin.dsc | 1 - > 16 files changed, 196 insertions(+), 415 deletions(-) > create mode 100644 > QuarkPlatformPkg/Application/ForceRecovery/ForceRecovery.c > create mode 100644 > QuarkPlatformPkg/Application/ForceRecovery/ForceRecovery.inf > delete mode 100644 > QuarkPlatformPkg/Include/Library/RecoveryOemHookLib.h > delete mode 100644 > QuarkPlatformPkg/Library/RecoveryOemHookLib/CommonHeader.h > delete mode 100644 > QuarkPlatformPkg/Library/RecoveryOemHookLib/RecoveryOemHookLib.c > delete mode 100644 > QuarkPlatformPkg/Library/RecoveryOemHookLib/RecoveryOemHookLib.inf > > -- > 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/2] QuarkSocPkg/QncSmmDispatcher: Fix SMI Handler ASSERTs()
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Kinney, Michael D > Sent: October 05, 2016 11:29 > To: edk2-devel@lists.01.org > Cc: Steele, Kelly <kelly.ste...@intel.com> > Subject: [Patch 0/2] QuarkSocPkg/QncSmmDispatcher: Fix SMI Handler > ASSERTs() > > This series fixes the following two issues: > > QuarkSocPkg QncSmmDispatcher passes incorrect context to SMI handler > https://bugzilla.tianocore.org/show_bug.cgi?id=136 > > QuarkSockg Use after free in QNCSmmCoreDispatcher > https://bugzilla.tianocore.org/show_bug.cgi?id=51 > > These issues can be reproduced using the unit test available in the following > branch that registers a periodic SMI that is triggered every 8 seconds and > unregisters itself after the periodic SMI handler has been triggered 4 times. > > https://github.com/mdkinney/edk2/tree/Bug51/Reproduce > > Cc: Kelly Steele <kelly.ste...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> > > Michael Kinney (2): > QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers > QuarkSocPkg/QncSmmDispatcher: Fix use after free issue > > .../QncSmmDispatcher/QNC/QNCSmmPeriodicTimer.c | 4 +- > .../Smm/DxeSmm/QncSmmDispatcher/QNCSmm.h | 9 ++-- > .../Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c | 51 > +- > 3 files changed, 49 insertions(+), 15 deletions(-) > > -- > 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 00/35] remove unused but set variables
I have built and verified that the firmware built for Quark still POSTs. QuarkPlatformPkg Reviewed-by: Kelly Steele <kelly.ste...@intel.com> QuarkSocPkg Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: March 24, 2016 03:37 > To: edk2-devel-01 <edk2-de...@ml01.01.org> > Cc: Andrew Fish <af...@apple.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org>; Tian, Feng <feng.t...@intel.com>; Wu, Hao A > <hao.a...@intel.com>; Fan, Jeff <jeff@intel.com>; Wu, Jiaxin > <jiaxin...@intel.com>; Yao, Jiewen <jiewen@intel.com>; Justen, Jordan L > <jordan.l.jus...@intel.com>; Steele, Kelly <kelly.ste...@intel.com>; Gao, > Liming <liming@intel.com>; Ma, Maurice <maurice...@intel.com>; > Kinney, Michael D <michael.d.kin...@intel.com>; Agyeman, Prince > <prince.agye...@intel.com>; Ni, Ruiyu <ruiyu...@intel.com>; Fu, Siyuan > <siyuan...@intel.com>; Zeng, Star <star.z...@intel.com>; Zhu, Yonghong > <yonghong@intel.com> > Subject: [PATCH 00/35] remove unused but set variables > > This series removes unused but set variables from edk2, so that the > source builds after Ard's patch (the last one in this series) lets > -Wunused-but-set-variables take effect for GCC DEBUG builds. > > I used the following method for locating these warnings: > * "-Werror" was temporarily removed; > * I rounded up the DSC files in the tree; > * I built each DSC file for: > { RELEASE, DEBUG } x { IA32, X64, ARM, AARCH64 }; > * some platform DSCs obviously don't build for all four arches above, I > ignored those errors; > * some platforms I couldn't build at all, I ignored those too; > * for the rest (i.e., when a given DSC built for at least some > platforms), I collected the warnings from the logs, across all the > arches that the DSC did build for, and I silenced them. > > Maintainers are invited to exert caution while reviewing the patches. > Namely, in a few cases, the silencing is almost certainly wrong, and > should be replaced with proper error checking. These are the cases when > a Status variable is set from a function call, but then never checked. I > didn't try to handle these errors myself; I just removed the Status > variable. > > Obviously, this method does not change behavior, but the gcc warning in > this case signals something much worse than a forgotten variable: lack > of error handling. So, dear maintainers, if you recognize this pattern > on your turf, please indicate in your reviews that you are going to post > a real error handling fix for that warning. > > The list of DSC's I could build (at least for some architectures): > > AppPkg/AppPkg.dsc > ArmPkg/ArmPkg.dsc > ArmVirtPkg/ArmVirtQemu.dsc > ArmVirtPkg/ArmVirtQemuKernel.dsc > ArmVirtPkg/ArmVirtXen.dsc > BeagleBoardPkg/BeagleBoardPkg.dsc > CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc > CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc > CryptoPkg/CryptoPkg.dsc > DuetPkg/DuetPkgIa32.dsc > DuetPkg/DuetPkgX64.dsc > EdkCompatibilityPkg/EdkCompatibilityPkg.dsc > EmulatorPkg/EmulatorPkg.dsc > IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc > IntelFrameworkPkg/IntelFrameworkPkg.dsc > IntelFspPkg/IntelFspPkg.dsc > IntelFspWrapperPkg/IntelFspWrapperPkg.dsc > MdeModulePkg/MdeModulePkg.dsc > MdePkg/MdePkg.dsc > NetworkPkg/NetworkPkg.dsc > OptionRomPkg/OptionRomPkg.dsc > OvmfPkg/OvmfPkgIa32.dsc > OvmfPkg/OvmfPkgIa32X64.dsc > OvmfPkg/OvmfPkgX64.dsc > PcAtChipsetPkg/PcAtChipsetPkg.dsc > PerformancePkg/PerformancePkg.dsc > QuarkSocPkg/QuarkSocPkg.dsc > SecurityPkg/SecurityPkg.dsc > ShellPkg/ShellPkg.dsc > SourceLevelDebugPkg/SourceLevelDebugPkg.dsc > StdLib/StdLib.dsc > UefiCpuPkg/UefiCpuPkg.dsc > > (Side note: CryptoPkg implies OpenSSL-1.0.2g.) > > The list of DSC's that wouldn't build for me at all (on Linux, with > GCC48): > > EmbeddedPkg/EmbeddedPkg.dsc > Nt32Pkg/Nt32Pkg.dsc > Omap35xxPkg/Omap35xxPkg.dsc > QuarkPlatformPkg/Quark.dsc > QuarkPlatformPkg/QuarkMin.dsc > Vlv2TbltDevicePkg/PlatformPkgConfig.dsc > Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > Vlv2TbltDevicePkg/PlatformPkgX64.dsc > > Fixing any possible warnings in these packages is left as an exercise to > their respective maintainers. > > Public branch: > <https://github.com/lersek/edk2/commits/warn_unused_but_set>. > > Cc: Andrew Fish <af...@apple.com> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> > Cc: Feng Tian <feng.t...@int
Re: [edk2] [PATCH v2 8/9] QuarkPkg: Move baud rate setting to top of .dsc file
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Leahy, Leroy P > Sent: March 04, 2016 14:31 > To: Kinney, Michael D <michael.d.kin...@intel.com>; Steele, Kelly > <kelly.ste...@intel.com>; edk2-devel@lists.01.org; Bjorge, Erik C > <erik.c.bjo...@intel.com> > Cc: Leahy, Leroy P <leroy.p.le...@intel.com> > Subject: [PATCH v2 8/9] QuarkPkg: Move baud rate setting to top of .dsc file > > Move the baud rate setting to the top of the .dsc file. Use a single > setting for each board. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Lee Leahy <leroy.p.le...@intel.com> > --- > QuarkPlatformPkg/Quark.dsc| 25 - > QuarkPlatformPkg/QuarkMin.dsc | 25 - > 2 files changed, 24 insertions(+), 26 deletions(-) > > diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc > index c87bb17..2b8038e 100644 > --- a/QuarkPlatformPkg/Quark.dsc > +++ b/QuarkPlatformPkg/Quark.dsc > @@ -46,6 +46,16 @@ >DEFINE GALILEO = GEN2 > ># > + # Specify the maximum baud rate for the board > + # > +!if $(GALILEO) == GEN1 > + DEFINE BAUD_RATE = 460800 > +!endif > +!if $(GALILEO) == GEN2 > + DEFINE BAUD_RATE = 921600 > +!endif > + > + # ># TPM 1.2 Hardware. Options are [NONE, LPC, ATMEL_I2C, INFINEON_I2C] ># >DEFINE TPM_12_HARDWARE = NONE > @@ -342,12 +352,7 @@ > !endif >gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0x18 >gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 > -!if $(GALILEO) == GEN1 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|460800 > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|921600 > -!endif > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(BAUD_RATE) >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 > @@ -382,14 +387,8 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x9000B000 > -!if $(GALILEO) == GEN1 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|460800 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE) >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|921600 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|0x03 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x07 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|FALSE > diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc > index f8a656e..7d89767 100644 > --- a/QuarkPlatformPkg/QuarkMin.dsc > +++ b/QuarkPlatformPkg/QuarkMin.dsc > @@ -40,6 +40,16 @@ >DEFINE PERFORMANCE_ENABLE = FALSE >DEFINE LOGGING = FALSE > > + # > + # Specify the maximum baud rate for the board > + # > +!if $(GALILEO) == GEN1 > + DEFINE BAUD_RATE = 460800 > +!endif > +!if $(GALILEO) == GEN2 > + DEFINE BAUD_RATE = 921600 > +!endif > + >!if $(TARGET) == "DEBUG" > DEFINE LOGGING = TRUE >!endif > @@ -311,12 +321,7 @@ > !endif >gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0x18 >gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 > -!if $(GALILEO) == GEN1 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|460800 > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|921600 > -!endif > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(BAUD_RATE) >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 > @@ -351,14 +356,8 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x9000B000 > -!if $(GALILEO) == GEN1 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|460800 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE) >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|921600 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|0x03 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x07 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|FALSE > -- > 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 8/9] QuarkPkg: Move baud rate setting to top of .dsc file
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Leahy, Leroy P > Sent: March 04, 2016 14:19 > To: Kinney, Michael D <michael.d.kin...@intel.com>; Steele, Kelly > <kelly.ste...@intel.com>; edk2-devel@lists.01.org; Bjorge, Erik C > <erik.c.bjo...@intel.com> > Cc: Leahy, Leroy P <leroy.p.le...@intel.com> > Subject: [PATCH 8/9] QuarkPkg: Move baud rate setting to top of .dsc file > > Move the baud rate setting to the top of the .dsc file. Use a single > setting for each board. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Lee Leahy <leroy.p.le...@intel.com> > --- > QuarkPlatformPkg/Quark.dsc| 25 - > QuarkPlatformPkg/QuarkMin.dsc | 25 - > 2 files changed, 24 insertions(+), 26 deletions(-) > > diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc > index c87bb17..2b8038e 100644 > --- a/QuarkPlatformPkg/Quark.dsc > +++ b/QuarkPlatformPkg/Quark.dsc > @@ -46,6 +46,16 @@ >DEFINE GALILEO = GEN2 > ># > + # Specify the maximum baud rate for the board > + # > +!if $(GALILEO) == GEN1 > + DEFINE BAUD_RATE = 460800 > +!endif > +!if $(GALILEO) == GEN2 > + DEFINE BAUD_RATE = 921600 > +!endif > + > + # ># TPM 1.2 Hardware. Options are [NONE, LPC, ATMEL_I2C, INFINEON_I2C] ># >DEFINE TPM_12_HARDWARE = NONE > @@ -342,12 +352,7 @@ > !endif >gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0x18 >gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 > -!if $(GALILEO) == GEN1 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|460800 > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|921600 > -!endif > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(BAUD_RATE) >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 > @@ -382,14 +387,8 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x9000B000 > -!if $(GALILEO) == GEN1 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|460800 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE) >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|921600 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|0x03 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x07 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|FALSE > diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc > index f8a656e..7d89767 100644 > --- a/QuarkPlatformPkg/QuarkMin.dsc > +++ b/QuarkPlatformPkg/QuarkMin.dsc > @@ -40,6 +40,16 @@ >DEFINE PERFORMANCE_ENABLE = FALSE >DEFINE LOGGING = FALSE > > + # > + # Specify the maximum baud rate for the board > + # > +!if $(GALILEO) == GEN1 > + DEFINE BAUD_RATE = 460800 > +!endif > +!if $(GALILEO) == GEN2 > + DEFINE BAUD_RATE = 921600 > +!endif > + >!if $(TARGET) == "DEBUG" > DEFINE LOGGING = TRUE >!endif > @@ -311,12 +321,7 @@ > !endif >gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0x18 >gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 > -!if $(GALILEO) == GEN1 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|460800 > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|921600 > -!endif > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(BAUD_RATE) >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 > @@ -351,14 +356,8 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x9000B000 > -!if $(GALILEO) == GEN1 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|460800 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE) >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|921600 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|0x03 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x07 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|FALSE > -- > 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 8/9] QuarkPkg: Move baud rate setting to top of .dsc file
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Leahy, Leroy P > Sent: March 04, 2016 09:03 > To: Kinney, Michael D <michael.d.kin...@intel.com>; Steele, Kelly > <kelly.ste...@intel.com>; edk2-devel@lists.01.org; Bjorge, Erik C > <erik.c.bjo...@intel.com> > Cc: Leahy, Leroy P <leroy.p.le...@intel.com> > Subject: [PATCH 8/9] QuarkPkg: Move baud rate setting to top of .dsc file > > Move the baud rate setting to the top of the .dsc file. Use a single > setting for each board. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Lee Leahy <leroy.p.le...@intel.com> > --- > QuarkPlatformPkg/Quark.dsc | 28 +++- > 1 file changed, 15 insertions(+), 13 deletions(-) > > diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc > index c87bb17..c8952d8 100644 > --- a/QuarkPlatformPkg/Quark.dsc > +++ b/QuarkPlatformPkg/Quark.dsc > @@ -46,6 +46,19 @@ >DEFINE GALILEO = GEN2 > ># > + # Specify the maximum baud rate for the board > + # > + DEFINE GEN1_BAUD_RATE = 460800 > + DEFINE GEN2_BAUD_RATE = 921600 > + > +!if $(GALILEO) == GEN1 > + BAUD_RATE = $(GEN1_BAUD_RATE) > +!endif > +!if $(GALILEO) == GEN2 > + BAUD_RATE = $(GEN2_BAUD_RATE) > +!endif > + > + # ># TPM 1.2 Hardware. Options are [NONE, LPC, ATMEL_I2C, INFINEON_I2C] ># >DEFINE TPM_12_HARDWARE = NONE > @@ -342,12 +355,7 @@ > !endif >gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0x18 >gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000 > -!if $(GALILEO) == GEN1 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|460800 > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|921600 > -!endif > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(BAUD_RATE) >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 >gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1 > @@ -382,14 +390,8 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x9000B000 > -!if $(GALILEO) == GEN1 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|460800 > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE) >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif > -!if $(GALILEO) == GEN2 > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|921600 > - > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE > -!endif >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|0x03 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x07 >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|FALSE > -- > 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 7/9] QuarkPlatformPkg/PlatformBootManagerLib: No non-countdown msgs
Reviewed-by: Kelly Steele <kelly.ste...@intel.com> > -Original Message- > From: Leahy, Leroy P > Sent: March 04, 2016 09:03 > To: Kinney, Michael D <michael.d.kin...@intel.com>; Steele, Kelly > <kelly.ste...@intel.com>; edk2-devel@lists.01.org; Bjorge, Erik C > <erik.c.bjo...@intel.com> > Cc: Leahy, Leroy P <leroy.p.le...@intel.com> > Subject: [PATCH 7/9] QuarkPlatformPkg/PlatformBootManagerLib: No non- > countdown msgs > > Disable the countdown messages which are displayed every second when the > timeout is specified as infinite (0x). > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Lee Leahy <leroy.p.le...@intel.com> > --- > QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | > 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git > a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c > b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c > index 19ff3d0..fff1c80 100644 > --- > a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c > +++ > b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c > @@ -333,5 +333,7 @@ PlatformBootManagerWaitCallback ( >UINT16 TimeoutRemain >) > { > - Print (L"\r%-2d seconds remained...", TimeoutRemain); > + if (TimeoutRemain != 0x) { > +Print (L"\r%-2d seconds remained...", TimeoutRemain); > + } > } > -- > 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] QuarkPlatformPkg/Readme.md: Move images to tianocore wiki
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 30, 2016 13:33 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch] QuarkPlatformPkg/Readme.md: Move images to tianocore wiki Move image files associated with Readme.md from tianocore website to tianocore wiki. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Readme.md | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md index b48e072..8f5b898 100644 --- a/QuarkPlatformPkg/Readme.md +++ b/QuarkPlatformPkg/Readme.md @@ -239,7 +239,7 @@ http://www.dediprog.com/pd/spi-flash-solution/SF100). * Connect the DediProg SF100 to the Galileo development board. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/Dediprog.jpg) + + ![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Qua + rkPlatformPkg/Images/Dediprog.jpg) * Make sure ```dpcmd.exe``` is in ```PATH``` @@ -273,7 +273,7 @@ Boot Manager, UEFI Shell, and operating system. The default serial communication parameters for the Intel(R) Galileo Gen 2 Development Board is 921600,n,8,1 with no hardware flow control. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermSerialParameters.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/TeraTermSerialParameters.png) The default serial communication parameters for the Intel(R) Galileo Development Board is 461800,n,8,1 with no hardware flow control. @@ -285,11 +285,11 @@ recommendation apply to the TCPIP use cases. * TERATERM.INI - Set terminal size to 80 x 25 and terminal settings to UTF8. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermTerminal.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/TeraTermTerminal.png) * TERATERM.INI - Set font type to Terminal to support box drawing glyphs. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/TeraTermFont.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/TeraTermFont.png) * TERATERM.INI - Disable line mode to make TCPIP mode work like COM port mode. @@ -353,7 +353,7 @@ Connect power adapter to Galileo development board, and the logging messages should be seen, followed by 5 second countdown, followed by an automatic boot to the built-in UEFI Shell. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/UefiShell.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/UefiShell.png) ## **Source Level Debug Using Intel(R) UEFI Development Kit Debugger Tool** @@ -410,7 +410,7 @@ the debug agent is initialized. The WinDbg window shows that the debugger is connected and the WinDbg application can be used for run control, breakpoint management, and viewing call stacks, local variables, global variables, etc. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/UdkDebugger.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/UdkDebugger.png) ## **Debug Using Intel(R) System Debugger using OpenOCD** @@ -615,7 +615,7 @@ Use Dediprog SF100 to update the Galileo development board FLASH image. Attach the CryptoShield to the Arduino header of the Galileo development board as shown below. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/GalileoCryptoShield.jpg) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/GalileoCryptoShield.jpg) Connect power adapter to Galileo development board and boot to the UEFI Shell. In the boot logging messages, messages similar to the following should be seen @@ -663,4 +663,4 @@ extra work that is only performed one time. In order to get correct performance measurements, use the 2nd or later boots. After the 2nd boot, run the ```dp -s``` command. The output should look similar to the figure below. -![](http://www.tianocore.org/Projects/QuarkPlatformPkg/Images/DpCommand.png) +![](https://github.com/tianocore/tianocore.github.io/wiki/Projects/Quar +kPlatformPkg/Images/DpCommand.png) -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/2] QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 28, 2016 15:34 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch 1/2] QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request If TCG Memory Overwrite Request is set, then clear all memory available for use by an OS. An OS may optionally use embedded SRAM in Quark SoC X1000, so the embedded SRAM should is cleared too. TCG MOR requests are communicated through a UEFI variable. This module reads UEFI variable to check state of MOR request. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- .../Platform/Pei/PlatformInit/MemoryCallback.c | 51 +- .../Platform/Pei/PlatformInit/MrcWrapper.c | 41 - 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c index 728e2b1..b140b0d 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c @@ -7,7 +7,7 @@ following action is performed in this file, 4. Set MTRR for PEI 5. Create FV HOB and Flash HOB -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -108,6 +108,9 @@ MemoryDiscoveredPpiNotifyCallback ( UINT8 CpuAddressWidth; UINT32RegEax; MTRR_SETTINGS MtrrSettings; + EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices; + UINT8 MorControl; + UINTN DataSize; DEBUG ((EFI_D_INFO, "Platform PEIM Memory Callback\n")); @@ -150,6 +153,52 @@ MemoryDiscoveredPpiNotifyCallback ( MtrrSetAllMtrrs (); PERF_END (NULL, "SetCache", NULL, 0); + + // + // Get necessary PPI + // + Status = PeiServicesLocatePpi ( + , // GUID + 0, // INSTANCE + NULL, // EFI_PEI_PPI_DESCRIPTOR + (VOID **) // PPI + ); + ASSERT_EFI_ERROR (Status); + + // + // Detect MOR request by the OS. + // + MorControl = 0; + DataSize = sizeof (MorControl); + Status = VariableServices->GetVariable ( + VariableServices, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + , + NULL, + , + + ); + // + // If OS requested a memory overwrite perform it now for Embedded + SRAM // if (MOR_CLEAR_MEMORY_VALUE (MorControl)) { +DEBUG ((EFI_D_INFO, "Clear Embedded SRAM per MOR request.\n")); +if (PcdGet32 (PcdESramMemorySize) > 0) { + if (PcdGet32 (PcdEsramStage1Base) == 0) { +// +// ZeroMem() generates an ASSERT() if Buffer parameter is NULL. +// Clear byte at 0 and start clear operation at address 1. +// +*(UINT8 *)(0) = 0; +ZeroMem ((VOID *)1, (UINTN)PcdGet32 (PcdESramMemorySize) - 1); + } else { +ZeroMem ( + (VOID *)(UINTN)PcdGet32 (PcdEsramStage1Base), + (UINTN)PcdGet32 (PcdESramMemorySize) + ); + } +} + } // // Install PeiReset for PeiResetSystem service diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c index eee696e..fec2398 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c @@ -1,7 +1,7 @@ /** @file Framework PEIM to initialize memory on a Quark Memory Controller. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -563,6 +563,8 @@ InstallEfiMemory ( PEI_CAPSULE_PPI *Capsule; VOID *LargeMemRangeBuf; UINTN LargeMemRangeBufLen; + UINT8 MorControl; + UINTN DataSize; // // Test the memory from 1M->TOM @@ -617,6 +619,20 @@ InstallEfiMemory ( RequiredMemSize = 0; RetriveRequiredMemorySize (PeiServi
Re: [edk2] [Patch 2/2] QuarkPlatformPkg: Add modules required for TCG MOR feature
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 28, 2016 15:34 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch 2/2] QuarkPlatformPkg: Add modules required for TCG MOR feature Add the TcgSmm and TcgMor modules that are required to manage UEFI variable that conveys TCG MOR request to memory init module in PEI phase. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Quark.dsc | 3 +++ QuarkPlatformPkg/Quark.fdf | 12 2 files changed, 15 insertions(+) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index be6b83d..c87bb17 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -184,6 +184,7 @@ !if $(TPM_12_HARDWARE) == INFINEON_I2C Tpm12DeviceLib|QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12DeviceLibInfineonI2c.inf !endif + + TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNu + ll.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf !endif @@ -843,7 +844,9 @@ # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) + SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf SecurityPkg/Tcg/TcgDxe/TcgDxe.inf + SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif # diff --git a/QuarkPlatformPkg/Quark.fdf b/QuarkPlatformPkg/Quark.fdf index c196d21..9f51eb3 100644 --- a/QuarkPlatformPkg/Quark.fdf +++ b/QuarkPlatformPkg/Quark.fdf @@ -574,7 +574,9 @@ INF FatPkg/EnhancedFatDxe/Fat.inf # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) +INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf +INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif @@ -724,6 +726,16 @@ INF RuleOverride = TIANOCOMPRESSED PerformancePkg/Dp_App/Dp.inf VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } +[Rule.Common.DXE_SMM_DRIVER.DRIVER_ACPITABLE] + FILE SMM = $(NAMED_GUID) { +DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex +PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi +RAW ACPI Optional|.acpi +RAW ASL Optional|.aml +UISTRING="$(MODULE_NAME)" Optional +VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + [Rule.Common.SMM_CORE] FILE SMM_CORE = $(NAMED_GUID) { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 27, 2016 22:58 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch] QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg Add a Readme.md for the QuarkPlatformPkg that describes how to build, boot, debug, and enable/disable features for the Intel(R) Galileo Development Board and the Intel(R) Galileo Gen 2 Development Board. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Readme.md | 666 + 1 file changed, 666 insertions(+) create mode 100644 QuarkPlatformPkg/Readme.md diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md new file mode 100644 index 000..04582cd --- /dev/null +++ b/QuarkPlatformPkg/Readme.md @@ -0,0 +1,666 @@ +# **EDK II firmware for Intel(R) Quark SoC X1000 based platforms** + +## **Features** +* UEFI firmware image with ability to enable/disable major features such as +- Logging +- Source level debug using [Intel(R) UEFI Development Kit Debugger Tool]( + https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool) +- Boot Performance Measurements +- UEFI Secure Boot with Physical Presence +- TCG Measured Boot using TPM 1.2 hardware devices on I2C bus +* Minimal firmware image for initial power-on and debug +* UEFI Shell built into FLASH image +* UEFI Linux operating system boot support from Micro SD FLASH +* Hardware Support +- [Intel(R) Quark SoC X1000 CPU]( + http://www.intel.com/content/www/us/en/embedded/products/quark/quark-x1000-datasheet.html) +- [Intel(R) Galileo Development Board]( + http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-g1-datasheet.html) +- [Intel(R) Galileo Gen 2 Development Board]( + http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html) +- HPET Timer +- Real Time Clock +* Major I/O Subsystems +- PCI including support for Mini PCI Express Cards +- USB using EHCI and OHCI host controllers +- Micro SD FLASH with FAT file system support +- Serial UART up to 921600 baud for console, logging, and debug +* ACPI Tables with ACPI S3 sleep state support +* SMBIOS Tables + +## **Windows Build Instructions** + +### Pre-requisites + +* GIT client: Available from https://git-scm.com/downloads +* Microsoft Visual Studio. + - Visual Studio 2015 recommended and is used in the examples below. +* Microsoft Windows Driver Development Kit 3790.1830 + - +http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81 +fc4093ecfd/1830_usa_ddk.iso + - Mount ISO image + - Right click on ```x86\kitsetup.exe``` & choose **Run as +administrator** + - Install to C:\WINDDK\3790.1830 + - Uncheck all Component Groups + - Expand Build Environment Component + - Check Windows Driver Development Kit 16-bit Additional Build Tools + - Install +* ASL compiler: Available from http://www.acpica.org + - Install into ```C:\ASL``` to match default tools_def.txt configuration. + +Create a new directory for an EDK II WORKSPACE. + +The code block below shows the GIT clone operations required to pull +the EDK II source tree, the FatPkg sources, the pre-built versions of +BaseTools as WIN32 binaries, and the edk2-non-osi repository that +provides a binary file for the Quark Remote Management Unit (RMU). + +Next it sets environment variables that must be set before running +```edksetup.bat```. Since content is being pulled from multiple +repositories, the EDK II [Multiple Workspace]( +https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspac +e) +feature is used. + +Next, the ```edksetup.bat``` file is run to complete the initialization +of an EDK II build environment. Two example build commands are shown. +The first one in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI +firmware image that is able to boot the built-in UEFI Shell and Linux +from a micro SD FLASH card. The second one in +```QuarkPlatformPkg/QuarkMin.dsc``` builds a minimal firmware image that is useful for initial power-on and debug of new features. + +```cmd +git clone https://github.com/tianocore/edk2.git +git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg git clone +https://github.com/tianocore/edk2-BaseTools-win32.git +git clone https://github.com/tianocore/edk2-non-osi.git + +set WORKSPACE=%CD% +set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi +set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32 + +cd edk2 +edksetup.bat + +build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc build -a IA32 +-t VS2015x86 -p QuarkPl
Re: [edk2] [PATCH 11/12] QuarkPlatformPkg: Add Tpm12DeviceLib instance for Infineon I2C TPM
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 20, 2016 18:10 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [PATCH 11/12] QuarkPlatformPkg: Add Tpm12DeviceLib instance for Infineon I2C TPM Add Tpm12DeviceLib instance for Infineon I2C TPM Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- .../Library/Tpm12DeviceLibInfineonI2c/TisPc.c | 618 + .../Tpm12DeviceLibInfineonI2c.inf | 44 ++ .../Tpm12DeviceLibInfineonI2c.uni | 21 + 3 files changed, 683 insertions(+) create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/TisPc.c create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12DeviceLibInfineonI2c.inf create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12DeviceLibInfineonI2c.uni diff --git a/QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/TisPc.c b/QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/TisPc.c new file mode 100644 index 000..8821365 --- /dev/null +++ b/QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/TisPc.c @@ -0,0 +1,618 @@ +/** @file + Basic TIS (TPM Interface Specification) functions for Infineon I2C TPM. + + Copyright (c) 2013 - 2016, Intel Corporation. All rights + reserved. This program and the accompanying materials are + licensed and made available under the terms and conditions of the BSD + License which accompanies this distribution. The full text of the + license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include +#include +#include +#include +#include +#include + +// +// Default TPM (Infineon SLB9645) I2C Slave Device Address on Crosshill board. +// +#define TPM_I2C_SLAVE_DEVICE_ADDRESS 0x20 + +// +// Default Infineon SLB9645 TPM I2C mapped registers (SLB9645 I2C Comm. Protocol Application Note). +// +#define INFINEON_TPM_ACCESS_0_ADDRESS_DEFAULT 0x0 +#define INFINEON_TPM_STS_0_ADDRESS_DEFAULT0x01 +#define INFINEON_TPM_BURST0_COUNT_0_DEFAULT 0x02 +#define INFINEON_TPM_BURST1_COUNT_0_DEFAULT 0x03 +#define INFINEON_TPM_DATA_FIFO_0_ADDRESS_DEFAULT 0x05 +#define INFINEON_TPM_DID_VID_0_DEFAULT0x09 + +// +// Max. retry count for read transfers (as recommended by Infineon). +// +#define READ_RETRY 3 + +// +// Guard time of 250us between I2C read and next I2C write transfer (as recommended by Infineon). +// +#define GUARD_TIME 250 + +// +// Define bits of ACCESS and STATUS registers // + +/// +/// This bit is a 1 to indicate that the other bits in this register are valid. +/// +#define TIS_PC_VALIDBIT7 +/// +/// Indicate that this locality is active. +/// +#define TIS_PC_ACC_ACTIVE BIT5 +/// +/// Set to 1 to indicate that this locality had the TPM taken away +while /// this locality had the TIS_PC_ACC_ACTIVE bit set. +/// +#define TIS_PC_ACC_SEIZED BIT4 +/// +/// Set to 1 to indicate that TPM MUST reset the /// TIS_PC_ACC_ACTIVE +bit and remove ownership for localities less than the /// locality that +is writing this bit. +/// +#define TIS_PC_ACC_SEIZEBIT3 +/// +/// When this bit is 1, another locality is requesting usage of the TPM. +/// +#define TIS_PC_ACC_PENDIND BIT2 +/// +/// Set to 1 to indicate that this locality is requesting to use TPM. +/// +#define TIS_PC_ACC_RQUUSE BIT1 +/// +/// A value of 1 indicates that a T/OS has not been established on the +platform /// +#define TIS_PC_ACC_ESTABLISHBIT0 + +/// +/// When this bit is 1, TPM is in the Ready state, /// indicating it is +ready to receive a new command. +/// +#define TIS_PC_STS_READYBIT6 +/// +/// Write a 1 to this bit to cause the TPM to execute that command. +/// +#define TIS_PC_STS_GO BIT5 +/// +/// This bit indicates that the TPM has data available as a response. +/// +#define TIS_PC_STS_DATA BIT4 +/// +/// The TPM sets this bit to a value of 1 when it expects another byte of data for a command. +/// +#define TIS_PC_STS_EXPECT BIT3 +/// +/// Writes a 1 to this bit to force the TPM to re-send the response. +/// +#define TIS_PC_STS_RETRYBIT1 + +// +// Default TimeOut values in microseconds // +#define TIS_TIMEOUT_A (750 * 1000) // 750ms +#define TIS_TIMEOUT_B (2000 * 1000) // 2s +#define TIS_TIMEOUT_C (750 * 1000) // 750ms +#define TIS_TIMEOUT_D (750 * 1000) // 750ms + +// +// Global variable to in
Re: [edk2] [PATCH 10/12] QuarkPlatformPkg: Add Tpm12DeviceLib instance for Atmel I2C TPM
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 20, 2016 18:10 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [PATCH 10/12] QuarkPlatformPkg: Add Tpm12DeviceLib instance for Atmel I2C TPM Add new Tpm12DeviceLib instance for an Atmel I2C TPM Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- .../Library/Tpm12DeviceLibAtmelI2c/TisPc.c | 419 + .../Tpm12DeviceLibAtmelI2c.inf | 45 +++ .../Tpm12DeviceLibAtmelI2c.uni | 21 ++ 3 files changed, 485 insertions(+) create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/Tpm12DeviceLibAtmelI2c.inf create mode 100644 QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/Tpm12DeviceLibAtmelI2c.uni diff --git a/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c new file mode 100644 index 000..4e5aa41 --- /dev/null +++ b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c @@ -0,0 +1,419 @@ +/** @file + Basic TIS (TPM Interface Specification) functions for Atmel I2C TPM. + + Copyright (c) 2016, Intel Corporation. All rights reserved. This + program and the accompanying materials are licensed and made + available under the terms and conditions of the BSD License which + accompanies this distribution. The full text of the license may be + found at http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include +#include +#include +#include +#include +#include +#include + +// +// Atmel I2C TPM slave address +// +#define ATMEL_I2C_TPM_SLAVE_ADDRESS 0x29 + +// +// Maximum I2C transfer size for Atmel I2C TPM // #define +ATMEL_I2C_TPM_MAX_TRANSFER_SIZE 0x10 + +// +// Default TimeOut values in microseconds // #define TIS_TIMEOUT_A ( +750 * 1000) // 750ms #define TIS_TIMEOUT_B (2000 * 1000) // 2s +#define TIS_TIMEOUT_C ( 750 * 1000) // 750ms #define TIS_TIMEOUT_D ( +750 * 1000) // 750ms + +/** + Send command to Atmel I2c TPM breaking request up into multiple I2C +transfers + if required. + + @param[in] Buffer Pointer to TPM command data. + @param[in] Length Number of bytes of TPM command data. + + @retval EFI_SUCCESSTPM command sent. + @retval EFI_NOT_FOUND TPM chip doesn't exit. + @retval EFI_TIMEOUTCan't get the TPM control in time. +**/ +EFI_STATUS +WriteTpmBufferMultiple ( + IN UINT8 *Buffer, + IN UINTN Length + ) +{ + EFI_STATUS Status; + EFI_I2C_DEVICE_ADDRESS I2CDeviceAddr; + UINTN Index; + UINTN PartialLength; + + I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS; + + DEBUG ((EFI_D_VERBOSE, "WriteTpmBufferMultiple: Addr=%02x + Length=%02x\n", I2CDeviceAddr.I2CDeviceAddress, Length)); + + for (PartialLength = 0; Length > 0; Length -= PartialLength, Buffer += PartialLength) { +// +// Write data to TPM. +// +PartialLength = MIN (Length, ATMEL_I2C_TPM_MAX_TRANSFER_SIZE); +Status = I2cWriteMultipleByte ( + I2CDeviceAddr, + EfiI2CSevenBitAddrMode, + , + Buffer + ); +DEBUG ((EFI_D_VERBOSE, " ")); +for (Index = 0; Index < PartialLength; Index++) { + DEBUG ((EFI_D_VERBOSE, "%02x ", Buffer[Index])); +} +DEBUG ((EFI_D_VERBOSE, "\n")); +if (EFI_ERROR (Status)) { + DEBUG ((EFI_D_VERBOSE, " Status = %r\n", Status)); + return Status; +} + } + + DEBUG ((EFI_D_VERBOSE, " Status = %r\n", Status)); + return Status; +} + +/** + Receive a response to a command from Atmel I2c TPM breaking response +into + multiple I2C transfers if required. + + @param[out] Buffer Pointer to TPM response data. + @param[in] Length Maximum number of bytes to receive. + + @retval EFI_SUCCESSTPM response received. + @retval EFI_NOT_FOUND TPM chip doesn't exit. + @retval EFI_TIMEOUTCan't get the TPM control in time. +**/ +EFI_STATUS +ReadTpmBufferMultiple ( + OUT UINT8 *Buffer, + IN UINTN Length + ) +{ + EFI_STATUS Status; + EFI_I2C_DEVICE_ADDRESS I2CDeviceAddr; + UINTN WriteLength; + UINTN Index; + UINTN PartialLength; + + I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS; + WriteLength = 0; + + DEBUG ((EFI_D_VERBOSE, "ReadTpmBufferMultiple: Addr=%02x + Length=%02x\n", I2CDeviceA
Re: [edk2] [PATCH 12/12] QuarkPlatformPkg: Add MEASURED_BOOT_ENABLE feature
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 20, 2016 18:10 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [PATCH 12/12] QuarkPlatformPkg: Add MEASURED_BOOT_ENABLE feature Add MEASURED_BOOT_ENABLE flag Add TPM_12_HARDWARE flag Add TrEEConfigPei to detect TPM 1.2 hardware device Use Tpm12DeviceLib instance for Atmel I2C TPM Use Tpm12DeviceLib instance for Infineon I2C TPM Add TcgPei and TcgDxe modules for TPM 1.2 support Clean up TpmMeasurementLib mappings Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Quark.dsc | 84 +- QuarkPlatformPkg/Quark.fdf | 13 ++- 2 files changed, 81 insertions(+), 16 deletions(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 3051551..485dca5 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -2,7 +2,7 @@ # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices. # # This package provides Clanton Peak CRB platform specific modules. -# Copyright (c) 2013 - 2014 Intel Corporation. +# Copyright (c) 2013 - 2016 Intel Corporation. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -34,11 +34,21 @@ # # Platform On/Off features are defined here # - DEFINE GALILEO = GEN2 - DEFINE SECURE_BOOT_ENABLE = FALSE - DEFINE SOURCE_DEBUG_ENABLE = FALSE - DEFINE PERFORMANCE_ENABLE = FALSE - DEFINE LOGGING = FALSE + DEFINE SECURE_BOOT_ENABLE = FALSE + DEFINE MEASURED_BOOT_ENABLE = FALSE + DEFINE SOURCE_DEBUG_ENABLE = FALSE + DEFINE PERFORMANCE_ENABLE = FALSE + DEFINE LOGGING = FALSE + + # + # Galileo board. Options are [GEN1, GEN2] # + DEFINE GALILEO = GEN2 + + # + # TPM 1.2 Hardware. Options are [NONE, LPC, ATMEL_I2C, INFINEON_I2C] + # + DEFINE TPM_12_HARDWARE = NONE !if $(TARGET) == "DEBUG" DEFINE LOGGING = TRUE @@ -148,17 +158,36 @@ !else PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf !endif -!if $(SECURE_BOOT_ENABLE) + +!if $(SECURE_BOOT_ENABLE) || $(MEASURED_BOOT_ENABLE) + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +!endif + +!if $(SECURE_BOOT_ENABLE) PlatformSecureLib|QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf !endif + +!if $(MEASURED_BOOT_ENABLE) + +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf + +Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf +!if $(TPM_12_HARDWARE) == LPC + +Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTp +m.inf +!endif +!if $(TPM_12_HARDWARE) == ATMEL_I2C + +Tpm12DeviceLib|QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/Tpm12Dev +iceLibAtmelI2c.inf +!endif +!if $(TPM_12_HARDWARE) == INFINEON_I2C + +Tpm12DeviceLib|QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12 +DeviceLibInfineonI2c.inf +!endif +!else + +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf +!endif + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf # @@ -218,7 +247,7 @@ TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf PlatformHelperLib|QuarkPlatformPkg/Library/PlatformHelperLib/PeiPlatformHelperLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf -!if $(SECURE_BOOT_ENABLE) +!if $(SECURE_BOOT_ENABLE) || $(MEASURED_BOOT_ENABLE) BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !endif !if $(PERFORMANCE_ENABLE) @@ -241,7 +270,7 @@ PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf -!if $(SECURE_BOOT_ENABLE) +!if $(SECURE_BOOT_ENABLE) || $(MEASURED_BOOT_ENABLE) BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf !endif !if $(PERFORMANCE_ENABLE) @@ -254,7
Re: [edk2] [Patch] QuarkPlatformPkg/Quark.dsc: Update for rename of UI libraries
Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 20, 2016 17:31 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Bi, Dandan <dandan...@intel.com> Subject: [Patch] QuarkPlatformPkg/Quark.dsc: Update for rename of UI libraries Rename the Ui libraries,so need to update the QuarkPlatformPkg.dsc file. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Dandan Bi <dandan...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Quark.dsc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 3051551..d2d0842 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -2,7 +2,7 @@ # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices. # # This package provides Clanton Peak CRB platform specific modules. -# Copyright (c) 2013 - 2014 Intel Corporation. +# Copyright (c) 2013 - 2016 Intel Corporation. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -628,9 +628,9 @@ } MdeModulePkg/Application/UiApp/UiApp.inf { - NULL|MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.inf - NULL|MdeModulePkg/Library/BootManagerLib/BootManagerLib.inf - NULL|MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.inf + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceM + anagerUiLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] QuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot
Looks good to me. Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Yao, Jiewen Sent: January 06, 2016 18:05 To: Kinney, Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com> Subject: RE: [Patch] QuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot Reviewed by: jiewen@intel.com -Original Message- From: Kinney, Michael D Sent: Thursday, January 07, 2016 9:50 AM To: edk2-devel@lists.01.org Cc: Steele, Kelly; Yao, Jiewen Subject: [Patch] QuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot Update memory bin sizes in Memory Type Information on first boot after FLASH update to avoid reboot when memory bins are too small when all features are enabled. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h index e0f06a3..d2bcf57 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.h @@ -1,7 +1,7 @@ /** @file Framework PEIM to initialize memory on an DDR2 SDRAM Memory Controller. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016 Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -22,11 +22,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Define the default memory areas required // -#define EDKII_RESERVED_SIZE_PAGES 0x40 -#define ACPI_NVS_SIZE_PAGES 0x40 +#define EDKII_RESERVED_SIZE_PAGES 0x20 +#define ACPI_NVS_SIZE_PAGES 0x60 #define RUNTIME_SERVICES_DATA_SIZE_PAGES 0x20 -#define RUNTIME_SERVICES_CODE_SIZE_PAGES 0x60 -#define ACPI_RECLAIM_SIZE_PAGES 0x10 +#define RUNTIME_SERVICES_CODE_SIZE_PAGES 0x80 +#define ACPI_RECLAIM_SIZE_PAGES 0x20 #define EDKII_DXE_MEM_SIZE_PAGES 0x20 #define AP_STARTUP_VECTOR 0x00097000 -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/3] QuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use
Looks good to me. Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 06, 2016 18:00 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch 1/3] QuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use The functions used to manage the PCAL GPIO I2C expander are located in a DXE specific source file. Move these functions to a source file that is common to both the PEI and DXE versions of this library so these GPIO pins can be managed from PEIMs. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- .../Library/PlatformHelperLib/PlatformHelperDxe.c | 250 +--- .../Library/PlatformHelperLib/PlatformHelperLib.c | 253 - 2 files changed, 253 insertions(+), 250 deletions(-) diff --git a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c index 9cfbc07..18dbd8b 100644 --- a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c +++ b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c @@ -1,7 +1,7 @@ /** @file Implementation of helper routines for DXE environment. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016 Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include #include #include @@ -48,135 +47,6 @@ EFI_SPI_PROTOCOL *mPlatHelpSpiProtocolRef = NULL; // Routines shared with other souce modules in this component. // -BOOLEAN -Pcal9555GetPortRegBit ( - IN CONST UINT32 Pcal9555SlaveAddr, - IN CONST UINT32 GpioNum, - IN CONST UINT8 RegBase - ) -{ - EFI_STATUSStatus; - UINTN ReadLength; - UINTN WriteLength; - UINT8 Data[2]; - EFI_I2C_DEVICE_ADDRESSI2cDeviceAddr; - EFI_I2C_ADDR_MODE I2cAddrMode; - UINT8 *RegValuePtr; - UINT8 GpioNumMask; - UINT8 SubAddr; - - I2cDeviceAddr.I2CDeviceAddress = (UINTN) Pcal9555SlaveAddr; - I2cAddrMode = EfiI2CSevenBitAddrMode; - - if (GpioNum < 8) { -SubAddr = RegBase; -GpioNumMask = (UINT8) (1 << GpioNum); - } else { -SubAddr = RegBase + 1; -GpioNumMask = (UINT8) (1 << (GpioNum - 8)); - } - - // - // Output port value always at 2nd byte in Data variable. - // - RegValuePtr = [1]; - - // - // On read entry sub address at 2nd byte, on read exit output - // port value in 2nd byte. - // - Data[1] = SubAddr; - WriteLength = 1; - ReadLength = 1; - Status = I2cReadMultipleByte ( - I2cDeviceAddr, - I2cAddrMode, - , - , - [1] - ); - ASSERT_EFI_ERROR (Status); - - // - // Adjust output port bit given callers request. - // - return ((*RegValuePtr & GpioNumMask) != 0); -} - -VOID -Pcal9555SetPortRegBit ( - IN CONST UINT32 Pcal9555SlaveAddr, - IN CONST UINT32 GpioNum, - IN CONST UINT8 RegBase, - IN CONST BOOLEANLogicOne - ) -{ - EFI_STATUSStatus; - UINTN ReadLength; - UINTN WriteLength; - UINT8 Data[2]; - EFI_I2C_DEVICE_ADDRESSI2cDeviceAddr; - EFI_I2C_ADDR_MODE I2cAddrMode; - UINT8 *RegValuePtr; - UINT8 GpioNumMask; - UINT8 SubAddr; - - I2cDeviceAddr.I2CDeviceAddress = (UINTN) Pcal9555SlaveAddr; - I2cAddrMode = EfiI2CSevenBitAddrMode; - - if (GpioNum < 8) { -SubAddr = RegBase; -GpioNumMask = (UINT8) (1 << GpioNum); - } else { -SubAddr = RegBase + 1; -GpioNumMask = (UINT8) (1 << (GpioNum - 8)); - } - - // - // Output port value always at 2nd byte in Data variable. - // - RegValuePtr = [1]; - - // - // On read entry sub address at 2nd byte, on read exit output - // port value in 2nd byte. - // - Data[1] = SubAddr; - WriteLength = 1; - ReadLength = 1; - Status = I2cReadMultipleByte ( - I2cDeviceAddr, - I2cAddrMode, - , - , - [1] - ); - ASSERT_EFI_ERROR (Status); - - // -
Re: [edk2] [Patch 3/3] QuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config
It looks good, but should we assign DEFINES to some of the "magic" numbers such as: Buffer[1] = 5; Etc.. Reviewed by: Kelly Steele <kelly.ste...@intel.com> -Original Message- From: Kinney, Michael D Sent: January 06, 2016 18:00 To: edk2-devel@lists.01.org Cc: Steele, Kelly <kelly.ste...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [Patch 3/3] QuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config Remove GPIO expander configuration actions that are now performed in PEI Phase in PlatformInit module. In order to detect physical presence only the state of the Reset Button needs to be read. Cc: Kelly Steele <kelly.ste...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- .../Library/PlatformSecureLib/PlatformSecureLib.c | 73 ++ 1 file changed, 6 insertions(+), 67 deletions(-) diff --git a/QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.c b/QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.c index 169980c..eb001cd 100644 --- a/QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.c +++ b/QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.c @@ -1,7 +1,7 @@ /** @file Provides a secure platform-specific method to detect physically present user. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016 Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -39,26 +39,9 @@ CheckResetButtonState ( UINTN ReadLength; UINT8 Buffer[2]; - DEBUG ((EFI_D_ERROR, "CheckResetButtonState(): mPlatformType == %d\n", mPlatformType)); + DEBUG ((EFI_D_INFO, "CheckResetButtonState(): mPlatformType == %d\n", + mPlatformType)); if (mPlatformType == GalileoGen2) { // -// Reset Button - EXP2.P1_7 should be configured as an input. -// -PlatformPcal9555GpioSetDir ( - GALILEO_GEN2_IOEXP2_7BIT_SLAVE_ADDR, // IO Expander 2. - 15, // P1-7. - FALSE - ); - -// -// Reset Button - EXP2.P1_7 pullup should be disabled. -// -PlatformPcal9555GpioDisablePull ( - GALILEO_GEN2_IOEXP2_7BIT_SLAVE_ADDR, // IO Expander 2. - 15// P1-7. - ); - -// // Read state of Reset Button - EXP2.P1_7 // This GPIO is pulled high when the button is not pressed // This GPIO reads low when button is pressed @@ -77,58 +60,14 @@ CheckResetButtonState ( } else { I2CSlaveAddress.I2CDeviceAddress = GALILEO_IOEXP_J2LO_7BIT_SLAVE_ADDR; } - +DEBUG ((EFI_D_INFO, "Galileo GPIO Expender Slave Address = %02x\n", + I2CSlaveAddress.I2CDeviceAddress)); + // -// Select Port 5 -// -Length = 2; -Buffer[0] = 0x18; -Buffer[1] = 0x05; -Status = I2cWriteMultipleByte ( - I2CSlaveAddress, - EfiI2CSevenBitAddrMode, - , - - ); -ASSERT_EFI_ERROR (Status); - -// -// Read "Pin Direction" of Port 5 -// -Length = 1; -ReadLength = 1; -Buffer[1] = 0x1C; -Status = I2cReadMultipleByte ( - I2CSlaveAddress, - EfiI2CSevenBitAddrMode, - , - , - [1] - ); -ASSERT_EFI_ERROR (Status); - -// -// Set "Pin Direction" of Port 5, Bit 0 as input -// -Length = 2; -Buffer[0] = 0x1C; -Buffer[1] = Buffer[1] | BIT0; - -Status = I2cWriteMultipleByte ( - I2CSlaveAddress, - EfiI2CSevenBitAddrMode, - , - - ); -ASSERT_EFI_ERROR (Status); - -// -// Read Port 5 +// Read state of RESET_N_SHLD (GPORT5_BIT0) // Buffer[1] = 5; Length = 1; ReadLength = 1; - Status = I2cReadMultipleByte ( I2CSlaveAddress, EfiI2CSevenBitAddrMode, @@ -139,7 +78,7 @@ CheckResetButtonState ( ASSERT_EFI_ERROR (Status); // -// Return the state of Port 5, Bit 0 +// Return the state of GPORT5_BIT0 // return ((Buffer[1] & BIT0) != 0); } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel