+2011-02-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Workaround yet another IEEE1275 bug.
+
+ * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
+ GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS.
+ * grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate): Ignore
+ adress_cells and size:cells if GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS
+ is set.
+ * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
+ GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS on powermacs.
+
2011-02-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/partmap/msdos.c (pc_partition_map_embed): Fix off by one
if (rc >= 0 && !grub_strcmp (tmp, "Emulated PC"))
is_qemu = 1;
+ if (grub_strncmp (tmp, "PowerMac", sizeof ("PowerMac") - 1) == 0)
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS);
+
if (is_smartfirmware)
{
/* Broken in all versions */
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"couldn't examine /memory/available property");
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS))
+ {
+ address_cells = 1;
+ size_cells = 1;
+ }
+
/* Decode each entry and call `hook'. */
i = 0;
available_size /= sizeof (grub_uint32_t);
/* OLPC / XO firmware has the cursor ON/OFF routines. */
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF,
+
+ /* Some PowerMacs claim to use 2 address cells but in fact use only 1.
+ Other PowerMacs claim to use only 1 and really do so. Always assume
+ 1 address cell is used on PowerMacs.
+ */
+ GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS,
};
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);