Date: Wed, 27 Feb 2008 13:19:40 -0800 From: Julian Elischer <julian@elischer.org> To: Marcel Moolenaar <xcllnt@mac.com> Cc: FreeBSD Arch <freebsd-arch@freebsd.org> Subject: Re: Moving vm_pmap in struct vmspace last Message-ID: <47C5D3EC.4010604@elischer.org> In-Reply-To: <8D7D4892-A2E4-42BE-B856-E868E358E5CD@mac.com> References: <8D7D4892-A2E4-42BE-B856-E868E358E5CD@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote: > All, > > On PowerPC we'll support Book E alongside the AIM processor > and there's one area where this results in an ABI problem: > For Book E the struct pmap is larger than for AIM. As such, > struct vmspace will have a different layout depending on > the configured CPU. This only affects libkvm, but is enough of a > hassle that I want to apply the following patch to address > that: just for fun I'm also supporting a ppc variant called gxemul which uses the 'test' devices in gxemul (not emulateed hardware). I have the loader working and warner had the machine booting to almost single user when Cisco did their linux thing. so that's not proep and not book-E. and to make things easier, it would work for mips under gxemul as well. I haven't figured out how to fit it as an option that can run across several architectures.. > > Index: sys/vm/vm_map.h > = > = > = > ======================================================================== > --- sys/vm/vm_map.h 2008/02/27 20:14:01 #56 > +++ sys/vm/vm_map.h 2008/02/27 20:14:01 > @@ -233,7 +233,6 @@ > */ > struct vmspace { > struct vm_map vm_map; /* VM address map */ > - struct pmap vm_pmap; /* private physical map */ > struct shmmap_state *vm_shm; /* SYS5 shared memory private data > XXX */ > segsz_t vm_swrss; /* resident set size before last swap */ > segsz_t vm_tsize; /* text size (pages) XXX */ > @@ -243,6 +242,12 @@ > caddr_t vm_daddr; /* (c) user virtual address of data */ > caddr_t vm_maxsaddr; /* user VA at max stack growth */ > int vm_refcnt; /* number of references */ > + /* > + * Keep the PMAP last, so that per-CPU variations within a > + * single architecture can be handled by the same toolchain > + * without having to worry about the MI fields. > + */ > + struct pmap vm_pmap; /* private physical map */ > }; > > #ifdef _KERNEL > > > The consequence of this patch is that the ABI will be > broken for all arhcitectures (once). Again, this only > affects libkvm. Do people see a problem with this change? > > Thanks, >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47C5D3EC.4010604>