]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | The header file for Boot Script Executer module.\r | |
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 - 2014, Intel Corporation. All rights reserved.<BR>\r | |
8 | Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r | |
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 | |
35 | #include <Library/TimerLib.h>\r | |
36 | #include <Library/UefiLib.h>\r | |
37 | #include <Library/DebugAgentLib.h>\r | |
38 | #include <Library/LockBoxLib.h>\r | |
39 | #include <Library/CpuExceptionHandlerLib.h>\r | |
40 | #include <Library/DevicePathLib.h>\r | |
41 | \r | |
42 | #include <Guid/AcpiS3Context.h>\r | |
43 | #include <Guid/BootScriptExecutorVariable.h>\r | |
44 | #include <Guid/MemoryProfile.h>\r | |
45 | \r | |
46 | #include <Protocol/DxeSmmReadyToLock.h>\r | |
47 | #include <IndustryStandard/Acpi.h>\r | |
48 | \r | |
49 | #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull\r | |
50 | \r | |
51 | /**\r | |
52 | a ASM function to transfer control to OS.\r | |
53 | \r | |
54 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r | |
55 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer \r | |
56 | **/\r | |
57 | VOID\r | |
58 | AsmTransferControl (\r | |
59 | IN UINT32 S3WakingVector,\r | |
60 | IN UINT32 AcpiLowMemoryBase\r | |
61 | );\r | |
62 | /**\r | |
63 | a 32bit ASM function to transfer control to OS.\r | |
64 | \r | |
65 | @param S3WakingVector The S3 waking up vector saved in ACPI Facs table\r | |
66 | @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer \r | |
67 | **/\r | |
68 | VOID\r | |
69 | AsmTransferControl32 (\r | |
70 | IN UINT32 S3WakingVector,\r | |
71 | IN UINT32 AcpiLowMemoryBase\r | |
72 | );\r | |
73 | /**\r | |
74 | a 16bit ASM function to transfer control to OS.\r | |
75 | **/\r | |
76 | VOID\r | |
77 | AsmTransferControl16 (\r | |
78 | VOID\r | |
79 | );\r | |
80 | /**\r | |
81 | Set a IDT entry for interrupt vector 3 for debug purpose. \r | |
82 | \r | |
83 | @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT \r | |
84 | \r | |
85 | **/\r | |
86 | VOID\r | |
87 | SetIdtEntry ( \r | |
88 | IN ACPI_S3_CONTEXT *AcpiS3Context\r | |
89 | );\r | |
90 | \r | |
91 | extern UINT32 AsmFixAddress16;\r | |
92 | extern UINT32 AsmJmpAddr32;\r | |
93 | extern BOOLEAN mPage1GSupport;\r | |
94 | extern UINT64 mAddressEncMask;\r | |
95 | \r | |
96 | #endif //_BOOT_SCRIPT_EXECUTOR_H_\r |