From owner-freebsd-arm@freebsd.org Thu Sep 10 11:49:17 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8CBBA017B1 for ; Thu, 10 Sep 2015 11:49:17 +0000 (UTC) (envelope-from prvs=688ae54f7=julien.grall@citrix.com) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61E261270 for ; Thu, 10 Sep 2015 11:49:17 +0000 (UTC) (envelope-from prvs=688ae54f7=julien.grall@citrix.com) X-IronPort-AV: E=Sophos;i="5.17,504,1437436800"; d="scan'208";a="299137752" Message-ID: <55F16DF5.1080705@citrix.com> Date: Thu, 10 Sep 2015 12:48:05 +0100 From: Julien Grall User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Andrew Turner , Shannon Zhao CC: , , , , , , , , , , , , , , , , Roger Pau Monne Subject: Re: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters References: <1441874516-11364-1-git-send-email-zhaoshenglong@huawei.com> <20150910123251.7e0810d1@bender.Home> In-Reply-To: <20150910123251.7e0810d1@bender.Home> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA2 X-Mailman-Approved-At: Thu, 10 Sep 2015 12:18:59 +0000 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 11:49:17 -0000 On 10/09/15 12:32, Andrew Turner wrote: > On Thu, 10 Sep 2015 16:41:56 +0800 > Shannon Zhao wrote: > >> From: Shannon Zhao >> >> These EFI stub parameters are used to internal communication between >> EFI stub and Linux kernel and EFI stub creates these parameters. But >> for Xen on ARM when booting with UEFI, Xen will create a minimal DT >> providing these parameters for Dom0 and Dom0 is not only Linux >> kernel, but also other OS (such as FreeBSD) which will be used in the >> future. So here we plan to standardize the names by dropping the >> prefix "linux," and make them common to other OS. Also this will not >> break the compatibility since these parameters are used to internal >> communication between EFI stub and kernel. > > It is unlikely FreeBSD will use this property when booting ad Xen dom0. > The kernel expects to be passed a data structure to find boot this > information. > > My preference would be to have the FreeBSD loader load the xen binary, > the FreeBSD kernel, and set up these data structs before passing > control to Xen, with the information it needs to boot the kernel. My > understanding is this is how it is done on x86. Well, AFAICT, there is no FreeBSD specific code in Xen for x86. We are faking a multiboot module which contains all the informations. I know that the bootloader is at least involved, I don't remember if there is some code in FreeBSD to read this boot module. I've CCed Roger to confirm. > I can see a few issues with this where, for example, the device tree or > ACPI tables need to be modified, but these should be solvable. Xen has to modify the firmware table in order to remove everything that it's used by itself (UART, virtual GIC...). So we would need to modify the FreeBSD data structure to pass the new DT/ACPI. Does the metadata are standardize? I.e is it stable from accross FreeBSD version? Anyway, I'd like to avoid any FreeBSD specific code in Xen, and even any OS specific code in Xen. It's better if we keep a common interface for everyone. Regards, -- Julien Grall