From owner-freebsd-arm@FreeBSD.ORG Wed Jan 15 01:26:35 2014 Return-Path: Delivered-To: freebsd-arm@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 8D113727 for ; Wed, 15 Jan 2014 01:26:35 +0000 (UTC) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5305E1F0C for ; Wed, 15 Jan 2014 01:26:35 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id to1so1433542ieb.16 for ; Tue, 14 Jan 2014 17:26:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=+4JJGpGzvrdmRsYJC2le9nkdPo2M0GbBqZE4IUfdtLA=; b=Ya32rAMyzKPU3RlMdpIeD9ntsNvwXTvoUqHQ8hZhrHRxUqyqHnS2n9Ob6liS2tt0QR wtB5styrpec8Lx2EdsNafgibKfjATqZqWV0xp9iSvw1o6MfydlZljChE1upbp6bFtzMY y3KbNepfY4P3k5palp0/1aDZaSkmsSZCMWTxk0J0kvzftyE0LwAvgtuj6tIQWBPzkMi+ tkgQVQI/iegfA2vfw6cvkx1M9Fjmzm9X4vMYNeJ0INbR7yWNQ6urck9sjeD71JyXC34g KJS7EnmhrMRloSkJvoNQD0Es6y+yNfQIksepSz+ht82vrlUg/rpKHlYDjieJOMAoHZHl WuBg== X-Gm-Message-State: ALoCoQkJbYpclpf+1LD5PLGBGJfIbaVjUXEXp4LRCpamlA76i6HNL6ad6aGbbA3Yzuecmhtq6tJV X-Received: by 10.50.50.70 with SMTP id a6mr6024319igo.1.1389749188092; Tue, 14 Jan 2014 17:26:28 -0800 (PST) Received: from fusion-mac.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id gc2sm26851224igd.6.2014.01.14.17.26.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 17:26:27 -0800 (PST) Sender: Warner Losh Subject: Re: [RFC] Add support for Xen ARM guest on FreeBSD Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <1389733267-20822-1-git-send-email-julien.grall@linaro.org> Date: Tue, 14 Jan 2014 18:26:25 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <24851B79-7EC7-4E3A-94DB-4B9B86FDFFFC@bsdimp.com> References: <1389733267-20822-1-git-send-email-julien.grall@linaro.org> To: Julien Grall X-Mailer: Apple Mail (2.1085) Cc: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org, freebsd-xen@freebsd.org, freebsd-arm@FreeBSD.org, gibbs@freebsd.org, roger.pau@citrix.com X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jan 2014 01:26:35 -0000 On Jan 14, 2014, at 2:01 PM, Julien Grall wrote: > This new support brings 2 open questions (for both Xen and FreeBSD = community). > When a new guest is created, the toolstack will generated a device = tree which > will contains: > - The amount of memory > - The description of the platform (gic, timer, hypervisor node) > - PSCI node for SMP bringup >=20 > Until now, Xen on ARM supported only Linux-based OS. When the support = of > device tree was added in Xen for guest, we chose to use Linux device = tree > bindings (gic, timer,...). It seems that FreeBSD choose a different = way to > implement device tree: > - strictly respect ePAR (for interrupt-parent property) > - gic bindings different (only 1 interrupt cell) >=20 > I would like to come with a common device tree specification = (bindings, ...) > across every operating system. I know the Linux community is working = on having > a device tree bindings out of the kernel tree. Does FreeBSD community = plan to > work with Linux community for this purpose? We generally try to follow the common definitions for the FDT stuff. = There are a few cases where we either lack the feature set of Linux, or = where the Linux folks are moving quickly and changing the underlying = definitions where we wait for the standards to mature before we = implement. In some cases, where maturity hasn't happened, or where the = bindings are overly Linux centric (which in theory they aren't supposed = to be, but sometimes wind up that way). where we've not implemented = things. > As specified early, the device tree can vary accross Xen version and = user input > (eg the memory). I have noticed few places (mainly the timer) where = the IRQs > number are harcoded. These cases should be viewed as bugs in FreeBSD, I believe. One of the = goals that has wide support, at leas tin theory, is that we can boot = with an unaltered Linux FDT. This goal is some time in the future. > In the long-term, it would be nice to see FreeBSD booting out-of-box = (eg the > device tree is directly provided by the board firmware). I plan to add = support > for Device Tree loading via Linux Boot ABI, it the way that Xen use to = boot a > new guest. That would be most welcome. > The second question is related to memory attribute for page table. The = early > page table setup by FreeBSD are using Write-Through memory attribute = which > result to a likely random (not every time the same place) crash before = the > real page table are initialized. > Replacing Write-Through by Write-Back made FreeBSD boot correctly. = Even today, > I have no idea if it's a requirement from Xen or a bug (either in Xen = or > FreeBSD). There were some problems with pages being setup improperly for the = mutexes to operate properly. Have you confirmed this on a recent version = of FreeBSD? > The code is taking its first faltering steps, therefore the TODO is = quite big: > - Try the code on x86 architecture. I did lots of rework for the = event > channels code and didn't even try to compile > - Clean up event channel code > - Clean up xen control code > - Add support for Device Tree loading via Linux Boot ABI > - Fixing crashing on userspace. Could be related to the patch > series "arm SMP on Cortex-A15" > - Add guest SMP support > - DOM0 support? >=20 > Any help, comments, questions are welcomed. I think this is great! We'd love to work with you to make this happen. Warner > Sincerely yours, >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Instruction to test FreeBSD on = Xen on ARM =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [trimmed]=