MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe: Add support for PCD PcdPteMemoryEn...
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / BootScriptExecutorDxe / ScriptExecute.h
CommitLineData
be46cd5f 1/** @file\r
2 The header file for Boot Script Executer module.\r
3 \r
59cc677c 4 This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory \r
be46cd5f 5 in the entry point. The functionality is to interpret and restore the S3 boot script \r
6 \r
84edd20b 7Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
ab1a5a58 8Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
be46cd5f 9\r
10This program and the accompanying materials\r
11are licensed and made available under the terms and conditions of the BSD License\r
12which accompanies this distribution. The full text of the license may be found at\r
13http://opensource.org/licenses/bsd-license.php\r
14\r
15THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
16WITHOUT 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
be46cd5f 41\r
42#include <Guid/AcpiS3Context.h>\r
43#include <Guid/BootScriptExecutorVariable.h>\r
84edd20b
SZ
44#include <Guid/MemoryProfile.h>\r
45\r
59cc677c 46#include <Protocol/DxeSmmReadyToLock.h>\r
be46cd5f 47#include <IndustryStandard/Acpi.h>\r
ab1a5a58
LD
48\r
49#define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull\r
50\r
be46cd5f 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
57VOID\r
58AsmTransferControl (\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
68VOID\r
69AsmTransferControl32 (\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
76VOID\r
77AsmTransferControl16 (\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
86VOID\r
87SetIdtEntry ( \r
88 IN ACPI_S3_CONTEXT *AcpiS3Context\r
89 );\r
90\r
91extern UINT32 AsmFixAddress16;\r
92extern UINT32 AsmJmpAddr32;\r
59cc677c 93extern BOOLEAN mPage1GSupport;\r
ab1a5a58 94extern UINT64 mAddressEncMask;\r
be46cd5f 95\r
96#endif //_BOOT_SCRIPT_EXECUTOR_H_\r