]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
Fix minor formatting issue.
[mirror_edk2.git] / MdePkg / Library / UefiApplicationEntryPoint / ApplicationEntryPoint.c
index d6d9beaaa1b5912aaf5443883383b63e76e5ba65..18b75a4a08d9770805d03314eae3306764a8251b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Entry point library instance to a UEFI application.\r
 \r
-Copyright (c) 2007, Intel Corporation<BR>\r
+Copyright (c) 2007 - 2008, Intel Corporation<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,14 +12,26 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
+#include <Uefi.h>\r
+#include <Library/UefiApplicationEntryPoint.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+\r
+\r
 /**\r
-  Enrty point to UEFI application.\r
+  Enrty point to UEFI Application.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  This function is the entry point for a UEFI Application. This function must call\r
+  ProcessLibraryConstructorList(), ProcessModuleEntryPointList(), and ProcessLibraryDestructorList().\r
+  The return value from ProcessModuleEntryPointList() is returned.\r
+  If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison,\r
+  then return EFI_INCOMPATIBLE_VERSION.\r
 \r
-  @retval  EFI_SUCCESS One or more of the drivers returned a success code.\r
-  @retval  !EFI_SUCESS The return status from the last driver entry point in the list.\r
+  @param  ImageHandle  The image handle of the UEFI Application.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
+\r
+  @retval  EFI_SUCCESS               The UEFI Application exited normally.\r
+  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
+  @retval  Other                     Return value from ProcessModuleEntryPointList().\r
 \r
 **/\r
 EFI_STATUS\r
@@ -61,14 +73,16 @@ _ModuleEntryPoint (
   return Status;\r
 }\r
 \r
+\r
 /**\r
-  Invoke the destuctors of all libraries and call gBS->Exit\r
-  to return control to firmware core.\r
+  Invokes the library destructors for all dependent libraries and terminates\r
+  the UEFI Application. \r
 \r
-  @param  Status Status returned by the application that is exiting.\r
-  \r
-  @retval VOID\r
+  This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
+  with a status specified by Status.\r
 \r
+  @param  Status  Status returned by the application that is exiting.\r
+  \r
 **/\r
 VOID\r
 EFIAPI\r
@@ -82,14 +96,16 @@ Exit (
   gBS->Exit (gImageHandle, Status, 0, NULL);\r
 }\r
 \r
+\r
 /**\r
-  Enrty point wrapper of UEFI Application.\r
+  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). \r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the UEFI Application.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
-  @retval  EFI_SUCCESS One or more of the drivers returned a success code.\r
-  @retval  !EFI_SUCESS The return status from the last driver entry point in the list.\r
+  @retval  EFI_SUCCESS               The UEFI Application exited normally.\r
+  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
+  @retval  Other                     Return value from ProcessModuleEntryPointList().\r
 \r
 **/\r
 EFI_STATUS\r