cache.c 664 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef GRUB_MACHINE_EMU
  2. #error "This source is only meant for grub-emu platform"
  3. #endif
  4. #include <grub/cache.h>
  5. #if defined(__ia64__)
  6. #include "../ia64/cache.c"
  7. #elif defined (__arm__) || defined (__aarch64__)
  8. void __clear_cache (void *beg, void *end);
  9. void
  10. grub_arch_sync_caches (void *address, grub_size_t len)
  11. {
  12. __clear_cache (address, (char *) address + len);
  13. }
  14. #elif defined (__mips__)
  15. void _flush_cache (void *address, grub_size_t len, int type);
  16. void
  17. grub_arch_sync_caches (void *address, grub_size_t len)
  18. {
  19. return _flush_cache (address, len, 0);
  20. }
  21. #elif defined(__riscv)
  22. void
  23. grub_arch_sync_caches (void *address, grub_size_t len)
  24. {
  25. }
  26. #endif