2008-04-18 Robert Millan <rmh@aybabtu.com>
Restructures early code path on ieee1275 to unify grub_main() as the first C function that is executed in every platform. * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype. * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of cmain(). * kern/powerpc/ieee1275/crt0.S (_start): Likewise. * kern/ieee1275/cmain.c (cmain): Rename to ... * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this. * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init() at the beginning.
This commit is contained in:
parent
57490c2bd6
commit
602566f64a
6 changed files with 20 additions and 9 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2008-04-18 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
Restructures early code path on ieee1275 to unify grub_main() as
|
||||||
|
the first C function that is executed in every platform.
|
||||||
|
|
||||||
|
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
|
||||||
|
* kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
|
||||||
|
cmain().
|
||||||
|
* kern/powerpc/ieee1275/crt0.S (_start): Likewise.
|
||||||
|
* kern/ieee1275/cmain.c (cmain): Rename to ...
|
||||||
|
* kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
|
||||||
|
* kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
|
||||||
|
at the beginning.
|
||||||
|
|
||||||
2008-04-18 Robert Millan <rmh@aybabtu.com>
|
2008-04-18 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* util/update-grub.in: Fix syntax error when setting
|
* util/update-grub.in: Fix syntax error when setting
|
||||||
|
|
|
@ -97,6 +97,7 @@ extern void EXPORT_FUNC(grub_ieee1275_set_flag) (enum grub_ieee1275_flag flag);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void EXPORT_FUNC(grub_ieee1275_init) (void);
|
||||||
int EXPORT_FUNC(grub_ieee1275_finddevice) (char *name,
|
int EXPORT_FUNC(grub_ieee1275_finddevice) (char *name,
|
||||||
grub_ieee1275_phandle_t *phandlep);
|
grub_ieee1275_phandle_t *phandlep);
|
||||||
int EXPORT_FUNC(grub_ieee1275_get_property) (grub_ieee1275_phandle_t phandle,
|
int EXPORT_FUNC(grub_ieee1275_get_property) (grub_ieee1275_phandle_t phandle,
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
start:
|
start:
|
||||||
_start:
|
_start:
|
||||||
movl %eax, EXT_C(grub_ieee1275_entry_fn)
|
movl %eax, EXT_C(grub_ieee1275_entry_fn)
|
||||||
jmp EXT_C(cmain)
|
jmp EXT_C(grub_main)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This call is special... it never returns... in fact it should simply
|
* This call is special... it never returns... in fact it should simply
|
||||||
|
|
|
@ -151,9 +151,8 @@ grub_ieee1275_find_options (void)
|
||||||
#undef SF
|
#undef SF
|
||||||
#undef OHW
|
#undef OHW
|
||||||
|
|
||||||
void cmain (void);
|
|
||||||
void
|
void
|
||||||
cmain (void)
|
grub_ieee1275_init (void)
|
||||||
{
|
{
|
||||||
grub_ieee1275_finddevice ("/chosen", &grub_ieee1275_chosen);
|
grub_ieee1275_finddevice ("/chosen", &grub_ieee1275_chosen);
|
||||||
|
|
||||||
|
@ -162,9 +161,4 @@ cmain (void)
|
||||||
grub_ieee1275_mmu = 0;
|
grub_ieee1275_mmu = 0;
|
||||||
|
|
||||||
grub_ieee1275_find_options ();
|
grub_ieee1275_find_options ();
|
||||||
|
|
||||||
/* Now invoke the main function. */
|
|
||||||
grub_main ();
|
|
||||||
|
|
||||||
/* Never reached. */
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,6 +180,8 @@ grub_machine_init (void)
|
||||||
char args[256];
|
char args[256];
|
||||||
int actual;
|
int actual;
|
||||||
|
|
||||||
|
grub_ieee1275_init ();
|
||||||
|
|
||||||
grub_console_init ();
|
grub_console_init ();
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
grub_keyboard_controller_init ();
|
grub_keyboard_controller_init ();
|
||||||
|
|
|
@ -42,5 +42,5 @@ _start:
|
||||||
lis 9, grub_ieee1275_entry_fn@ha
|
lis 9, grub_ieee1275_entry_fn@ha
|
||||||
stw 5, grub_ieee1275_entry_fn@l(9)
|
stw 5, grub_ieee1275_entry_fn@l(9)
|
||||||
|
|
||||||
bl cmain
|
bl grub_main
|
||||||
1: b 1b
|
1: b 1b
|
||||||
|
|
Loading…
Add table
Reference in a new issue