Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RtRJN-0003Zj-72 for mharc-grub-devel@gnu.org; Fri, 03 Feb 2012 17:08:53 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtQ6p-0004B5-8f for grub-devel@gnu.org; Fri, 03 Feb 2012 15:51:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtQ6m-00032I-SR for grub-devel@gnu.org; Fri, 03 Feb 2012 15:51:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtQ6m-00031s-Lp for grub-devel@gnu.org; Fri, 03 Feb 2012 15:51:48 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q13KpjIZ011384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 3 Feb 2012 15:51:45 -0500 Received: from cavan.codon.org.uk (ovpn-113-122.phx2.redhat.com [10.3.113.122]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q13Kpix4022398 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Fri, 3 Feb 2012 15:51:45 -0500 Received: from 209-6-41-104.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.41.104] helo=localhost.localdomain) by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1RtQ6g-0007qb-TX; Fri, 03 Feb 2012 20:51:43 +0000 From: Matthew Garrett To: grub-devel@gnu.org Subject: [PATCH 1/3] Update the Linux boot protocol Date: Fri, 3 Feb 2012 15:51:24 -0500 Message-Id: <1328302286-6623-1-git-send-email-mjg@redhat.com> X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 209.6.41.104 X-SA-Exim-Mail-From: mjg@redhat.com X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 X-Mailman-Approved-At: Fri, 03 Feb 2012 17:08:49 -0500 Cc: Matthew Garrett X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2012 20:51:53 -0000 The Linux boot header includes information on the kernel's desired load address and alignment. Add support for that. --- ChangeLog | 6 ++++++ include/grub/i386/linux.h | 28 +++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5a5d72..028691d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-02-03 Matthew Garrett + + * include/grub/i386/linux.h (linux_kernel_header): Update to + boot protocol 2.10. + (linux_kernel_params): Likewise + 2012-02-03 Vladimir Serbinenko * util/grub-mkrescue.in: Use same message as diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h index 6aa2391..8e27b93 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -86,7 +86,7 @@ enum GRUB_VIDEO_LINUX_TYPE_SIMPLE = 0x70 /* Linear framebuffer without any additional functions. */ }; -/* For the Linux/i386 boot protocol version 2.03. */ +/* For the Linux/i386 boot protocol version 2.10. */ struct linux_kernel_header { grub_uint8_t code1[0x0020]; @@ -131,8 +131,16 @@ struct linux_kernel_header grub_uint32_t initrd_addr_max; /* Highest address for initrd */ grub_uint32_t kernel_alignment; grub_uint8_t relocatable; - grub_uint8_t pad[3]; + grub_uint8_t min_alignment; + grub_uint8_t pad[2]; grub_uint32_t cmdline_size; + grub_uint32_t hardware_subarch; + grub_uint64_t hardware_subarch_data; + grub_uint32_t payload_offset; + grub_uint32_t payload_length; + grub_uint64_t setup_data; + grub_uint64_t pref_address; + grub_uint64_t init_size; } __attribute__ ((packed)); /* Boot parameters for Linux based on 2.6.12. This is used by the setup @@ -276,10 +284,20 @@ struct linux_kernel_params grub_uint32_t ramdisk_size; /* initrd size */ grub_uint32_t bootsect_kludge; /* obsolete */ grub_uint16_t heap_end_ptr; /* Free memory after setup end */ - grub_uint16_t pad1; /* Unused */ + grub_uint8_t ext_loader_ver; /* Extended loader version */ + grub_uint8_t ext_loader_type; /* Extended loader type */ grub_uint32_t cmd_line_ptr; /* Points to the kernel command line */ - - grub_uint8_t pad2[164]; /* 22c */ + grub_uint32_t initrd_addr_max; /* Maximum initrd address */ + grub_uint32_t kernel_alignment; /* Alignment of the kernel */ + grub_uint8_t relocatable_kernel; /* Is the kernel relocatable */ + grub_uint8_t pad1[3]; + grub_uint32_t cmdline_size; /* Size of the kernel command line */ + grub_uint32_t hardware_subarch; + grub_uint64_t hardware_subarch_data; + grub_uint32_t payload_offset; + grub_uint32_t payload_length; + grub_uint64_t setup_data; + grub_uint8_t pad2[120]; /* 258 */ struct grub_e820_mmap e820_map[GRUB_E820_MAX_ENTRY]; /* 2d0 */ } __attribute__ ((packed)); -- 1.7.7.6