On Tue, 17 Jun 2014, Mark Cave-Ayland wrote:
It seems BAT registers are not used only a TLB which is near the end of the memory like in OpenBIOS.
I had a feeling that would be the case, however I'm glad at least we have some evidence to back this up. BTW you mean hash table, not TLB here, right?
Uhmm yes, hash table for TLB to be precise.
FWIW I don't know much about the PPC side of this, however for SPARC the client stack is set as part of the context initialisation (see arch/sparc64/context.c for an example of this). This allows the caller to initialise a context (including specifying the stack) all in C before dropping into asm to finally execute the loaded file.
This seems to use a static array defined in that file as the client stack. That would still be mapped in the ROM area and would fail when MorphOS takes over the MMU and only adds translation for the first 256 MB of memory at first. (Otherwise I could just clear the stack area before calling the client code to preload translations like for the 0x1000 case but this is not enough and seems the stack should be moved where Apple puts it after the loaded image to fit within 256 MBs.
Regards, BALATON Zoltan