b772baedcd
as opposed to after. * grub-core/Makefile.core.def (kernel): Increase linking address. (none_decompress): Likewise. (xz_decompress): Likewise. * grub-core/boot/mips/startup_raw.S: Use prewritten uncompression address. * grub-core/kern/mips/arc/init.c (grub_machine_init): Handle memory layout change. (grub_arch_modules_addr): New function. * grub-core/kern/mips/init.c (grub_arch_modules_addr): Moved from here... * grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): .. here * grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr): ... and here. * grub-core/kern/mips/startup.S (total_size): Rename to ... (grub_total_modules_size): ... this. Make global. [GRUB_MACHINE_ARC]: Don't attempt to move modules out of the bss. * include/grub/offsets.h (GRUB_KERNEL_MIPS_LOONGSON_UNCOMPRESSED_ADDR): New definition. (GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_ADDR): Likewise. (GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_ADDR): Likewise. (GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR): Likewise. (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): Increased. * util/grub-mkimage.c (image_target_desc): New flag PLATFORM_FLAGS_MODULES_BEFORE_KERNEL. (image_targets): Set PLATFORM_FLAGS_MODULES_BEFORE_KERNEL on mips-arc. (generate_image): Handle images with modules before kernel.
70 lines
1.1 KiB
C
70 lines
1.1 KiB
C
#include <grub/kernel.h>
|
|
#include <grub/misc.h>
|
|
#include <grub/env.h>
|
|
#include <grub/time.h>
|
|
#include <grub/types.h>
|
|
#include <grub/misc.h>
|
|
#include <grub/mm.h>
|
|
#include <grub/time.h>
|
|
#include <grub/machine/memory.h>
|
|
#include <grub/cpu/memory.h>
|
|
#include <grub/memory.h>
|
|
|
|
extern void grub_serial_init (void);
|
|
extern void grub_terminfo_init (void);
|
|
|
|
void
|
|
grub_machine_init (void)
|
|
{
|
|
grub_addr_t modend;
|
|
|
|
/* FIXME: measure this. */
|
|
grub_arch_cpuclock = 64000000;
|
|
|
|
modend = grub_modules_get_end ();
|
|
grub_mm_init_region ((void *) modend, grub_arch_memsize
|
|
- (modend - GRUB_ARCH_LOWMEMVSTART));
|
|
|
|
grub_install_get_time_ms (grub_rtc_get_time_ms);
|
|
|
|
grub_terminfo_init ();
|
|
grub_serial_init ();
|
|
}
|
|
|
|
void
|
|
grub_machine_fini (void)
|
|
{
|
|
}
|
|
|
|
void
|
|
grub_exit (void)
|
|
{
|
|
while (1);
|
|
}
|
|
|
|
void
|
|
grub_halt (void)
|
|
{
|
|
while (1);
|
|
}
|
|
|
|
void
|
|
grub_reboot (void)
|
|
{
|
|
while (1);
|
|
}
|
|
|
|
grub_err_t
|
|
grub_machine_mmap_iterate (grub_memory_hook_t hook)
|
|
{
|
|
hook (0, grub_arch_memsize, GRUB_MEMORY_AVAILABLE);
|
|
return GRUB_ERR_NONE;
|
|
}
|
|
|
|
extern char _end[];
|
|
|
|
grub_addr_t
|
|
grub_arch_modules_addr (void)
|
|
{
|
|
return (grub_addr_t) _end;
|
|
}
|