On 15/12/17 23:26, Jd Lyons wrote:
Thanks Mark, I’m unsure how to get Openbios to execute the Fcode, I can load it to the correct address on my PCI card, via a little hack to Openbios.
I’d really like to just go ahead and fix the fact that Openbios doesn’t probe for Fcode Rom’s on PCI devices. I know this will likely break a few things, requiring other fixes. If I had some idea of where to start, some sample code I maybe able to hack something together, but it would likely break more than it fixes.
I’m sure you're busy, I’m retired and this is just something to keep my occupied, tho I’m not really qualified to do it.
I really wouldn't worry about being qualified. My involvement with OpenBIOS and QEMU started because I wanted to try and boot some old Solaris HD images in QEMU, and that was 8 years ago and I'm still not quite there - it's been a great learning experience though :)
The part that takes the time is doing the investigation rather than the patches, so just being able to hack up something that works gives us something to work with. Yes, I am fairly busy with other bits of work right now but I'm happy to answer any questions that you might have.
If it could be added as a priority to Openbios, to probe and execute FCode Rom’s on PCI devices, that would be great. I’m sure someone will take it up when they have a little spare time.
I would say that there are 2 different tasks here:
1) Add PCI option ROM support to OpenBIOS
From looking at the code it appears that the pc-bios/vgabios-stdvga.bin option ROM is added to QEMU's default PCI VGA adapter, so you need to add the relevant properties to "reg"/"assigned-addresses" using your previous http://mirror.informatimago.com/next/developer.apple.com/technotes/tn/tn2000... link as a guide.
The above link suggests the key is to look at offset 0x30 in configuration space for that device and use that to determine ROM base address but please experiment and report back what happens.
2) Try executing the FCode and see what fails
Obviously we know about the config-* Forth words, but creating Forth wrappers around those words shouldn't be too hard - I can point you towards commits that do similar things when you get to that point.
I’m having trouble CC ing the list, I know stupid of me.
Any idea what the unnamed FCode in the detok is?
Does detok just not understand it, or is it words or methods?
From memory I believe it's an anonymous Forth word, i.e. one where the dictionary name is empty but it can still be called by its address.
ATB,
Mark.