Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755332AbXJDADb (ORCPT ); Wed, 3 Oct 2007 20:03:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752193AbXJDADX (ORCPT ); Wed, 3 Oct 2007 20:03:23 -0400 Received: from ozlabs.org ([203.10.76.45]:50914 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752171AbXJDADV (ORCPT ); Wed, 3 Oct 2007 20:03:21 -0400 Subject: Re: [PATCH 5/5] lguest: loading bzImage directly From: Rusty Russell To: Chris Malley Cc: lkml - Kernel Mailing List , Jeremy Fitzhardinge , lguest , James Bottomley , Vivek Goyal , "Eric W. Biederman" , "H. Peter Anvin" , Stephen Rothwell In-Reply-To: <1191404221.17247.15.camel@feisty> References: <1191368052.17826.40.camel@localhost.localdomain> <1191368106.17826.43.camel@localhost.localdomain> <1191368154.17826.44.camel@localhost.localdomain> <1191368217.17826.47.camel@localhost.localdomain> <1191368399.17826.51.camel@localhost.localdomain> <1191368457.17826.53.camel@localhost.localdomain> <1191404221.17247.15.camel@feisty> Content-Type: text/plain Date: Thu, 04 Oct 2007 10:02:55 +1000 Message-Id: <1191456175.8268.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 16409 Lines: 634 On Wed, 2007-10-03 at 10:37 +0100, Chris Malley wrote: > Hi guys > > Would it not be clearer to #include and use > the relevant named members of struct setup_header / struct boot_params > rather than the hard-coded values 0x202, 0x1F1, 0x214 ? Yes, but unfortunately bootparam.h wasn't designed to be included from userspace. The patch would look like this, but it makes me wonder if it'd be better to put all these user-exposed types in bootparam.h and have the other headers include them. hpa? diff -r 6bb527d113a8 include/asm-i386/Kbuild --- a/include/asm-i386/Kbuild Wed Oct 03 13:49:31 2007 +1000 +++ b/include/asm-i386/Kbuild Thu Oct 04 09:53:08 2007 +1000 @@ -6,7 +6,10 @@ header-y += msr-index.h header-y += msr-index.h header-y += ptrace-abi.h header-y += ucontext.h +header-y += bootparam.h +unifdef-y += e820.h +unifdef-y += ist.h unifdef-y += msr.h unifdef-y += mtrr.h unifdef-y += vm86.h diff -r 6bb527d113a8 include/asm-i386/bootparam.h --- a/include/asm-i386/bootparam.h Wed Oct 03 13:49:31 2007 +1000 +++ b/include/asm-i386/bootparam.h Thu Oct 04 09:45:12 2007 +1000 @@ -10,82 +10,82 @@ #include