summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-28 09:07:50 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-28 09:07:50 +0000
commit0308e20dc67c63e48211b140558ae3bd13a1cbf5 (patch)
tree7516a4e2ed18c99eacba9ede87dda6aca1193415
parenta41a173f8619b0d3f0f3859814351790bd9b77a1 (diff)
downloadedk2-platforms-0308e20dc67c63e48211b140558ae3bd13a1cbf5.tar.xz
1. build.py's changes : include XXXEntryPointLib.h into the corresponding autogen.c files of various modules to avoid the inconsistence between the interface definition of library class and the implementation of autogen.c
2. code base changes : modify some interface definitions to follow the lastest Mde Library Spec. 3. PeiCore changes : remove the return value of PeiCore() which is meaningless as PeiCore will never reach the end of procedure.replace it with VOID. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6271 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.h2
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain/PeiMain.c11
-rw-r--r--MdePkg/Include/Library/DxeCoreEntryPoint.h2
-rw-r--r--MdePkg/Include/Library/PeiCoreEntryPoint.h4
-rw-r--r--MdePkg/Include/Library/PeimEntryPoint.h23
-rw-r--r--MdePkg/Include/Library/UefiApplicationEntryPoint.h3
-rw-r--r--MdePkg/Include/Library/UefiDriverEntryPoint.h18
-rw-r--r--MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c14
8 files changed, 33 insertions, 44 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index e4ef1a0b7c..c3102950c5 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -230,7 +230,7 @@ typedef struct {
@retval EFI_NOT_FOUND Never reach
**/
-EFI_STATUS
+VOID
EFIAPI
PeiCore (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index 8055659129..32f875b688 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -86,7 +86,7 @@ STATIC EFI_PEI_SERVICES gPs = {
@retval EFI_NOT_FOUND Never reach
**/
-EFI_STATUS
+VOID
EFIAPI
PeiCore (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
@@ -156,7 +156,7 @@ PeiCore (
//
// Initialize libraries that the PeiCore is linked against
//
- ProcessLibraryConstructorList (NULL, &PrivateData.PS);
+ ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&PrivateData.PS);
InitializeMemoryServices (&PrivateData, SecCoreData, OldCoreData);
@@ -247,10 +247,11 @@ PeiCore (
&PrivateData.PS,
PrivateData.HobList
);
-
+ //
+ // Should never reach here.
+ //
ASSERT_EFI_ERROR (Status);
-
- return EFI_NOT_FOUND;
+ CpuDeadLoop();
}
diff --git a/MdePkg/Include/Library/DxeCoreEntryPoint.h b/MdePkg/Include/Library/DxeCoreEntryPoint.h
index d735c82165..af4c244383 100644
--- a/MdePkg/Include/Library/DxeCoreEntryPoint.h
+++ b/MdePkg/Include/Library/DxeCoreEntryPoint.h
@@ -16,7 +16,7 @@
#define __MODULE_ENTRY_POINT_H__
///
-/// Declare the cache of copy of HobList.
+/// Global variable that contains a pointer to the Hob List passed into the DXE Core entry point.
///
extern VOID *gHobList;
diff --git a/MdePkg/Include/Library/PeiCoreEntryPoint.h b/MdePkg/Include/Library/PeiCoreEntryPoint.h
index 84542e4086..6d52445059 100644
--- a/MdePkg/Include/Library/PeiCoreEntryPoint.h
+++ b/MdePkg/Include/Library/PeiCoreEntryPoint.h
@@ -88,8 +88,8 @@ EfiMain (
VOID
EFIAPI
ProcessLibraryConstructorList (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
diff --git a/MdePkg/Include/Library/PeimEntryPoint.h b/MdePkg/Include/Library/PeimEntryPoint.h
index dedf32d67d..81c78afbf9 100644
--- a/MdePkg/Include/Library/PeimEntryPoint.h
+++ b/MdePkg/Include/Library/PeimEntryPoint.h
@@ -18,7 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
-extern const UINT32 _gPeimRevision;
+extern CONST UINT32 _gPeimRevision;
+
/**
Image entry point of Peim.
@@ -32,8 +33,8 @@ extern const UINT32 _gPeimRevision;
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
@@ -49,8 +50,8 @@ _ModuleEntryPoint (
EFI_STATUS
EFIAPI
EfiMain (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
@@ -64,8 +65,8 @@ EfiMain (
VOID
EFIAPI
ProcessLibraryConstructorList (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
@@ -79,8 +80,8 @@ ProcessLibraryConstructorList (
VOID
EFIAPI
ProcessLibraryDestructorList (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
@@ -96,8 +97,8 @@ ProcessLibraryDestructorList (
EFI_STATUS
EFIAPI
ProcessModuleEntryPointList (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
);
#endif
diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h b/MdePkg/Include/Library/UefiApplicationEntryPoint.h
index d9c25d92cb..9740b6f533 100644
--- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h
+++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h
@@ -18,7 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
-extern const UINT32 _gUefiDriverRevision;
+extern CONST UINT32 _gUefiDriverRevision;
+
/**
Enrty point to UEFI Application.
diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h b/MdePkg/Include/Library/UefiDriverEntryPoint.h
index a6c4a74e96..b2808e7b63 100644
--- a/MdePkg/Include/Library/UefiDriverEntryPoint.h
+++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h
@@ -18,27 +18,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
-extern const UINT32 _gUefiDriverRevision;
-
-///
-/// Declare the number of entry points in the image.
-///
-extern const UINT8 _gDriverEntryPointCount;
+extern CONST UINT32 _gUefiDriverRevision;
///
/// Declare the number of unload handler in the image.
///
-extern const UINT8 _gDriverUnloadImageCount;
-
-///
-/// Declare the arrary of Boot Sevice Exit Event callbacks .
-///
-extern const EFI_EVENT_NOTIFY _gDriverExitBootServicesEvent[];
+extern CONST UINT8 _gDriverUnloadImageCount;
-///
-/// Declare the arrary of Virtual Address Change Event callbacks .
-///
-extern const EFI_EVENT_NOTIFY _gDriverSetVirtualAddressMapEvent[];
/**
Enrty point to DXE Driver.
diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
index 8a2c71a3dd..6ea991984e 100644
--- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
+++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
@@ -31,8 +31,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
)
{
if (_gPeimRevision != 0) {
@@ -45,12 +45,12 @@ _ModuleEntryPoint (
//
// Call constructor for all libraries
//
- ProcessLibraryConstructorList (FfsHeader, PeiServices);
+ ProcessLibraryConstructorList (FileHandle, PeiServices);
//
// Call the driver entry point
//
- return ProcessModuleEntryPointList (FfsHeader, PeiServices);
+ return ProcessModuleEntryPointList (FileHandle, PeiServices);
}
@@ -66,9 +66,9 @@ _ModuleEntryPoint (
EFI_STATUS
EFIAPI
EfiMain (
- IN EFI_PEI_FILE_HANDLE *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
+ IN EFI_PEI_FILE_HANDLE FileHandle,
+ IN CONST EFI_PEI_SERVICES **PeiServices
)
{
- return _ModuleEntryPoint (FfsHeader, PeiServices);
+ return _ModuleEntryPoint (FileHandle, PeiServices);
}