grub/grub-core/kern/mips/qemu-mips/init.c

59 lines
920 B
C
Raw Normal View History

2009-10-09 17:50:31 +00:00
#include <grub/kernel.h>
#include <grub/misc.h>
#include <grub/env.h>
#include <grub/time.h>
#include <grub/types.h>
#include <grub/misc.h>
2009-10-10 11:30:14 +00:00
#include <grub/mm.h>
2009-10-11 00:07:52 +00:00
#include <grub/time.h>
2009-10-09 17:50:31 +00:00
#include <grub/machine/kernel.h>
2009-10-10 11:30:14 +00:00
#include <grub/machine/memory.h>
2009-10-09 17:50:31 +00:00
#include <grub/cpu/kernel.h>
2009-10-10 11:30:14 +00:00
#define RAMSIZE (*(grub_uint32_t *) ((16 << 20) - 264))
2009-10-09 17:50:31 +00:00
grub_uint32_t
grub_get_rtc (void)
{
static int calln = 0;
return calln++;
}
void
grub_machine_init (void)
{
grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_USABLE,
RAMSIZE - (GRUB_MACHINE_MEMORY_USABLE & 0x7fffffff));
2009-10-10 18:52:15 +00:00
grub_install_get_time_ms (grub_rtc_get_time_ms);
2009-10-09 17:50:31 +00:00
}
void
grub_machine_fini (void)
{
}
void
grub_exit (void)
{
while (1);
}
void
grub_halt (void)
{
while (1);
}
void
grub_reboot (void)
{
while (1);
}
2009-10-10 11:30:14 +00:00
grub_err_t
2010-09-04 15:10:10 +00:00
grub_machine_mmap_iterate (grub_memory_hook_t hook)
2009-10-10 11:30:14 +00:00
{
2010-09-04 15:10:10 +00:00
hook (0, RAMSIZE, GRUB_MEMORY_AVAILABLE);
2009-10-10 11:30:14 +00:00
return GRUB_ERR_NONE;
}