You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
6f8c44b375
Synced up MdePkg, IntelFsp2Pkg and BaseTools to EDK2 stable tag edk2-stable201905. There are several changes for MdePkg and BaseTools. MdePkg: - Support light print to reduce SBL size MdePkg\Library\BasePrintLib\PrintLibInternal.c MdePkg\Include\Library\DebugLib.h - TCG TPM2 spec changes and remove dependencies MdePkg\Include\IndustryStandard\UefiTcgPlatform.h MdePkg\Include\IndustryStandard\Tpm2Acpi.h - Use old NVM protocol file MdePkg\Include\Protocol\NvmExpressPassthru.h - Removed unused files BaseTools: - Added LZ4 support - Removed unused files Signed-off-by: Maurice Ma <maurice.ma@intel.com>
75 lines
1.1 KiB
C
75 lines
1.1 KiB
C
/** @file
|
|
Binder function implementations for ANSI C libraries.
|
|
|
|
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include "BinderFuncs.h"
|
|
#include "CommonLib.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
//
|
|
// Binder Function Implementations
|
|
//
|
|
|
|
VOID *
|
|
CommonLibBinderAllocate (
|
|
IN UINTN Size
|
|
)
|
|
{
|
|
return (VOID *) malloc (Size);
|
|
}
|
|
|
|
VOID
|
|
CommonLibBinderFree (
|
|
IN VOID *Pointer
|
|
)
|
|
{
|
|
free (Pointer);
|
|
}
|
|
|
|
VOID
|
|
CommonLibBinderCopyMem (
|
|
IN VOID *Destination,
|
|
IN VOID *Source,
|
|
IN UINTN Length
|
|
)
|
|
{
|
|
memmove (Destination, Source, Length);
|
|
}
|
|
|
|
VOID
|
|
CommonLibBinderSetMem (
|
|
IN VOID *Destination,
|
|
IN UINTN Length,
|
|
IN UINT8 Value
|
|
)
|
|
{
|
|
memset (Destination, Value, Length);
|
|
}
|
|
|
|
INTN
|
|
CommonLibBinderCompareMem (
|
|
IN VOID *MemOne,
|
|
IN VOID *MemTwo,
|
|
IN UINTN Length
|
|
)
|
|
{
|
|
return memcmp (MemOne, MemTwo, Length);
|
|
}
|
|
|
|
BOOLEAN
|
|
CommonLibBinderCompareGuid (
|
|
IN EFI_GUID *Guid1,
|
|
IN EFI_GUID *Guid2
|
|
)
|
|
{
|
|
return CompareGuid (Guid1, Guid2) ? FALSE : TRUE;
|
|
}
|
|
|
|
|
|
|