TianoCore EDK2 master
Loading...
Searching...
No Matches
SaveLongModeContext.c File Reference

Go to the source code of this file.

Macros

#define EXTRA_PAGE_TABLE_PAGES   8
 

Functions

VOID * AllocateReservedMemoryBelow4G (IN UINTN Size)
 
VOID EFIAPI VariableLockCapsuleLongModeBufferVariable (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI PrepareContextForCapsulePei (VOID)
 
VOID SaveLongModeContext (VOID)
 

Detailed Description

Create the variable to save the base address of page table and stack for transferring into long mode in IA32 capsule PEI.

Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SaveLongModeContext.c.

Macro Definition Documentation

◆ EXTRA_PAGE_TABLE_PAGES

#define EXTRA_PAGE_TABLE_PAGES   8

Definition at line 31 of file SaveLongModeContext.c.

Function Documentation

◆ AllocateReservedMemoryBelow4G()

VOID * AllocateReservedMemoryBelow4G ( IN UINTN  Size)

Allocate EfiReservedMemoryType below 4G memory address.

This function allocates EfiReservedMemoryType below 4G memory address.

Parameters
SizeSize of memory to allocate.
Returns
Allocated Address for output.

Definition at line 44 of file SaveLongModeContext.c.

◆ PrepareContextForCapsulePei()

VOID EFIAPI PrepareContextForCapsulePei ( VOID  )
  1. Allocate Reserved memory for capsule PEIM to establish a 1:1 Virtual to Physical mapping.
  2. Allocate Reserved memroy as a stack for capsule PEIM to transfer from 32-bit mdoe to 64-bit mode.

Definition at line 104 of file SaveLongModeContext.c.

◆ SaveLongModeContext()

VOID SaveLongModeContext ( VOID  )

Create the variable to save the base address of page table and stack for transferring into long mode in IA32 capsule PEI.

Definition at line 201 of file SaveLongModeContext.c.

◆ VariableLockCapsuleLongModeBufferVariable()

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

Register callback function upon VariableLockProtocol to lock EFI_CAPSULE_LONG_MODE_BUFFER_NAME variable to avoid malicious code to update it.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextPointer to the notification function's context.

Definition at line 79 of file SaveLongModeContext.c.