From 4b8157f93c8e42c857462096a0861ecf73f8bd6d Mon Sep 17 00:00:00 2001 From: gikidy Date: Thu, 11 Dec 2008 06:29:24 +0000 Subject: Modified PeiServicesTablePointerLib.h to match the Spec, and sync the c files with it. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6991 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PeiServicesTablePointer.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'MdePkg/Library/PeiServicesTablePointerLibKr7') diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c index d6927999cc..671268fa53 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c @@ -18,10 +18,13 @@ #include /** - The function returns the pointer to PEI services. + Retrieves the cached value of the PEI Services Table pointer. - The function returns the pointer to PEI services. - It will ASSERT() if the pointer to PEI services is NULL. + Returns the cached value of the PEI Services Table pointer in a CPU specific manner + as specified in the CPU binding section of the Platform Initialization Pre-EFI + Initialization Core Interface Specification. + + If the cached PEI Services Table pointer is NULL, then ASSERT(). @return The pointer to PeiServices. @@ -39,10 +42,18 @@ GetPeiServicesTablePointer ( return PeiServices; } + /** + Caches a pointer PEI Services Table. + + Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer + in a CPU specific manner as specified in the CPU binding section of the Platform Initialization + Pre-EFI Initialization Core Interface Specification. The function set the pointer of PEI services in KR7 register according to PI specification. + If PeiServicesTablePointer is NULL, then ASSERT(). + @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID @@ -51,6 +62,7 @@ SetPeiServicesTablePointer ( IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer ) { + ASSERT (PeiServicesTablePointer != NULL); AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer); } -- cgit v1.2.3