MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses
In preparation of providing a standalone MM based FTW driver, move the existing SMM driver to the new MM services table, and factor out some pieces that are specific to the traditional driver, mainly related to the use of UEFI boot services, which are not accessible to standalone MM drivers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -77,4 +77,43 @@ typedef struct {
|
||||
UINT8 Data[1];
|
||||
} SMM_FTW_GET_LAST_WRITE_HEADER;
|
||||
|
||||
/**
|
||||
Shared entry point of the module
|
||||
|
||||
@retval EFI_SUCCESS The initialization finished successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory error
|
||||
@retval EFI_INVALID_PARAMETER Workspace or Spare block does not exist
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
MmFaultTolerantWriteInitialize (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
This function checks if the buffer is valid per processor architecture and
|
||||
does not overlap with SMRAM.
|
||||
|
||||
@param Buffer The buffer start address to be checked.
|
||||
@param Length The buffer length to be checked.
|
||||
|
||||
@retval TRUE This buffer is valid per processor architecture and does not
|
||||
overlap with SMRAM.
|
||||
@retval FALSE This buffer is not valid per processor architecture or overlaps
|
||||
with SMRAM.
|
||||
**/
|
||||
BOOLEAN
|
||||
FtwSmmIsBufferOutsideSmmValid (
|
||||
IN EFI_PHYSICAL_ADDRESS Buffer,
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
/**
|
||||
Notify the system that the SMM FTW driver is ready
|
||||
**/
|
||||
VOID
|
||||
FtwNotifySmmReady (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user