[OpenBIOS] [PATCH] escc.c: add empty ranges property to escc and escc-legacy nodes

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Apr 15 12:09:31 CEST 2016

This fixes an intermittent panic in the AppleSCCSerial module for MacOS
10.2 and the g3beige machine during initialisation as the module tries to
write to the on-chip registers at 0x130XX rather than calculating the
correct address derived from the parent PCI node.

As described in the IEEE-1275 specification: if a "ranges" property exists but
has a zero-length property value, the child address space is identical to the
parent address space.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
 openbios-devel/drivers/escc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/openbios-devel/drivers/escc.c b/openbios-devel/drivers/escc.c
index 5fa3139..1990e79 100644
--- a/openbios-devel/drivers/escc.c
+++ b/openbios-devel/drivers/escc.c
@@ -514,6 +514,7 @@ escc_init(const char *path, phys_addr_t addr)
     set_property(dnode, "device_type", "escc",
                  strlen("escc") + 1);
     set_property(dnode, "compatible", "escc\0CHRP,es0", 14);
+    set_property(dnode, "ranges", "", 0);
@@ -541,6 +542,7 @@ escc_init(const char *path, phys_addr_t addr)
     set_property(dnode, "device_type", "escc-legacy",
                  strlen("escc-legacy") + 1);
     set_property(dnode, "compatible", "chrp,es1", 9);
+    set_property(dnode, "ranges", "", 0);

More information about the OpenBIOS mailing list