diff options
author | Jamey Sharp <jamey@thetovacompany.com> | 2008-04-22 16:21:06 -0700 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-04-24 11:20:42 +1000 |
commit | 27b1321a9b1f69cef5dabe968617a572e159f138 (patch) | |
tree | 47ee61e156d95b53564402825b8cbdd8f2215480 | |
parent | bb127e837117314d9c6365110089cded5642d818 (diff) |
Conform more closely to Documentation/i386/boot.txt for bzImages.
DS, ES, FS, and GS were all initialized to 0, but according to boot.txt
they need to point to setup_base. Recent kernel versions apparently rely
on this point of the spec, though earlier versions didn't.
Signed-off-by: Jamey Sharp <jamey@thetovacompany.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/kexec-bzImage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c index 93e37a4..abb094c 100644 --- a/kexec/arch/i386/kexec-bzImage.c +++ b/kexec/arch/i386/kexec-bzImage.c @@ -284,9 +284,12 @@ int do_bzImage_load(struct kexec_info *info, /* * Initialize the 16bit start information. */ - regs16.cs = (setup_base>>4) + 0x20; + regs16.ds = regs16.es = regs16.fs = regs16.gs = setup_base >> 4; + regs16.cs = regs16.ds + 0x20; regs16.ip = 0; + /* XXX: Documentation/i386/boot.txt says 'ss' must equal 'ds' */ regs16.ss = (elf_rel_get_addr(&info->rhdr, "stack_end") - 64*1024) >> 4; + /* XXX: Documentation/i386/boot.txt says 'sp' must equal heap_end */ regs16.esp = 0xFFFC; if (real_mode_entry) { printf("Starting the kernel in real mode\n"); |