]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Runtime.h
Code have been checked with spec
[mirror_edk2.git] / MdePkg / Include / Protocol / Runtime.h
index 355fa83fee976640be27134b82a5fbd426c3ac49..2dfd320a04e33f8d2b51c1df5d8d6897589fbb21 100644 (file)
@@ -1,17 +1,14 @@
 /** @file\r
   Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE\r
 \r
-  This code is used to produce the UEFI 2.0 runtime virtual switch over\r
-\r
-  This driver must add SetVirtualAddressMap () and ConvertPointer () to\r
-  the EFI system table. This driver is not responcible for CRCing the \r
-  EFI system table.\r
-\r
-  This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a \r
-  pointer to the Runtime Arch Protocol instance structure. The protocol\r
-  member functions are used by the DXE core to export information need\r
-  by this driver to produce the runtime transition to virtual mode\r
-  calling.\r
+  Allows the runtime functionality of the DXE Foundation to be contained \r
+  in a separate driver. It also provides hooks for the DXE Foundation to \r
+  export information that is needed at runtime. As such, this protocol allows \r
+  services to the DXE Foundation to manage runtime drivers and events. \r
+  This protocol also implies that the runtime services required to transition \r
+  to virtual mode, SetVirtualAddressMap() and ConvertPointer(), have been \r
+  registered into the UEFI Runtime Table in the UEFI System Table. This protocol \r
+  must be produced by a runtime DXE driver and may only be consumed by the DXE Foundation.\r
 \r
   Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
@@ -42,85 +39,88 @@ typedef LIST_ENTRY EFI_LIST_ENTRY;
 \r
 typedef struct _EFI_RUNTIME_IMAGE_ENTRY  EFI_RUNTIME_IMAGE_ENTRY;\r
 \r
+///\r
+/// EFI_RUNTIME_IMAGE_ENTRY\r
+///\r
 struct _EFI_RUNTIME_IMAGE_ENTRY {\r
+  ///\r
+  /// Start of image that has been loaded in memory. It is a pointer \r
+  /// to either the DOS header or PE header of the image.\r
+  ///\r
   VOID                    *ImageBase;\r
+  ///\r
+  /// Size in bytes of the image represented by ImageBase.\r
+  ///\r
   UINT64                  ImageSize;\r
+  ///\r
+  /// Information about the fix-ups that were performed on ImageBase when it was\r
+  /// loaded into memory.\r
+  ///\r
   VOID                    *RelocationData;\r
+  ///\r
+  /// The ImageHandle passed into ImageBase when it was loaded.\r
+  ///\r
   EFI_HANDLE              Handle;\r
+  ///\r
+  /// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list.\r
+  ///\r
   EFI_LIST_ENTRY          Link;\r
 };\r
 \r
 typedef struct _EFI_RUNTIME_EVENT_ENTRY  EFI_RUNTIME_EVENT_ENTRY;\r
 \r
+///\r
+/// EFI_RUNTIME_EVENT_ENTRY\r
+///\r
 struct _EFI_RUNTIME_EVENT_ENTRY {\r
-  UINT32                  Type;\r
-  EFI_TPL                 NotifyTpl;\r
-  EFI_EVENT_NOTIFY        NotifyFunction;\r
-  VOID                    *NotifyContext;\r
-  EFI_EVENT               *Event;\r
-  EFI_LIST_ENTRY          Link;\r
-};\r
-\r
-//\r
-// Interface stucture for the Runtime Architectural Protocol\r
-//\r
-/**\r
-  @par Protocol Description:\r
-  Allows the runtime functionality of the DXE Foundation to be contained in a \r
-  separate driver. It also provides hooks for the DXE Foundation to export \r
-  information that is needed at runtime. As such, this protocol allows the DXE \r
-  Foundation to manage runtime drivers and events. This protocol also implies \r
-  that the runtime services required to transition to virtual mode, \r
-  SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r
-  EFI Runtime Table in the EFI System Partition.  This protocol must be produced \r
-  by a runtime DXE driver and may only be consumed by the DXE Foundation.\r
-**/\r
-struct _EFI_RUNTIME_ARCH_PROTOCOL {\r
-  ///\r
-  /// A list of type EFI_RUNTIME_IMAGE_ENTRY.\r
-  ///\r
-  EFI_LIST_ENTRY          ImageHead;\r
-  \r
   ///\r
-  /// A list of type EFI_RUNTIME_EVENT_ENTRY.\r
+  /// The same as Type passed into CreateEvent().\r
   ///\r
-  EFI_LIST_ENTRY          EventHead;\r
-  \r
-  ///\r
-  /// Size of a memory descriptor that is return by GetMemoryMap().\r
-  ///\r
-  UINTN                   MemoryDescriptorSize;\r
-  \r
-  ///\r
-  /// Version of a memory descriptor that is return by GetMemoryMap().\r
-  ///\r
-  UINT32                  MemoryDesciptorVersion;\r
-  \r
+  UINT32                  Type;\r
   ///\r
-  /// Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r
+  /// The same as NotifyTpl passed into CreateEvent().\r
   ///\r
-  UINTN                   MemoryMapSize;\r
-  \r
+  EFI_TPL                 NotifyTpl;\r
   ///\r
-  /// Pointer to a runtime buffer that contains a copy of \r
-  /// the memory map returned via GetMemoryMap().\r
+  /// The same as NotifyFunction passed into CreateEvent().\r
   ///\r
-  EFI_MEMORY_DESCRIPTOR   *MemoryMapPhysical;\r
-  \r
+  EFI_EVENT_NOTIFY        NotifyFunction;\r
   ///\r
-  /// Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r
+  /// The same as NotifyContext passed into CreateEvent().\r
   ///\r
-  EFI_MEMORY_DESCRIPTOR   *MemoryMapVirtual;\r
-  \r
+  VOID                    *NotifyContext;\r
   ///\r
-  /// Boolean that is TRUE if SetVirtualAddressMap() has been called.\r
+  /// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory.\r
   ///\r
-  BOOLEAN                 VirtualMode;\r
-  \r
+  EFI_EVENT               *Event;\r
   ///\r
-  /// Boolean that is TRUE if ExitBootServices () has been called.\r
+  /// Entry for this node in the\r
+  /// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list.\r
   ///\r
-  BOOLEAN                 AtRuntime;\r
+  EFI_LIST_ENTRY          Link;\r
+};\r
+\r
+///\r
+/// Allows the runtime functionality of the DXE Foundation to be contained in a \r
+/// separate driver. It also provides hooks for the DXE Foundation to export \r
+/// information that is needed at runtime. As such, this protocol allows the DXE \r
+/// Foundation to manage runtime drivers and events. This protocol also implies \r
+/// that the runtime services required to transition to virtual mode, \r
+/// SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r
+/// EFI Runtime Table in the EFI System Partition.  This protocol must be produced \r
+/// by a runtime DXE driver and may only be consumed by the DXE Foundation.\r
+///\r
+struct _EFI_RUNTIME_ARCH_PROTOCOL {\r
+  EFI_LIST_ENTRY          ImageHead;    ///< A list of type EFI_RUNTIME_IMAGE_ENTRY.\r
+  EFI_LIST_ENTRY          EventHead;    ///< A list of type EFI_RUNTIME_EVENT_ENTRY.\r
+  UINTN                   MemoryDescriptorSize;   ///< Size of a memory descriptor that is return by GetMemoryMap().\r
+  UINT32                  MemoryDesciptorVersion; ///< Version of a memory descriptor that is return by GetMemoryMap().\r
+  UINTN                   MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r
+  EFI_MEMORY_DESCRIPTOR   *MemoryMapPhysical;     ///< Pointer to a runtime buffer that contains a copy of \r
+                                                  ///< the memory map returned via GetMemoryMap().\r
+  EFI_MEMORY_DESCRIPTOR   *MemoryMapVirtual;      ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r
+  BOOLEAN                 VirtualMode;  ///< Boolean that is TRUE if SetVirtualAddressMap() has been called.\r
+  BOOLEAN                 AtRuntime;    ///< Boolean that is TRUE if ExitBootServices () has been called.\r
 };\r
 \r
 extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r