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 NVS memory
5 in the entry point. The functionality is to interpret and restore the S3 boot script
6 
7 Copyright (c) 2013-2015 Intel Corporation.
8 
9 This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution.  The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
13 
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 
17 **/
18 #ifndef _SCRIPT_EXECUTE_H_
19 #define _SCRIPT_EXECUTE_H_
20 
21 #include <PiDxe.h>
22 
23 #include <Library/BaseLib.h>
24 #include <Library/UefiDriverEntryPoint.h>
25 #include <Library/BaseMemoryLib.h>
26 #include <Library/DebugLib.h>
27 #include <Library/S3BootScriptLib.h>
28 #include <Library/PeCoffLib.h>
29 #include <Library/DxeServicesLib.h>
30 #include <Library/UefiBootServicesTableLib.h>
31 #include <Library/UefiRuntimeServicesTableLib.h>
32 #include <Library/PcdLib.h>
33 #include <Library/CacheMaintenanceLib.h>
34 #include <Library/TimerLib.h>
35 #include <Library/UefiLib.h>
36 #include <Library/DebugAgentLib.h>
37 #include <Library/LockBoxLib.h>
38 #include <Library/IntelQNCLib.h>
39 #include <Library/QNCAccessLib.h>
40 
41 #include <Guid/AcpiS3Context.h>
42 #include <Guid/BootScriptExecutorVariable.h>
43 #include <Guid/EventGroup.h>
44 #include <IndustryStandard/Acpi.h>
45 
46 /**
47   a ASM function to transfer control to OS.
48 
49   @param  S3WakingVector  The S3 waking up vector saved in ACPI Facs table
50   @param  AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
51 **/
52 VOID
53 AsmTransferControl (
54   IN   UINT32           S3WakingVector,
55   IN   UINT32           AcpiLowMemoryBase
56   );
57 
58 VOID
59 SetIdtEntry (
60   IN ACPI_S3_CONTEXT     *AcpiS3Context
61   );
62 
63 /**
64   Platform specific mechanism to transfer control to 16bit OS waking vector
65 
66   @param[in] AcpiWakingVector    The 16bit OS waking vector
67   @param[in] AcpiLowMemoryBase   A buffer under 1M which could be used during the transfer
68 
69 **/
70 VOID
71 PlatformTransferControl16 (
72   IN UINT32       AcpiWakingVector,
73   IN UINT32       AcpiLowMemoryBase
74   );
75 
76 #endif //_SCRIPT_EXECUTE_H_
77