]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFsp2Pkg: Remove CarBase and CarSize from FSP_GLOBAL_DATA
authorSatya Yarlagadda <satya.p.yarlagadda@intel.com>
Wed, 20 Jul 2016 06:49:15 +0000 (14:49 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Sat, 23 Jul 2016 01:20:04 +0000 (09:20 +0800)
CarBase and CarSize in Fsp Global data structure are no longer needed as
Boot loader doesn't pass them to FSP even in case that BL chooses to skip calling
the FspTempRamInit API. In case of FspTempramInit is called, we can use the PCDs
to identify the CarBase and Size. Hence we remove the relevant code.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
IntelFsp2Pkg/FspSecCore/SecFsp.c
IntelFsp2Pkg/Include/FspGlobalData.h
IntelFsp2Pkg/Include/Library/FspCommonLib.h
IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c

index 7259a55bbd9cce4c9c4f0e1525c9ff4efe52d19a..96f8fb755467f596eac12c1288da478c8a11e762 100644 (file)
@@ -76,7 +76,7 @@ SecGetPlatformData (
   //\r
   // Pointer to the size field\r
   //\r
-  TopOfCar = FspPlatformData->CarBase + FspPlatformData->CarSize;\r
+  TopOfCar = PcdGet32(PcdTemporaryRamBase) + PcdGet32(PcdTemporaryRamSize);\r
   StackPtr = (UINT32 *)(TopOfCar - sizeof (UINT32));\r
 \r
   if (*(StackPtr - 1) == FSP_MCUD_SIGNATURE) {\r
@@ -140,8 +140,6 @@ FspGlobalDataInit (
   PeiFspData->CoreStack            = BootLoaderStack;\r
   PeiFspData->PerfIdx              = 2;\r
   PeiFspData->PerfSig              = FSP_PERFORMANCE_DATA_SIGNATURE;\r
-  PeiFspData->PlatformData.CarBase = AsmReadMsr32 (0x200) & ~(0x6);\r
-  PeiFspData->PlatformData.CarSize = ~(AsmReadMsr32(0x201) & ~(0x800)) + 1;\r
 \r
   SetFspMeasurePoint (FSP_PERF_ID_API_FSP_MEMORY_INIT_ENTRY);\r
 \r
index a484d16dcc9aba47a606a15aa8898251d5f94710..8ac3199bab9147542a7545f326c10debb770e272 100644 (file)
@@ -34,8 +34,6 @@ typedef struct  {
    UINT32             MicrocodeRegionSize;\r
    UINT32             CodeRegionBase;\r
    UINT32             CodeRegionSize;\r
-   UINT32             CarBase;\r
-   UINT32             CarSize;\r
 } FSP_PLAT_DATA;\r
 \r
 #define FSP_GLOBAL_DATA_SIGNATURE  SIGNATURE_32 ('F', 'S', 'P', 'D')\r
index 231f1e44b3b715f10b86be750be41e23eb04b876..5f7a14b9b24a98671c239ddf71c2dd59728fd664 100644 (file)
@@ -289,26 +289,6 @@ SetPhaseStatusCode (
   UINT32  StatusCode\r
   );\r
 \r
-/**\r
-  This function gets FSP CAR base.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-GetFspCarBase (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  This function gets FSP CAR size.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-GetFspCarSize (\r
-  VOID\r
-  );\r
-\r
 /**\r
   This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.\r
 \r
index 0c5f0b306ea4a187ea86b60abf6d843216ce595f..660e9fc696f5c20edd9cb2f785758f4550982896 100644 (file)
@@ -504,48 +504,6 @@ SetPhaseStatusCode (
   FspData->StatusCode = StatusCode;\r
 }\r
 \r
-/**\r
-  This function gets FSP CAR base.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-GetFspCarBase (\r
-  VOID\r
-  )\r
-{\r
-  FSP_GLOBAL_DATA  *FspData;\r
-  UINT32           CarBase;\r
-\r
-  FspData  = GetFspGlobalDataPointer ();\r
-  CarBase = FspData->PlatformData.CarBase;\r
-  if (CarBase == 0) {\r
-    CarBase = PcdGet32(PcdTemporaryRamBase);\r
-  }\r
-  return CarBase;\r
-}\r
-\r
-/**\r
-  This function gets FSP CAR size.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-GetFspCarSize (\r
-  VOID\r
-  )\r
-{\r
-  FSP_GLOBAL_DATA  *FspData;\r
-  UINT32           CarSize;\r
-\r
-  FspData  = GetFspGlobalDataPointer ();\r
-  CarSize = FspData->PlatformData.CarSize;\r
-  if (FspData->PlatformData.CarBase == 0) {\r
-    CarSize = PcdGet32(PcdTemporaryRamSize);\r
-  }\r
-  return CarSize;\r
-}\r
-\r
 /**\r
   This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.\r
 \r