]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmConfiguration.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmConfiguration.h
CommitLineData
978da309 1/** @file\r
2 EFI SMM Configuration Protocol as defined in the PI 1.2 specification.\r
3\r
4 This protocol is used to:\r
5 1) report the portions of SMRAM regions which cannot be used for the SMRAM heap.\r
6 2) register the SMM Foundation entry point with the processor code. The entry\r
7 point will be invoked by the SMM processor entry code.\r
8 \r
2f208e59 9 Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
9df063a0 10 This program and the accompanying materials \r
978da309 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 _SMM_CONFIGURATION_H_\r
21#define _SMM_CONFIGURATION_H_\r
22\r
2f208e59 23#include <Protocol/MmConfiguration.h>\r
978da309 24#include <Pi/PiSmmCis.h>\r
25\r
2f208e59 26#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID EFI_MM_CONFIGURATION_PROTOCOL_GUID\r
978da309 27\r
28///\r
29/// Structure describing a SMRAM region which cannot be used for the SMRAM heap.\r
30///\r
31typedef struct _EFI_SMM_RESERVED_SMRAM_REGION {\r
32 ///\r
33 /// Starting address of the reserved SMRAM area, as it appears while SMRAM is open. \r
34 /// Ignored if SmramReservedSize is 0.\r
35 ///\r
36 EFI_PHYSICAL_ADDRESS SmramReservedStart;\r
37 ///\r
38 /// Number of bytes occupied by the reserved SMRAM area. A size of zero indicates the \r
39 /// last SMRAM area.\r
40 ///\r
41 UINT64 SmramReservedSize;\r
42} EFI_SMM_RESERVED_SMRAM_REGION;\r
43\r
44typedef struct _EFI_SMM_CONFIGURATION_PROTOCOL EFI_SMM_CONFIGURATION_PROTOCOL;\r
45\r
46/**\r
47 Register the SMM Foundation entry point.\r
48 \r
49 This function registers the SMM Foundation entry point with the processor code. This entry point \r
50 will be invoked by the SMM Processor entry code.\r
51\r
52 @param[in] This The EFI_SMM_CONFIGURATION_PROTOCOL instance.\r
53 @param[in] SmmEntryPoint SMM Foundation entry point.\r
54 \r
55 @retval EFI_SUCCESS Success to register SMM Entry Point.\r
56 @retval EFI_INVALID_PARAMETER SmmEntryPoint is NULL.\r
57**/\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *EFI_SMM_REGISTER_SMM_ENTRY)(\r
61 IN CONST EFI_SMM_CONFIGURATION_PROTOCOL *This,\r
62 IN EFI_SMM_ENTRY_POINT SmmEntryPoint\r
63 );\r
64\r
65///\r
66/// The EFI SMM Configuration Protocol is a mandatory protocol published by a DXE CPU driver to\r
67/// indicate which areas within SMRAM are reserved for use by the CPU for any purpose, \r
68/// such as stack, save state or SMM entry point.\r
69///\r
70/// The RegisterSmmEntry() function allows the SMM IPL DXE driver to register the SMM \r
71/// Foundation entry point with the SMM entry vector code.\r
72///\r
73struct _EFI_SMM_CONFIGURATION_PROTOCOL {\r
74 ///\r
75 /// A pointer to an array SMRAM ranges used by the initial SMM entry code.\r
76 ///\r
77 EFI_SMM_RESERVED_SMRAM_REGION *SmramReservedRegions;\r
78 EFI_SMM_REGISTER_SMM_ENTRY RegisterSmmEntry;\r
79};\r
80\r
81extern EFI_GUID gEfiSmmConfigurationProtocolGuid;\r
82\r
83#endif\r
84\r