From owner-freebsd-ppc@FreeBSD.ORG Tue Oct 28 05:58:20 2003 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B7B816A4D5; Tue, 28 Oct 2003 05:58:20 -0800 (PST) Received: from motgate7.mot.com (motgate7.mot.com [129.188.136.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2483743FE5; Tue, 28 Oct 2003 05:58:19 -0800 (PST) (envelope-from Rafal.Jaworowski@motorola.com) Received: from il06exr02.mot.com (il06exr02.mot.com [129.188.137.132]) by motgate7.mot.com (Motorola/Motgate7) with ESMTP id h9SDvXBO023111; Tue, 28 Oct 2003 06:57:34 -0700 (MST) Received: from zpl02exm01.corp.mot.com (zpl02exm01.mpsc.mot.com [175.28.10.102])h9SDwF27005826; Tue, 28 Oct 2003 07:58:16 -0600 Received: by zpl02exm01.mpsc.mot.com with Internet Mail Service (5.5.2657.2) id ; Tue, 28 Oct 2003 14:57:29 +0100 Message-ID: From: Jaworowski Rafal-ARJ004 To: "'Peter Grehan'" Date: Tue, 28 Oct 2003 14:57:29 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.2) Content-Type: text/plain cc: freebsd-ppc@freebsd.org Subject: [PPCBug] a couple of pmap-related questions X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2003 13:58:20 -0000 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