From 92dda53e9fe6568c9204ffd97f146710bdde3369 Mon Sep 17 00:00:00 2001 From: xli24 Date: Wed, 31 Jan 2007 04:57:46 +0000 Subject: Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning #1419. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2338 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 9 +- EdkModulePkg/Core/Dxe/DxeMain.h | 252 +++++++++++++++++++++ EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c | 121 ---------- EdkModulePkg/Core/Dxe/Event/timer.c | 2 + EdkModulePkg/Core/Dxe/Image/ImageFile.c | 70 ------ EdkModulePkg/Core/Dxe/Mem/Page.c | 2 + .../Dxe/SectionExtraction/CoreSectionExtraction.c | 9 +- 7 files changed, 268 insertions(+), 197 deletions(-) (limited to 'EdkModulePkg/Core/Dxe') diff --git a/EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index e7c23b57b3..08d5dc34e5 100644 --- a/EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -101,11 +101,13 @@ FV_FILEPATH_DEVICE_PATH mFvDevicePath; // // Function Prototypes // +STATIC VOID CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter ( IN EFI_CORE_DRIVER_ENTRY *InsertedDriverEntry ); +STATIC VOID EFIAPI CoreFwVolEventProtocolNotify ( @@ -113,6 +115,7 @@ CoreFwVolEventProtocolNotify ( IN VOID *Context ); +STATIC EFI_DEVICE_PATH_PROTOCOL * CoreFvToDevicePath ( IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, @@ -523,7 +526,7 @@ Returns: return ReturnStatus; } - +STATIC VOID CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter ( IN EFI_CORE_DRIVER_ENTRY *InsertedDriverEntry @@ -664,7 +667,7 @@ Returns: - +STATIC EFI_DEVICE_PATH_PROTOCOL * CoreFvToDevicePath ( IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, @@ -858,7 +861,7 @@ Returns: return Status; } - +STATIC VOID EFIAPI CoreFwVolEventProtocolNotify ( diff --git a/EdkModulePkg/Core/Dxe/DxeMain.h b/EdkModulePkg/Core/Dxe/DxeMain.h index b38ba8e7f9..d655cd3381 100644 --- a/EdkModulePkg/Core/Dxe/DxeMain.h +++ b/EdkModulePkg/Core/Dxe/DxeMain.h @@ -2507,4 +2507,256 @@ CoreDisplayDiscoveredNotDispatched ( NONE --*/; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg0 ( + VOID + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + None + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg1 ( + UINTN Arg1 + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + Arg1 - Undefined + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg2 ( + UINTN Arg1, + UINTN Arg2 + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + Arg1 - Undefined + + Arg2 - Undefined + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg3 ( + UINTN Arg1, + UINTN Arg2, + UINTN Arg3 + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + Arg1 - Undefined + + Arg2 - Undefined + + Arg3 - Undefined + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg4 ( + UINTN Arg1, + UINTN Arg2, + UINTN Arg3, + UINTN Arg4 + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + Arg1 - Undefined + + Arg2 - Undefined + + Arg3 - Undefined + + Arg4 - Undefined + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +EFIAPI +CoreEfiNotAvailableYetArg5 ( + UINTN Arg1, + UINTN Arg2, + UINTN Arg3, + UINTN Arg4, + UINTN Arg5 + ) +/*++ + +Routine Description: + + Place holder function until all the Boot Services and Runtime Services are available + +Arguments: + + Arg1 - Undefined + + Arg2 - Undefined + + Arg3 - Undefined + + Arg4 - Undefined + + Arg5 - Undefined + +Returns: + + EFI_NOT_AVAILABLE_YET + +--*/ +; + +EFI_STATUS +CoreGetPeiProtocol ( + IN EFI_GUID *ProtocolGuid, + IN VOID **Interface + ) +/*++ + +Routine Description: + + Searches for a Protocol Interface passed from PEI through a HOB + +Arguments: + + ProtocolGuid - The Protocol GUID to search for in the HOB List + + Interface - A pointer to the interface for the Protocol GUID + +Returns: + + EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface + + EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List + +--*/ +; + +EFI_STATUS +DxeMainUefiDecompressGetInfo ( + IN EFI_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + OUT UINT32 *DestinationSize, + OUT UINT32 *ScratchSize + ); + +EFI_STATUS +EFIAPI +DxeMainUefiDecompress ( + IN EFI_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + IN OUT VOID *Destination, + IN UINT32 DestinationSize, + IN OUT VOID *Scratch, + IN UINT32 ScratchSize + ); + +EFI_STATUS +DxeMainTianoDecompressGetInfo ( + IN EFI_TIANO_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + OUT UINT32 *DestinationSize, + OUT UINT32 *ScratchSize + ); + +EFI_STATUS +EFIAPI +DxeMainTianoDecompress ( + IN EFI_TIANO_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + IN OUT VOID *Destination, + IN UINT32 DestinationSize, + IN OUT VOID *Scratch, + IN UINT32 ScratchSize + ); + +EFI_STATUS +DxeMainCustomDecompressGetInfo ( + IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + OUT UINT32 *DestinationSize, + OUT UINT32 *ScratchSize + ); + +EFI_STATUS +EFIAPI +DxeMainCustomDecompress ( + IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This, + IN VOID *Source, + IN UINT32 SourceSize, + IN OUT VOID *Destination, + IN UINT32 DestinationSize, + IN OUT VOID *Scratch, + IN UINT32 ScratchSize + ); + #endif diff --git a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c index 6b1f084e77..b590538fea 100644 --- a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -21,127 +21,6 @@ Abstract: #include -VOID -EFIAPI -DxeMain ( - IN VOID *HobStart - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg0 ( - VOID - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg1 ( - UINTN Arg1 - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg2 ( - UINTN Arg1, - UINTN Arg2 - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg3 ( - UINTN Arg1, - UINTN Arg2, - UINTN Arg3 - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg4 ( - UINTN Arg1, - UINTN Arg2, - UINTN Arg3, - UINTN Arg4 - ); - -EFI_STATUS -EFIAPI -CoreEfiNotAvailableYetArg5 ( - UINTN Arg1, - UINTN Arg2, - UINTN Arg3, - UINTN Arg4, - UINTN Arg5 - ); - -EFI_STATUS -CoreGetPeiProtocol ( - IN EFI_GUID *ProtocolGuid, - IN VOID **Interface - ); - -EFI_STATUS -DxeMainUefiDecompressGetInfo ( - IN EFI_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - OUT UINT32 *DestinationSize, - OUT UINT32 *ScratchSize - ); - -EFI_STATUS -EFIAPI -DxeMainUefiDecompress ( - IN EFI_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - IN OUT VOID *Destination, - IN UINT32 DestinationSize, - IN OUT VOID *Scratch, - IN UINT32 ScratchSize - ); - -EFI_STATUS -DxeMainTianoDecompressGetInfo ( - IN EFI_TIANO_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - OUT UINT32 *DestinationSize, - OUT UINT32 *ScratchSize - ); - -EFI_STATUS -EFIAPI -DxeMainTianoDecompress ( - IN EFI_TIANO_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - IN OUT VOID *Destination, - IN UINT32 DestinationSize, - IN OUT VOID *Scratch, - IN UINT32 ScratchSize - ); - -EFI_STATUS -DxeMainCustomDecompressGetInfo ( - IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - OUT UINT32 *DestinationSize, - OUT UINT32 *ScratchSize - ); - -EFI_STATUS -EFIAPI -DxeMainCustomDecompress ( - IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This, - IN VOID *Source, - IN UINT32 SourceSize, - IN OUT VOID *Destination, - IN UINT32 DestinationSize, - IN OUT VOID *Scratch, - IN UINT32 ScratchSize - ); - // // DXE Core Global Variables for Protocols from PEI // diff --git a/EdkModulePkg/Core/Dxe/Event/timer.c b/EdkModulePkg/Core/Dxe/Event/timer.c index 8d7932f837..a49701519e 100644 --- a/EdkModulePkg/Core/Dxe/Event/timer.c +++ b/EdkModulePkg/Core/Dxe/Event/timer.c @@ -33,6 +33,7 @@ CoreCurrentSystemTime ( VOID ); +STATIC VOID EFIAPI CoreCheckTimers ( @@ -173,6 +174,7 @@ Returns: CoreReleaseLock (&mEfiSystemTimeLock); } +STATIC VOID EFIAPI CoreCheckTimers ( diff --git a/EdkModulePkg/Core/Dxe/Image/ImageFile.c b/EdkModulePkg/Core/Dxe/Image/ImageFile.c index 999cd694ad..408688c69f 100644 --- a/EdkModulePkg/Core/Dxe/Image/ImageFile.c +++ b/EdkModulePkg/Core/Dxe/Image/ImageFile.c @@ -25,15 +25,6 @@ Revision History #include - -VOID -CoreDevicePathToFileName ( - IN FILEPATH_DEVICE_PATH *FilePath, - OUT CHAR16 **String - ); - - - EFI_STATUS CoreOpenImageFile ( IN BOOLEAN BootPolicy, @@ -432,67 +423,6 @@ Returns: return Status; } - -VOID -CoreDevicePathToFileName ( - IN FILEPATH_DEVICE_PATH *FilePath, - OUT CHAR16 **String - ) -/*++ - -Routine Description: - - Transfer a device's full path a string. - -Arguments: - - FilePath - Device path - - String - The string represent the device's full path - -Returns: - - None - ---*/ -{ - UINTN StringSize; - FILEPATH_DEVICE_PATH *FilePathNode; - CHAR16 *Str; - - *String = NULL; - StringSize = 0; - FilePathNode = FilePath; - while (!IsDevicePathEnd (&FilePathNode->Header)) { - - // - // For filesystem access each node should be a filepath component - // - if (DevicePathType (&FilePathNode->Header) != MEDIA_DEVICE_PATH || - DevicePathSubType (&FilePathNode->Header) != MEDIA_FILEPATH_DP) { - - return; - } - - StringSize += StrLen (FilePathNode->PathName); - - FilePathNode = (FILEPATH_DEVICE_PATH *) NextDevicePathNode (&FilePathNode->Header); - } - - *String = CoreAllocateBootServicesPool (StringSize); - if (*String == NULL) { - return; - } - - FilePathNode = FilePath; - Str = *String; - while (!IsDevicePathEnd (&FilePathNode->Header)) { - StrCat (Str, FilePathNode->PathName); - FilePathNode = (FILEPATH_DEVICE_PATH *) NextDevicePathNode (&FilePathNode->Header); - } -} - - BOOLEAN CoreGrowBuffer ( IN OUT EFI_STATUS *Status, diff --git a/EdkModulePkg/Core/Dxe/Mem/Page.c b/EdkModulePkg/Core/Dxe/Mem/Page.c index 44116abcb6..4f66e0a3d2 100644 --- a/EdkModulePkg/Core/Dxe/Mem/Page.c +++ b/EdkModulePkg/Core/Dxe/Mem/Page.c @@ -94,6 +94,7 @@ EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1] = { // // Internal prototypes // +STATIC VOID PromoteMemoryResource ( VOID @@ -175,6 +176,7 @@ Returns: CoreReleaseLock (&gMemoryLock); } +STATIC VOID PromoteMemoryResource ( VOID diff --git a/EdkModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/EdkModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index 89dd9afcc1..a3e20e69e8 100644 --- a/EdkModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/EdkModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -131,6 +131,7 @@ CreateGuidedExtractionRpnEvent ( IN CORE_SECTION_CHILD_NODE *ChildNode ); +STATIC EFI_STATUS EFIAPI OpenSectionStream ( @@ -140,6 +141,7 @@ OpenSectionStream ( OUT UINTN *SectionStreamHandle ); +STATIC EFI_STATUS EFIAPI GetSection ( @@ -153,6 +155,7 @@ GetSection ( OUT UINT32 *AuthenticationStatus ); +STATIC EFI_STATUS EFIAPI CloseSectionStream ( @@ -262,7 +265,7 @@ Returns: return Status; } - +STATIC EFI_STATUS EFIAPI OpenSectionStream ( @@ -308,7 +311,7 @@ Returns: ); } - +STATIC EFI_STATUS EFIAPI GetSection ( @@ -451,7 +454,7 @@ GetSection_Done: } - +STATIC EFI_STATUS EFIAPI CloseSectionStream ( -- cgit v1.2.3