1 | /** @file
|
---|
2 | Definitions for data structures used in S3 resume.
|
---|
3 |
|
---|
4 | Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | This program and the accompanying materials
|
---|
7 | are licensed and made available under the terms and conditions
|
---|
8 | of the BSD License which accompanies this distribution. The
|
---|
9 | full text of the license may be found at
|
---|
10 | http://opensource.org/licenses/bsd-license.php
|
---|
11 |
|
---|
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
14 |
|
---|
15 | **/
|
---|
16 |
|
---|
17 | #ifndef _ACPI_S3_DATA_H_
|
---|
18 | #define _ACPI_S3_DATA_H_
|
---|
19 |
|
---|
20 | #include <Library/BaseLib.h>
|
---|
21 |
|
---|
22 | #define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')
|
---|
23 | #define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')
|
---|
24 |
|
---|
25 | #pragma pack(1)
|
---|
26 |
|
---|
27 | typedef struct {
|
---|
28 | UINT64 Signature;
|
---|
29 | EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;
|
---|
30 | EFI_PHYSICAL_ADDRESS SmmS3StackBase;
|
---|
31 | UINT64 SmmS3StackSize;
|
---|
32 | UINT64 SmmS3Cr0;
|
---|
33 | UINT64 SmmS3Cr3;
|
---|
34 | UINT64 SmmS3Cr4;
|
---|
35 | UINT16 ReturnCs;
|
---|
36 | EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
|
---|
37 | EFI_PHYSICAL_ADDRESS ReturnContext1;
|
---|
38 | EFI_PHYSICAL_ADDRESS ReturnContext2;
|
---|
39 | EFI_PHYSICAL_ADDRESS ReturnStackPointer;
|
---|
40 | EFI_PHYSICAL_ADDRESS Smst;
|
---|
41 | } SMM_S3_RESUME_STATE;
|
---|
42 |
|
---|
43 |
|
---|
44 | typedef struct {
|
---|
45 | EFI_PHYSICAL_ADDRESS AcpiFacsTable;
|
---|
46 | EFI_PHYSICAL_ADDRESS IdtrProfile;
|
---|
47 | EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;
|
---|
48 | EFI_PHYSICAL_ADDRESS BootScriptStackBase;
|
---|
49 | UINT64 BootScriptStackSize;
|
---|
50 | EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
|
---|
51 | } ACPI_S3_CONTEXT;
|
---|
52 |
|
---|
53 | typedef struct {
|
---|
54 | UINT16 ReturnCs;
|
---|
55 | UINT64 ReturnStatus;
|
---|
56 | EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
|
---|
57 | EFI_PHYSICAL_ADDRESS ReturnStackPointer;
|
---|
58 | EFI_PHYSICAL_ADDRESS AsmTransferControl;
|
---|
59 | IA32_DESCRIPTOR Idtr;
|
---|
60 | } PEI_S3_RESUME_STATE;
|
---|
61 |
|
---|
62 | #pragma pack()
|
---|
63 |
|
---|
64 | #define EFI_ACPI_S3_CONTEXT_GUID \
|
---|
65 | { \
|
---|
66 | 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \
|
---|
67 | }
|
---|
68 |
|
---|
69 | extern EFI_GUID gEfiAcpiS3ContextGuid;
|
---|
70 |
|
---|
71 | extern EFI_GUID gEfiAcpiVariableGuid;
|
---|
72 |
|
---|
73 | #endif
|
---|