TianoCore EDK2 master
|
#include <PiDxe.h>
#include <Guid/EventGroup.h>
#include <Protocol/SmmBase2.h>
#include <Protocol/DxeSmmReadyToLock.h>
#include <Protocol/SmmReadyToLock.h>
#include <Protocol/SmmExitBootServices.h>
#include <Protocol/SmmLegacyBoot.h>
#include <Library/S3BootScriptLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/PcdLib.h>
#include <Library/SmbusLib.h>
#include <Library/IoLib.h>
#include <Library/PciSegmentLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/TimerLib.h>
#include <Library/UefiLib.h>
#include <Library/LockBoxLib.h>
#include "BootScriptInternalFormat.h"
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_DATA * | mS3BootScriptTablePtr |
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.
#define MAX_IO_ADDRESS 0xFFFF |
Definition at line 39 of file InternalBootScriptLib.h.
#define MAX_SMBUS_BLOCK_LEN 32 |
Definition at line 64 of file InternalBootScriptLib.h.
#define MIN_SMBUS_BLOCK_LEN 1 |
Definition at line 63 of file InternalBootScriptLib.h.
#define PCI_ADDRESS_ENCODE | ( | S, | |
A | |||
) |
Definition at line 44 of file InternalBootScriptLib.h.
#define S3_BOOT_SCRIPT_LIB_LABEL_OPCODE 0xFE |
Definition at line 92 of file InternalBootScriptLib.h.
#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.
#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 EFI_STATUS(EFIAPI * DISPATCH_ENTRYPOINT_FUNC) (IN EFI_HANDLE ImageHandle, IN VOID *Context) |
Definition at line 81 of file InternalBootScriptLib.h.
|
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.