VirtualBox

Ignore:
Timestamp:
Mar 31, 2025 11:31:09 AM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168237
Message:

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
3 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c

    r105670 r108794  
    44  notify to call FspSiliconInit API.
    55
    6   Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
     6  Copyright (c) 2014 - 2024, Intel Corporation. All rights reserved.<BR>
    77  SPDX-License-Identifier: BSD-2-Clause-Patent
    88
     
    3939#include <FspGlobalData.h>
    4040#include <Library/FspCommonLib.h>
     41#include <Guid/MigratedFvInfo.h>
    4142
    4243extern EFI_GUID  gFspHobGuid;
     
    125126
    126127  //
    127   // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status
    128   //
    129   if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
    130     DEBUG ((DEBUG_INFO, "FspMemoryInitApi requested reset %r\n", Status));
    131     CallFspWrapperResetSystem (Status);
    132   }
    133 
    134   if ((Status != FSP_STATUS_VARIABLE_REQUEST) && EFI_ERROR (Status)) {
    135     DEBUG ((DEBUG_ERROR, "ERROR - Failed to execute FspMemoryInitApi(), Status = %r\n", Status));
    136     ASSERT_EFI_ERROR (Status);
    137   }
    138 
    139   DEBUG ((DEBUG_INFO, "FspMemoryInit status: %r\n", Status));
    140   if (Status == FSP_STATUS_VARIABLE_REQUEST) {
    141     //
    142     // call to Variable request handler
    143     //
    144     FspWrapperVariableRequestHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex);
    145   }
    146 
    147   //
    148   // See if MultiPhase process is required or not
    149   //
    150   FspWrapperMultiPhaseHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex);    // FspM MultiPhase
    151 
    152   //
    153   // Create hobs after memory initialization and not in temp RAM. Hence passing the recorded timestamp here
    154   //
    155   PERF_START_EX (&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);
    156   PERF_END_EX (&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
    157   DEBUG ((DEBUG_INFO, "Total time spent executing FspMemoryInitApi: %d millisecond\n", DivU64x32 (GetTimeInNanoSecond (AsmReadTsc () - TimeStampCounterStart), 1000000)));
    158 
    159   Status = TestFspMemoryInitApiOutput (FspmUpdDataPtr, &FspHobListPtr);
    160   if (EFI_ERROR (Status)) {
    161     DEBUG ((DEBUG_ERROR, "ERROR - TestFspMemoryInitApiOutput () fail, Status = %r\n", Status));
    162   }
    163 
    164   DEBUG ((DEBUG_INFO, "  FspHobListPtr (returned) - 0x%x\n", FspHobListPtr));
    165   ASSERT (FspHobListPtr != NULL);
    166 
    167   PostFspmHobProcess (FspHobListPtr);
    168 
    169   //
    170128  // FspHobList is not complete at this moment.
    171129  // Save FspHobList pointer to hob, so that it can be got later
     
    177135  ASSERT (HobData != NULL);
    178136  CopyMem (HobData, &FspHobListPtr, sizeof (FspHobListPtr));
     137
     138  //
     139  // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status
     140  //
     141  if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
     142    DEBUG ((DEBUG_INFO, "FspMemoryInitApi requested reset %r\n", Status));
     143    CallFspWrapperResetSystem (Status);
     144  }
     145
     146  if ((Status != FSP_STATUS_VARIABLE_REQUEST) && EFI_ERROR (Status)) {
     147    DEBUG ((DEBUG_ERROR, "ERROR - Failed to execute FspMemoryInitApi(), Status = %r\n", Status));
     148    ASSERT_EFI_ERROR (Status);
     149  }
     150
     151  DEBUG ((DEBUG_INFO, "FspMemoryInit status: %r\n", Status));
     152  if (Status == FSP_STATUS_VARIABLE_REQUEST) {
     153    //
     154    // call to Variable request handler
     155    //
     156    FspWrapperVariableRequestHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex);
     157  }
     158
     159  //
     160  // See if MultiPhase process is required or not
     161  //
     162  FspWrapperMultiPhaseHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex);    // FspM MultiPhase
     163
     164  //
     165  // Create hobs after memory initialization and not in temp RAM. Hence passing the recorded timestamp here
     166  //
     167  PERF_START_EX (&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);
     168  PERF_END_EX (&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
     169  DEBUG ((DEBUG_INFO, "Total time spent executing FspMemoryInitApi: %d millisecond\n", DivU64x32 (GetTimeInNanoSecond (AsmReadTsc () - TimeStampCounterStart), 1000000)));
     170
     171  Status = TestFspMemoryInitApiOutput (FspmUpdDataPtr, &FspHobListPtr);
     172  if (EFI_ERROR (Status)) {
     173    DEBUG ((DEBUG_ERROR, "ERROR - TestFspMemoryInitApiOutput () fail, Status = %r\n", Status));
     174  }
     175
     176  DEBUG ((DEBUG_INFO, "  FspHobListPtr (returned) - 0x%x\n", FspHobListPtr));
     177  ASSERT (FspHobListPtr != NULL);
     178
     179  PostFspmHobProcess (FspHobListPtr);
    179180
    180181  return Status;
     
    279280  )
    280281{
    281   UINT32  FspMeasureMask;
     282  UINT32                  FspMeasureMask;
     283  EFI_PHYSICAL_ADDRESS    FsptBaseAddress;
     284  EFI_PHYSICAL_ADDRESS    FspmBaseAddress;
     285  EDKII_MIGRATED_FV_INFO  *MigratedFvInfo;
     286  EFI_PEI_HOB_POINTERS    Hob;
    282287
    283288  DEBUG ((DEBUG_INFO, "TcgPpiNotify FSPM\n"));
    284289
    285   FspMeasureMask = PcdGet32 (PcdFspMeasurementConfig);
     290  FspMeasureMask  = PcdGet32 (PcdFspMeasurementConfig);
     291  FsptBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFsptBaseAddress);
     292  FspmBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFspmBaseAddress);
     293  Hob.Raw         = GetFirstGuidHob (&gEdkiiMigratedFvInfoGuid);
     294  while (Hob.Raw != NULL) {
     295    MigratedFvInfo = GET_GUID_HOB_DATA (Hob);
     296    if ((MigratedFvInfo->FvOrgBase == PcdGet32 (PcdFsptBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) {
     297      //
     298      // Found the migrated FspT raw data
     299      //
     300      FsptBaseAddress = MigratedFvInfo->FvDataBase;
     301    }
     302
     303    if ((MigratedFvInfo->FvOrgBase == PcdGet32 (PcdFspmBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) {
     304      FspmBaseAddress = MigratedFvInfo->FvDataBase;
     305    }
     306
     307    Hob.Raw = GET_NEXT_HOB (Hob);
     308    Hob.Raw = GetNextGuidHob (&gEdkiiMigratedFvInfoGuid, Hob.Raw);
     309  }
    286310
    287311  if ((FspMeasureMask & FSP_MEASURE_FSPT) != 0) {
     
    289313      0,
    290314      "FSPT",
    291       PcdGet32 (PcdFsptBaseAddress),
    292       (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFsptBaseAddress))->FvLength
     315      FsptBaseAddress,
     316      (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FsptBaseAddress)->FvLength
    293317      );
    294318  }
     
    298322      0,
    299323      "FSPM",
    300       PcdGet32 (PcdFspmBaseAddress),
    301       (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength
     324      FspmBaseAddress,
     325      (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FspmBaseAddress)->FvLength
    302326      );
    303327  }
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf

    r101291 r108794  
    77# notify to call FspSiliconInit API.
    88#
    9 #  Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
     9#  Copyright (c) 2014 - 2024, Intel Corporation. All rights reserved.<BR>
    1010#
    1111#  SPDX-License-Identifier: BSD-2-Clause-Patent
     
    7070  gFspHobGuid                           ## PRODUCES ## HOB
    7171  gFspApiPerformanceGuid                ## SOMETIMES_CONSUMES ## GUID
     72  gEdkiiMigratedFvInfoGuid              ## SOMETIMES_CONSUMES ## HOB
    7273
    7374[Ppis]
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c

    r101291 r108794  
    422422
    423423  MeasurementExcludedFvPpi = AllocatePool (sizeof (*MeasurementExcludedFvPpi));
    424   ASSERT (MeasurementExcludedFvPpi != NULL);
     424  if (MeasurementExcludedFvPpi == NULL) {
     425    ASSERT (MeasurementExcludedFvPpi != NULL);
     426    return EFI_OUT_OF_RESOURCES;
     427  }
     428
    425429  MeasurementExcludedFvPpi->Count          = 1;
    426430  MeasurementExcludedFvPpi->Fv[0].FvBase   = PcdGet32 (PcdFspsBaseAddress);
     
    428432
    429433  MeasurementExcludedPpiList = AllocatePool (sizeof (*MeasurementExcludedPpiList));
    430   ASSERT (MeasurementExcludedPpiList != NULL);
     434  if (MeasurementExcludedPpiList == NULL) {
     435    ASSERT (MeasurementExcludedPpiList != NULL);
     436    FreePool (MeasurementExcludedFvPpi);
     437    return EFI_OUT_OF_RESOURCES;
     438  }
     439
    431440  MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
    432441  MeasurementExcludedPpiList->Guid  = &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid;
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h

    r99404 r108794  
    1414#define FSP_MEASURE_FSPM    BIT2
    1515#define FSP_MEASURE_FSPS    BIT3
     16#define FSP_MEASURE_FSPI    BIT4
    1617#define FSP_MEASURE_FSPUPD  BIT31
    1718
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h

    r99404 r108794  
    7979  );
    8080
     81/**
     82  Call FSP API - FspSmmInit.
     83
     84  @param[in] FspiUpdDataPtr     Pointer to the FSPI_UPD data structure.
     85
     86  @return EFI status returned by FspSmmInit API.
     87**/
     88EFI_STATUS
     89EFIAPI
     90CallFspSmmInit (
     91  IN VOID  *FspiUpdDataPtr
     92  );
     93
    8194#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiTestLib.h

    r99404 r108794  
    5353  );
    5454
     55/**
     56  Test the output of FSP API - FspSmmInit.
     57
     58  @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure.
     59
     60  @return test result on output of FspSmmInit API.
     61**/
     62EFI_STATUS
     63EFIAPI
     64TestFspSmmInitApiOutput (
     65  IN  VOID  *FspiUpdDataPtr
     66  );
     67
    5568#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperHobProcessLib.h

    r99404 r108794  
    3636  );
    3737
     38/**
     39  Post FSP-I HOB process.
     40
     41  @param[in] FspHobList  Pointer to the HOB data structure produced by FSP.
     42
     43  @return If platform process the FSP hob list successfully.
     44**/
     45EFI_STATUS
     46EFIAPI
     47PostFspiHobProcess (
     48  IN VOID  *FspHobList
     49  );
     50
    3851#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperPlatformLib.h

    r99404 r108794  
    7878  );
    7979
     80/**
     81  This function overrides the default configurations in the FSP-I UPD data region.
     82
     83  @param[in,out] FspUpdRgnPtr   A pointer to the UPD data region data structure.
     84
     85**/
     86VOID
     87EFIAPI
     88UpdateFspiUpdData (
     89  IN OUT VOID  *FspUpdRgnPtr
     90  );
     91
    8092#endif
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec

    r99404 r108794  
    9191  gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi|0x00000000|UINT32|0x40000009
    9292
    93   ## This PCD decides how FSP is measured
    94   # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM.
    95   # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT.
    96   # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered
    97   # as configuration block, and it may be updated by OEM by design.
    98   # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region.
    99   # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2.
    100   # BIT1: Need measure FSPT. (for FSP 2.x)
    101   # BIT2: Need measure FSPM. (for FSP 2.x)
    102   # BIT3: Need measure FSPS. (for FSP 2.x)
    103   # BIT4~30: reserved.
    104   # BIT31: Need isolate UPD region measurement.
    105     #0: measure FSP[T|M|S] as one binary in one record (PCR0).
    106     #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0).
    107   #
    108   gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x4000000B
    109 
    11093[PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
    11194  ## This PCD decides how Wrapper code utilizes FSP
     
    11699
    117100  #
    118   ## These are the base address of FSP-M/S
     101  ## These are the base address of FSP-M/S/I
    119102  #
    120103  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000
    121104  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32|0x00001001
     105  gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress|0x00000000|UINT32|0x00001002
    122106  #
    123107  # To provide flexibility for platform to pre-allocate FSP UPD buffer
     
    138122  #
    139123  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64|0x00000000|UINT64|0x50000003
     124
     125  ## This PCD decides how FSP is measured
     126  # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM.
     127  # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT.
     128  # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered
     129  # as configuration block, and it may be updated by OEM by design.
     130  # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region.
     131  # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2.
     132  # BIT1: Need measure FSPT. (for FSP 2.x)
     133  # BIT2: Need measure FSPM. (for FSP 2.x)
     134  # BIT3: Need measure FSPS. (for FSP 2.x)
     135  # BIT4~30: reserved.
     136  # BIT31: Need isolate UPD region measurement.
     137    #0: measure FSP[T|M|S] as one binary in one record (PCR0).
     138    #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0).
     139  #
     140  gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x50000004
     141  #
     142  # To provide flexibility for platform to pre-allocate FSP UPD buffer
     143  #
     144  # The PCDs define the pre-allocated FSPI UPD Data Buffer Address.
     145  # 0x00000000 - Platform will not pre-allocate UPD buffer before FspWrapper module
     146  # non-zero   - Platform will pre-allocate UPD buffer and patch this value to
     147  #              buffer address before FspWrapper module executing.
     148  #
     149  gIntelFsp2WrapperTokenSpaceGuid.PcdFspiUpdDataAddress|0x00000000|UINT64|0x50000005
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc

    r101291 r108794  
    7979  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
    8080
    81 [Components.Ia32]
     81[Components.Ia32, Components.X64]
    8282  IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/BaseFspWrapperApiTestLibNull.inf
    8383  IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspWrapperPlatformSecLibSample.inf
     
    8888  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
    8989  IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
     90  IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf
    9091
    9192[Components.IA32, Components.X64]
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf

    r80721 r108794  
    6464  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress  ## CONSUMES
    6565  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress  ## CONSUMES
     66  gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress  ## CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApiLib.c

    r99404 r108794  
    231231  return Status;
    232232}
     233
     234/**
     235  Call FSP API - FspSmmInit.
     236
     237  @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure.
     238
     239  @return EFI status returned by FspSmmInit API.
     240**/
     241EFI_STATUS
     242EFIAPI
     243CallFspSmmInit (
     244  IN VOID  *FspiUpdDataPtr
     245  )
     246{
     247  FSP_INFO_HEADER  *FspHeader;
     248  FSP_SMM_INIT     FspSmmInitApi;
     249  EFI_STATUS       Status;
     250  BOOLEAN          InterruptState;
     251
     252  FspHeader = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32 (PcdFspiBaseAddress));
     253  if (FspHeader == NULL) {
     254    return EFI_DEVICE_ERROR;
     255  }
     256
     257  FspSmmInitApi  = (FSP_SMM_INIT)((UINTN)FspHeader->ImageBase + FspHeader->FspSmmInitEntryOffset);
     258  InterruptState = SaveAndDisableInterrupts ();
     259  if ((FspHeader->ImageAttribute & IMAGE_ATTRIBUTE_64BIT_MODE_SUPPORT) == FSP_IA32) {
     260    Status = Execute32BitCode ((UINTN)FspSmmInitApi, (UINTN)FspiUpdDataPtr, (UINTN)NULL);
     261  } else {
     262    Status = Execute64BitCode ((UINTN)FspSmmInitApi, (UINTN)FspiUpdDataPtr, (UINTN)NULL);
     263  }
     264
     265  SetInterruptState (InterruptState);
     266
     267  return Status;
     268}
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/FspWrapperApiTestNull.c

    r99404 r108794  
    5858  return RETURN_UNSUPPORTED;
    5959}
     60
     61/**
     62  Test the output of FSP API - FspSmmInit.
     63
     64  @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure.
     65
     66  @return test result on output of FspSmmInit API.
     67**/
     68EFI_STATUS
     69EFIAPI
     70TestFspSmmInitApiOutput (
     71  IN  VOID  *FspiUpdDataPtr
     72  )
     73{
     74  return RETURN_SUCCESS;
     75}
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c

    r99404 r108794  
    9696  CpuDeadLoop ();
    9797}
     98
     99/**
     100  This function overrides the default configurations in the FSP-I UPD data region.
     101
     102  @param[in,out] FspUpdRgnPtr   A pointer to the UPD data region data structure.
     103
     104**/
     105VOID
     106EFIAPI
     107UpdateFspiUpdData (
     108  IN OUT VOID  *FspUpdRgnPtr
     109  )
     110{
     111}
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/FspWrapperMultiPhaseProcessLib.inf

    r99404 r108794  
    3939  PeiServicesLib
    4040  FspWrapperPlatformMultiPhaseLib
     41  BaseMemoryLib
     42  HobLib
    4143
    4244[Ppis]
     
    4446  gEdkiiPeiVariablePpiGuid
    4547
     48[Guids]
     49  gFspHobGuid       ## CONSUMES
     50
    4651[Pcd]
    4752  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress       ## CONSUMES
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/PeiFspWrapperMultiPhaseProcessLib.c

    r105670 r108794  
    1818#include <Library/PeiServicesLib.h>
    1919#include <Library/FspWrapperPlatformMultiPhaseLib.h>
     20#include <Library/BaseMemoryLib.h>
     21#include <Library/HobLib.h>
    2022
    2123/**
     
    157159  BOOLEAN                                           WriteVariableSupport;
    158160  FSP_MULTI_PHASE_COMPLETE_VARIABLE_REQUEST_PARAMS  CompleteVariableRequestParams;
     161  VOID                                              *GuidHob;
     162  VOID                                              *HobData;
    159163
    160164  WriteVariableSupport = TRUE;
     
    290294
    291295  //
     296  // Refresh FspHobList pointer stored in HOB.
     297  //
     298  GuidHob = GetFirstGuidHob (&gFspHobGuid);
     299  ASSERT (GuidHob != NULL);
     300  if (GuidHob != NULL) {
     301    HobData = GET_GUID_HOB_DATA (GuidHob);
     302    CopyMem (HobData, FspHobListPtr, sizeof (*FspHobListPtr));
     303  }
     304
     305  //
    292306  // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status
    293307  //
     
    322336  UINT32                                       Index;
    323337  UINT32                                       NumOfPhases;
     338  VOID                                         *GuidHob;
     339  VOID                                         *HobData;
    324340
    325341  //
     
    353369    Status                                 = CallFspMultiPhaseEntry (&FspMultiPhaseParams, FspHobListPtr, ComponentIndex);
    354370
     371    //
     372    // Refresh FspHobList pointer stored in HOB.
     373    //
     374    GuidHob = GetFirstGuidHob (&gFspHobGuid);
     375    ASSERT (GuidHob != NULL);
     376    if (GuidHob != NULL) {
     377      HobData = GET_GUID_HOB_DATA (GuidHob);
     378      CopyMem (HobData, FspHobListPtr, sizeof (*FspHobListPtr));
     379    }
     380
    355381    if (Status == FSP_STATUS_VARIABLE_REQUEST) {
    356382      //
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/FspWrapperApiTest.c

    r99404 r108794  
    8484  return RETURN_SUCCESS;
    8585}
     86
     87/**
     88  Test the output of FSP API - FspSmmInit.
     89
     90  @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure.
     91
     92  @return test result on output of FspSmmInit API.
     93**/
     94EFI_STATUS
     95EFIAPI
     96TestFspSmmInitApiOutput (
     97  IN  VOID  *FspiUpdDataPtr
     98  )
     99{
     100  return RETURN_SUCCESS;
     101}
  • trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/FspWrapperHobProcessLibSample.c

    r99404 r108794  
    401401  return EFI_SUCCESS;
    402402}
     403
     404/**
     405  Post FSP-I HOB process.
     406
     407  @param[in] FspHobList  Pointer to the HOB data structure produced by FSP.
     408
     409  @return If platform process the FSP hob list successfully.
     410**/
     411EFI_STATUS
     412EFIAPI
     413PostFspiHobProcess (
     414  IN VOID  *FspHobList
     415  )
     416{
     417  return EFI_SUCCESS;
     418}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette