mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
efi_loader: new function efi_memcpy_runtime()
Provide a memcpy() function that we can use at UEFI runtime. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
724d28171e
commit
b0dd8cb407
2 changed files with 22 additions and 0 deletions
|
@ -137,6 +137,25 @@ efi_status_t efi_init_runtime_supported(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_memcpy_runtime() - copy memory area
|
||||
*
|
||||
* At runtime memcpy() is not available.
|
||||
*
|
||||
* @dest: destination buffer
|
||||
* @src: source buffer
|
||||
* @n: number of bytes to copy
|
||||
* Return: pointer to destination buffer
|
||||
*/
|
||||
void __efi_runtime efi_memcpy_runtime(void *dest, const void *src, size_t n)
|
||||
{
|
||||
u8 *d = dest;
|
||||
const u8 *s = src;
|
||||
|
||||
for (; n; --n)
|
||||
*d++ = *s++;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_update_table_header_crc32() - Update crc32 in table header
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue