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 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 _BOOT_SCRIPT_EXECUTOR_H_ 19 #define _BOOT_SCRIPT_EXECUTOR_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/CpuExceptionHandlerLib.h> 39 #include <Library/DevicePathLib.h> 40 41 #include <Guid/AcpiS3Context.h> 42 #include <Guid/BootScriptExecutorVariable.h> 43 #include <Guid/MemoryProfile.h> 44 45 #include <Protocol/DxeSmmReadyToLock.h> 46 #include <IndustryStandard/Acpi.h> 47 /** 48 a ASM function to transfer control to OS. 49 50 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table 51 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer 52 **/ 53 VOID 54 AsmTransferControl ( 55 IN UINT32 S3WakingVector, 56 IN UINT32 AcpiLowMemoryBase 57 ); 58 /** 59 a 32bit ASM function to transfer control to OS. 60 61 @param S3WakingVector The S3 waking up vector saved in ACPI Facs table 62 @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer 63 **/ 64 VOID 65 AsmTransferControl32 ( 66 IN UINT32 S3WakingVector, 67 IN UINT32 AcpiLowMemoryBase 68 ); 69 /** 70 a 16bit ASM function to transfer control to OS. 71 **/ 72 VOID 73 AsmTransferControl16 ( 74 VOID 75 ); 76 /** 77 Set a IDT entry for interrupt vector 3 for debug purpose. 78 79 @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT 80 81 **/ 82 VOID 83 SetIdtEntry ( 84 IN ACPI_S3_CONTEXT *AcpiS3Context 85 ); 86 87 extern UINT32 AsmFixAddress16; 88 extern UINT32 AsmJmpAddr32; 89 extern BOOLEAN mPage1GSupport; 90 91 #endif //_BOOT_SCRIPT_EXECUTOR_H_ 92