]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiLib/UefiNotTiano.c
Cleanup "Tiano" word.
[mirror_edk2.git] / MdePkg / Library / UefiLib / UefiNotTiano.c
index f51a16cb7e7a2a648bddd7c557c97f24b2a9f880..b2e01997f8daf52562b007e4de2cad70d6c0c9cb 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  Library functions that abstract areas of conflict between Tiano an UEFI 2.0.\r
+  Library functions that abstract areas of conflict between framework and UEFI 2.0.\r
 \r
-  Help Port Framework/Tinao code that has conflicts with UEFI 2.0 by hiding the\r
-  oldconflicts with library functions and supporting implementations of the old\r
+  Help Port Framework code that has conflicts with UEFI 2.0 by hiding the\r
+  old conflicts with library functions and supporting implementations of the old\r
   (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as\r
   it contains DXE enum extensions for EFI event services.\r
 \r
@@ -18,19 +18,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
+\r
 #include "UefiLibInternal.h"\r
 \r
 /**\r
   An empty function to pass error checking of CreateEventEx ().\r
 \r
-  This empty function ensures that EFI_EVENT_NOTIFY_SIGNAL_ALL is error\r
+  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error\r
   checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.\r
\r
+  @param  Event                 Event whose notification function is being invoked.\r
+  @param  Context               Pointer to the notification function's context,\r
+                                which is implementation-dependent.\r
 \r
 **/\r
-STATIC\r
 VOID\r
 EFIAPI\r
 InternalEmptyFuntion (\r
@@ -42,15 +43,16 @@ InternalEmptyFuntion (
 }\r
 \r
 /**\r
-  Create a Legacy Boot Event.\r
-\r
-  Tiano extended the CreateEvent Type enum to add a legacy boot event type.\r
-  This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
-  added and now it's possible to not voilate the UEFI specification by\r
-  declaring a GUID for the legacy boot event class. This library supports\r
-  the EDK/EFI 1.10 form and EDK II/UEFI 2.0 form and allows common code to\r
-  work both ways.\r
-\r
+  Creates an EFI event in the Legacy Boot Event Group.  Prior to UEFI 2.0 this \r
+  was done via a non blessed UEFI extensions and this library abstracts the \r
+  implementation mechanism of this event from the caller.\r
+  \r
+  This function abstracts the creation of the Legacy Boot Event.  The Framework \r
+  moved from a proprietary to UEFI 2.0 based mechanism.  This library abstracts \r
+  the caller from how this event is created to prevent to code form having to \r
+  change with the version of the specification supported.\r
+  If LegacyBootEvent is NULL, then ASSERT().\r
+  \r
   @param  LegacyBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
 \r
   @retval EFI_SUCCESS       Event was created.\r
@@ -126,16 +128,17 @@ EfiCreateEventLegacyBootEx (
 }\r
 \r
 /**\r
-  Create a Read to Boot Event.\r
-\r
-  Tiano extended the CreateEvent Type enum to add a ready to boot event type.\r
-  This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
-  added and now it's possible to not voilate the UEFI specification and use\r
-  the ready to boot event class defined in UEFI 2.0. This library supports\r
-  the EDK/EFI 1.10 form and EDK II/UEFI 2.0 form and allows common code to\r
-  work both ways.\r
+  Create an EFI event in the Ready To Boot Event Group.  Prior to UEFI 2.0 this \r
+  was done via a non-standard UEFI extension, and this library abstracts the \r
+  implementation mechanism of this event from the caller.\r
+  \r
+  This function abstracts the creation of the Ready to Boot Event.  The Framework \r
+  moved from a proprietary to UEFI 2.0-based mechanism.  This library abstracts \r
+  the caller from how this event is created to prevent the code form having to \r
+  change with the version of the specification supported.\r
+  If ReadyToBootEvent is NULL, then ASSERT().\r
 \r
-  @param  LegacyBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+  @param  ReadyToBootEvent  Returns the EFI event returned from gBS->CreateEvent(Ex).\r
 \r
   @retval EFI_SUCCESS       Event was created.\r
   @retval Other             Event was not created.\r
@@ -168,7 +171,7 @@ EfiCreateEventReadyToBoot (
   @param  NotifyTpl         The task priority level of the event.\r
   @param  NotifyFunction    The notification function to call when the event is signaled.\r
   @param  NotifyContext     The content to pass to NotifyFunction when the event is signaled.\r
-  @param  LegacyBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+  @param  ReadyToBootEvent  Returns the EFI event returned from gBS->CreateEvent(Ex).\r
 \r
   @retval EFI_SUCCESS       Event was created.\r
   @retval Other             Event was not created.\r
@@ -258,18 +261,17 @@ EfiSignalEventLegacyBoot (
 \r
 \r
 /**\r
-  Check to see if the Firmware Volume (FV) Media Device Path is valid\r
-\r
-  Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum\r
-  so as we move to UEFI 2.0 support we must use a mechanism that conforms with\r
-  the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed\r
-  device path is defined for Tiano extensions of device path. If the code\r
-  is compiled to conform with the UEFI 2.0 specification use the new device path\r
-  else use the old form for backwards compatability. The return value to this\r
-  function points to a location in FvDevicePathNode and it does not allocate\r
-  new memory for the GUID pointer that is returned.\r
-\r
-  @param  FvDevicePathNode  Pointer to FV device path to check.\r
+  The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification.  \r
+  This library function abstracts validating a device path node.\r
+\r
+  Check the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure to see if it's valid.  \r
+  If it is valid, then return the GUID file name from the device path node.  \r
+  Otherwise, return NULL.  This device path changed in the DXE CIS version 0.92 \r
+  in a non back ward compatible way to not conflict with the UEFI 2.0 specification.  \r
+  This function abstracts the differences from the caller.\r
+  If FvDevicePathNode is NULL, then ASSERT().\r
+  \r
+  @param  FvFileDevicePathNode  Pointer to FV device path to check.\r
 \r
   @retval NULL              FvDevicePathNode is not valid.\r
   @retval Other             FvDevicePathNode is valid and pointer to NameGuid was returned.\r
@@ -283,9 +285,8 @@ EfiGetNameGuidFromFwVolDevicePathNode (
 {\r
   ASSERT (FvFileDevicePathNode != NULL);\r
 \r
-  if (FvFileDevicePathNode->Header.Type == MEDIA_DEVICE_PATH &&\r
-      FvFileDevicePathNode->Header.SubType == MEDIA_PIWG_FW_FILE_DP\r
-     ) {\r
+  if (DevicePathType (&FvFileDevicePathNode->Header) == MEDIA_DEVICE_PATH &&\r
+      DevicePathSubType (&FvFileDevicePathNode->Header) == MEDIA_PIWG_FW_FILE_DP) {\r
     return (EFI_GUID *) &FvFileDevicePathNode->FvFileName;\r
   }\r
 \r
@@ -294,16 +295,17 @@ EfiGetNameGuidFromFwVolDevicePathNode (
 \r
 \r
 /**\r
-  Initialize a Firmware Volume (FV) Media Device Path node.\r
+  The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification.  \r
+  This library function abstracts initializing a device path node.\r
 \r
-  Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum\r
-  so as we move to UEFI 2.0 support we must use a mechanism that conforms with\r
-  the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed\r
-  device path is defined for Tiano extensions of device path. If the code\r
-  is compiled to conform with the UEFI 2.0 specification use the new device path\r
-  else use the old form for backwards compatability.\r
+  Initialize the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure.  This device \r
+  path changed in the DXE CIS version 0.92 in a non back ward compatible way to \r
+  not conflict with the UEFI 2.0 specification.  This function abstracts the \r
+  differences from the caller.\r
+  If FvDevicePathNode is NULL, then ASSERT().\r
+  If NameGuid is NULL, then ASSERT().\r
 \r
-  @param  FvDevicePathNode  Pointer to a FV device path node to initialize\r
+  @param  FvFileDevicePathNode  Pointer to a FV device path node to initialize\r
   @param  NameGuid          FV file name to use in FvDevicePathNode\r
 \r
 **/\r