[OpenBIOS] [PATCH] drivers/escc.c: Add slot-names property ch-a node under escc
Hervé Poussineau
hpoussin at reactos.org
Tue Feb 9 07:25:24 CET 2016
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é
More information about the OpenBIOS
mailing list