From owner-freebsd-arch@FreeBSD.ORG Fri Oct 29 01:57:25 2010 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 B034810656AD; Fri, 29 Oct 2010 01:57:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6078FC36; Fri, 29 Oct 2010 01:57:25 +0000 (UTC) Received: from [10.0.0.182] (182.imp.bsdimp.com [10.0.0.182] (may be forged)) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o9T1tso4035910; Thu, 28 Oct 2010 19:55:55 -0600 (MDT) (envelope-from imp@bsdimp.com) Message-ID: <4CCA29AA.6090701@bsdimp.com> Date: Thu, 28 Oct 2010 19:55:54 -0600 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: Tijl Coosemans References: <201010281013.03261.jhb@freebsd.org> <201010282331.19825.tijl@coosemans.org> In-Reply-To: <201010282331.19825.tijl@coosemans.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , Warner Losh , John Baldwin , freebsd-arch@FreeBSD.org Subject: Re: [PATCH] Headers for the x86 subtree 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: Fri, 29 Oct 2010 01:57:25 -0000 On 10/28/2010 15:31, Tijl Coosemans wrote: > On Thursday 28 October 2010 16:13:02 John Baldwin wrote: >> On Thursday, October 28, 2010 3:44:21 am Attilio Rao wrote: >>> 2010/10/27 John Baldwin: >>>> On Wednesday, October 27, 2010 10:56:06 am Attilio Rao wrote: >>>>> This patch should convert a (simple and 100% shared between amd64 and >>>>> i386 header) under the x86 sub-tree. Please note that in this patch I >>>>> "svn cp" the file from sys/amd64/include/mptable.h into >>>>> sys/x86/include/mptable.h: >>>>> http://www.freebsd.org/~attilio/headers-x86.diff >>>>> >>>>> This is someway a POC, that I really want to get in. The idea is >>>>> simple and someway follows the pc98 case (even if not entirely): the >>>>> files under machine/include/* became just mere stubs for x86/include/* >>>>> contents and redirect there. >>>>> This won't particulary help reducing the number of available files, >>>>> but generally removing verbatim and would also be the way to go for >>>>> handling MFCs. >>>>> If you find this is the right way I'll commit the fix and start moving >>>>> other files as time permits. >>>> No, we want to do this differently because we also want this to work in >>>> userland. (e.g. I'd like to outright move mca.h to x86/include and then >>>> use '#include' in both kernel and userland for it). We'd need >>>> some special glue to setup an 'x86' symlink during a kernel build that >>>> points to @/x86/include as we do now to setup an 'i386' link for pc98 >>>> kernels. >>>> >>>> We'd also need to install the x86 headers into /usr/include during an >>>> installworld. Warner has some more pointers on this I think. >>> I spoke with Warner briefly about it. >>> One question I'm having now, though, is how getting co-living of pc98 >>> and x86 now, as we are basically overriding the same infrastructure >>> (MACHINE_CPUARCH) in the i386/amd64 case? >>> Do you have ideas about that? >> I'm still doing testing, but this seems to be working so far. I am >> moving mca.h as my current test. >> >> Index: include/Makefile >> =================================================================== >> --- include/Makefile (revision 214386) >> +++ include/Makefile (working copy) >> @@ -116,8 +116,11 @@ >> .endfor >> >> .if ${MACHINE} != ${MACHINE_CPUARCH} >> -_MARCH=${MACHINE_CPUARCH} >> +_MARCHS= ${MACHINE_CPUARCH} >> .endif >> +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" >> +_MARCHS+= x86 >> +.endif > Can't MACHINE_CPUARCH be set to "x86" in the i386, amd64 and pc98 > cases? This patch wouldn't be needed then. Nope. Not yet anyway, there's lots of other things that would break at the moment... It is a long-term goal, however, to get there eventually. Warner