[PPCBug] a couple of pmap-related questions

Jaworowski Rafal-ARJ004 Rafal.Jaworowski at motorola.com
Tue Oct 28 05:58:20 PST 2003


Peter,
I believe I have more or less sorted out the pmap area for my PPCBug port, although I still have some doubts and questions. I'm using sources from mid Sep so maybe some of the points below are not valid anymore in up to date -current..

1. In pmap_bootstrap() there is a number of assignemnts for BAT entries kept in battable[], but it seems for me that they are never used i.e. the cpu registers are never filled out according to this table; only two or three explicit BAT registers assignments exist (like for the bottom 256M and PCI bus io space). The battable[] is used however by pmap_bat_mapped() call but only for reading. Why is that (or am I missing something)? General question: what is the overall intended outcome for further kernel initialisation upon completion of pmap_bootstrap()? 

2. powerpc_init() takes 'basekernel' as a parmeter but it's never used; more on the same note, 'kernelstart' and 'kernelend' are passed down to pmap_bootstrap() but this function doen't make use of it. Question: is there anything to be completed still and these will be used when it gets done? Or it just needs cleaning up?

3. powerpc_init() turns on address translation _before_ calling pmap_bootstrap() which sets up the memory maps etc. My understanding is that one first creates mappings, page tables etc. and only after that turns on address translations. My guess is the OF has some initial translations so it's safe to behave so but I'm not that intimate with OF. Comments?

FWIW, my recent status is that the kernel goes through all the mi_startup() routines for SYSINITs compiled in (copyright, tunables, vm, all that), and prompts for the root mountpoint in the end. There's no device hierarchy built yet, no low-level clock support routines, no IRQs set up, nexus and related are stubbed at the moment. Just the kernel skeleton but I'll keep on slowly filling out the missing pieces.

I'll appreciate your comments for the above.

regards,
Rafal


More information about the freebsd-ppc mailing list