]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Modified PeiServicesTablePointerLib.h to match the Spec, and sync the c files with it.
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Dec 2008 06:29:24 +0000 (06:29 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Dec 2008 06:29:24 +0000 (06:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6991 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/PeiServicesTablePointerLib.h
MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c

index a366c98f1bffb24f46b05f881129cddd34ddf229..2906d86c48eb95e4b538662a36d90b7c64edab30 100644 (file)
@@ -16,10 +16,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define __PEI_SERVICES_TABLE_POINTER_LIB_H__\r
 \r
 /**\r
 #define __PEI_SERVICES_TABLE_POINTER_LIB_H__\r
 \r
 /**\r
-  The function returns the pointer to PEI services.\r
+  Retrieves the cached value of the PEI Services Table pointer.\r
 \r
 \r
-  The function returns the pointer to PEI services.\r
-  It will ASSERT() if the pointer to PEI services is NULL.\r
+  Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
+  as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
+  Initialization Core Interface Specification.\r
+  \r
+  If the cached PEI Services Table pointer is NULL, then ASSERT().\r
 \r
   @return  The pointer to PeiServices.\r
 \r
 \r
   @return  The pointer to PeiServices.\r
 \r
@@ -31,8 +34,13 @@ GetPeiServicesTablePointer (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  The function set the pointer of PEI services immediately preceding the IDT table\r
-  according to PI specification.\r
+  Caches a pointer PEI Services Table. \r
\r
+  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
+  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
+  Pre-EFI Initialization Core Interface Specification. \r
+  \r
+  If PeiServicesTablePointer is NULL, then ASSERT().\r
   \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
   \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
index c45a55829d0f7ff13c72e346547d18ae47f4fca4..2198fd0d140b28906b6527c5d6f7552d17d3cafb 100644 (file)
 CONST EFI_PEI_SERVICES  **gPeiServices;\r
 \r
 /**\r
 CONST EFI_PEI_SERVICES  **gPeiServices;\r
 \r
 /**\r
-  The function set the pointer of PEI services immediately preceding the IDT table\r
-  according to PI specification.\r
+  Caches a pointer PEI Services Table. \r
\r
+  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
+  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
+  Pre-EFI Initialization Core Interface Specification. \r
+  \r
+  If PeiServicesTablePointer is NULL, then ASSERT().\r
   \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
   \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
@@ -33,16 +38,20 @@ SetPeiServicesTablePointer (
   IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
   )\r
 {\r
   IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
   )\r
 {\r
+  ASSERT (PeiServicesTablePointer != NULL);\r
   gPeiServices = PeiServicesTablePointer;\r
 }\r
 \r
 /**\r
   gPeiServices = PeiServicesTablePointer;\r
 }\r
 \r
 /**\r
-  The function returns the pointer to PEI services.\r
+  Retrieves the cached value of the PEI Services Table pointer.\r
 \r
 \r
-  The function returns the pointer to PEI services.\r
-  It will ASSERT() if the pointer to PEI services is NULL.\r
+  Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
+  as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
+  Initialization Core Interface Specification.\r
+  \r
+  If the cached PEI Services Table pointer is NULL, then ASSERT().\r
 \r
 \r
-  @retval  The pointer to PeiServices.\r
+  @return  The pointer to PeiServices.\r
 \r
 **/\r
 CONST EFI_PEI_SERVICES **\r
 \r
 **/\r
 CONST EFI_PEI_SERVICES **\r
index f2c29bdaa4c6f9692980d5f660cfc46159945281..6bacb323c0356d6111d2a11029e98d99a7e95753 100644 (file)
 #include <Library/DebugLib.h>\r
 \r
 /**\r
 #include <Library/DebugLib.h>\r
 \r
 /**\r
-  The function returns the pointer to PEI services.\r
+  Retrieves the cached value of the PEI Services Table pointer.\r
 \r
 \r
-  The function returns the pointer to PEI services.\r
-  It will ASSERT() if the pointer to PEI services is NULL.\r
+  Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
+  as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
+  Initialization Core Interface Specification.\r
+  \r
+  If the cached PEI Services Table pointer is NULL, then ASSERT().\r
 \r
 \r
-  @retval  The pointer to PeiServices.\r
+  @return  The pointer to PeiServices.\r
 \r
 **/\r
 CONST EFI_PEI_SERVICES **\r
 \r
 **/\r
 CONST EFI_PEI_SERVICES **\r
@@ -46,9 +49,16 @@ GetPeiServicesTablePointer (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Caches a pointer PEI Services Table. \r
\r
+  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
+  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
+  Pre-EFI Initialization Core Interface Specification. \r
   The function set the pointer of PEI services immediately preceding the IDT table\r
   according to PI specification.\r
   \r
   The function set the pointer of PEI services immediately preceding the IDT table\r
   according to PI specification.\r
   \r
+  If PeiServicesTablePointer is NULL, then ASSERT().\r
+  \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
 VOID\r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
 VOID\r
@@ -59,6 +69,7 @@ SetPeiServicesTablePointer (
 {\r
   IA32_DESCRIPTOR   Idtr;\r
   \r
 {\r
   IA32_DESCRIPTOR   Idtr;\r
   \r
+  ASSERT (PeiServicesTablePointer != NULL);\r
   AsmReadIdtr (&Idtr);\r
   (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;\r
 }\r
   AsmReadIdtr (&Idtr);\r
   (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer;\r
 }\r
index d6927999ccab38dce1627f11d580ee398428dce1..671268fa53d838935b7f973840a3f6e3dafc5821 100644 (file)
 #include <Library/DebugLib.h>\r
 \r
 /**\r
 #include <Library/DebugLib.h>\r
 \r
 /**\r
-  The function returns the pointer to PEI services.\r
+  Retrieves the cached value of the PEI Services Table pointer.\r
 \r
 \r
-  The function returns the pointer to PEI services.\r
-  It will ASSERT() if the pointer to PEI services is NULL.\r
+  Returns the cached value of the PEI Services Table pointer in a CPU specific manner \r
+  as specified in the CPU binding section of the Platform Initialization Pre-EFI \r
+  Initialization Core Interface Specification.\r
+  \r
+  If the cached PEI Services Table pointer is NULL, then ASSERT().\r
 \r
   @return  The pointer to PeiServices.\r
 \r
 \r
   @return  The pointer to PeiServices.\r
 \r
@@ -39,10 +42,18 @@ GetPeiServicesTablePointer (
   return PeiServices;\r
 }\r
 \r
   return PeiServices;\r
 }\r
 \r
+\r
 /**\r
 /**\r
+  Caches a pointer PEI Services Table. \r
\r
+  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer \r
+  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization \r
+  Pre-EFI Initialization Core Interface Specification. \r
   The function set the pointer of PEI services in KR7 register \r
   according to PI specification.\r
   \r
   The function set the pointer of PEI services in KR7 register \r
   according to PI specification.\r
   \r
+  If PeiServicesTablePointer is NULL, then ASSERT().\r
+  \r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
 VOID\r
   @param    PeiServicesTablePointer   The address of PeiServices pointer.\r
 **/\r
 VOID\r
@@ -51,6 +62,7 @@ SetPeiServicesTablePointer (
   IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
   )\r
 {\r
   IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer\r
   )\r
 {\r
+  ASSERT (PeiServicesTablePointer != NULL);\r
   AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer);\r
 }\r
   \r
   AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer);\r
 }\r
   \r