summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-31 04:57:46 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-31 04:57:46 +0000
commit92dda53e9fe6568c9204ffd97f146710bdde3369 (patch)
tree6e555e93dae8c4ea49d503ecae1f56b3d4d2db3a /EdkModulePkg/Core
parent86e6bb786f6f23201a2041901362e08b80681930 (diff)
downloadedk2-platforms-92dda53e9fe6568c9204ffd97f146710bdde3369.tar.xz
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
Diffstat (limited to 'EdkModulePkg/Core')
-rw-r--r--EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c9
-rw-r--r--EdkModulePkg/Core/Dxe/DxeMain.h252
-rw-r--r--EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c121
-rw-r--r--EdkModulePkg/Core/Dxe/Event/timer.c2
-rw-r--r--EdkModulePkg/Core/Dxe/Image/ImageFile.c70
-rw-r--r--EdkModulePkg/Core/Dxe/Mem/Page.c2
-rw-r--r--EdkModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c9
-rw-r--r--EdkModulePkg/Core/Pei/Dispatcher/Dispatcher.c3
-rw-r--r--EdkModulePkg/Core/Pei/Ipf/IpfPeiMain.h52
-rw-r--r--EdkModulePkg/Core/Pei/Ipf/SwitchToCacheMode.c9
-rw-r--r--EdkModulePkg/Core/Pei/PeiMain.msa1
-rw-r--r--EdkModulePkg/Core/Pei/Security/Security.c2
12 files changed, 327 insertions, 205 deletions
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 <DxeMain.h>
-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 <DxeMain.h>
-
-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 (
diff --git a/EdkModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/EdkModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index ccd840d376..c764b3907e 100644
--- a/EdkModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/EdkModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -23,6 +23,7 @@ Revision History
#include <PeiMain.h>
+STATIC
VOID *
TransferOldDataToNewDataRange (
IN PEI_CORE_INSTANCE *PrivateData
@@ -506,7 +507,7 @@ Returns:
return Runnable;
}
-
+STATIC
VOID *
TransferOldDataToNewDataRange (
IN PEI_CORE_INSTANCE *PrivateData
diff --git a/EdkModulePkg/Core/Pei/Ipf/IpfPeiMain.h b/EdkModulePkg/Core/Pei/Ipf/IpfPeiMain.h
new file mode 100644
index 0000000000..e2df07378e
--- /dev/null
+++ b/EdkModulePkg/Core/Pei/Ipf/IpfPeiMain.h
@@ -0,0 +1,52 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ IpfPeiMain.h
+
+Abstract:
+
+ Definition of IPF specific function
+
+Revision History
+
+--*/
+
+#ifndef _IPF_PEI_MAIN_H_
+#define _IPF_PEI_MAIN_H_
+
+#include <PeiMain.h>
+
+SAL_RETURN_REGS
+GetHandOffStatus (
+ VOID
+ )
+/*++
+
+Routine Description:
+
+ This routine is called by all processors simultaneously, to get some hand-off
+ status that has been captured by IPF dispatcher and recorded in kernel registers.
+
+Arguments :
+
+ On Entry : None.
+
+Returns:
+
+ Lid, R20Status.
+
+--*/
+
+;
+
+#endif
diff --git a/EdkModulePkg/Core/Pei/Ipf/SwitchToCacheMode.c b/EdkModulePkg/Core/Pei/Ipf/SwitchToCacheMode.c
index 36b66f93d9..db9cb52adf 100644
--- a/EdkModulePkg/Core/Pei/Ipf/SwitchToCacheMode.c
+++ b/EdkModulePkg/Core/Pei/Ipf/SwitchToCacheMode.c
@@ -20,14 +20,9 @@ Abstract:
Revision History
--*/
-#include <PeiMain.h>
-#include "IpfCpuCore.i"
-extern
-SAL_RETURN_REGS
-GetHandOffStatus (
- VOID
- );
+#include "IpfPeiMain.h"
+#include "IpfCpuCore.i"
VOID
SwitchToCacheMode (
diff --git a/EdkModulePkg/Core/Pei/PeiMain.msa b/EdkModulePkg/Core/Pei/PeiMain.msa
index 250d5390ed..5daf40f64d 100644
--- a/EdkModulePkg/Core/Pei/PeiMain.msa
+++ b/EdkModulePkg/Core/Pei/PeiMain.msa
@@ -74,6 +74,7 @@
<Filename SupArchList="IPF">Ipf/SwitchToCacheMode.c</Filename>
<Filename SupArchList="IPF">Ipf/IpfCpuCore.i</Filename>
<Filename SupArchList="IPF">Ipf/IpfCpuCore.s</Filename>
+ <Filename SupArchList="IPF">Ipf/IpfPeiMain.h</Filename>
<Filename SupArchList="IPF">Ipf/Stack.c</Filename>
<Filename SupArchList="IA32 X64 EBC">Dispatcher/Stack.c</Filename>
</SourceFiles>
diff --git a/EdkModulePkg/Core/Pei/Security/Security.c b/EdkModulePkg/Core/Pei/Security/Security.c
index 0bc175a856..089995e529 100644
--- a/EdkModulePkg/Core/Pei/Security/Security.c
+++ b/EdkModulePkg/Core/Pei/Security/Security.c
@@ -21,6 +21,7 @@ Abstract:
#include <PeiMain.h>
+STATIC
EFI_STATUS
EFIAPI
SecurityPpiNotifyCallback (
@@ -63,6 +64,7 @@ Returns:
return;
}
+STATIC
EFI_STATUS
EFIAPI
SecurityPpiNotifyCallback (