summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Protocol/Runtime.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-19 10:12:02 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-19 10:12:02 +0000
commitd1f950002362305fcd4c30f108ef7b76679f5843 (patch)
tree7cf4fd91cedb0adf0cb570c5ae95b774a916630a /MdePkg/Include/Protocol/Runtime.h
parent00edb2182b6203a037219c29317ab6362c78b422 (diff)
downloadedk2-d1f950002362305fcd4c30f108ef7b76679f5843.tar.gz
edk2-d1f950002362305fcd4c30f108ef7b76679f5843.tar.bz2
edk2-d1f950002362305fcd4c30f108ef7b76679f5843.zip
Checked in the Protocols introduced in UEFI/PI.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2674 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Protocol/Runtime.h')
-rw-r--r--MdePkg/Include/Protocol/Runtime.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/MdePkg/Include/Protocol/Runtime.h b/MdePkg/Include/Protocol/Runtime.h
new file mode 100644
index 0000000000..1f7504a9fc
--- /dev/null
+++ b/MdePkg/Include/Protocol/Runtime.h
@@ -0,0 +1,126 @@
+/** @file
+ Runtime Architectural Protocol as defined in DXE CIS
+
+ This code is used to produce the EFI 1.0 runtime virtual switch over
+
+ This driver must add SetVirtualAddressMap () and ConvertPointer () to
+ the EFI system table. This driver is not responcible for CRCing the
+ EFI system table.
+
+ This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a
+ pointer to the Runtime Arch Protocol instance structure. The protocol
+ member functions are used by the DXE core to export information need
+ by this driver to produce the runtime transition to virtual mode
+ calling.
+
+ Copyright (c) 2006, Intel Corporation
+ 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.
+
+ Module Name: Runtime.h
+
+ @par Revision Reference:
+ Version 0.91.
+
+**/
+
+#ifndef __ARCH_PROTOCOL_RUNTIME_H__
+#define __ARCH_PROTOCOL_RUNTIME_H__
+
+//
+// Global ID for the Runtime Architectural Protocol
+//
+#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
+ { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }
+
+typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;
+
+//
+// LIST_ENTRY from BaseType
+//
+typedef LIST_ENTRY EFI_LIST_ENTRY;
+
+typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;
+
+struct _EFI_RUNTIME_IMAGE_ENTRY {
+ VOID *ImageBase;
+ UINT64 ImageSize;
+ VOID *RelocationData;
+ EFI_HANDLE Handle;
+ EFI_LIST_ENTRY Link;
+};
+
+typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;
+
+struct _EFI_RUNTIME_EVENT_ENTRY {
+ UINT32 Type;
+ EFI_TPL NotifyTpl;
+ EFI_EVENT_NOTIFY NotifyFunction;
+ VOID *NotifyContext;
+ EFI_EVENT *Event;
+ EFI_LIST_ENTRY Link;
+};
+
+//
+// Interface stucture for the Runtime Architectural Protocol
+//
+/**
+ @par Protocol Description:
+ Allows the runtime functionality of the DXE Foundation to be contained in a
+ separate driver. It also provides hooks for the DXE Foundation to export
+ information that is needed at runtime. As such, this protocol allows the DXE
+ Foundation to manage runtime drivers and events. This protocol also implies
+ that the runtime services required to transition to virtual mode,
+ SetVirtualAddressMap() and ConvertPointer(), have been registered into the
+ EFI Runtime Table in the EFI System Partition. This protocol must be produced
+ by a runtime DXE driver and may only be consumed by the DXE Foundation.
+
+ @param ImageHead
+ A list of type EFI_RUNTIME_IMAGE_ENTRY.
+
+ @param EventHead
+ A list of type EFI_RUNTIME_EVENT_ENTRY.
+
+ @param MemoryDescriptorSize
+ Size of a memory descriptor that is return by GetMemoryMap().
+
+ @param MemoryDescriptorVersion
+ Version of a memory descriptor that is return by GetMemoryMap().
+
+ @param MemoryMapSize
+ Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual.
+
+ @param MemoryMapPhysical
+ Pointer to a runtime buffer that contains a copy of
+ the memory map returned via GetMemoryMap().
+
+ @param MemoryMapVirtual
+ Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().
+
+ @param VirtualMode
+ Boolean that is TRUE if SetVirtualAddressMap() has been called.
+
+ @param AtRuntime
+ Boolean that is TRUE if ExitBootServices () has been called.
+
+**/
+struct _EFI_RUNTIME_ARCH_PROTOCOL {
+ EFI_LIST_ENTRY ImageHead;
+ EFI_LIST_ENTRY EventHead;
+ UINTN MemoryDescriptorSize;
+ UINT32 MemoryDesciptorVersion;
+ UINTN MemoryMapSize;
+ EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical;
+ EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual;
+ BOOLEAN VirtualMode;
+ BOOLEAN AtRuntime;
+};
+
+extern EFI_GUID gEfiRuntimeArchProtocolGuid;
+
+#endif