summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-30 14:09:38 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-30 14:09:38 +0000
commit60c93673b3189b7a48acdb5c300f4ee3546ffb85 (patch)
treec335e23e592face4b3d6e5dcafffb8d51d64d246 /MdePkg
parented300ce2a68ba42b7e140af9e7e71c706518c9f1 (diff)
downloadedk2-60c93673b3189b7a48acdb5c300f4ee3546ffb85.tar.gz
edk2-60c93673b3189b7a48acdb5c300f4ee3546ffb85.tar.bz2
edk2-60c93673b3189b7a48acdb5c300f4ee3546ffb85.zip
The driver and library in MdePkg, MdeModulePkg and Nt32Pkg that don't depend on PI spec should include Uefi.h not PiDxe.h.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5758 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c2
-rw-r--r--MdePkg/Library/HiiLib/InternalHiiLib.h2
-rw-r--r--MdePkg/Library/IfrSupportLib/UefiIfrLibraryInternal.h2
-rw-r--r--MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c2
-rw-r--r--MdePkg/Library/UefiLib/UefiLibInternal.h2
-rw-r--r--MdePkg/Library/UefiRuntimeLib/RuntimeLib.c19
-rw-r--r--MdePkg/Library/UefiRuntimeLib/RuntimeLibInternal.h2
-rw-r--r--MdePkg/Library/UefiRuntimeLib/RuntimeService.c31
-rw-r--r--MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf4
-rw-r--r--MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c8
-rw-r--r--MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLibInternal.h39
-rw-r--r--MdePkg/Library/UefiScsiLib/UefiScsiLib.c2
-rw-r--r--MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h2
13 files changed, 40 insertions, 77 deletions
diff --git a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
index e8229f76be..1c1c879a5f 100644
--- a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
@@ -14,7 +14,7 @@
**/
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Library/MemoryAllocationLib.h>
diff --git a/MdePkg/Library/HiiLib/InternalHiiLib.h b/MdePkg/Library/HiiLib/InternalHiiLib.h
index d80db675a2..0c7ed9d585 100644
--- a/MdePkg/Library/HiiLib/InternalHiiLib.h
+++ b/MdePkg/Library/HiiLib/InternalHiiLib.h
@@ -15,7 +15,7 @@
#ifndef __INTERNAL_HII_LIB_H__
#define __INTERNAL_HII_LIB_H__
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Protocol/HiiDatabase.h>
#include <Protocol/HiiString.h>
diff --git a/MdePkg/Library/IfrSupportLib/UefiIfrLibraryInternal.h b/MdePkg/Library/IfrSupportLib/UefiIfrLibraryInternal.h
index 1cdb36c78d..d5fcb669f6 100644
--- a/MdePkg/Library/IfrSupportLib/UefiIfrLibraryInternal.h
+++ b/MdePkg/Library/IfrSupportLib/UefiIfrLibraryInternal.h
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define _IFRLIBRARY_INTERNAL_H_
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Protocol/DevicePath.h>
diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
index 100549c027..ee1970199a 100644
--- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
+++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
@@ -13,7 +13,7 @@
**/
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h
index 970df2bc79..886287f25d 100644
--- a/MdePkg/Library/UefiLib/UefiLibInternal.h
+++ b/MdePkg/Library/UefiLib/UefiLibInternal.h
@@ -14,7 +14,7 @@
#define __UEFI_LIB_INTERNAL_H_
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Protocol/DriverBinding.h>
#include <Protocol/ComponentName.h>
#include <Protocol/ComponentName2.h>
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
index 4565955690..a30a95c54c 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
@@ -1,7 +1,7 @@
/** @file
- Library utility functions for Runtime driver.
+ UEFI Runtime Library implementation for non IPF processor types.
-Copyright (c) 2006 Intel Corporation. <BR>
+Copyright (c) 2006 - 2008 Intel Corporation. <BR>
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
@@ -70,6 +70,8 @@ RuntimeLibVirtualNotifyEvent (
/**
Intialize runtime Driver Lib if it has not yet been initialized.
+ It will ASSERT() if gRT is NULL or gBS is NULL.
+ It will ASSERT() if that operation fails.
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
@@ -85,13 +87,13 @@ RuntimeDriverLibConstruct (
{
EFI_STATUS Status;
+ ASSERT (gRT != NULL);
+ ASSERT (gBS != NULL);
+
mRT = gRT;
- ASSERT (mRT != NULL);
-
//
// Register SetVirtualAddressMap () notify function
//
- ASSERT (gBS != NULL);
Status = gBS->CreateEvent (
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
TPL_NOTIFY,
@@ -116,9 +118,10 @@ RuntimeDriverLibConstruct (
}
/**
- This routine will free some resources which have been allocated in
- EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error,
- it must call this routine to free the allocated resource before the exiting.
+ If a runtime driver exits with an error, it must call this routine
+ to free the allocated resource before the exiting.
+ It will ASSERT() if gBS is NULL.
+ It will ASSERT() if that operation fails.
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLibInternal.h b/MdePkg/Library/UefiRuntimeLib/RuntimeLibInternal.h
index 66157feed7..fce10c65ce 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeLibInternal.h
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLibInternal.h
@@ -15,7 +15,7 @@
#ifndef __RUNTIMELIBINTERNAL_H__
#define __RUNTIMELIBINTERNAL_H__
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Library/UefiRuntimeLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
index 941426e0a4..b4479d0bdb 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
@@ -6,7 +6,7 @@
OS virtual address space. All pointer values are different for a virtual
mapping than from the normal physical mapping at boot services time.
- Copyright (c) 2006 - 2007, Intel Corporation.<BR>
+ Copyright (c) 2006 - 2008, Intel Corporation.<BR>
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
@@ -17,9 +17,7 @@
**/
-#include <PiDxe.h>
-
-#include <RuntimeLibInternal.h>
+#include "RuntimeLibInternal.h"
/**
@@ -54,7 +52,7 @@ EfiResetSystem (
capabilities.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -95,7 +93,7 @@ EfiSetTime (
@param Time Current alarm clock setting.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -118,7 +116,7 @@ EfiGetWakeupTime (
@param Time Point to alarm clock setting.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -145,7 +143,7 @@ EfiSetWakeupTime (
@param Data Point to return Data-Buffer.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -176,7 +174,7 @@ EfiGetVariable (
As output, returns the VendorGuid of the current variable.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -203,7 +201,7 @@ EfiGetNextVariableName (
@param Data Point to the content of the variable.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -226,7 +224,7 @@ EfiSetVariable (
@param HighCount Pointer to returned value.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -248,7 +246,7 @@ EfiGetNextHighMonotonicCount (
applied.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -269,7 +267,7 @@ EfiConvertPointer (
@param ListHead Head of linked list to convert.
@retval EFI_SUCCESS Success to execute the function.
- @retval !EFI_SUCCESS Failed to e3xecute the function.
+ @retval !EFI_SUCCESS Failed to execute the function.
**/
EFI_STATUS
@@ -281,6 +279,13 @@ EfiConvertList (
{
LIST_ENTRY *Link;
LIST_ENTRY *NextLink;
+
+ //
+ // For NULL List, return EFI_SUCCESS
+ //
+ if (ListHead == NULL) {
+ return EFI_SUCCESS;
+ }
//
// Convert all the ForwardLink & BackLink pointers in the list
diff --git a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf b/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
index 75bc3fc15d..90e613521e 100644
--- a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+++ b/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
@@ -2,7 +2,7 @@
# Runtime driver library
#
# Instance of runtime driver library, Hook VitualAddressChange and
-# BooterviceExit event and provide runtime service.
+# BooterviceExit event and provide runtime service for non IPF processor types.
# Copyright (c) 2006 - 2007, Intel Corporation.
#
# All rights reserved. This program and the accompanying materials
@@ -29,7 +29,7 @@
DESTRUCTOR = RuntimeDriverLibDeconstruct
#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+# VALID_ARCHITECTURES = IA32 X64 EBC
#
diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
index 4889094618..e664a0f5c2 100644
--- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
+++ b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
@@ -12,15 +12,9 @@
**/
-
-#include <PiDxe.h>
-
-
-#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Uefi.h>
#include <Library/DebugLib.h>
-#include "UefiRuntimeServicesTableLibInternal.h"
-
EFI_RUNTIME_SERVICES *gRT = NULL;
/**
diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLibInternal.h b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLibInternal.h
deleted file mode 100644
index 95ff283203..0000000000
--- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLibInternal.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/** @file
- Internal Header file for UEFI Runtime Services Table Library.
-
- Copyright (c) 2006, Intel Corporation<BR>
- 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.
-
-**/
-
-
-#ifndef _UEFI_RUNTIME_SERVICES_TABLE_LIB_INTERNAL_H_
-#define _UEFI_RUNTIME_SERVICES_TABLE_LIB_INTERNAL_H_
-/**
- The constructor function caches the pointer of Runtime Services Table.
-
- The constructor function caches the pointer of Runtime Services Table.
- It will ASSERT() if the pointer of Runtime Services Table is NULL.
- It will always return EFI_SUCCESS.
-
- @param ImageHandle The firmware allocated handle for the EFI image.
- @param SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-
-**/
-EFI_STATUS
-EFIAPI
-UefiRuntimeServicesTableLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-;
-#endif
-
diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
index bbf63179e7..796d73160b 100644
--- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
+++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
@@ -13,7 +13,7 @@
**/
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/ScsiLib.h>
#include <Library/BaseMemoryLib.h>
diff --git a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
index 8bfd8c9b49..99673a36c8 100644
--- a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
+++ b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h
@@ -16,7 +16,7 @@
#ifndef __UEFI_USB_LIB_INTERNAL_H_
#define __UEFI_USB_LIB_INTERNAL_H_
-#include <PiDxe.h>
+#include <Uefi.h>
#include <Library/UsbLib.h>
#include <Library/BaseMemoryLib.h>