TianoCore EDK2 master
Loading...
Searching...
No Matches
ScriptExecute.c File Reference
#include "ScriptExecute.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI S3BootScriptExecutorEntryFunction (IN ACPI_S3_CONTEXT *AcpiS3Context, IN PEI_S3_RESUME_STATE *PeiS3ResumeState)
 
VOID RegisterMemoryProfileImage (IN EFI_GUID *FileName, IN PHYSICAL_ADDRESS ImageBase, IN UINT64 ImageSize, IN EFI_FV_FILETYPE FileType)
 
VOID EFIAPI ReadyToLockEventNotify (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI BootScriptExecutorEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_GUID mBootScriptExecutorImageGuid
 
BOOLEAN mPage1GSupport = FALSE
 
UINT64 mAddressEncMask = 0
 

Detailed Description

This is the code for Boot Script Executer module.

This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory in the entry point. The functionality is to interpret and restore the S3 boot script

Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.

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

Definition in file ScriptExecute.c.

Function Documentation

◆ BootScriptExecutorEntryPoint()

EFI_STATUS EFIAPI BootScriptExecutorEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entrypoint of Boot script exector driver, this function will be executed in normal boot phase and invoked by DXE dispatch.

Parameters
[in]ImageHandleThe firmware allocated handle for the EFI image.
[in]SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
otherSome error occurs when executing this entry point.

Definition at line 411 of file ScriptExecute.c.

◆ ReadyToLockEventNotify()

VOID EFIAPI ReadyToLockEventNotify ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This is the Event notification function to reload BootScriptExecutor image to RESERVED mem and save it to LockBox.

Parameters
EventPointer to this event
ContextEvent handler private data

Definition at line 267 of file ScriptExecute.c.

◆ RegisterMemoryProfileImage()

VOID RegisterMemoryProfileImage ( IN EFI_GUID FileName,
IN PHYSICAL_ADDRESS  ImageBase,
IN UINT64  ImageSize,
IN EFI_FV_FILETYPE  FileType 
)

Register image to memory profile.

Parameters
FileNameFile name of the image.
ImageBaseImage base address.
ImageSizeImage size.
FileTypeFile type of the image.

Definition at line 228 of file ScriptExecute.c.

◆ S3BootScriptExecutorEntryFunction()

EFI_STATUS EFIAPI S3BootScriptExecutorEntryFunction ( IN ACPI_S3_CONTEXT AcpiS3Context,
IN PEI_S3_RESUME_STATE PeiS3ResumeState 
)

Entry function of Boot script exector. This function will be executed in S3 boot path. This function should not return, because it is invoked by switch stack.

Parameters
AcpiS3Contexta pointer to a structure of ACPI_S3_CONTEXT
PeiS3ResumeStatea pointer to a structure of PEI_S3_RESUME_STATE
Return values
EFI_INVALID_PARAMETER- OS waking vector not found
EFI_UNSUPPORTED- something wrong when we resume to OS

Definition at line 36 of file ScriptExecute.c.

Variable Documentation

◆ mAddressEncMask

UINT64 mAddressEncMask = 0

Definition at line 21 of file ScriptExecute.c.

◆ mBootScriptExecutorImageGuid

EFI_GUID mBootScriptExecutorImageGuid
Initial value:
= {
0x9a8d3433, 0x9fe8, 0x42b6, { 0x87, 0xb, 0x1e, 0x31, 0xc8, 0x4e, 0xbe, 0x3b }
}

Definition at line 16 of file ScriptExecute.c.

◆ mPage1GSupport

BOOLEAN mPage1GSupport = FALSE

Definition at line 20 of file ScriptExecute.c.