From owner-freebsd-sparc64@FreeBSD.ORG Sat Mar 1 19:52:01 2014 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17833381; Sat, 1 Mar 2014 19:52:01 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE898191D; Sat, 1 Mar 2014 19:52:00 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s21Jpw0P099504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Mar 2014 11:51:58 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s21JpwtJ099503; Sat, 1 Mar 2014 11:51:58 -0800 (PST) (envelope-from jmg) Date: Sat, 1 Mar 2014 11:51:58 -0800 From: John-Mark Gurney To: Florian Smeets Subject: Re: HEADS UP: sparc64 backend for llvm/clang imported Message-ID: <20140301195158.GA47921@funkthat.com> Mail-Followup-To: Florian Smeets , Dimitry Andric , Craig Butler , freebsd-current@freebsd.org, freebsd-sparc64@freebsd.org, rdivacky@freebsd.org References: <20140301011643.GV47921@funkthat.com> <5311FCB9.60406@smeets.im> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5311FCB9.60406@smeets.im> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 01 Mar 2014 11:51:59 -0800 (PST) Cc: rdivacky@freebsd.org, freebsd-current@freebsd.org, Dimitry Andric , freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 19:52:01 -0000 Florian Smeets wrote this message on Sat, Mar 01, 2014 at 16:28 +0100: > On 01/03/14 02:16, John-Mark Gurney wrote: > > Dimitry Andric wrote this message on Fri, Feb 28, 2014 at 20:22 +0100: > >> > >> For building the sparc64 kernel, there is one open issue left, which is > >> that sys/sparc64/include/pcpu.h uses global register variables, and this > >> is not supported by clang. A preliminary patch for this is attached, > >> but it may or may not blow up your system, please beware! > >> > >> The patch changes the pcpu and curpcb global register variables into > >> inline functions, similar to what is done on other architectures. > >> However, the current approach is not optimal, and the emitted code is > >> slightly different from what gcc outputs. Any improvements to this > >> patch are greatly appreciated! > >> > >> Last but not least, thanks go out to Roman Divacky for his work with > >> llvm/clang upstream in getting the sparc64 backend into shape. > > > > Ok, I have a new pcpu patch to try. I have only compile tested it. > > > > It is available here: > > https://www.funkthat.com/~jmg/sparc64.pcpu.patch > > > > I've also attached it. > > > > Craig, do you mind testing it? > > > > My machine doesn't boot with this patch. > > OK boot -v > Booting... > jumping to kernel entry at 0xc0088000. > OF_panic: sparc64_init: cannot find boot CPU node > Program terminated > {1} ok > > I'm now going to try the version that dim sent. Does it boot w/o the patch? Is this a clang built loader/kernel or a gcc built loader/kernel that you tried the patch on? >From a quick look at the code, it doesn't look like my patch would have effected this part of the kernel... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."