mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-11-02 07:05:48 +00:00
190718fbee
BAR 0 exists on a real Power Mac 8600 and the dingusppc 7500. On a Power Mac 8600, the initial value is 0x84000003. In Open Firmware, you can write to all bits of the BAR and read the value back except the 2 least significant bits are always %11. Bit 0 indicates I/O space. Bit 1 is reserved and should be zero so maybe this is not a real I/O space BAR. 0x8400000 is written to the BAR by Open Firmware. It doesn't look like a normal I/O address which are usually 16 bits. On the emulated 7500, 0x02000000 is written to the BAR by Open Firmware sometime during probe-all. The BAR did not behave as it does in the Power Mac 8600. This commit fixes that. Two questions remain: 1) Which fcode writes to the BAR? Is it the probe fcode or is it the control fcode? There's no config-_! in the control fcode. 2) What is the purpose of the BAR? Writing to it can cause a hang. The testbits code below seems to succeed - it restores the original value after reading the result of testing each bit and before displaying the result. The values shown for the MSB (0x84 on the 8600 and 0x02 on the 7500) could be three flag bits. ``` dev vci0 : testbits { adr ; org } cr adr config-l@ dup -> org ." original : " 8 u.r cr 20 0 do 1 1f i - << dup 8 u.r ." : " adr config-l! adr config-l@ org adr config-l! 8 u.r cr loop ; 15810 testbits \ 15810 is the address of the BAR on the emulated 7500. ``` |
||
---|---|---|
.. | ||
common | ||
ethernet | ||
floppy | ||
ioctrl | ||
memctrl | ||
serial | ||
sound | ||
video | ||
CMakeLists.txt | ||
deviceregistry.cpp | ||
deviceregistry.h |