From: Chris E. <cem...@ch...> - 2000-05-02 02:23:03
|
On Mon, 1 May 2000, Jeff Dike wrote: > Attached are diffs which abstract away a lot of the arch-dependent stuff: Good stuff - I've now merged my changes in and have a kernel which goes as far as mounting the root filesystem, although I haven't managed to run an init yet. The patch is attached. It will break i386 in its current state, unfortunately. [snip] > I think this covers most of the problems that you've told us about so far. It does cover most things. > Let me know what else you find. There were a few things... There were some leftover references to Intel registers around. I've added a couple more defines for them. There's one reference to EDX in finish_exec() - what's that one for? My patch changes it to an PPC register, but I don't really know which one it should be. (This is one of the places which will break i386) Although the arch is "ppc", some places need "powerpc", eg the -U__powerpc__ option and link.ld.in. There may need to be an extra level of indirection for that. I covered the former with Makefile-ppc, but for the latter I just edited the link.ld. A few places have actual #ifdef __UM_PPC__ (a define I've added) blocks. Another place should have but doesn't - I've deleted a large chunk of arch/um/kernel/syscall_kern.c for system calls which don't seem to exist on PPC. Oops. I'm not going to fix it now, as it's 3am and I've got work tomorrow, but I'll put the stuff back in with an #ifdef tomorrow if no-one beats me to it. The ppc version of [_]switch_to has a different number of arguments - I've hacked around it with some preprocessor macros in <asm-um/system.h>. I've done something similar for struct sigcontext, which is called struct sigcontext_struct in ppc. There are some references to CR2, which does map to a PPC register (DAR I think) of a different name. I think they could be renamed to something more generic. > The kernel should get past the UNIFIX thing once remap_data works. Correct. :-) > You'll need to define the entry point as 0x20000000 to avoid being > stomped on by init when you get around to execing it. I've done that, although something is still broken. Chris -- Chris Emerson, obsessed Cambridge juggler E-mail: cem...@ch... Web page: http://www.chiark.greenend.org.uk/~cemerson/ |