grub/grub-core/kern/emu/cache.c
Alexander Graf 09d8eedbba RISC-V: Add to build system
This patch adds support for RISC-V to the grub build system. With this
patch, I can successfully build grub on RISC-V as a UEFI application.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-09-21 16:43:54 -04:00

35 lines
664 B
C

#ifndef GRUB_MACHINE_EMU
#error "This source is only meant for grub-emu platform"
#endif
#include <grub/cache.h>
#if defined(__ia64__)
#include "../ia64/cache.c"
#elif defined (__arm__) || defined (__aarch64__)
void __clear_cache (void *beg, void *end);
void
grub_arch_sync_caches (void *address, grub_size_t len)
{
__clear_cache (address, (char *) address + len);
}
#elif defined (__mips__)
void _flush_cache (void *address, grub_size_t len, int type);
void
grub_arch_sync_caches (void *address, grub_size_t len)
{
return _flush_cache (address, len, 0);
}
#elif defined(__riscv)
void
grub_arch_sync_caches (void *address, grub_size_t len)
{
}
#endif