14#include "hal/library/memlib.h"
60 volatile uint8_t *dst;
61 const volatile uint8_t *src;
63 dst = (
volatile uint8_t *)dst_buf;
64 src = (
const volatile uint8_t *)src_buf;
68 if ((dst ==
NULL) || (dst_len > (SIZE_MAX >> 1))) {
79 if (((src < dst) && (src + src_len > dst)) || ((dst < src) && (dst + src_len > src))) {
85 if ((src_len > dst_len) ||
86 (src_len > (SIZE_MAX >> 1)))
92 while (src_len-- != 0) {
118 SetMem (buffer, length, value);
167 const void *destination_buffer,
168 const void *source_buffer,
172 if (
CompareMem (destination_buffer, source_buffer, length) == 0) {
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
bool libspdm_consttime_is_mem_equal(const void *destination_buffer, const void *source_buffer, size_t length)
void libspdm_set_mem(void *buffer, size_t length, uint8_t value)
void libspdm_zero_mem(void *buffer, size_t length)
void libspdm_copy_mem(void *dst_buf, size_t dst_len, const void *src_buf, size_t src_len)