summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-11 06:29:24 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-11 06:29:24 +0000
commit4b8157f93c8e42c857462096a0861ecf73f8bd6d (patch)
tree33f25105af4ccf1bec915b8cbd9025e42eff81ef /MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
parent64d2df940cc2b67f0a17f3eac7e98a43c13621de (diff)
downloadedk2-4b8157f93c8e42c857462096a0861ecf73f8bd6d.tar.gz
edk2-4b8157f93c8e42c857462096a0861ecf73f8bd6d.tar.bz2
edk2-4b8157f93c8e42c857462096a0861ecf73f8bd6d.zip
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
Diffstat (limited to 'MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c')
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
index f2c29bdaa4..6bacb323c0 100644
--- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
@@ -22,12 +22,15 @@
#include <Library/DebugLib.h>
/**
- 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().
- @retval The pointer to PeiServices.
+ @return The pointer to PeiServices.
**/
CONST EFI_PEI_SERVICES **
@@ -46,9 +49,16 @@ GetPeiServicesTablePointer (
}
/**
+ 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 immediately preceding the IDT table
according to PI specification.
+ If PeiServicesTablePointer is NULL, then ASSERT().
+
@param PeiServicesTablePointer The address of PeiServices pointer.
**/
VOID
@@ -59,6 +69,7 @@ SetPeiServicesTablePointer (
{
IA32_DESCRIPTOR Idtr;
+ ASSERT (PeiServicesTablePointer != NULL);
AsmReadIdtr (&Idtr);
(*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;
}