From: Pekka Enberg Date: Sat, 27 Mar 2010 18:23:35 +0000 (+0200) Subject: kvm: Load kernel at 0x1000 X-Git-Tag: next-20110824~3^2~528^2~224 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c55b59d210dabb2d07e4c621d6e0c0f2560f25d3;p=karo-tx-linux.git kvm: Load kernel at 0x1000 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 --- diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index d52a0aab6ee9..6f7112900fcd 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -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) {