Fix mips-emu compilation.
This commit is contained in:
parent
b75db69ac1
commit
d5c14e1e26
9 changed files with 27 additions and 52 deletions
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include <grub/cache.h>
|
||||
|
||||
#if defined(__ia64__) || defined (__arm__) || defined (__aarch64__)
|
||||
#include <grub/cache.h>
|
||||
|
||||
void __clear_cache (char *beg, char *end);
|
||||
|
||||
|
@ -9,5 +10,15 @@ 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);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,24 +6,9 @@
|
|||
/* Nothing is necessary. */
|
||||
#elif defined(__sparc__)
|
||||
#include "../sparc64/cache.S"
|
||||
#elif defined(__mips__)
|
||||
/* On MIPS we must go through standard functions. */
|
||||
#include <grub/symbol.h>
|
||||
|
||||
FUNCTION (grub_cpu_flush_cache)
|
||||
FUNCTION (grub_arch_sync_caches)
|
||||
.set nomacro
|
||||
.set noreorder
|
||||
lui $t0, %hi(_flush_cache)
|
||||
addui $t0, $t0, %lo(_flush_cache)
|
||||
move $a3, $zero
|
||||
jr $t0
|
||||
nop
|
||||
.set reorder
|
||||
.set macro
|
||||
#elif defined(__powerpc__)
|
||||
#include "../powerpc/cache.S"
|
||||
#elif defined(__ia64__) || defined(__arm__) || defined(__aarch64__)
|
||||
#elif defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__)
|
||||
#else
|
||||
#error "No target cpu type is defined"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue