Fix emu on mipsel.
* conf/Makefile.common (CFLAGS_PLATFORM): Add -mflush-func =grub_cpu_flush_cache on all mips and not only yeeloong. * configure.ac (COND_mips): New conditional. * grub-core/Makefile.am (KERNEL_HEADER_FILES): Add libgcc on all platforms. * grub-core/kern/emu/cache.S (__mips__): Use _flush_cache. * grub-core/kern/emu/full.c (grub_arch_dl_init_linker) [GRUB_LINKER_HAVE_INIT]: New function. (grub_emu_post_init): Likewise. * grub-core/kern/emu/lite.c (grub_emu_post_init): Likewise. * grub-core/kern/emu/main.c: Use grub_emu_post_init. * include/grub/cache.h (_mips): Include mips/cache.h. * include/grub/disk.h [GRUB_UTIL || GRUB_MACHINE_EMU]: Add missing LVM and RAID prototypes. * include/grub/emu/misc.h (grub_emu_post_init): New proto. * include/grub/mips/time.h (grub_cpu_idle) [GRUB_MACHINE_EMU]: New function.
This commit is contained in:
parent
5ed7d816b4
commit
050abaeaa8
12 changed files with 94 additions and 16 deletions
|
@ -23,6 +23,10 @@
|
|||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
#ifdef _mips
|
||||
#include <grub/mips/cache.h>
|
||||
#endif
|
||||
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
static inline void
|
||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
||||
|
|
|
@ -177,4 +177,13 @@ struct grub_disk_ata_pass_through_parms
|
|||
extern grub_err_t (* EXPORT_VAR(grub_disk_ata_pass_through)) (grub_disk_t,
|
||||
struct grub_disk_ata_pass_through_parms *);
|
||||
|
||||
#if defined (GRUB_UTIL) || defined (GRUB_MACHINE_EMU)
|
||||
void grub_lvm_init (void);
|
||||
void grub_mdraid_init (void);
|
||||
void grub_raid_init (void);
|
||||
void grub_lvm_fini (void);
|
||||
void grub_mdraid_fini (void);
|
||||
void grub_raid_fini (void);
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_DISK_HEADER */
|
||||
|
|
|
@ -45,6 +45,7 @@ extern const char *program_name;
|
|||
void grub_emu_init (void);
|
||||
void grub_init_all (void);
|
||||
void grub_fini_all (void);
|
||||
void grub_emu_post_init (void);
|
||||
|
||||
void grub_find_zpool_from_dir (const char *dir,
|
||||
char **poolname, char **poolfs);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifdef GRUB_MACHINE_EMU
|
||||
static inline void
|
||||
grub_cpu_idle(void)
|
||||
{
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue