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@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);
fword("finish-device");
@@ -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);
fword("finish-device");
On 15/04/16 11:09, Mark Cave-Ayland wrote:
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@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);
fword("finish-device");
@@ -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);
fword("finish-device");
Note that this fixes a regression with current QEMU git master for g3beige and MacOS 10.2, so unless I hear otherwise then I'm intending to commit this later today and send an upstream pull request in time for the 2.6 release.
ATB,
Mark.
On Apr 15, 2016, at 6:09 AM, Mark Cave-Ayland wrote:
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@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);
fword("finish-device");
@@ -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);
fword("finish-device");
-- 1.7.10.4
I tried out your patch using Mac OS 10.2.8 and the beige g3 target. I didn't notice any difference while booting with and without your patch. What is the exact version of Mac OS 10.2 you are using?
This message is displayed with and without your patch: AppleSCCSerial: Failed to create Tx DMA interupt event source!
On 15/04/16 16:48, Programmingkid wrote:
I tried out your patch using Mac OS 10.2.8 and the beige g3 target. I didn't notice any difference while booting with and without your patch. What is the exact version of Mac OS 10.2 you are using?
That's a good question - I can't tell unless there is a file on the CD which specifically states the version?
This message is displayed with and without your patch: AppleSCCSerial: Failed to create Tx DMA interupt event source!
Is that just a warning, or is a fatal error that prevents booting into the installer?
ATB,
Mark.
On Apr 15, 2016, at 12:13 PM, Mark Cave-Ayland wrote:
On 15/04/16 16:48, Programmingkid wrote:
I tried out your patch using Mac OS 10.2.8 and the beige g3 target. I didn't notice any difference while booting with and without your patch. What is the exact version of Mac OS 10.2 you are using?
That's a good question - I can't tell unless there is a file on the CD which specifically states the version?
After you have booted to the desktop, click on the Apple menu and select "About this Mac". It will tell you in the window that opens up. Oh, you are using a CD. I was testing with an installation of Mac OS 10.2.8.
This message is displayed with and without your patch: AppleSCCSerial: Failed to create Tx DMA interupt event source!
Is that just a warning, or is a fatal error that prevents booting into the installer?
Just a warning. Someone said it isn't necessary to have DMA support for ESCC to boot Mac OS 9 and it doesn't hurt Mac OS X, so I guess it will not be fixed. Unless someone has a need for the ESCC.
On 15/04/16 17:22, Programmingkid wrote:
On Apr 15, 2016, at 12:13 PM, Mark Cave-Ayland wrote:
On 15/04/16 16:48, Programmingkid wrote:
I tried out your patch using Mac OS 10.2.8 and the beige g3 target. I didn't notice any difference while booting with and without your patch. What is the exact version of Mac OS 10.2 you are using?
That's a good question - I can't tell unless there is a file on the CD which specifically states the version?
After you have booted to the desktop, click on the Apple menu and select "About this Mac". It will tell you in the window that opens up. Oh, you are using a CD. I was testing with an installation of Mac OS 10.2.8.
Yeah. For some unhelpful reason, all of the menus are disabled in the installer which makes it hard to see exactly which version is being installed without running through the entire process :(
This message is displayed with and without your patch: AppleSCCSerial: Failed to create Tx DMA interupt event source!
Is that just a warning, or is a fatal error that prevents booting into the installer?
Just a warning. Someone said it isn't necessary to have DMA support for ESCC to boot Mac OS 9 and it doesn't hurt Mac OS X, so I guess it will not be fixed. Unless someone has a need for the ESCC.
Okay as long as you still get a successful 10.2 boot then that's fine for the moment. I'll commit the patch now and then get the QEMU OpenBIOS images updated soon.
ATB,
Mark.