TianoCore EDK2 master
Loading...
Searching...
No Matches
FaultTolerantWriteTraditionalMm.c
Go to the documentation of this file.
1
11#include <Library/SmmMemLib.h>
13#include "FaultTolerantWrite.h"
15
28BOOLEAN
31 IN UINT64 Length
32 )
33{
34 return SmmIsBufferOutsideSmmValid (Buffer, Length);
35}
36
53UINT32
55 IN VOID *Buffer,
56 IN UINTN Length
57 )
58{
59 EFI_STATUS Status;
60 UINT32 ReturnValue;
61
62 Status = gBS->CalculateCrc32 (Buffer, Length, &ReturnValue);
63 ASSERT_EFI_ERROR (Status);
64
65 return ReturnValue;
66}
67
71VOID
73 VOID
74 )
75{
76 EFI_HANDLE FtwHandle;
77 EFI_STATUS Status;
78
79 FtwHandle = NULL;
80 Status = gBS->InstallProtocolInterface (
81 &FtwHandle,
82 &gEfiSmmFaultTolerantWriteProtocolGuid,
84 NULL
85 );
86 ASSERT_EFI_ERROR (Status);
87}
88
101EFIAPI
103 IN EFI_HANDLE ImageHandle,
104 IN EFI_SYSTEM_TABLE *SystemTable
105 )
106{
108}
UINT64 UINTN
EFI_STATUS MmFaultTolerantWriteInitialize(VOID)
VOID FtwNotifySmmReady(VOID)
UINT32 FtwCalculateCrc32(IN VOID *Buffer, IN UINTN Length)
BOOLEAN FtwSmmIsPrimaryBufferValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
EFI_STATUS EFIAPI SmmFaultTolerantWriteInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
BOOLEAN EFIAPI SmmIsBufferOutsideSmmValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
Definition: SmmMemLib.c:114
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193