]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h
MdeModulePkg: Clean up source files
[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 - 2018, 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 #include <Library/DxeServicesTableLib.h>
42
43 #include <Guid/AcpiS3Context.h>
44 #include <Guid/BootScriptExecutorVariable.h>
45 #include <Guid/MemoryProfile.h>
46
47 #include <Protocol/DxeSmmReadyToLock.h>
48 #include <IndustryStandard/Acpi.h>
49
50 #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull
51
52 /**
53 a ASM function to transfer control to OS.
54
55 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table
56 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
57 **/
58 VOID
59 AsmTransferControl (
60 IN UINT32 S3WakingVector,
61 IN UINT32 AcpiLowMemoryBase
62 );
63 /**
64 a 32bit ASM function to transfer control to OS.
65
66 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table
67 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
68 **/
69 VOID
70 AsmTransferControl32 (
71 IN UINT32 S3WakingVector,
72 IN UINT32 AcpiLowMemoryBase
73 );
74 /**
75 a 16bit ASM function to transfer control to OS.
76 **/
77 VOID
78 AsmTransferControl16 (
79 VOID
80 );
81 /**
82 Set a IDT entry for interrupt vector 3 for debug purpose.
83
84 @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT
85
86 **/
87 VOID
88 SetIdtEntry (
89 IN ACPI_S3_CONTEXT *AcpiS3Context
90 );
91
92 extern UINT32 AsmFixAddress16;
93 extern UINT32 AsmJmpAddr32;
94 extern BOOLEAN mPage1GSupport;
95 extern UINT64 mAddressEncMask;
96
97 #endif //_BOOT_SCRIPT_EXECUTOR_H_