]> git.proxmox.com Git - mirror_edk2.git/blob - UefiPayloadPkg/Include/Guid/SmmS3CommunicationInfoGuid.h
0f7006a5f485bd3f9295c1cbd90c8930c63d022a
[mirror_edk2.git] / UefiPayloadPkg / Include / Guid / SmmS3CommunicationInfoGuid.h
1 /** @file
2 This file defines the SMM S3 communication hob structure.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef PAYLOAD_S3_COMMUNICATION_GUID_H_
10 #define PAYLOAD_S3_COMMUNICATION_GUID_H_
11
12 extern EFI_GUID gS3CommunicationGuid;
13
14 #pragma pack(1)
15
16 typedef struct {
17 EFI_SMRAM_DESCRIPTOR CommBuffer;
18 BOOLEAN PldAcpiS3Enable;
19 } PLD_S3_COMMUNICATION;
20
21 ///
22 /// The information below is used for communication between bootloader and payload.
23 /// It is used to save/store some registers in S3 path
24 ///
25 /// This region exists only when gEfiAcpiVariableGuid HOB exist.
26 /// when PLD_S3_INFO.PldAcpiS3Enable is false, the communication buffer is defined as below.
27 ///
28
29 typedef struct {
30 UINT32 ApicId;
31 UINT32 SmmBase;
32 } CPU_SMMBASE;
33
34 typedef struct {
35 UINT8 SwSmiData;
36 UINT8 SwSmiTriggerValue;
37 UINT16 Reserved;
38 UINT32 CpuCount;
39 CPU_SMMBASE SmmBase[0];
40 } SMM_S3_INFO;
41
42 //
43 // Payload would save this structure to S3 communication area in normal boot.
44 // In S3 path, bootloader need restore SMM base and writie IO port 0xB2 with SwSmiTriggerValue
45 // to trigger SMI to let payload to restore S3.
46 //
47 typedef struct {
48 EFI_HOB_GUID_TYPE Header;
49 SMM_S3_INFO S3Info;
50 } PLD_TO_BL_SMM_INFO;
51
52 #pragma pack()
53
54 #endif