From owner-freebsd-ppc Sat Oct 27 2:39:35 2001 Delivered-To: freebsd-ppc@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 8C94E37B408 for ; Sat, 27 Oct 2001 02:39:24 -0700 (PDT) Received: (qmail 4460 invoked from network); 27 Oct 2001 09:39:23 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 27 Oct 2001 09:39:23 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Sat, 27 Oct 2001 02:39:23 -0700 (PDT) From: John Baldwin To: Mark Peek Subject: Re: trap() and friends Cc: freebsd-ppc@FreeBSD.ORG Sender: owner-freebsd-ppc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 27-Oct-01 Mark Peek wrote: > At 4:33 AM -0700 10/26/01, John Baldwin wrote: >>I was bored last night, so I cleaned up the powerpc trap() function. I don't >>have anything setup to test it, but I think it should compile and handle most >>kernel and user faults ok. (I haven't looked at the ALI faults yet, so they >>always fail right now.) (This is assuming the pmap code is done, >>it's just the >>necessary changes for trap() itself.) I also think that syscalls might work >>now, assuming that the NetBSD code this was cribbed from worked. Since my >> >>Note that some of the assembly stuff in locore.s still needs some work. >>Specifically, on return from interrupts and exceptions, we need to call the >>ast() function instead of doing an EXC_AST fake trap. I've got some comments >>to that effect in the patch. There are no guarantees that this compiles, but >>it should be a lot closer now to the final version. >> >>http://www.FreeBSD.org/~jhb/patches/ppc.patch > > John, > Thanks for making these changes! Either you're a maniac, an insomniac > or both! :-) I have some additional changes to get everything > compiled correctly that I put up at > http://www.FreeBSD.org/~mp/patches/ppc_trap.patch w/ full > diffs...diff the diffs to see my additional changes. I did make the > use of framep rather than frame consistent across all the routines. > It needs a little more work to get the floating point save/restore > coded up and then it should link. This shouldn't be too hard and I > can try to whip up some changes tomorrow. > > The pmap code isn't working too well right now and I'm in mid-rewrite > to make it a little more FreeBSD friendly. I'll have to find a few > more cycles of free time to whip it into shape. Oops, handle_onfault() shouldn't use __P() in the actual function definition which is a bug on my part. :) I actually prefer frame over framep myself (see userret() and ast() in subr_trap.c) but don't really care which so long as it's consistent. alpha and ia64 seem to use framep. i386 uses frame, sparc64 uses tf. To be honest, the main reason I did this was that I was tired of making changes to all the other arch's trap.c's and coming along to powerpc and finding it in need of major work before I could incorporate those changes. If I get some time I may add the interrupt thread hooks for the external interrupt stuff so that ithreads will mostly work. > Mark -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ppc" in the body of the message