diff options
author | Alek Du <alek.du@intel.com> | 2008-05-13 17:27:32 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 20:22:36 -0700 |
commit | fe0e8edbee4406cfd0c348bb98ee452ecc7ac4d3 (patch) | |
tree | ad041b1c1cb26b5dabd198ede03df18928e43b61 | |
parent | 2c4ebecb2259bd402293baa6751c0dde292a55fd (diff) | |
download | bootstub-fe0e8edbee4406cfd0c348bb98ee452ecc7ac4d3.tar.gz |
* Fill more setup_header items
-rw-r--r-- | bootstub.c | 3 | ||||
-rw-r--r-- | bootstub.h | 9 | ||||
-rw-r--r-- | head.S | 10 |
3 files changed, 17 insertions, 5 deletions
@@ -57,6 +57,9 @@ static void setup_boot_params(struct boot_params *bp, struct setup_header *sh) memset(bp, 0, sizeof (struct boot_params)); memcpy(&bp->hdr, sh, sizeof (struct setup_header)); bp->hdr.cmd_line_ptr = CMDLINE_OFFSET; + bp->hdr.cmdline_size = *(u32*)CMDLINE_SIZE; + bp->hdr.ramdisk_size = *(u32*)INITRD_SIZE; + bp->hdr.ramdisk_image = *(u32*)INITRD_OFFSET + CMDLINE_OFFSET; } static int get_32bit_entry(unsigned char *ptr) @@ -4,9 +4,12 @@ #ifndef _BOOT_STUB_HEAD #define _BOOT_STUB_HEAD -#define CMDLINE_OFFSET 0x100000 -#define BZIMAGE_OFFSET 0x102000 -#define STACK_OFFSET 0x101000 +#define CMDLINE_OFFSET 0x100000 +#define CMDLINE_SIZE 0x100100 +#define INITRD_SIZE 0x100104 +#define INITRD_OFFSET 0x100108 +#define BZIMAGE_OFFSET 0x102000 +#define STACK_OFFSET 0x101000 #define SETUP_HEADER_OFFSET (BZIMAGE_OFFSET + 0x1F1) #define SETUP_HEADER_SIZE (0x0202 + *(unsigned char*)(0x0201+BZIMAGE_OFFSET)) #define BOOT_PARAMS_OFFSET 0x8000 @@ -17,9 +17,15 @@ * | boot stub | * 0x101000 +-----------------------+ * | free space | - * | used as stack | + * | used as stack | MIC need to pad this to 0 + * 0x10010c +-----------------------+ + * | initramfs offset| MIC need to fill it + * 0x100108 +-----------------------+ + * | initramfs size | MIC need to fill it + * 0x100104 +-----------------------+ + * | cmdline size | MIC need to fill it * 0x100100 +-----------------------+ - * | kernel cmdline | + * | kernel cmdline | MIC need to fill it * 0x100000 +-----------------------+ */ |