]>
Commit | Line | Data |
---|---|---|
be46cd5f | 1 | /** @file\r |
2 | The header file for Boot Script Executer module.\r | |
d1102dba LG |
3 | \r |
4 | This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory\r | |
5 | in the entry point. The functionality is to interpret and restore the S3 boot script\r | |
6 | \r | |
7 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
ab1a5a58 | 8 | Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r |
be46cd5f | 9 | \r |
9d510e61 | 10 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
be46cd5f | 11 | \r |
12 | **/\r | |
13 | #ifndef _BOOT_SCRIPT_EXECUTOR_H_\r | |
14 | #define _BOOT_SCRIPT_EXECUTOR_H_\r | |
15 | \r | |
16 | #include <PiDxe.h>\r | |
17 | \r | |
18 | #include <Library/BaseLib.h>\r | |
19 | #include <Library/UefiDriverEntryPoint.h>\r | |
20 | #include <Library/BaseMemoryLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | #include <Library/S3BootScriptLib.h>\r | |
23 | #include <Library/PeCoffLib.h>\r | |
24 | #include <Library/DxeServicesLib.h>\r | |
25 | #include <Library/UefiBootServicesTableLib.h>\r | |
26 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
27 | #include <Library/PcdLib.h>\r | |
28 | #include <Library/CacheMaintenanceLib.h>\r | |
be46cd5f | 29 | #include <Library/TimerLib.h>\r |
30 | #include <Library/UefiLib.h>\r | |
31 | #include <Library/DebugAgentLib.h>\r | |
32 | #include <Library/LockBoxLib.h>\r | |
1e172d6b | 33 | #include <Library/CpuExceptionHandlerLib.h>\r |
84edd20b | 34 | #include <Library/DevicePathLib.h>\r |
6a3094c9 | 35 | #include <Library/DxeServicesTableLib.h>\r |
be46cd5f | 36 | \r |
37 | #include <Guid/AcpiS3Context.h>\r | |
38 | #include <Guid/BootScriptExecutorVariable.h>\r | |
84edd20b SZ |
39 | #include <Guid/MemoryProfile.h>\r |
40 | \r | |
59cc677c | 41 | #include <Protocol/DxeSmmReadyToLock.h>\r |
be46cd5f | 42 | #include <IndustryStandard/Acpi.h>\r |
ab1a5a58 LD |
43 | \r |
44 | #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull\r | |
45 | \r | |
be46cd5f | 46 | /**\r |
47 | a ASM function to transfer control to OS.\r | |
d1102dba | 48 | \r |
be46cd5f | 49 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 50 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 51 | **/\r |
52 | VOID\r | |
53 | AsmTransferControl (\r | |
54 | IN UINT32 S3WakingVector,\r | |
55 | IN UINT32 AcpiLowMemoryBase\r | |
56 | );\r | |
57 | /**\r | |
58 | a 32bit ASM function to transfer control to OS.\r | |
d1102dba | 59 | \r |
be46cd5f | 60 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 61 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 62 | **/\r |
63 | VOID\r | |
64 | AsmTransferControl32 (\r | |
65 | IN UINT32 S3WakingVector,\r | |
66 | IN UINT32 AcpiLowMemoryBase\r | |
67 | );\r | |
68 | /**\r | |
69 | a 16bit ASM function to transfer control to OS.\r | |
70 | **/\r | |
71 | VOID\r | |
72 | AsmTransferControl16 (\r | |
73 | VOID\r | |
74 | );\r | |
75 | /**\r | |
d1102dba LG |
76 | Set a IDT entry for interrupt vector 3 for debug purpose.\r |
77 | \r | |
78 | @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT\r | |
79 | \r | |
be46cd5f | 80 | **/\r |
81 | VOID\r | |
d1102dba | 82 | SetIdtEntry (\r |
be46cd5f | 83 | IN ACPI_S3_CONTEXT *AcpiS3Context\r |
84 | );\r | |
85 | \r | |
86 | extern UINT32 AsmFixAddress16;\r | |
87 | extern UINT32 AsmJmpAddr32;\r | |
59cc677c | 88 | extern BOOLEAN mPage1GSupport;\r |
ab1a5a58 | 89 | extern UINT64 mAddressEncMask;\r |
be46cd5f | 90 | \r |
91 | #endif //_BOOT_SCRIPT_EXECUTOR_H_\r |