diff options
Diffstat (limited to 'MdePkg/Library/UefiLib')
-rw-r--r-- | MdePkg/Library/UefiLib/Console.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/UefiLib/UefiLib.c | 19 | ||||
-rw-r--r-- | MdePkg/Library/UefiLib/UefiLibPrint.c | 7 | ||||
-rw-r--r-- | MdePkg/Library/UefiLib/UefiNotTiano.c | 13 |
4 files changed, 30 insertions, 11 deletions
diff --git a/MdePkg/Library/UefiLib/Console.c b/MdePkg/Library/UefiLib/Console.c index 11b4befb94..737c69b46e 100644 --- a/MdePkg/Library/UefiLib/Console.c +++ b/MdePkg/Library/UefiLib/Console.c @@ -1,5 +1,5 @@ /** @file
- Mde UEFI library functions.
+ This module provide help function for displaying unicode string.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index 877c320ff7..e3fff09de3 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -47,6 +47,8 @@ CompareIso639LanguageCode ( Table for a table with a GUID that matches TableGuid. If a match is found,
then a pointer to the configuration table is returned in Table, and EFI_SUCCESS
is returned. If a matching GUID is not found, then EFI_NOT_FOUND is returned.
+ If TableGuid is NULL, then ASSERT().
+ If Table is NULL, then ASSERT().
@param TableGuid Pointer to table's GUID type..
@param Table Pointer to the table associated with TableGuid in the EFI System Table.
@@ -146,6 +148,9 @@ EfiCreateProtocolNotifyEvent( This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext.
This event is signaled with EfiNamedEventSignal(). This provide the ability for
one or more listeners on the same event named by the GUID specified by Name.
+ If Name is NULL, then ASSERT().
+ If NotifyTpl is not a legal TPL value, then ASSERT().
+ If NotifyFunction is NULL, then ASSERT().
@param Name Supplies GUID name of the event.
@param NotifyTpl Supplies the task priority level of the event notifications.
@@ -171,6 +176,10 @@ EfiNamedEventListen ( EFI_EVENT Event;
VOID *RegistrationLocal;
+ ASSERT (Name != NULL);
+ ASSERT (NotifyFunction != NULL);
+ ASSERT (NotifyTpl <= TPL_HIGH_LEVEL);
+
//
// Create event
//
@@ -204,7 +213,7 @@ EfiNamedEventListen ( );
ASSERT_EFI_ERROR (Status);
- return EFI_SUCCESS;
+ return Status;
}
/**
@@ -242,7 +251,7 @@ EfiNamedEventSignal ( );
ASSERT_EFI_ERROR (Status);
- return EFI_SUCCESS;
+ return Status;
}
/**
@@ -279,6 +288,8 @@ EfiGetCurrentTpl ( and returns the lock. Each lock provides mutual exclusion access at its task
priority level. Since there is no preemption or multiprocessor support in EFI,
acquiring the lock only consists of raising to the locks TPL.
+ If Lock is NULL, then ASSERT().
+ If Priority is not a valid TPL value, then ASSERT().
@param Lock A pointer to the lock data structure to initialize.
@param Priority EFI TPL associated with the lock.
@@ -306,6 +317,9 @@ EfiInitializeLock ( This function raises the system's current task priority level to the task
priority level of the mutual exclusion lock. Then, it places the lock in the
acquired state.
+ If Lock is NULL, then ASSERT().
+ If Lock is not initialized, then ASSERT().
+ If Lock is already in the acquired state, then ASSERT().
@param Lock The task lock with priority level.
@@ -671,6 +685,7 @@ LookupUnicodeString ( **/
EFI_STATUS
+
EFIAPI
LookupUnicodeString2 (
IN CONST CHAR8 *Language,
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c index c277974ab4..3787431c67 100644 --- a/MdePkg/Library/UefiLib/UefiLibPrint.c +++ b/MdePkg/Library/UefiLib/UefiLibPrint.c @@ -212,7 +212,6 @@ AsciiInternalPrint ( string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.
If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated ASCII format string.
@param ... VARARG list consumed to process Format.
@@ -230,7 +229,8 @@ AsciiPrint ( {
VA_LIST Marker;
UINTN Return;
-
+ ASSERT (Format != NULL);
+
VA_START (Marker, Format);
Return = AsciiInternalPrint( Format, gST->ConOut, Marker);
@@ -250,7 +250,6 @@ AsciiPrint ( string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.
If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated ASCII format string.
@param ... VARARG list consumed to process Format.
@@ -269,6 +268,8 @@ AsciiErrorPrint ( VA_LIST Marker;
UINTN Return;
+ ASSERT (Format != NULL);
+
VA_START (Marker, Format);
Return = AsciiInternalPrint( Format, gST->StdErr, Marker);
diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c index 0121481a60..4587b136ad 100644 --- a/MdePkg/Library/UefiLib/UefiNotTiano.c +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c @@ -1,8 +1,8 @@ /** @file
- Library functions that abstract areas of conflict between Tiano an UEFI 2.0.
+ Library functions that abstract areas of conflict between framework and UEFI 2.0.
- Help Port Framework/Tiano code that has conflicts with UEFI 2.0 by hiding the
- oldconflicts with library functions and supporting implementations of the old
+ Help Port Framework code that has conflicts with UEFI 2.0 by hiding the
+ old conflicts with library functions and supporting implementations of the old
(EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as
it contains DXE enum extensions for EFI event services.
@@ -129,7 +129,7 @@ EfiCreateEventLegacyBootEx ( }
/**
- Create a Read to Boot Event.
+ Create a "Ready to Boot" Event.
Tiano extended the CreateEvent Type enum to add a ready to boot event type.
This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was
@@ -271,7 +271,8 @@ EfiSignalEventLegacyBoot ( else use the old form for backwards compatability. The return value to this
function points to a location in FvDevicePathNode and it does not allocate
new memory for the GUID pointer that is returned.
-
+ If FvDevicePathNode is NULL, then ASSERT().
+
@param FvFileDevicePathNode Pointer to FV device path to check.
@retval NULL FvDevicePathNode is not valid.
@@ -304,6 +305,8 @@ EfiGetNameGuidFromFwVolDevicePathNode ( device path is defined for Tiano extensions of device path. If the code
is compiled to conform with the UEFI 2.0 specification use the new device path
else use the old form for backwards compatability.
+ If FvDevicePathNode is NULL, then ASSERT().
+ If NameGuid is NULL, then ASSERT().
@param FvFileDevicePathNode Pointer to a FV device path node to initialize
@param NameGuid FV file name to use in FvDevicePathNode
|