X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FPeiServicesTablePointerLib%2FPeiServicesTablePointer.c;h=c45a55829d0f7ff13c72e346547d18ae47f4fca4;hb=f38fdc749879ff6b9339fded2062e3dac46fa72d;hp=558f7cc19330ee824cba009680ebda40567e704a;hpb=a73480f6f2e211947ac19ef049adcba6f50bb655;p=mirror_edk2.git diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 558f7cc193..c45a55829d 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -1,7 +1,10 @@ /** @file PEI Services Table Pointer Library. + + This library is used for PEIM which does executed from flash device directly but + executed in memory. - Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -10,17 +13,28 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: PeiServicesTablePointer.c - **/ #include #include #include -#include "PeiServicesTablePointerInternal.h" +CONST EFI_PEI_SERVICES **gPeiServices; -static EFI_PEI_SERVICES **gPeiServices; +/** + The function set the pointer of PEI services immediately preceding the IDT table + according to PI specification. + + @param PeiServicesTablePointer The address of PeiServices pointer. +**/ +VOID +EFIAPI +SetPeiServicesTablePointer ( + IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer + ) +{ + gPeiServices = PeiServicesTablePointer; +} /** The function returns the pointer to PEI services. @@ -31,7 +45,8 @@ static EFI_PEI_SERVICES **gPeiServices; @retval The pointer to PeiServices. **/ -EFI_PEI_SERVICES ** +CONST EFI_PEI_SERVICES ** +EFIAPI GetPeiServicesTablePointer ( VOID ) @@ -47,7 +62,7 @@ GetPeiServicesTablePointer ( The constructor function caches the pointer to PEI services. It will always return EFI_SUCCESS. - @param FfsHeader Pointer to FFS header the loaded driver. + @param FileHandle Handle of FFS header the loaded driver. @param PeiServices Pointer to the PEI services. @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. @@ -56,10 +71,12 @@ GetPeiServicesTablePointer ( EFI_STATUS EFIAPI PeiServicesTablePointerLibConstructor ( - IN EFI_FFS_FILE_HEADER *FfsHeader, - IN EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ) { gPeiServices = PeiServices; return EFI_SUCCESS; } + +