Reviewed-by: Mang Guo <mang....@intel.com<mailto:mang....@intel.com>>
From: Steele, Kelly Sent: Monday, September 24, 2018 9:29 PM To: edk2-devel@lists.01.org Cc: Wei, David; Guo, Mang Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Shift EEPROM PEI files >From 1ae6e8934e17e0a0d20d169551d852cf3e8a1227 Mon Sep 17 00:00:00 2001 From: Kelly Steele <kelly.ste...@intel.com> 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 <kelly.ste...@intel.com> --- .../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..0000000000000000000000000000000000000000 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 b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/Pei/GetImagePei.c similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/GetImagePei.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/Pei/GetImagePei.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memory/HobDataPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memory/Pei/HobDataPei.c similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memory/HobDataPei.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memory/Pei/HobDataPei.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Pei/MemoryAllocationPei.c similarity index 95% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Pei/MemoryAllocationPei.c index 71abbaed75..76c7ed798e 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Pei/MemoryAllocationPei.c @@ -315,10 +315,12 @@ GetEepromMemoryHob (VOID) // // Create HOB // + if (mEepromDataLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); ZeroMem (&AllocationHeader, sizeof (EEPROM_ALLOCATION_STRUCT)); AllocationHeader.Signature = ALLOCATION_HOB_HEADER_SIGNATURE; HeaderPointer = BuildGuidDataHob (&gEepromVariableGuid, &AllocationHeader, MAX_EEPROM_HOB_SIZE); if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HeaderPointer = %08x\n", __FUNCTION__, __LINE__, HeaderPointer)); + if (mEepromDataLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); Exit: if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - AllocationHob @ %08x\n", __FUNCTION__, __LINE__, HeaderPointer)); diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc index db7cba5f46..1606e04379 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc @@ -91,7 +91,15 @@ !else gPlatformModuleTokenSpaceGuid.PcdSerialIoUartNumber|2 !endif - # - # EEPROM GPIO Whitelist - gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList | {0x08, 0x05, 0xC0, 0x00, 0x78, 0x05, 0xC0, 0x00, 0x80, 0x05, 0xC0, 0x00, 0x88, 0x05, 0xC0, 0x00, 0x90, 0x05, 0xC0, 0x00, 0xA0, 0x05, 0xC0, 0x00, 0xC8, 0x05, 0xC0, 0x00, 0xD0, 0x05, 0xC0, 0x00, 0xE0, 0x05, 0xC0, 0x00, 0xF0, 0x05, 0xC0, 0x00, 0xF8, 0x05, 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, 0x06, 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, 0x0 5, 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, 0x00, 0x70, 0x05, 0xC7, 0x00, 0x78, 0x05, 0xC7, 0x00, 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} - + + !if $(MINNOW3_MODULE_BOARD) == TRUE + # + # I2C bus the master EEPROM is hanging on + gPlatformModuleTokenSpaceGuid.PcdEepromBus|0x08 + # 7-bit address of the master EEPROM + gPlatformModuleTokenSpaceGuid.PcdEepromAddress|0x10 + # EEPROM GPIO Whitelist for MB3M (should think about shifting to SkuId specfic PCD to allow for other platforms). + # +-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+------- ----------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-------------------- ---+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+ + # | 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 | W_GPIO_127 | W_GPIO_132 | W_GPIO_133 | W_GPIO_134 | W_GPIO_135 | W_GPIO_136 | W_GPIO_137 | 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 -- 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel