devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Sebastian Andrzej Siewior
	<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: bootloader support for DTB on x86
Date: Tue, 22 May 2012 14:53:54 -0700	[thread overview]
Message-ID: <4FBC0AF2.2030106@zytor.com> (raw)
In-Reply-To: <20120522195107.GA17501-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>

On 05/22/2012 12:51 PM, Sebastian Andrzej Siewior wrote:
> 
> It should not be that difficult. 
> - Look how the initrd is loaded. Use the same technique to load the dtb 
>   blob. 
> 
> - Allocate another memory block for setup_data. You need one entry of 
>   type SETUP_DTB pointing to the dtb. If I remember correctly, the 
>   setup_data is thrown away by kernel and the dtb blob itself is  
>   relocated to some place safe.
> 
> - You may need to set hardware_subarch to some similar to 
>   X86_SUBARCH_CE4100. I mean you *may* need your own subarch value but 
>   you can most likely reuse most of the functions that ce4100 is using. 
>   The PCI bus and UART is broken is a special way, everything else is
>   generic. Since we don't have ACPI/SFI,  we need something to find
>   HPET, IO-APIC, irq routing, 
> 

Careful here!

We have just had a long discussion how we want to handle large data
blobs which need bootloader support in x86 space.  The consensus opinion
ended up that they should be prepended to the initramfs, uncompressed,
and using a cpio header with a file name beginning with "kernel/".

Thus, it is logically part of initramfs but can be accessed earlier in
the boot.  This has a number of advantages for the bootloader, including
a modicum of backward compatibility with legacy bootloaders.

Intended users of this mechanism include microcode updates and ACPI
table overrides.

I really don't want to see more ad hockery of the CE4100 variety.

The code for this is still not integrated; I wrote up some cpio parsing
code for this:

http://www.zytor.com/~hpa/kernel/findcpio.c

... but it hasn't been included in any kernel trees yet.  I know Thomas
Renninger said he was going to work on it, but I haven't seen anything.

See the LKML thread "[PATCH] ACPI: Implement overriding of arbitrary
ACPI tables via initrd":

http://lkml.kernel.org/r/1332512984-79664-1-git-send-email-trenn@suse.de

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2012-05-22 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 12:56 bootloader support for DTB on x86 Thierry Reding
     [not found] ` <20120522125622.GA21187-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-05-22 16:17   ` Dirk Brandewie
2012-05-22 19:51   ` Sebastian Andrzej Siewior
     [not found]     ` <20120522195107.GA17501-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2012-05-22 21:53       ` H. Peter Anvin [this message]
2012-07-10 12:27   ` Simon Glass
     [not found]     ` <CAPnjgZ2OwarbF+=SZkXYgszhES94Y6=-9wq+BdNHuo+PrZsYWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-10 12:35       ` Thierry Reding

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=4FBC0AF2.2030106@zytor.com \
    --to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=trenn-l3A5Bk7waGM@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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).