1 |
/* cmain.c - Startup code for the PowerPC. */ |
/* cmain.c - Startup code for the PowerPC. */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
37 |
intptr_t (*grub_ieee1275_entry_fn) (void *); |
intptr_t (*grub_ieee1275_entry_fn) (void *); |
38 |
|
|
39 |
grub_uint32_t grub_ieee1275_flags; |
grub_uint32_t grub_ieee1275_flags; |
40 |
|
int grub_ieee1275_realmode; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
static void |
45 |
|
find_options (void) |
46 |
|
{ |
47 |
|
grub_ieee1275_phandle_t options; |
48 |
|
|
49 |
|
grub_ieee1275_finddevice ("/options", &options); |
50 |
|
grub_ieee1275_get_property (options, "real-mode?", &grub_ieee1275_realmode, |
51 |
|
sizeof (grub_ieee1275_realmode), 0); |
52 |
|
} |
53 |
|
|
54 |
/* Setup the argument vector and pass control over to the main |
/* Setup the argument vector and pass control over to the main |
55 |
function. */ |
function. */ |
56 |
void |
void |
84 |
grub_ieee1275_entry_fn = (intptr_t (*)(void *)) r5; |
grub_ieee1275_entry_fn = (intptr_t (*)(void *)) r5; |
85 |
} |
} |
86 |
|
|
87 |
|
find_options (); |
88 |
|
|
89 |
/* If any argument was passed to the kernel (us), they are |
/* If any argument was passed to the kernel (us), they are |
90 |
put in the bootargs property of /chosen. The string can |
put in the bootargs property of /chosen. The string can |
91 |
be null (just the nul-character), so check that the size |
be null (just the nul-character), so check that the size |