[OpenBIOS] [PATCH] drivers/escc.c: Add slot-names property ch-a node under escc

Alyssa Milburn fuzzie at fuzzie.org
Tue Feb 9 09:24:13 CET 2016


On Mon, Feb 08, 2016 at 10:45:42PM -0500, Programmingkid wrote:
> Mac OS X's AppleSCCSerial kernel extension requires the slot-names property in order to use any serial ports. This patch adds the property.
> 
> After this patch is applied, the next thing that stops Mac OS X from using the serial port is something  having to do with DMA. 

Great!

You can assign addresses for serial DMA and even OS 9 will try poking at the
dbdma controller, so this is just a question of hooking up the qemu side. I
can try doing this later today if it's useful..

Which version of OS X are you using for testing this?

> http://www.opensource.apple.com/source/AppleSCCSerial/AppleSCCSerial-126.4.0/PPCSerialPort.cpp
> In this file the setPortName() function is what does the searching for slot-names. 
> 
> Index: drivers/escc.c
> ===================================================================
> --- drivers/escc.c	(revision 1378)
> +++ drivers/escc.c	(working copy)
> @@ -456,6 +456,11 @@
>      NEWWORLD(set_property(dnode, "interrupts",
>               (char *)&props, 3 * sizeof(cell)));
>  
> +    /* The four numbers in front of Modem are needed for AppleSCCSerial
> +       kernel extension compatibility. */
> +    char *names = "0001Modem";

Weird. Is this meant to be \x00\x00\x00\x01Modem? (I see that the OS X code
you linked is just skipping the first four bytes. And it hardcodes the
PowerMac1,1 case I switched to for my own testing, heh..!)

> +    NEWWORLD(set_property(dnode, "slot-names", names, strlen(names) + 1));

If so, I guess you have to replace the strlen with a hard-coded length.

(Shouldn't the slot-name only be set to a string for one channel? Maybe it
doesn't matter?)

> +
>      device_end();
>  
>      if (legacy) {
> 

- Alyssa



More information about the OpenBIOS mailing list