]> git.proxmox.com Git - mirror_edk2.git/blob - UefiPayloadPkg/BlSupportSmm/BlSupportSmm.h
UefiPayloadPkg: Add bootloader SMM support module
[mirror_edk2.git] / UefiPayloadPkg / BlSupportSmm / BlSupportSmm.h
1 /** @file
2 The header file of bootloader support SMM.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8 #ifndef BL_SUPPORT_SMM_H_
9 #define BL_SUPPORT_SMM_H_
10
11 #include <PiDxe.h>
12 #include <Library/BaseLib.h>
13 #include <Library/DebugLib.h>
14 #include <Library/IoLib.h>
15 #include <Library/HobLib.h>
16 #include <Library/MtrrLib.h>
17 #include <Library/UefiLib.h>
18 #include <Library/BaseMemoryLib.h>
19 #include <Library/MemoryAllocationLib.h>
20 #include <Library/SmmServicesTableLib.h>
21 #include <Library/PciLib.h>
22 #include <Protocol/SmmSwDispatch2.h>
23 #include <Protocol/SmmAccess2.h>
24 #include <protocol/MpService.h>
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Register/Intel/ArchitecturalMsr.h>
27 #include <Guid/SmmRegisterInfoGuid.h>
28 #include <Guid/SmmS3CommunicationInfoGuid.h>
29 #include <Guid/SmramMemoryReserve.h>
30
31 #define EFI_MSR_SMRR_MASK 0xFFFFF000
32 #define MSR_SMM_FEATURE_CONTROL 0x4E0
33 #define SMRAM_SAVE_STATE_MAP_OFFSET 0xFC00 /// Save state offset from SMBASE
34
35 typedef struct {
36 UINT32 Base;
37 UINT32 Mask;
38 } SMRR_BASE_MASK;
39
40 #endif
41