X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FPeiServicesTablePointerLib%2FPeiServicesTablePointer.c;h=c45a55829d0f7ff13c72e346547d18ae47f4fca4;hb=f38fdc749879ff6b9339fded2062e3dac46fa72d;hp=21c2009143db3cc0b6fdd55572998a98580db748;hpb=58dcdada561c36394c819d3105e867208b84227d;p=mirror_edk2.git
diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
index 21c2009143..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
@@ -16,23 +19,21 @@
#include
#include
-#include "PeiServicesTablePointerInternal.h"
-
-static EFI_PEI_SERVICES **gPeiServices;
+CONST EFI_PEI_SERVICES **gPeiServices;
/**
The function set the pointer of PEI services immediately preceding the IDT table
according to PI specification.
- @param PeiServices The address of PeiServices pointer.
+ @param PeiServicesTablePointer The address of PeiServices pointer.
**/
VOID
EFIAPI
SetPeiServicesTablePointer (
- EFI_PEI_SERVICES **PeiServices
+ IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer
)
{
- gPeiServices = PeiServices;
+ gPeiServices = PeiServicesTablePointer;
}
/**
@@ -44,7 +45,8 @@ SetPeiServicesTablePointer (
@retval The pointer to PeiServices.
**/
-EFI_PEI_SERVICES **
+CONST EFI_PEI_SERVICES **
+EFIAPI
GetPeiServicesTablePointer (
VOID
)
@@ -60,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.
@@ -69,8 +71,8 @@ GetPeiServicesTablePointer (
EFI_STATUS
EFIAPI
PeiServicesTablePointerLibConstructor (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
)
{
gPeiServices = PeiServices;