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

Go to the source code of this file.

Data Structures

struct  SMM_FTW_COMMUNICATE_FUNCTION_HEADER
 
struct  SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER
 
struct  SMM_FTW_ALLOCATE_HEADER
 
struct  SMM_FTW_WRITE_HEADER
 
struct  SMM_FTW_RESTART_HEADER
 
struct  SMM_FTW_GET_LAST_WRITE_HEADER
 

Macros

#define FTW_FUNCTION_GET_MAX_BLOCK_SIZE   1
 
#define FTW_FUNCTION_ALLOCATE   2
 
#define FTW_FUNCTION_WRITE   3
 
#define FTW_FUNCTION_RESTART   4
 
#define FTW_FUNCTION_ABORT   5
 
#define FTW_FUNCTION_GET_LAST_WRITE   6
 
#define SMM_COMMUNICATE_HEADER_SIZE   (OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data))
 
#define SMM_FTW_COMMUNICATE_HEADER_SIZE   (OFFSET_OF (SMM_FTW_COMMUNICATE_FUNCTION_HEADER, Data))
 

Functions

EFI_STATUS MmFaultTolerantWriteInitialize (VOID)
 
BOOLEAN FtwSmmIsPrimaryBufferValid (IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
 
VOID FtwNotifySmmReady (VOID)
 

Detailed Description

The common header file for SMM FTW module and SMM FTW DXE Module.

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

Definition in file FaultTolerantWriteSmmCommon.h.

Macro Definition Documentation

◆ FTW_FUNCTION_ABORT

#define FTW_FUNCTION_ABORT   5

Definition at line 20 of file FaultTolerantWriteSmmCommon.h.

◆ FTW_FUNCTION_ALLOCATE

#define FTW_FUNCTION_ALLOCATE   2

Definition at line 17 of file FaultTolerantWriteSmmCommon.h.

◆ FTW_FUNCTION_GET_LAST_WRITE

#define FTW_FUNCTION_GET_LAST_WRITE   6

Definition at line 21 of file FaultTolerantWriteSmmCommon.h.

◆ FTW_FUNCTION_GET_MAX_BLOCK_SIZE

#define FTW_FUNCTION_GET_MAX_BLOCK_SIZE   1

Definition at line 16 of file FaultTolerantWriteSmmCommon.h.

◆ FTW_FUNCTION_RESTART

#define FTW_FUNCTION_RESTART   4

Definition at line 19 of file FaultTolerantWriteSmmCommon.h.

◆ FTW_FUNCTION_WRITE

#define FTW_FUNCTION_WRITE   3

Definition at line 18 of file FaultTolerantWriteSmmCommon.h.

◆ SMM_COMMUNICATE_HEADER_SIZE

#define SMM_COMMUNICATE_HEADER_SIZE   (OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data))

Size of SMM communicate header, without including the payload.

Definition at line 32 of file FaultTolerantWriteSmmCommon.h.

◆ SMM_FTW_COMMUNICATE_HEADER_SIZE

#define SMM_FTW_COMMUNICATE_HEADER_SIZE   (OFFSET_OF (SMM_FTW_COMMUNICATE_FUNCTION_HEADER, Data))

Size of SMM FTW communicate function header, without including the payload.

Definition at line 37 of file FaultTolerantWriteSmmCommon.h.

Function Documentation

◆ FtwNotifySmmReady()

VOID FtwNotifySmmReady ( VOID  )

Notify the system that the SMM FTW driver is ready.

Definition at line 62 of file FaultTolerantWriteStandaloneMm.c.

◆ FtwSmmIsPrimaryBufferValid()

BOOLEAN FtwSmmIsPrimaryBufferValid ( IN EFI_PHYSICAL_ADDRESS  Buffer,
IN UINT64  Length 
)

This function checks if the Primary Buffer is valid.

Parameters
BufferThe buffer start address to be checked.
LengthThe buffer length to be checked.
Return values
TRUEThis buffer is valid.
FALSEThis buffer is not valid.

This function checks if the Primary Buffer is valid per processor architecture and does not overlap with SMRAM.

Parameters
BufferThe buffer start address to be checked.
LengthThe buffer length to be checked.
Return values
TRUEThis buffer is valid per processor architecture and does not overlap with SMRAM.
FALSEThis buffer is not valid per processor architecture or overlaps with SMRAM.

Definition at line 26 of file FaultTolerantWriteStandaloneMm.c.

◆ MmFaultTolerantWriteInitialize()

EFI_STATUS MmFaultTolerantWriteInitialize ( VOID  )

Shared entry point of the module.

Return values
EFI_SUCCESSThe initialization finished successfully.
EFI_OUT_OF_RESOURCESAllocate memory error
EFI_INVALID_PARAMETERWorkspace or Spare block does not exist

Shared entry point of the module

Return values
EFI_SUCCESSThe initialization finished successfully.
EFI_OUT_OF_RESOURCESAllocate memory error
EFI_INVALID_PARAMETERWorkspace or Spare block does not exist

Definition at line 611 of file FaultTolerantWriteSmm.c.