]>
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 |
10 | This program and the accompanying materials\r | |
11 | are licensed and made available under the terms and conditions of the BSD License\r | |
12 | which accompanies this distribution. The full text of the license may be found at\r | |
13 | http://opensource.org/licenses/bsd-license.php\r | |
14 | \r | |
15 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
16 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
17 | \r | |
18 | **/\r | |
19 | #ifndef _BOOT_SCRIPT_EXECUTOR_H_\r | |
20 | #define _BOOT_SCRIPT_EXECUTOR_H_\r | |
21 | \r | |
22 | #include <PiDxe.h>\r | |
23 | \r | |
24 | #include <Library/BaseLib.h>\r | |
25 | #include <Library/UefiDriverEntryPoint.h>\r | |
26 | #include <Library/BaseMemoryLib.h>\r | |
27 | #include <Library/DebugLib.h>\r | |
28 | #include <Library/S3BootScriptLib.h>\r | |
29 | #include <Library/PeCoffLib.h>\r | |
30 | #include <Library/DxeServicesLib.h>\r | |
31 | #include <Library/UefiBootServicesTableLib.h>\r | |
32 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
33 | #include <Library/PcdLib.h>\r | |
34 | #include <Library/CacheMaintenanceLib.h>\r | |
be46cd5f | 35 | #include <Library/TimerLib.h>\r |
36 | #include <Library/UefiLib.h>\r | |
37 | #include <Library/DebugAgentLib.h>\r | |
38 | #include <Library/LockBoxLib.h>\r | |
1e172d6b | 39 | #include <Library/CpuExceptionHandlerLib.h>\r |
84edd20b | 40 | #include <Library/DevicePathLib.h>\r |
6a3094c9 | 41 | #include <Library/DxeServicesTableLib.h>\r |
be46cd5f | 42 | \r |
43 | #include <Guid/AcpiS3Context.h>\r | |
44 | #include <Guid/BootScriptExecutorVariable.h>\r | |
84edd20b SZ |
45 | #include <Guid/MemoryProfile.h>\r |
46 | \r | |
59cc677c | 47 | #include <Protocol/DxeSmmReadyToLock.h>\r |
be46cd5f | 48 | #include <IndustryStandard/Acpi.h>\r |
ab1a5a58 LD |
49 | \r |
50 | #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull\r | |
51 | \r | |
be46cd5f | 52 | /**\r |
53 | a ASM function to transfer control to OS.\r | |
d1102dba | 54 | \r |
be46cd5f | 55 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 56 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 57 | **/\r |
58 | VOID\r | |
59 | AsmTransferControl (\r | |
60 | IN UINT32 S3WakingVector,\r | |
61 | IN UINT32 AcpiLowMemoryBase\r | |
62 | );\r | |
63 | /**\r | |
64 | a 32bit ASM function to transfer control to OS.\r | |
d1102dba | 65 | \r |
be46cd5f | 66 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r |
d1102dba | 67 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer\r |
be46cd5f | 68 | **/\r |
69 | VOID\r | |
70 | AsmTransferControl32 (\r | |
71 | IN UINT32 S3WakingVector,\r | |
72 | IN UINT32 AcpiLowMemoryBase\r | |
73 | );\r | |
74 | /**\r | |
75 | a 16bit ASM function to transfer control to OS.\r | |
76 | **/\r | |
77 | VOID\r | |
78 | AsmTransferControl16 (\r | |
79 | VOID\r | |
80 | );\r | |
81 | /**\r | |
d1102dba LG |
82 | Set a IDT entry for interrupt vector 3 for debug purpose.\r |
83 | \r | |
84 | @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT\r | |
85 | \r | |
be46cd5f | 86 | **/\r |
87 | VOID\r | |
d1102dba | 88 | SetIdtEntry (\r |
be46cd5f | 89 | IN ACPI_S3_CONTEXT *AcpiS3Context\r |
90 | );\r | |
91 | \r | |
92 | extern UINT32 AsmFixAddress16;\r | |
93 | extern UINT32 AsmJmpAddr32;\r | |
59cc677c | 94 | extern BOOLEAN mPage1GSupport;\r |
ab1a5a58 | 95 | extern UINT64 mAddressEncMask;\r |
be46cd5f | 96 | \r |
97 | #endif //_BOOT_SCRIPT_EXECUTOR_H_\r |