mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
IntelFsp2WrapperPkg/FspiWrapperPeim : Support dispatch mode
Add FSP-SMM code for dispatch mode. Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Chen Gang C <gang.c.chen@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Cc: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
6fd8533b62
commit
e374edc180
@ -10,7 +10,37 @@
|
|||||||
|
|
||||||
#include <PiPei.h>
|
#include <PiPei.h>
|
||||||
#include <Library/PeimEntryPoint.h>
|
#include <Library/PeimEntryPoint.h>
|
||||||
|
#include <Library/PeiServicesLib.h>
|
||||||
#include <Library/PeiServicesTablePointerLib.h>
|
#include <Library/PeiServicesTablePointerLib.h>
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Do FSP SMM initialization in Dispatch mode.
|
||||||
|
|
||||||
|
@retval FSP SMM initialization status.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
FspiWrapperInitDispatchMode (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// FSP-I Wrapper running in Dispatch mode and reports FSP-I FV to PEI dispatcher.
|
||||||
|
//
|
||||||
|
PeiServicesInstallFvInfoPpi (
|
||||||
|
&((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspiBaseAddress))->FileSystemGuid,
|
||||||
|
(VOID *)(UINTN)PcdGet32 (PcdFspiBaseAddress),
|
||||||
|
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspiBaseAddress))->FvLength,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is the entrypoint of PEIM.
|
This is the entrypoint of PEIM.
|
||||||
@ -27,6 +57,11 @@ FspiWrapperPeimEntryPoint (
|
|||||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
DEBUG ((DEBUG_INFO, "FspiWrapperPeimEntryPoint\n"));
|
||||||
|
|
||||||
|
Status = FspiWrapperInitDispatchMode ();
|
||||||
|
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -30,14 +30,18 @@
|
|||||||
PeimEntryPoint
|
PeimEntryPoint
|
||||||
PeiServicesLib
|
PeiServicesLib
|
||||||
PeiServicesTablePointerLib
|
PeiServicesTablePointerLib
|
||||||
|
DebugLib
|
||||||
|
MemoryAllocationLib
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress ## CONSUMES
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
|
|
||||||
@ -45,4 +49,4 @@
|
|||||||
FspiWrapperPeim.c
|
FspiWrapperPeim.c
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
gEfiPeiMemoryDiscoveredPpiGuid
|
||||||
|
@ -98,10 +98,11 @@
|
|||||||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UINT8|0x4000000A
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x00000001|UINT8|0x4000000A
|
||||||
|
|
||||||
#
|
#
|
||||||
## These are the base address of FSP-M/S
|
## These are the base address of FSP-M/S/I
|
||||||
#
|
#
|
||||||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000
|
||||||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32|0x00001001
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32|0x00001001
|
||||||
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress|0x00000000|UINT32|0x00001002
|
||||||
#
|
#
|
||||||
# To provide flexibility for platform to pre-allocate FSP UPD buffer
|
# To provide flexibility for platform to pre-allocate FSP UPD buffer
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user