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

Programmingkid programmingkidx at gmail.com
Tue Feb 9 15:35:42 CET 2016


On Feb 9, 2016, at 1:25 AM, Hervé Poussineau wrote:

> Le 09/02/2016 04:45, Programmingkid a écrit :
>> 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.
>> 
>> 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";
>> +    NEWWORLD(set_property(dnode, "slot-names", names, strlen(names) + 1));
>> +
>>      device_end();
>> 
>>      if (legacy) {
>> 
>> 
> 
> I get a compilation error.
> drivers/escc.c: In function 'escc_add_channel':
> drivers/escc.c:463:19: error: initialization discards 'const' qualifier from pointer target type [-Werror]
>     char *names = "0001Modem";
> 
> It works by changing the line to const char *names = "0001Modem";
> 
> I didn't test MacOS X, but this changes MacOS 9 error from "illegal instruction" to "address error".
> 
> Hervé
> 

Thanks for testing out my patch. I think this change in Mac OS 9 errors definitely indicates we are on the right patch. Now all that's left is attaching DMA channels to the ESCC (I think). 




More information about the OpenBIOS mailing list