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

Programmingkid programmingkidx at gmail.com
Tue Feb 9 19:56:01 CET 2016


On Feb 9, 2016, at 11:52 AM, Tarl Neustaedter wrote:

> On 2016-Feb-9 11:45 , BALATON Zoltan wrote:
>> On Tue, 9 Feb 2016, BALATON Zoltan wrote: 
>>> modem as well. Not sure what should it say for just a serial port. Maybe none or serial instead of modem. 
>> 
>> What if you just put four zero bytes in slot-names? But you may still need working DMA added. 
> 
> I don't know if that works for Apple, but it shouldn't. From the PCI binding:
> 
> "slot-names" S prop-name, describes external labeling of add-in slots.
> 
> prop-encoded-array: An integer, encoded as with encode-int, followed by a list of strings, each encoded as with encode-string.
> 
> The integer portion of the property value is a bitmask of available slots; for each add-in slot on the bus, the bit corresponding to that slot's Device Number is set. The least-significant bit corresponds to Device Number 0, the next bit corresponds to Device Number 1, etc. The number of following strings is the same as the number of slots; the first string gives the label that is printed on the chassis for the slot with the smallest Device Number, and so on.
> 
> 
> That is, the first four bytes are supposed to be an integer (in binary) indicating how many names follow, each name null-terminated. The usual case for this properly is that you see 0x00, 0x00, 0x00, 0x01, <string>, 0x00.

So is this how it is suppose to be added to OpenBIOS:

1 encode-int " Modem" encode-string encode+ " slot-names" property

I tried my best to make it look like this:

00000001
Modem

but I just couldn't figure out how. The above code makes the value for slot-names into a bunch of unsightly hexadecimal values. 


More information about the OpenBIOS mailing list