mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 04:31:27 +00:00
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 <penberg@cs.helsinki.fi>
This commit is contained in:
committed by
Will Deacon
parent
edc8a14d5b
commit
b08e9ec449
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user