Date: Sat, 27 Oct 2001 02:39:23 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Mark Peek <mark@whistle.com> Cc: freebsd-ppc@FreeBSD.ORG Subject: Re: trap() and friends Message-ID: <XFMail.011027023923.jhb@FreeBSD.org> In-Reply-To: <p05101002b7ffd61ed7ec@[207.76.207.129]>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011027023923.jhb>