]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe: Add support for PCD PcdPteMemoryEn...
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / BootScriptExecutorDxe / ScriptExecute.h
1 /** @file
2 The header file for Boot Script Executer module.
3
4 This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory
5 in the entry point. The functionality is to interpret and restore the S3 boot script
6
7 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
8 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
9
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
14
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17
18 **/
19 #ifndef _BOOT_SCRIPT_EXECUTOR_H_
20 #define _BOOT_SCRIPT_EXECUTOR_H_
21
22 #include <PiDxe.h>
23
24 #include <Library/BaseLib.h>
25 #include <Library/UefiDriverEntryPoint.h>
26 #include <Library/BaseMemoryLib.h>
27 #include <Library/DebugLib.h>
28 #include <Library/S3BootScriptLib.h>
29 #include <Library/PeCoffLib.h>
30 #include <Library/DxeServicesLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/UefiRuntimeServicesTableLib.h>
33 #include <Library/PcdLib.h>
34 #include <Library/CacheMaintenanceLib.h>
35 #include <Library/TimerLib.h>
36 #include <Library/UefiLib.h>
37 #include <Library/DebugAgentLib.h>
38 #include <Library/LockBoxLib.h>
39 #include <Library/CpuExceptionHandlerLib.h>
40 #include <Library/DevicePathLib.h>
41
42 #include <Guid/AcpiS3Context.h>
43 #include <Guid/BootScriptExecutorVariable.h>
44 #include <Guid/MemoryProfile.h>
45
46 #include <Protocol/DxeSmmReadyToLock.h>
47 #include <IndustryStandard/Acpi.h>
48
49 #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull
50
51 /**
52 a ASM function to transfer control to OS.
53
54 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table
55 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
56 **/
57 VOID
58 AsmTransferControl (
59 IN UINT32 S3WakingVector,
60 IN UINT32 AcpiLowMemoryBase
61 );
62 /**
63 a 32bit ASM function to transfer control to OS.
64
65 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table
66 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
67 **/
68 VOID
69 AsmTransferControl32 (
70 IN UINT32 S3WakingVector,
71 IN UINT32 AcpiLowMemoryBase
72 );
73 /**
74 a 16bit ASM function to transfer control to OS.
75 **/
76 VOID
77 AsmTransferControl16 (
78 VOID
79 );
80 /**
81 Set a IDT entry for interrupt vector 3 for debug purpose.
82
83 @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT
84
85 **/
86 VOID
87 SetIdtEntry (
88 IN ACPI_S3_CONTEXT *AcpiS3Context
89 );
90
91 extern UINT32 AsmFixAddress16;
92 extern UINT32 AsmJmpAddr32;
93 extern BOOLEAN mPage1GSupport;
94 extern UINT64 mAddressEncMask;
95
96 #endif //_BOOT_SCRIPT_EXECUTOR_H_