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