From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756438AbXKFBcS (ORCPT ); Mon, 5 Nov 2007 20:32:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754174AbXKFBcJ (ORCPT ); Mon, 5 Nov 2007 20:32:09 -0500 Received: from terminus.zytor.com ([198.137.202.10]:49872 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbXKFBcI (ORCPT ); Mon, 5 Nov 2007 20:32:08 -0500 Message-ID: <472FC401.9020202@zytor.com> Date: Mon, 05 Nov 2007 17:31:45 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: Jeremy Fitzhardinge CC: "Eric W. Biederman" , Linus Torvalds , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , Mikael Petterson Subject: Re: [GIT PULL] x86 setup: correct booting on 486 (revised) References: <200711050358.lA53wlho003349@tazenda.hos.anvin.org> <472F5941.2060507@zytor.com> <472F61C8.4040300@zytor.com> <472F7D8D.8050505@zytor.com> <472F826E.3050008@goop.org> <472F85F2.6040501@zytor.com> <472FBC83.5060509@goop.org> <472FBF40.1010300@zytor.com> <472FC0F3.10102@goop.org> In-Reply-To: <472FC0F3.10102@goop.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Jeremy Fitzhardinge wrote: > > Another thing it would be nice to add is an elf-note-like notion so that > the kernel can export arbitrary key/value data to the bootloader (ie, > the converse of the bootloader->kernel value list). Xen currently does > this via ELF notes, but any semanically equivalent mechanism would do. > It's probably simpler than trying to work out how to mush bzimage and > ELF together. > I suspect all we need is an offset-pointer field pointing into the kernel image. As far as the kernel build process is concerned, it becomes a section in the boot/compressed link script. That offset then needs to get exported to the setup.elf link stage and there adjusted to become a file offset. The ELF note format is sane enough, although it looks like it's not self-terminating, so we'd either need an offset and a length field, or adopt the convention that namesz = descsz = type = 0 terminates the block (I prefer the latter, myself.) We also need the notes documented, obviously. -hpa