TianoCore EDK2
master
Loading...
Searching...
No Matches
InternalBootScriptLib.h
Go to the documentation of this file.
1
11
#ifndef __INTERNAL_BOOT_SCRIPT_LIB__
12
#define __INTERNAL_BOOT_SCRIPT_LIB__
13
14
#include <
PiDxe.h
>
15
16
#include <
Guid/EventGroup.h
>
17
#include <
Protocol/SmmBase2.h
>
18
#include <
Protocol/DxeSmmReadyToLock.h
>
19
#include <
Protocol/SmmReadyToLock.h
>
20
#include <
Protocol/SmmExitBootServices.h
>
21
#include <
Protocol/SmmLegacyBoot.h
>
22
23
#include <
Library/S3BootScriptLib.h
>
24
25
#include <
Library/UefiBootServicesTableLib.h
>
26
#include <
Library/BaseLib.h
>
27
#include <
Library/PcdLib.h
>
28
#include <
Library/SmbusLib.h
>
29
#include <
Library/IoLib.h
>
30
#include <
Library/PciSegmentLib.h
>
31
#include <
Library/DebugLib.h
>
32
#include <
Library/BaseMemoryLib.h
>
33
#include <
Library/TimerLib.h
>
34
#include <
Library/UefiLib.h
>
35
#include <
Library/LockBoxLib.h
>
36
37
#include "
BootScriptInternalFormat.h
"
38
39
#define MAX_IO_ADDRESS 0xFFFF
40
41
//
42
// Macro to convert a UEFI PCI address + segment to a PCI Segment Library PCI address
43
//
44
#define PCI_ADDRESS_ENCODE(S, A) PCI_SEGMENT_LIB_ADDRESS(\
45
S, \
46
((((UINTN)(A)) & 0xff000000) >> 24), \
47
((((UINTN)(A)) & 0x00ff0000) >> 16), \
48
((((UINTN)(A)) & 0xff00) >> 8), \
49
((RShiftU64 ((A), 32) & 0xfff) | ((A) & 0xff)) \
50
)
51
52
typedef
union
{
53
UINT8
volatile
*Buf;
54
UINT8
volatile
*Uint8;
55
UINT16
volatile
*Uint16;
56
UINT32
volatile
*Uint32;
57
UINT64
volatile
*Uint64;
58
UINTN
volatile
Uint;
59
}
PTR
;
60
61
// Minimum and maximum length for SMBus bus block protocols defined in SMBus spec 2.0.
62
//
63
#define MIN_SMBUS_BLOCK_LEN 1
64
#define MAX_SMBUS_BLOCK_LEN 32
65
66
//
67
// The boot script private data.
68
//
69
typedef
struct
{
70
UINT8 *TableBase;
71
UINT32 TableLength;
// Record the actual memory length
72
UINT16 TableMemoryPageNumber;
// Record the page number Allocated for the table
73
BOOLEAN
InSmm
;
// Record if this library is in SMM.
74
BOOLEAN
AtRuntime
;
// Record if current state is after SmmExitBootServices or SmmLegacyBoot.
75
UINT32 BootTimeScriptLength;
// Maintain boot time script length in LockBox after SmmReadyToLock in SMM.
76
BOOLEAN SmmLocked;
// Record if current state is after SmmReadyToLock
77
BOOLEAN BackFromS3;
// Indicate that the system is back from S3.
78
}
SCRIPT_TABLE_PRIVATE_DATA
;
79
80
typedef
81
EFI_STATUS
82
(EFIAPI *DISPATCH_ENTRYPOINT_FUNC)(
83
IN
EFI_HANDLE
ImageHandle,
84
IN
VOID *Context
85
);
86
87
extern
SCRIPT_TABLE_PRIVATE_DATA
*
mS3BootScriptTablePtr
;
88
89
//
90
// Define Opcode for Label which is implementation specific and no standard spec define.
91
//
92
#define S3_BOOT_SCRIPT_LIB_LABEL_OPCODE 0xFE
93
97
#define S3_BOOT_SCRIPT_LIB_TABLE_OPCODE 0xAA
101
#define S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE 0xFF
102
103
#endif
//__INTERNAL_BOOT_SCRIPT_LIB__
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
BaseLib.h
BaseMemoryLib.h
BootScriptInternalFormat.h
DxeSmmReadyToLock.h
EventGroup.h
PciSegmentLib.h
mS3BootScriptTablePtr
SCRIPT_TABLE_PRIVATE_DATA * mS3BootScriptTablePtr
Definition:
BootScriptSave.c:97
IoLib.h
LockBoxLib.h
AtRuntime
BOOLEAN AtRuntime(VOID)
Definition:
VariableDxe.c:63
IN
#define IN
Definition:
Base.h:279
DebugLib.h
PcdLib.h
PiDxe.h
InSmm
BOOLEAN EFIAPI InSmm(VOID)
Definition:
PiSmmCoreSmmServicesTableLib.c:49
S3BootScriptLib.h
SmbusLib.h
SmmBase2.h
SmmExitBootServices.h
SmmLegacyBoot.h
SmmReadyToLock.h
TimerLib.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
UefiBootServicesTableLib.h
UefiLib.h
SCRIPT_TABLE_PRIVATE_DATA
Definition:
InternalBootScriptLib.h:69
PTR
Definition:
InternalBootScriptLib.h:52
MdeModulePkg
Library
PiDxeS3BootScriptLib
InternalBootScriptLib.h
Generated on Fri Nov 15 2024 18:01:12 for TianoCore EDK2 by
1.9.6