mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
2008-01-20 Robert Millan <rmh@aybabtu.com>
Fix detection of "real mode" when /options/real-mode? doesn't exist.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
declaration.
* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
(grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
`GRUB_IEEE1275_FLAG_REAL_MODE'.
(cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
property).
* kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
`grub_ieee1275_mmu' rather than obtaining a handler on every call.
This commit is contained in:
1 parent
33bf70a759
commit
0bf74728de
4 files changed
+22
-9
No files matched your search
@@ -28,6 +28,7 @@
|
||||
int (*grub_ieee1275_entry_fn) (void *);
|
||||
|
||||
grub_ieee1275_phandle_t grub_ieee1275_chosen;
|
||||
grub_ieee1275_ihandle_t grub_ieee1275_mmu;
|
||||
|
||||
static grub_uint32_t grub_ieee1275_flags;
|
||||
|
||||
@@ -58,7 +59,7 @@ grub_ieee1275_find_options (void)
|
||||
grub_ieee1275_finddevice ("/options", &options);
|
||||
rc = grub_ieee1275_get_integer_property (options, "real-mode?", &realmode,
|
||||
sizeof realmode, 0);
|
||||
if ((rc >= 0) && realmode)
|
||||
if (((rc >= 0) && realmode) || (grub_ieee1275_mmu == 0))
|
||||
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_REAL_MODE);
|
||||
|
||||
grub_ieee1275_finddevice ("/openprom", &openprom);
|
||||
@@ -108,6 +109,10 @@ cmain (void)
|
||||
{
|
||||
grub_ieee1275_finddevice ("/chosen", &grub_ieee1275_chosen);
|
||||
|
||||
if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "mmu", &grub_ieee1275_mmu,
|
||||
sizeof grub_ieee1275_mmu, 0) < 0)
|
||||
grub_ieee1275_mmu = 0;
|
||||
|
||||
grub_ieee1275_find_options ();
|
||||
|
||||
/* Now invoke the main function. */
|
||||
|
||||
Reference in new issue
Block a user