]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Load kernel at 0x1000
authorPekka Enberg <penberg@cs.helsinki.fi>
Sat, 27 Mar 2010 18:23:35 +0000 (20:23 +0200)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sat, 27 Mar 2010 18:26:44 +0000 (20:26 +0200)
As described in Documentation/x86/boot.txt, memory starting at 0x1000 is
available for the boot loader.  As we don't have a separate boot loader, load
the kernel at the address.  Note: we're setting up the segment selector here so
0x0100:0x0000 in 16-bit real mode is 0x1000 in physical memory.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
tools/kvm/kvm.c

index d52a0aab6ee934541a8e8a6c8d62059c4f80f25b..6f7112900fcd7b8cafca562b0fdb78c338c70c42 100644 (file)
@@ -153,8 +153,8 @@ static inline uint32_t segment_to_flat(uint16_t selector, uint16_t offset)
        return ((uint32_t)selector << 4) + (uint32_t) offset;
 }
 
-#define BOOT_LOADER_CS         0x0000
-#define BOOT_LOADER_IP         0x7c00
+#define BOOT_LOADER_CS         0x0100
+#define BOOT_LOADER_IP         0x0000
 
 static int load_flat_binary(struct kvm *self, int fd)
 {