mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
The Null instance of MemDebugLogLib only provides MemDebugLogWrite(), MemDebugLogPages(), and MemDebugLogEnabled(). Any module that references MemDebugLogInit() or MemDebugLogCopy() cannot link against the Null instance, forcing the feature to be gated at the build-system level rather than at runtime. Add no-op stubs for MemDebugLogInit() and MemDebugLogCopy(). This will be used by the following commit to add memory debug log support in TDX. Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
60 lines
842 B
C
60 lines
842 B
C
/** @file
|
|
*
|
|
Memory Debug Log Library - Null.
|
|
|
|
Copyright (C) 2025, Oracle and/or its affiliates.
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include <Library/MemDebugLogLib.h>
|
|
|
|
EFI_STATUS
|
|
EFIAPI
|
|
MemDebugLogWrite (
|
|
IN CHAR8 *Buffer,
|
|
IN UINTN Length
|
|
)
|
|
{
|
|
// Null Instance - NOP
|
|
return EFI_SUCCESS;
|
|
}
|
|
|
|
UINT32
|
|
EFIAPI
|
|
MemDebugLogPages (
|
|
VOID
|
|
)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
BOOLEAN
|
|
EFIAPI
|
|
MemDebugLogEnabled (
|
|
VOID
|
|
)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
EFI_STATUS
|
|
EFIAPI
|
|
MemDebugLogInit (
|
|
IN EFI_PHYSICAL_ADDRESS MemDebugLogBufAddr,
|
|
IN UINT32 MemDebugLogBufSize
|
|
)
|
|
{
|
|
return EFI_SUCCESS;
|
|
}
|
|
|
|
EFI_STATUS
|
|
EFIAPI
|
|
MemDebugLogCopy (
|
|
IN EFI_PHYSICAL_ADDRESS MemDebugLogBufDestAddr,
|
|
IN EFI_PHYSICAL_ADDRESS MemDebugLogBufSrcAddr
|
|
)
|
|
{
|
|
return EFI_SUCCESS;
|
|
}
|