I suppose the first thing we need it the my-space patch so we can get the correct value before map-in.
On Jul 14, 2019, at 8:24 AM, BALATON Zoltan balaton@eik.bme.hu wrote:
On Sun, 14 Jul 2019, BALATON Zoltan wrote:
I might be able to try to implement config-* words based on the config-l you've added but not sure if these should all call back to C or should we base them on config-l or config-b or some other generic C helper in Forth? For reading bytes one could do config-l@ then extract the needed byte somehow (need to find the forth for that) but for storing we may be better off with a helper otherwise we need to 'config-l@ modify-it config-l!' if we only have config-l! or if we base it on config-b! then we need to do multiple of these for config-l so C helpers or a generic one like do_config_{read,write}(addr, size) might be simpler. I should check how other open firmware implementation do this in forth (although probably I won't understand it). Do you think it's worth trying to do in Forth or should I try to do that in pci.c?
AFAIU looks like most implementations use a C helper for this: most of SmartFirmware is in C, SLOF seem to call back to rtas and maybe only OpenFirmware tries to do this in Forth:
https://github.com/openbios/openfirmware/blob/master/dev/pci/configm1.fth
but even in OF I've seen machine specific implementations that use assembly. So probably doing it in OpenBIOS in a C helper would be simplest or maybe could be done in Forth if the config base address is available somewhere.
Regards, BALATON Zoltan _______________________________________________ OpenBIOS mailing list -- openbios@openbios.org To unsubscribe send an email to openbios-leave@openbios.org