From 8b9f28994a1b5702ce33e62e55d1595b1a056892 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 25 Jan 2018 10:50:39 +0530 Subject: vendorcode/intel: Add UDK2017 support This patch includes (edk2/UDK2017) all required headers for UDK2017 from EDK2 github project using below command >> git clone https://github.com/tianocore/edk2.git vUDK2017 commit hash: 66833b2a87d98be8d81d1337c193bcbf0de47d47 Change-Id: If0d5a3fef016c67e9eed6aed9b698b3b13b930c4 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/23425 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh --- .../edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h (limited to 'src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h') diff --git a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h new file mode 100644 index 0000000000..21e9b75fb7 --- /dev/null +++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/Runtime.h @@ -0,0 +1,128 @@ +/** @file + Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE + + 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 + services to 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 UEFI Runtime Table in the UEFI System Table. This protocol + must be produced by a runtime DXE driver and may only be consumed by the DXE Foundation. + + Copyright (c) 2006 - 2008, 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. + +**/ + +#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; + +/// +/// EFI_RUNTIME_IMAGE_ENTRY +/// +struct _EFI_RUNTIME_IMAGE_ENTRY { + /// + /// Start of image that has been loaded in memory. It is a pointer + /// to either the DOS header or PE header of the image. + /// + VOID *ImageBase; + /// + /// Size in bytes of the image represented by ImageBase. + /// + UINT64 ImageSize; + /// + /// Information about the fix-ups that were performed on ImageBase when it was + /// loaded into memory. + /// + VOID *RelocationData; + /// + /// The ImageHandle passed into ImageBase when it was loaded. + /// + EFI_HANDLE Handle; + /// + /// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list. + /// + EFI_LIST_ENTRY Link; +}; + +typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY; + +/// +/// EFI_RUNTIME_EVENT_ENTRY +/// +struct _EFI_RUNTIME_EVENT_ENTRY { + /// + /// The same as Type passed into CreateEvent(). + /// + UINT32 Type; + /// + /// The same as NotifyTpl passed into CreateEvent(). + /// + EFI_TPL NotifyTpl; + /// + /// The same as NotifyFunction passed into CreateEvent(). + /// + EFI_EVENT_NOTIFY NotifyFunction; + /// + /// The same as NotifyContext passed into CreateEvent(). + /// + VOID *NotifyContext; + /// + /// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory. + /// + EFI_EVENT *Event; + /// + /// Entry for this node in the + /// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list. + /// + EFI_LIST_ENTRY Link; +}; + +/// +/// 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. +/// +struct _EFI_RUNTIME_ARCH_PROTOCOL { + EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY. + EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY. + UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is returned by GetMemoryMap(). + UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is returned by GetMemoryMap(). + UINTN MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. + EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of + ///< the memory map returned via GetMemoryMap(). + EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap(). + BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called. + BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called. +}; + +extern EFI_GUID gEfiRuntimeArchProtocolGuid; + +#endif -- cgit v1.2.3