TianoCore EDK2 master
Loading...
Searching...
No Matches
InternalBootScriptLib.h File Reference

Go to the source code of this file.

Data Structures

union  PTR
 
struct  SCRIPT_TABLE_PRIVATE_DATA
 

Macros

#define MAX_IO_ADDRESS   0xFFFF
 
#define PCI_ADDRESS_ENCODE(S, A)
 
#define MIN_SMBUS_BLOCK_LEN   1
 
#define MAX_SMBUS_BLOCK_LEN   32
 
#define S3_BOOT_SCRIPT_LIB_LABEL_OPCODE   0xFE
 
#define S3_BOOT_SCRIPT_LIB_TABLE_OPCODE   0xAA
 
#define S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE   0xFF
 

Typedefs

typedef EFI_STATUS(EFIAPI * DISPATCH_ENTRYPOINT_FUNC) (IN EFI_HANDLE ImageHandle, IN VOID *Context)
 

Variables

SCRIPT_TABLE_PRIVATE_DATAmS3BootScriptTablePtr
 

Detailed Description

Support for S3 boot script lib. This file defined some internal macro and internal data structure

Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file InternalBootScriptLib.h.

Macro Definition Documentation

◆ MAX_IO_ADDRESS

#define MAX_IO_ADDRESS   0xFFFF

Definition at line 39 of file InternalBootScriptLib.h.

◆ MAX_SMBUS_BLOCK_LEN

#define MAX_SMBUS_BLOCK_LEN   32

Definition at line 64 of file InternalBootScriptLib.h.

◆ MIN_SMBUS_BLOCK_LEN

#define MIN_SMBUS_BLOCK_LEN   1

Definition at line 63 of file InternalBootScriptLib.h.

◆ PCI_ADDRESS_ENCODE

#define PCI_ADDRESS_ENCODE (   S,
 
)
Value:
S, \
((((UINTN)(A)) & 0xff000000) >> 24), \
((((UINTN)(A)) & 0x00ff0000) >> 16), \
((((UINTN)(A)) & 0xff00) >> 8), \
((RShiftU64 ((A), 32) & 0xfff) | ((A) & 0xff)) \
)
UINT64 UINTN
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: RShiftU64.c:28
#define PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register)
Definition: PciSegmentLib.h:51

Definition at line 44 of file InternalBootScriptLib.h.

◆ S3_BOOT_SCRIPT_LIB_LABEL_OPCODE

#define S3_BOOT_SCRIPT_LIB_LABEL_OPCODE   0xFE

Definition at line 92 of file InternalBootScriptLib.h.

◆ S3_BOOT_SCRIPT_LIB_TABLE_OPCODE

#define S3_BOOT_SCRIPT_LIB_TABLE_OPCODE   0xAA

The opcode indicate the start of the boot script table.

Definition at line 97 of file InternalBootScriptLib.h.

◆ S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE

#define S3_BOOT_SCRIPT_LIB_TERMINATE_OPCODE   0xFF

The opcode indicate the end of the boot script table.

Definition at line 101 of file InternalBootScriptLib.h.

Typedef Documentation

◆ DISPATCH_ENTRYPOINT_FUNC

typedef EFI_STATUS(EFIAPI * DISPATCH_ENTRYPOINT_FUNC) (IN EFI_HANDLE ImageHandle, IN VOID *Context)

Definition at line 81 of file InternalBootScriptLib.h.

Variable Documentation

◆ mS3BootScriptTablePtr

SCRIPT_TABLE_PRIVATE_DATA* mS3BootScriptTablePtr
extern

Data structure usage:

+---------------------------—+<----— PcdS3BootScriptTablePrivateDataPtr | SCRIPT_TABLE_PRIVATE_DATA | (mS3BootScriptTablePtr, Before SmmReadyToLock) | TableBase |— PcdS3BootScriptTablePrivateSmmDataPtr | TableLength |–|– (mS3BootScriptTablePtr = mS3BootScriptTableSmmPtr, After SmmReadyToLock InSmm) | TableMemoryPageNumber |–|-|-— | AtRuntime | | | | | InSmm | | | | | BootTimeScriptLength |–|-|—|— | SmmLocked | | | | | | BackFromS3 | | | | | +---------------------------—+ | | | | | | | | +---------------------------—+<– | | | | EFI_BOOT_SCRIPT_TABLE_HEADER | | | | | TableLength |-—|– | | +---------------------------—+ | | | | | ...... | | | | | +---------------------------—+<-— | | | | EFI_BOOT_SCRIPT_TERMINATE | | | | +---------------------------—+<---— | | | | | | mBootScriptDataBootTimeGuid LockBox: | | Used to restore data after back from S3| | to handle potential INSERT boot script | | at runtime. | | +---------------------------—+ | | | Boot Time Boot Script | | |

Before SmmReadyToLock

+---------------------------—+ | | | Boot Time Boot Script | | | | After SmmReadyToLock InSmm | | | | | | | +---------------------------—+<----—|–| | | | | mBootScriptDataGuid LockBox: (IN_PLACE) | | Used to restore data at S3 resume. | | +---------------------------—+ | | | Boot Time Boot Script | | |

Before SmmReadyToLock

+---------------------------—+ | | | Boot Time Boot Script | | | | After SmmReadyToLock InSmm | | | | | | | +---------------------------—+<----—|— | Runtime Boot Script | | | After SmmReadyToLock InSmm | | +---------------------------—+ | | ...... | | +---------------------------—+<-----—

mBootScriptTableBaseGuid LockBox: (IN_PLACE) +---------------------------—+ | mS3BootScriptTablePtr-> | | TableBase | +---------------------------—+

mBootScriptSmmPrivateDataGuid LockBox: (IN_PLACE) SMM private data with BackFromS3 = TRUE at runtime. S3 will help restore it to tell the Library the system is back from S3. +---------------------------—+ | SCRIPT_TABLE_PRIVATE_DATA | | TableBase | | TableLength | | TableMemoryPageNumber | | AtRuntime | | InSmm | | BootTimeScriptLength | | SmmLocked | | BackFromS3 = TRUE | +---------------------------—+

Definition at line 97 of file BootScriptSave.c.