From c55b59d210dabb2d07e4c621d6e0c0f2560f25d3 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sat, 27 Mar 2010 20:23:35 +0200 Subject: [PATCH] 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 --- tools/kvm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.39.5