From: Andrew Turner <andrew@fubar.geek.nz>
To: Julien Grall <julien.grall@citrix.com>
Cc: Hangaohuai <hangaohuai@huawei.com>,
Ian Campbell <ian.campbell@citrix.com>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
xen-devel <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Shannon Zhao <shannon.zhao@linaro.org>,
Jan Beulich <jbeulich@suse.com>,
Shannon Zhao <zhaoshenglong@huawei.com>,
Parth Dixit <parth.dixit@linaro.org>,
Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: Design doc of adding ACPI support for arm64 on Xen - version 2
Date: Wed, 12 Aug 2015 11:36:55 +0100 [thread overview]
Message-ID: <20150812113655.274e4fa9@bender> (raw)
In-Reply-To: <55CB1033.4040509@citrix.com>
On Wed, 12 Aug 2015 10:21:55 +0100
Julien Grall <julien.grall@citrix.com> wrote:
> Hi,
>
> (Cc Andrew Turner who worked on the ACPI port for FreeBSD ARM64)
>
> On 12/08/2015 09:52, Ian Campbell wrote:
> > On Wed, 2015-08-12 at 11:04 +0800, Shannon Zhao wrote:
> >> Hi Julien,
> >>
> >> On 2015/8/12 0:19, Julien Grall wrote:
> >>> Hi Shannon,
> >>>
> >>> On 07/08/15 03:11, Shannon Zhao wrote:
> >>>> 2. Create minimal DT to pass required information to Dom0
> >>>> ----------------------------------------------------------
> >>>> The minimal DT mainly passes Dom0 bootargs, address and size of
> >>>> initrd
> >>>> (if available), address and size of uefi system table, address
> >>>> and size
> >>>> of uefi memory table, uefi-mmap-desc-size and uefi-mmap-desc-ver.
> >>>>
> >>>> An example of the minimal DT:
> >>>> / {
> >>>> #address-cells = <2>;
> >>>> #size-cells = <1>;
> >>>> chosen {
> >>>> bootargs = "kernel=Image console=hvc0
> >>>> earlycon=pl011,0x1c090000
> >>>> root=/dev/vda2 rw rootfstype=ext4 init=/bin/sh acpi=force";
> >>>> linux,initrd-start = <0xXXXXXXXX>;
> >>>> linux,initrd-end = <0xXXXXXXXX>;
> >>>> linux,uefi-system-table = <0xXXXXXXXX>;
> >>>> linux,uefi-mmap-start = <0xXXXXXXXX>;
> >>>> linux,uefi-mmap-size = <0xXXXXXXXX>;
> >>>> linux,uefi-mmap-desc-size = <0xXXXXXXXX>;
> >>>> linux,uefi-mmap-desc-ver = <0xXXXXXXXX>;
> >>>> };
Would it be possible to add a stdout property and node for the hvc0
device? It would help FreeBSD as we use this to find the kernel
console. We check for the stdout-path, linux,stdout-path, stdout,
stdin-path, and stdin properties, in that order, with the first
property selected as the console. If none are found we fall back to
searching for a serial0 device. You can see how we find the device at
[1].
> >>>> };
> >>>>
> >>>> For details loook at
> >>>> https://github.com/torvalds/linux/blob/master/Documentation/arm/uefi.
> >>>> txt
> >>>
> >>> AFAICT, the device tree properties in this documentation are only
> >>> used in order to communicate between the UEFI stub and Linux.
> >>>
> >>> This means that those properties are not standardize and can
> >>> change at any time by Linux folks. They don't even live in
> >>> Documentation/devicetree/
> >>>
> >>> I would also expect to see the same needs for FreeBSD running as
> >>> DOM0 with ACPI.
> >>>
> >> I'm not very clear about how FreeBSD communicates with UEFI. And
> >> when booting with DT, how does FreeBSD communicate with UEFI? Not
> >> through these properties?
FreeBSD has a tool called loader.efi. It gets loaded by UEFI, and knows
how to communicate with it. It then loads the kernel and reads any
important data the kernel may need. Finally it puts this data into a
format the kernel understands, exits the boot services, and boots the
kernel. The kernel never communicates with UEFI, we have loaded any
data we need (however this may change in the future).
In the case of the memory may loader.efi calls GetMemoryMap from
EFI_BOOT_SERVICES. It then passes this data directly to the kernel for
the kernel to parse in the early boot code.
> >
> > These properties are in effect a Linux internal interface defined
> > between the "Linux UEFI stub" and the "Linux kernel proper". The
> > stub and the kernel are notionally separate entities, although they
> > are in the same tree etc there is a well defined transition/entry
> > point between the two. Since they are in the same tree even though
> > they are in theory "separate" I expect they will tend to co-evolve.
> >
> > IIRC we discussed with some of the maintainers (at Connect?) making
> > this a more formal interface, i.e. exposing the entry point to
> > "Linux kernel proper" which understands these properties to other
> > than just the "Linux UEFI stub" specifically to external entities
> > such as Xen.
> >
> > Probably part of this work needs to formalise that, such as by
> > moving this binding into the proper external bindings dir.
> >
> > At which point BSD can (hopefully!) choose to support the same
> > interface.
What are the advantages of these bindings over the existing UEFI calls
to get the memory map?
Andrew
[1]
https://svnweb.freebsd.org/base/head/sys/dev/uart/uart_cpu_fdt.c?revision=281438&view=markup#l127
--
ABT Systems Ltd
Unit 11, Hove Business Centre, Fonthill Road, Hove, BN3 6HA
Registered in England and Wales, No. 9285513
next prev parent reply other threads:[~2015-08-12 10:36 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 2:11 Design doc of adding ACPI support for arm64 on Xen - version 2 Shannon Zhao
2015-08-07 9:45 ` Stefano Stabellini
2015-08-07 10:33 ` Julien Grall
2015-08-07 10:37 ` Christoffer Dall
2015-08-07 10:42 ` Stefano Stabellini
2015-08-07 10:44 ` Julien Grall
2015-08-11 2:09 ` Shannon Zhao
2015-08-11 9:46 ` Julien Grall
2015-08-11 10:27 ` Shannon Zhao
2015-08-11 14:12 ` Ian Campbell
2015-08-11 14:51 ` David Vrabel
2015-08-11 14:59 ` Ian Campbell
2015-08-11 15:02 ` David Vrabel
2015-08-11 15:11 ` Julien Grall
2015-08-11 15:19 ` Ian Campbell
2015-08-11 15:25 ` David Vrabel
2015-08-11 16:01 ` Julien Grall
2015-08-12 2:42 ` Shannon Zhao
2015-08-12 8:46 ` Ian Campbell
2015-08-12 8:46 ` Ian Campbell
2015-08-12 9:02 ` Julien Grall
2015-08-12 15:48 ` Jan Beulich
2015-08-11 14:19 ` Ian Campbell
2015-08-11 14:21 ` Ian Campbell
2015-08-11 15:29 ` Boris Ostrovsky
2015-08-11 15:35 ` Ian Campbell
2015-08-11 15:52 ` Boris Ostrovsky
2015-08-12 2:47 ` Shannon Zhao
2015-08-12 8:47 ` Ian Campbell
2015-08-12 9:00 ` Shannon Zhao
2015-08-17 10:36 ` Roger Pau Monné
2015-08-18 1:44 ` Shannon Zhao
2015-08-11 16:19 ` Julien Grall
2015-08-12 3:04 ` Shannon Zhao
2015-08-12 8:52 ` Ian Campbell
2015-08-12 9:21 ` Julien Grall
2015-08-12 10:36 ` Andrew Turner [this message]
2015-08-12 10:48 ` Stefano Stabellini
2015-08-12 11:23 ` Ian Campbell
2015-08-12 12:11 ` Julien Grall
2015-09-02 11:27 ` Ian Campbell
2015-08-12 12:20 ` Julien Grall
2015-09-02 11:30 ` Ian Campbell
2015-09-02 11:39 ` Julien Grall
2015-09-02 12:05 ` Ian Campbell
2015-08-12 10:17 ` Stefano Stabellini
2015-08-12 7:22 ` Shannon Zhao
2015-08-12 9:11 ` Julien Grall
2015-08-14 14:05 ` Shannon Zhao
2015-08-14 14:17 ` xen/arm: Crash when allocating memory for ACPI table (Was Re: Design doc of adding ACPI support for arm64 on Xen - version 2) Julien Grall
2015-08-14 14:35 ` Shannon Zhao
2015-08-14 14:41 ` Julien Grall
2015-08-14 14:49 ` Shannon Zhao
2015-08-14 14:53 ` Julien Grall
2015-08-14 14:55 ` Shannon Zhao
2015-08-12 15:45 ` Design doc of adding ACPI support for arm64 on Xen - version 2 Jan Beulich
2015-08-12 15:51 ` Christoffer Dall
2015-08-12 15:58 ` Jan Beulich
2015-08-12 16:18 ` Julien Grall
2015-08-13 6:41 ` Jan Beulich
2015-08-13 8:01 ` Christoffer Dall
2015-08-13 8:11 ` Jan Beulich
2015-08-13 8:18 ` Jan Beulich
2015-08-13 9:05 ` Ian Campbell
2015-08-13 9:20 ` Jan Beulich
2015-08-13 10:40 ` Julien Grall
2015-08-13 9:43 ` Stefano Stabellini
2015-08-13 10:03 ` Jan Beulich
2015-08-13 10:13 ` Stefano Stabellini
2015-08-13 10:22 ` Ian Campbell
2015-08-13 10:29 ` Christoffer Dall
2015-08-13 10:32 ` Stefano Stabellini
2015-08-13 10:34 ` Ian Campbell
2015-08-13 10:48 ` Shannon Zhao
2015-08-13 10:54 ` Jan Beulich
2015-08-13 11:00 ` Julien Grall
2015-08-13 11:07 ` Stefano Stabellini
2015-08-13 11:55 ` Jan Beulich
2015-08-13 12:08 ` Julien Grall
2015-08-13 14:49 ` Ian Campbell
2015-08-14 5:34 ` Shannon Zhao
2015-08-14 9:54 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150812113655.274e4fa9@bender \
--to=andrew@fubar.geek.nz \
--cc=christoffer.dall@linaro.org \
--cc=hangaohuai@huawei.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=parth.dixit@linaro.org \
--cc=peter.huangpeng@huawei.com \
--cc=shannon.zhao@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=zhaoshenglong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).