[OpenBIOS] next-property

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Jan 3 22:14:59 CET 2014


On 03/01/14 20:33, Olivier Danet wrote:

> On 03/01/2014 21:01, Mark Cave-Ayland wrote:
>> On 03/01/14 19:16, Olivier Danet wrote:
>>
>> Hi Olivier,
>>
>>> You are right.
>>> I tried on an Ultra 10 with OpenBoot 3.12.
>>>
>>> next-property returns nothing when the property is unknown and also when
>>> the property is the last one.
>>> This contradicts Sun own documentation "Writing FCode 3.x Programs".
>>
>> Hmmmm. Is there anything in the IEEE1275 errata about this?
>>
>>> Puzzled, I tried then on a Apple iBook G3 :
>>> dev screen
>>> " <something>" active-package next-property
>>>
>>> This laptop returns :
>>> - true and a forth string when the property is not the last one
>>> - true and "0 0" when the property is the last one
>>> - false when the property does not exist.
>>>
>>> Anyway, whatever method is chosen (return nothing, return zero...),
>>> OpenBIOS forth and/or C code ("opb_nextprop()") should be modifed to
>>> avoid page faults.
>>
>> Yes indeed. The OpenBIOS Forth string to C string implementation
>> returns NULL if the length is 0 which has caught me out a few times.
>> The trick I've done, particularly in the filesystem drivers, is to do
>> something like the following where required:
>>
>> if (str == NULL) {
>> return "";
>> }
>>
>> BTW you never answered about which version of NetBSD you were trying
>> to boot?
>>
>>
>> ATB,
>>
>> Mark.
> I am using the latest, 6.1.2, installed from the full ISO image.
> They changed quite a bit the video part in NetBSD 6, overhauled
> the console and seem to have forked the TCX X11 driver to add hardware
> acceleration.

Oh that's interesting. Is there anything here that could be shared with 
a potential CG6 driver of any sort?

FWIW for testing you could also try my CG3 patchset here: 
https://github.com/mcayland/qemu/tree/cg3-final but you'll probably want 
to replace the QEMU,cgthree.bin ROM in QEMU with the one from OpenBIOS 
SVN trunk.

> I managed yesterday to boot NetBSD and run X in 256 colours mode !

Fantastic!

> Changes so far :
>
> OpenBIOS :
> - The "next-property" stuff. Called when starting the X server.
> - "keyboard" property detail. Else keyboard input does not work.
> - TCX properties modifications. For TCX/Dumb framebuffer selection.

The latter is interesting; is it possible for the OS to detect the 
framebuffer as a CG3/CG6 at all?

> QEMU :
> - Old bug "!TC on DATA XFER" in esp.c driver

I seem to remember Blue posted a potential patch for this, but I wasn't 
able to find it again?

> - TCX hardware acceleration stuff in tcx.c and sun4m.c (for memory
> regions):
> blitter, stippler, hardware cursor.

Fascinating.

As always, I'm happy to apply any OpenBIOS patches and to help get the 
others into QEMU as required.


ATB,

Mark.



More information about the OpenBIOS mailing list