From owner-freebsd-arch@FreeBSD.ORG Wed Feb 27 20:39:12 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9E4106569B for ; Wed, 27 Feb 2008 20:39:12 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.78]) by mx1.freebsd.org (Postfix) with ESMTP id DBE858FC1D for ; Wed, 27 Feb 2008 20:39:12 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp006-s [10.150.69.69]) by smtpoutm.mac.com (Xserve/smtpout015/MantshX 4.0) with ESMTP id m1RKdCpq004754 for ; Wed, 27 Feb 2008 12:39:12 -0800 (PST) Received: from mini-g4.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp006/MantshX 4.0) with ESMTP id m1RKd8fb027906 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 27 Feb 2008 12:39:10 -0800 (PST) Message-Id: <8D7D4892-A2E4-42BE-B856-E868E358E5CD@mac.com> From: Marcel Moolenaar To: FreeBSD Arch Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 27 Feb 2008 12:39:07 -0800 X-Mailer: Apple Mail (2.919.2) Subject: Moving vm_pmap in struct vmspace last X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 20:39:13 -0000 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: 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, -- Marcel Moolenaar xcllnt@mac.com