VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.c@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 3 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1/** @file
2
3 Parts of the SMM/MM implementation that are specific to standalone MM
4
5Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR>
6Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
7SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#include <Library/SmmMemLib.h>
12#include <Library/UefiBootServicesTableLib.h>
13#include "FaultTolerantWrite.h"
14#include "FaultTolerantWriteSmmCommon.h"
15
16/**
17 This function checks if the Primary Buffer is valid.
18
19 @param Buffer The buffer start address to be checked.
20 @param Length The buffer length to be checked.
21
22 @retval TRUE This buffer is valid.
23 @retval FALSE This buffer is not valid.
24**/
25BOOLEAN
26FtwSmmIsPrimaryBufferValid (
27 IN EFI_PHYSICAL_ADDRESS Buffer,
28 IN UINT64 Length
29 )
30{
31 return TRUE;
32}
33
34/**
35 Internal implementation of CRC32. Depending on the execution context
36 (standalone SMM or DXE vs standalone MM), this function is implemented
37 via a call to the CalculateCrc32 () boot service, or via a library
38 call.
39
40 If Buffer is NULL, then ASSERT().
41 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
42
43 @param[in] Buffer A pointer to the buffer on which the 32-bit CRC is to be computed.
44 @param[in] Length The number of bytes in the buffer Data.
45
46 @retval Crc32 The 32-bit CRC was computed for the data buffer.
47
48**/
49UINT32
50FtwCalculateCrc32 (
51 IN VOID *Buffer,
52 IN UINTN Length
53 )
54{
55 return CalculateCrc32 (Buffer, Length);
56}
57
58/**
59 Notify the system that the SMM FTW driver is ready.
60**/
61VOID
62FtwNotifySmmReady (
63 VOID
64 )
65{
66}
67
68/**
69 This function is the entry point of the Fault Tolerant Write driver.
70
71 @param[in] ImageHandle A handle for the image that is initializing this driver
72 @param[in] MmSystemTable A pointer to the MM system table
73
74 @retval EFI_SUCCESS The initialization finished successfully.
75 @retval EFI_OUT_OF_RESOURCES Allocate memory error
76 @retval EFI_INVALID_PARAMETER Workspace or Spare block does not exist
77
78**/
79EFI_STATUS
80EFIAPI
81StandaloneMmFaultTolerantWriteInitialize (
82 IN EFI_HANDLE ImageHandle,
83 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
84 )
85{
86 return MmFaultTolerantWriteInitialize ();
87}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette