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/MmBase.h | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/MmBase.h (limited to 'src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/MmBase.h') diff --git a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/MmBase.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/MmBase.h new file mode 100644 index 0000000000..4ce410e3f1 --- /dev/null +++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/MmBase.h @@ -0,0 +1,87 @@ +/** @file + EFI MM Base Protocol as defined in the PI 1.5 specification. + + This protocol is utilized by all MM drivers to locate the MM infrastructure services and determine + whether the driver is being invoked inside MMRAM or outside of MMRAM. + + Copyright (c) 2017, 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 _MM_BASE_H_ +#define _MM_BASE_H_ + +#include + +#define EFI_MM_BASE_PROTOCOL_GUID \ + { \ + 0xf4ccbfb7, 0xf6e0, 0x47fd, {0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 } \ + } + +typedef struct _EFI_MM_BASE_PROTOCOL EFI_MM_BASE_PROTOCOL; + +/** + Service to indicate whether the driver is currently executing in the MM Initialization phase. + + This service is used to indicate whether the driver is currently executing in the MM Initialization + phase. For MM drivers, this will return TRUE in InMmram while inside the driver's entry point and + otherwise FALSE. For combination MM/DXE drivers, this will return FALSE in the DXE launch. For the + MM launch, it behaves as an MM driver. + + @param[in] This The EFI_MM_BASE_PROTOCOL instance. + @param[out] InMmram Pointer to a Boolean which, on return, indicates that the driver is + currently executing inside of MMRAM (TRUE) or outside of MMRAM (FALSE). + + @retval EFI_SUCCESS The call returned successfully. + @retval EFI_INVALID_PARAMETER InMmram was NULL. +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_MM_INSIDE_OUT)( + IN CONST EFI_MM_BASE_PROTOCOL *This, + OUT BOOLEAN *InMmram + ) +; + +/** + Returns the location of the Management Mode Service Table (MMST). + + This function returns the location of the Management Mode Service Table (MMST). The use of the + API is such that a driver can discover the location of the MMST in its entry point and then cache it in + some driver global variable so that the MMST can be invoked in subsequent handlers. + + @param[in] This The EFI_MM_BASE_PROTOCOL instance. + @param[in,out] Mmst On return, points to a pointer to the Management Mode Service Table (MMST). + + @retval EFI_SUCCESS The operation was successful. + @retval EFI_INVALID_PARAMETER Mmst was invalid. + @retval EFI_UNSUPPORTED Not in MM. +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_MM_GET_MMST_LOCATION)( + IN CONST EFI_MM_BASE_PROTOCOL *This, + IN OUT EFI_MM_SYSTEM_TABLE **Mmst + ) +; + +/// +/// EFI MM Base Protocol is utilized by all MM drivers to locate the MM infrastructure +/// services and determine whether the driver is being invoked inside MMRAM or outside of MMRAM. +/// +struct _EFI_MM_BASE_PROTOCOL { + EFI_MM_INSIDE_OUT InMm; + EFI_MM_GET_MMST_LOCATION GetMmstLocation; +}; + +extern EFI_GUID gEfiMmBaseProtocolGuid; + +#endif + -- cgit v1.2.3