1 // SPDX-License-Identifier: GPL-2.0 2 3 #include <linux/efi.h> 4 #include <asm/efi.h> 5 #include <asm/string.h> 6 7 #include "efistub.h" 8 9 #ifdef CONFIG_KASAN 10 #undef memcpy 11 #undef memmove 12 #undef memset 13 void *__memcpy(void *__dest, const void *__src, size_t __n) __alias(memcpy); 14 void *__memmove(void *__dest, const void *__src, size_t count) __alias(memmove); 15 void *__memset(void *s, int c, size_t count) __alias(memset); 16 #endif 17 18 void *memcpy(void *dst, const void *src, size_t len) 19 { 20 efi_bs_call(copy_mem, dst, src, len); 21 return dst; 22 } 23 24 extern void *memmove(void *dst, const void *src, size_t len) __alias(memcpy); 25 26 void *memset(void *dst, int c, size_t len) 27 { 28 efi_bs_call(set_mem, dst, len, c & U8_MAX); 29 return dst; 30 } 31