Skip to contentSkip to conversation

Mac OpenFirmware 3.x questions.

DISCUSSION Andrei Warkentin 1 participant 1 message Dec 19, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I was just wondering if I clearly understand the process of using the client interface if I ever (in my kernel) decide to set up my own virtual memory (or for that matter pretty much do anything that involves modifying CPU state) -
1) Load saved OF-era SDR1, MSR, SPRGs, BATs, segment registers, SRR0, SRR1, restore OF exception vectors.
2) Flush i/d caches.
3) Call client interface.
4) Load kernel SDR1, MSR, SPRGs, BATs, segment registers, SRR0, SRR1, restore kernel exception vectors.
5) Flush i/d caches.

Does this seem reasonable? Do I need to save/restore anything else? I understand that OF (3.x) lives in flash ROM, and only copies the exception vectors from 0xfff----- down to 0x000----- - but where does it store the page tables (as used by claim/release) and where is OF physically/virtually? It would be pretty bad to wipe out OF's .bss or whatever, or even worse... overwrite the flash itself. :)

Thanks and have a great day.

Andrei Warkentin
[email protected]
Cell: (+1) (847) 321-15-55
Office: (+1) (312) 756-15-00 x614