]>
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 | |
1436aea4 | 13 | \r |
be46cd5f | 14 | #ifndef _BOOT_SCRIPT_EXECUTOR_H_\r |
15 | #define _BOOT_SCRIPT_EXECUTOR_H_\r | |
16 | \r | |
17 | #include <PiDxe.h>\r | |
18 | \r | |
19 | #include <Library/BaseLib.h>\r | |
20 | #include <Library/UefiDriverEntryPoint.h>\r | |
21 | #include <Library/BaseMemoryLib.h>\r | |
22 | #include <Library/DebugLib.h>\r | |
23 | #include <Library/S3BootScriptLib.h>\r | |
24 | #include <Library/PeCoffLib.h>\r | |
25 | #include <Library/DxeServicesLib.h>\r | |
26 | #include <Library/UefiBootServicesTableLib.h>\r | |
27 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
28 | #include <Library/PcdLib.h>\r | |
29 | #include <Library/CacheMaintenanceLib.h>\r | |
be46cd5f | 30 | #include <Library/TimerLib.h>\r |
31 | #include <Library/UefiLib.h>\r | |
32 | #include <Library/DebugAgentLib.h>\r | |
33 | #include <Library/LockBoxLib.h>\r | |
1e172d6b | 34 | #include <Library/CpuExceptionHandlerLib.h>\r |
84edd20b | 35 | #include <Library/DevicePathLib.h>\r |
6a3094c9 | 36 | #include <Library/DxeServicesTableLib.h>\r |
be46cd5f | 37 | \r |
38 | #include <Guid/AcpiS3Context.h>\r | |
39 | #include <Guid/BootScriptExecutorVariable.h>\r | |
84edd20b SZ |
40 | #include <Guid/MemoryProfile.h>\r |
41 | \r | |
59cc677c | 42 | #include <Protocol/DxeSmmReadyToLock.h>\r |
be46cd5f | 43 | #include <IndustryStandard/Acpi.h>\r |
ab1a5a58 LD |
44 | \r |
45 | #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull\r | |
46 | \r | |
be46cd5f | 47 | /**\r |
48 | a ASM function to transfer control to OS.\r | |
d1102dba | 49 | \r |
be46cd5f | 50 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 51 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 52 | **/\r |
53 | VOID\r | |
54 | AsmTransferControl (\r | |
1436aea4 MK |
55 | IN UINT32 S3WakingVector,\r |
56 | IN UINT32 AcpiLowMemoryBase\r | |
be46cd5f | 57 | );\r |
1436aea4 | 58 | \r |
be46cd5f | 59 | /**\r |
60 | a 32bit ASM function to transfer control to OS.\r | |
d1102dba | 61 | \r |
be46cd5f | 62 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 63 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 64 | **/\r |
65 | VOID\r | |
66 | AsmTransferControl32 (\r | |
1436aea4 MK |
67 | IN UINT32 S3WakingVector,\r |
68 | IN UINT32 AcpiLowMemoryBase\r | |
be46cd5f | 69 | );\r |
1436aea4 | 70 | \r |
be46cd5f | 71 | /**\r |
72 | a 16bit ASM function to transfer control to OS.\r | |
73 | **/\r | |
74 | VOID\r | |
75 | AsmTransferControl16 (\r | |
76 | VOID\r | |
77 | );\r | |
1436aea4 | 78 | \r |
be46cd5f | 79 | /**\r |
d1102dba LG |
80 | Set a IDT entry for interrupt vector 3 for debug purpose.\r |
81 | \r | |
82 | @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT\r | |
83 | \r | |
be46cd5f | 84 | **/\r |
85 | VOID\r | |
d1102dba | 86 | SetIdtEntry (\r |
1436aea4 | 87 | IN ACPI_S3_CONTEXT *AcpiS3Context\r |
be46cd5f | 88 | );\r |
89 | \r | |
1436aea4 MK |
90 | extern UINT32 AsmFixAddress16;\r |
91 | extern UINT32 AsmJmpAddr32;\r | |
92 | extern BOOLEAN mPage1GSupport;\r | |
93 | extern UINT64 mAddressEncMask;\r | |
be46cd5f | 94 | \r |
95 | #endif //_BOOT_SCRIPT_EXECUTOR_H_\r |