29 |
#include <grub/setjmp.h> |
#include <grub/setjmp.h> |
30 |
#include <grub/env.h> |
#include <grub/env.h> |
31 |
#include <grub/misc.h> |
#include <grub/misc.h> |
|
#include <grub/machine/init.h> |
|
32 |
#include <grub/machine/time.h> |
#include <grub/machine/time.h> |
33 |
#include <grub/machine/kernel.h> |
#include <grub/machine/kernel.h> |
34 |
|
#include <grub/machine/console.h> |
35 |
|
#include <grub/machine/ofdisk.h> |
36 |
|
|
37 |
/* Apple OF 1.0.5 reserves 0x0 to 0x4000 for the exception handlers. */ |
/* Apple OF 1.0.5 reserves 0x0 to 0x4000 for the exception handlers. */ |
38 |
static const grub_addr_t grub_heap_start = 0x4000; |
static const grub_addr_t grub_heap_start = 0x4000; |
43 |
{ |
{ |
44 |
/* Trap to Open Firmware. */ |
/* Trap to Open Firmware. */ |
45 |
asm ("trap"); |
asm ("trap"); |
46 |
|
|
47 |
for (;;); |
for (;;); |
48 |
} |
} |
49 |
|
|
73 |
grub_ieee1275_finddevice ("/chosen", &chosen); |
grub_ieee1275_finddevice ("/chosen", &chosen); |
74 |
if (grub_ieee1275_get_property (chosen, "bootpath", &bootpath, |
if (grub_ieee1275_get_property (chosen, "bootpath", &bootpath, |
75 |
sizeof (bootpath), 0)) |
sizeof (bootpath), 0)) |
76 |
{ |
{ |
77 |
/* Should never happen. */ |
/* Should never happen. */ |
78 |
grub_printf ("/chosen/bootpath property missing!\n"); |
grub_printf ("/chosen/bootpath property missing!\n"); |
79 |
grub_env_set ("prefix", ""); |
grub_env_set ("prefix", ""); |
139 |
{ |
{ |
140 |
grub_ofdisk_fini (); |
grub_ofdisk_fini (); |
141 |
grub_console_fini (); |
grub_console_fini (); |
|
|
|
|
grub_ieee1275_release (grub_heap_start, grub_heap_len); |
|
|
/* XXX Release memory claimed for Old World firmware. */ |
|
142 |
} |
} |
143 |
|
|
144 |
void |
void |