]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/MmConfiguration.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[mirror_edk2.git] / MdePkg / Include / Protocol / MmConfiguration.h
CommitLineData
07c6a47e
ED
1/** @file\r
2 EFI MM Configuration Protocol as defined in the PI 1.5 specification.\r
3\r
4 This protocol is used to:\r
5 1) report the portions of MMRAM regions which cannot be used for the MMRAM heap.\r
6 2) register the MM Foundation entry point with the processor code. The entry\r
7 point will be invoked by the MM processor entry code.\r
8\r
9 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
10 This program and the accompanying materials\r
11 are licensed and made available under the terms and conditions of the BSD License\r
12 which accompanies this distribution. The full text of the license may be found at\r
13 http://opensource.org/licenses/bsd-license.php\r
14\r
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
17\r
18**/\r
19\r
20#ifndef _MM_CONFIGURATION_H_\r
21#define _MM_CONFIGURATION_H_\r
22\r
23#include <Pi/PiMmCis.h>\r
24\r
25#define EFI_MM_CONFIGURATION_PROTOCOL_GUID \\r
26 { \\r
27 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 } \\r
28 }\r
29\r
30///\r
31/// Structure describing a MMRAM region which cannot be used for the MMRAM heap.\r
32///\r
33typedef struct _EFI_MM_RESERVED_MMRAM_REGION {\r
34 ///\r
35 /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.\r
36 /// Ignored if MmramReservedSize is 0.\r
37 ///\r
38 EFI_PHYSICAL_ADDRESS MmramReservedStart;\r
39 ///\r
40 /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the\r
41 /// last MMRAM area.\r
42 ///\r
43 UINT64 MmramReservedSize;\r
44} EFI_MM_RESERVED_MMRAM_REGION;\r
45\r
46typedef struct _EFI_MM_CONFIGURATION_PROTOCOL EFI_MM_CONFIGURATION_PROTOCOL;\r
47\r
48/**\r
49 Register the MM Foundation entry point.\r
50\r
51 This function registers the MM Foundation entry point with the processor code. This entry point\r
52 will be invoked by the MM Processor entry code.\r
53\r
54 @param[in] This The EFI_MM_CONFIGURATION_PROTOCOL instance.\r
55 @param[in] MmEntryPoint MM Foundation entry point.\r
56\r
57 @retval EFI_SUCCESS Success to register MM Entry Point.\r
58 @retval EFI_INVALID_PARAMETER MmEntryPoint is NULL.\r
59**/\r
60typedef\r
61EFI_STATUS\r
62(EFIAPI *EFI_MM_REGISTER_MM_ENTRY)(\r
63 IN CONST EFI_MM_CONFIGURATION_PROTOCOL *This,\r
64 IN EFI_MM_ENTRY_POINT MmEntryPoint\r
65 );\r
66\r
67///\r
68/// The EFI MM Configuration Protocol is a mandatory protocol published by a DXE CPU driver to\r
69/// indicate which areas within MMRAM are reserved for use by the CPU for any purpose,\r
70/// such as stack, save state or MM entry point.\r
71///\r
72/// The RegistermmEntry() function allows the MM IPL DXE driver to register the MM\r
73/// Foundation entry point with the MM entry vector code.\r
74///\r
75struct _EFI_MM_CONFIGURATION_PROTOCOL {\r
76 ///\r
77 /// A pointer to an array MMRAM ranges used by the initial MM entry code.\r
78 ///\r
79 EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions;\r
80 EFI_MM_REGISTER_MM_ENTRY RegisterMmEntry;\r
81};\r
82\r
83extern EFI_GUID gEfiMmConfigurationProtocolGuid;\r
84\r
85#endif\r
86\r