summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-10-05 18:22:00 +0000
committerPeter Stuge <peter@stuge.se>2010-10-05 18:22:00 +0000
commita5a776131aef5a861d3c27dd4e9a37457991dc98 (patch)
tree0bbb665b5281e104c59901120b140e8489b9eebc /util
parent5f89d0a7a4f80b26082def1667b30a24b0b1218c (diff)
downloadcoreboot-a5a776131aef5a861d3c27dd4e9a37457991dc98.tar.xz
mkelfImage: set kernel_alignment so 2.6.31+ work
The kernel initialization code as of boot protocol 2.10 is now reading the kernel_alignment field. With the field left unset the kernel attempts to align things to 4GB which is unlikely to work, so change the alignment to the kernel's normal value of 16MB so newer kernels processed by mkelfImage will boot. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5914 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/mkelfImage/linux-i386/convert_params.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/mkelfImage/linux-i386/convert_params.c b/util/mkelfImage/linux-i386/convert_params.c
index 819f797390..f39e8e027c 100644
--- a/util/mkelfImage/linux-i386/convert_params.c
+++ b/util/mkelfImage/linux-i386/convert_params.c
@@ -178,7 +178,10 @@ struct parameters {
uint32_t cmd_line_ptr; /* 0x228 */
/* 2.03+ */
uint32_t initrd_addr_max; /* 0x22c */
- uint8_t reserved15[0x2d0 - 0x230]; /* 0x230 */
+ /* 2.05+ */
+ uint32_t kernel_alignment; /* 0x230 */
+ uint8_t relocateable_kernel; /* 0x234 */
+ uint8_t reserved15[0x2d0 - 0x235]; /* 0x235 */
struct e820entry e820_map[E820MAX]; /* 0x2d0 */
uint8_t reserved16[688]; /* 0x550 */
@@ -1512,6 +1515,9 @@ void initialize_linux_params(struct param_info *info)
/* No loader flags */
info->real_mode->loader_flags = 0;
+ /* Set it to 16M, instead of 0 which means 4G */
+ info->real_mode->kernel_alignment = 16*1024*1024;
+
/* Ramdisk address and size ... */
info->real_mode->initrd_start = 0;
info->real_mode->initrd_size = 0;