/* cmain.c - Startup code for the PowerPC. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
int (*grub_ieee1275_entry_fn) (void *);
int
{
}
void
{
}
static void
grub_ieee1275_find_options (void)
{
int rc;
int is_smartfirmware = 0;
int is_olpc = 0;
int is_qemu = 0;
#ifdef __sparc__
#endif
sizeof realmode, 0);
is_smartfirmware = 1;
is_olpc = 1;
is_qemu = 1;
if (is_smartfirmware)
{
/* Broken in all versions */
/* There are two incompatible ways of checking the version number. Try
both. */
if (rc < 0)
if (rc >= 0)
{
/* It is tempting to implement a version parser to set the flags for
e.g. 1.3 and below. However, there's a special situation here.
3rd party updates which fix the partition bugs are common, and for
some reason their fixes aren't being merged into trunk. So for
example we know that 1.2 and 1.3 are broken, but there's 1.2.99
and 1.3.99 which are known good (and applying this workaround
would cause breakage). */
{
}
}
}
if (is_olpc)
{
/* OLPC / XO laptops have three kinds of storage devices:
- NAND flash. These are accessible via OFW callbacks, but:
- Follow strange semantics, imposed by hardware constraints.
- Its ABI is undocumented, and not stable.
They lack "device_type" property, which conveniently makes GRUB
skip them.
- USB drives. Not accessible, because OFW shuts down the controller
in order to prevent collisions with applications accessing it
directly. Even worse, attempts to access it will NOT return
control to the caller, so we have to avoid probing them.
- SD cards. These work fine.
To avoid breakage, we only need to skip USB probing. However,
since detecting SD cards is more reliable, we do that instead.
*/
}
if (is_qemu)
{
/* OpenFirmware hangs on qemu if one requests any memory below 1.5 MiB. */
}
{
{
}
}
}
void
grub_ieee1275_init (void)
{
sizeof grub_ieee1275_mmu, 0) < 0)
grub_ieee1275_mmu = 0;
}