mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
vm load: fix bug in loading kernel
According to the explaination for pref_address in Documentation/x86/boot.txt, a relocating bootloader should attempt to load kernel at pref_address if possible. But due to a non-relocatable kernel will unconditionally move itself and to run at perf address, no need to copy kernel to perf_address by bootloader. Signed-off-by: Zheng, Gen <gen.zheng@intel.com>
This commit is contained in:
@@ -34,32 +34,7 @@
|
||||
#include <hv_arch.h>
|
||||
#include <bsp_extern.h>
|
||||
#include <hv_debug.h>
|
||||
|
||||
struct zero_page {
|
||||
uint8_t pad1[0x1e8]; /* 0x000 */
|
||||
uint8_t e820_nentries; /* 0x1e8 */
|
||||
uint8_t pad2[0x8]; /* 0x1e9 */
|
||||
|
||||
struct {
|
||||
uint8_t setup_sects; /* 0x1f1 */
|
||||
uint8_t hdr_pad1[0x1e]; /* 0x1f2 */
|
||||
uint8_t loader_type; /* 0x210 */
|
||||
uint8_t load_flags; /* 0x211 */
|
||||
uint8_t hdr_pad2[0x6]; /* 0x212 */
|
||||
uint32_t ramdisk_addr; /* 0x218 */
|
||||
uint32_t ramdisk_size; /* 0x21c */
|
||||
uint8_t hdr_pad3[0x8]; /* 0x220 */
|
||||
uint32_t bootargs_addr; /* 0x228 */
|
||||
uint8_t hdr_pad4[0x1c]; /* 0x22c */
|
||||
uint32_t payload_offset;/* 0x248 */
|
||||
uint32_t payload_length;/* 0x24c */
|
||||
uint8_t hdr_pad5[0x18]; /* 0x250 */
|
||||
} __packed hdr;
|
||||
|
||||
uint8_t pad3[0x68]; /* 0x268 */
|
||||
struct e820_entry e820[0x80]; /* 0x2d0 */
|
||||
uint8_t pad4[0x330]; /* 0xcd0 */
|
||||
} __packed;
|
||||
#include <zeropage.h>
|
||||
|
||||
static uint32_t create_e820_table(struct e820_entry *_e820)
|
||||
{
|
||||
|
Reference in New Issue
Block a user