From 6fd8533b6282047f418a07aa288296335c2f9fc4 Mon Sep 17 00:00:00 2001 From: Hongbin1 Zhang Date: Sun, 6 Oct 2024 21:02:11 +0800 Subject: IntelFsp2WrapperPkg/FspiWrapperPeim : FSP-I wrapper PEIM entrypoint FSP-I wrapper PEIM entrypoint is for including FSP-SMM code for both dispatch and API mode. Signed-off-by: Hongbin1 Zhang Cc: Chasel Chiu Cc: Nate DeSimone Cc: Duggapu Chinni B Cc: Chen Gang C Cc: Star Zeng Cc: Ted Kuo Cc: Ashraf Ali S Cc: Ray Ni --- .../FspiWrapperPeim/FspiWrapperPeim.c | 32 +++++++++++++++ .../FspiWrapperPeim/FspiWrapperPeim.inf | 48 ++++++++++++++++++++++ IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 3 +- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.c create mode 100644 IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf diff --git a/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.c b/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.c new file mode 100644 index 0000000000..f3efaa6da1 --- /dev/null +++ b/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.c @@ -0,0 +1,32 @@ +/** @file + This will be invoked only once. It will call FspSmmInit API, + to call MmIplPei to load MM Core and dispatch all Standalone + MM drivers. + + Copyright (c) 2024, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include + +/** + This is the entrypoint of PEIM. + + @param[in] FileHandle Handle of the file being invoked. + @param[in] PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS if it completed successfully. +**/ +EFI_STATUS +EFIAPI +FspiWrapperPeimEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + + return EFI_SUCCESS; +} diff --git a/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf b/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf new file mode 100644 index 0000000000..156033523e --- /dev/null +++ b/IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf @@ -0,0 +1,48 @@ +## @file +# FSP-I wrapper PEI Module +# +# This PEIM initialize FSP. +# This will be invoked only once. It will call FspSmmInit API, +# to call MmIplPei to load MM Core and dispatch all Standalone +# MM drivers. +# +# Copyright (c) 2024, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010017 + BASE_NAME = FspiWrapperPeim + FILE_GUID = 64D6CA11-6F4C-4B79-B77F-37A281CF0FCC + VERSION_STRING = 1.0 + MODULE_TYPE = PEIM + ENTRY_POINT = FspiWrapperPeimEntryPoint + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + PeiServicesTablePointerLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[Ppis] + +[Pcd] + +[Guids] + +[Sources] + FspiWrapperPeim.c + +[Depex] + TRUE diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc index fe621244a6..f51e1c89f6 100644 --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc @@ -78,7 +78,7 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf -[Components.Ia32] +[Components.Ia32, Components.X64] IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/BaseFspWrapperApiTestLibNull.inf IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspWrapperPlatformSecLibSample.inf IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/PeiFspWrapperHobProcessLibSample.inf @@ -87,6 +87,7 @@ IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf + IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf [Components.IA32, Components.X64] IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf -- cgit