From: Thomas Renninger <trenn@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: eric.piel@tremplin-utc.net, vojcek@tlen.pl, dsdt@gaugusch.at,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Lin Ming <ming.m.lin@intel.com>,
lenb@kernel.org, robert.moore@intel.com,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] ACPI: Implement overriding of arbitrary ACPI tables via initrd
Date: Sat, 24 Mar 2012 04:02:37 +0100 [thread overview]
Message-ID: <201203240402.38749.trenn@suse.de> (raw)
In-Reply-To: <4F6D2AF8.3070707@zytor.com>
On Saturday 24 March 2012 03:01:28 H. Peter Anvin wrote:
> On 03/23/2012 06:42 PM, Thomas Renninger wrote:
> >
> > If there is any initrd change this could easily be adopted.
> > Would be great to see this one pushed into 3.4 before a possibly long
> > taking discussion about bigger initrd layout changes.
> >
>
> This should have been in linux-next before the merge window started, and
> certainly "pushing it upstream before a possibly long talking discussion
> about bigger initrd layout changes" is *definitely* putting the cart
> before the horse ... almost nothing matters as much as avoiding
> introducing a new protocol that we need to keep stable.
>
> Sorry, it doesn't work that way.
I guess this would not be the first time a good feature has been added,
knowing that a more general API will be build around it later.
10 lines are really easy to adopt.
> I'm not too happy about the idea of using "naked" ACPI headers as the
> sole discriminator, because they lack a strong magic. Furthermore, I
> really don't want to see all the potential early-initrd users invent
> different schemes for encapsulation, which has the potential of
> cross-infection (early microcode update, for example, would have to be
> invoked before ACPI, and needing that code to understand ACPI table
> format is a nonstarter.)
>
> I see two realistic options:
>
> 1. We use cpio encapsulation for everything, with a special namespace
> for items used directly by the kernel, e.g. "kernel/".
>
> + Simple, existing tools can pick apart
> - May lead people to believe that the early-initrd portion can be
> compressed like the "normal" initrd portion, leading to strange
> problems.
Can this be implemented without using dynamic memory allocations?
If not, it's not suitable for early APCI overriding.
>
> 2. We create a new simple header (just a magic number, an identifier
> for the type of data, and a length) for each of the early-initrd
> objects:
>
> struct early_initrd_header {
> u64 magic; /* 0xa5a46ce422d8f5a1 */
> u32 type; /* 1 = file data, 2 = ACPI, 3 = microcode... */
> u32 length; /* Length of data object */
> };
>
> XXX: Should we make this a defined endianness (presumably
> bigendian), or use host-endianness? I would guess the former might
> be better...
>
> Either of these allow one piece of code to quickly bypass bits that
> doesn't belong to it.
>
> Thoughts?
Whatabout Multiboot(2):
http://en.wikipedia.org/wiki/Multiboot_Specification
http://www.gnu.org/software/grub/manual/multiboot/multiboot.html
They do it similar to 2, but without specifying the data of the
files like you do with type.
It's a bigger thing, but I could imagine there are some guys who would
be willing to give it a try. I remember I googled a multiboot patch
which got submitted to lkml long time ago.
It has it pros and cons, but should show up in such a discussion.
Thomas
next prev parent reply other threads:[~2012-03-24 3:02 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 14:29 [PATCH] ACPI: Implement overriding of arbitrary ACPI tables via initrd Thomas Renninger
2012-03-23 15:51 ` Thomas Renninger
2012-03-23 20:05 ` H. Peter Anvin
2012-03-24 1:42 ` Thomas Renninger
2012-03-24 2:01 ` H. Peter Anvin
2012-03-24 3:02 ` Thomas Renninger [this message]
2012-03-24 4:40 ` H. Peter Anvin
2012-03-24 4:43 ` H. Peter Anvin
2012-03-24 4:50 ` Yinghai Lu
2012-03-24 4:58 ` H. Peter Anvin
2012-03-24 9:24 ` Borislav Petkov
2012-03-24 18:49 ` H. Peter Anvin
2012-03-25 8:54 ` Borislav Petkov
2012-03-26 1:36 ` H. Peter Anvin
2012-03-26 14:21 ` Konrad Rzeszutek Wilk
2012-03-26 0:45 ` Thomas Renninger
2012-03-26 1:25 ` H. Peter Anvin
2012-03-26 14:19 ` Thomas Renninger
2012-03-26 14:46 ` H. Peter Anvin
2012-03-26 14:51 ` Thomas Renninger
2012-03-27 4:15 ` H. Peter Anvin
2012-03-27 4:46 ` Peter Stuge
2012-03-27 6:18 ` H. Peter Anvin
2012-03-24 18:42 ` Konrad Rzeszutek Wilk
2012-03-24 19:15 ` H. Peter Anvin
2012-03-24 19:17 ` Konrad Rzeszutek Wilk
2012-03-24 19:44 ` H. Peter Anvin
2012-03-24 22:21 ` H. Peter Anvin
2012-03-24 22:44 ` H. Peter Anvin
2012-03-25 9:25 ` Borislav Petkov
2012-03-25 23:29 ` H. Peter Anvin
2012-03-25 4:17 ` H. Peter Anvin
2012-03-25 9:07 ` Borislav Petkov
2012-03-23 20:54 ` Yinghai Lu
2012-03-24 0:15 ` Yinghai Lu
2012-03-24 1:05 ` Yinghai Lu
2012-03-24 1:22 ` Thomas Renninger
2012-03-24 1:26 ` Thomas Renninger
2012-03-24 4:41 ` Yinghai Lu
2012-03-26 0:45 ` Thomas Renninger
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=201203240402.38749.trenn@suse.de \
--to=trenn@suse.de \
--cc=dsdt@gaugusch.at \
--cc=eric.piel@tremplin-utc.net \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=robert.moore@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=vojcek@tlen.pl \
--cc=x86@kernel.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