HV: separate e820 related code as e820.c/h

1. e820 is modulized as separated files.
2. move boot_regs into multiboot.h as it's related with
multiboot info header

Tracked-On: #1842
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Minggui Cao
2018-12-07 14:41:02 +08:00
committed by wenlingz
parent c5d827ab1f
commit b69d24b1d4
13 changed files with 276 additions and 261 deletions

View File

@@ -7,37 +7,7 @@
#include <hypervisor.h>
#include <zeropage.h>
#include <boot_context.h>
#ifdef CONFIG_PARTITION_MODE
static uint32_t create_e820_table(struct e820_entry *param_e820)
{
uint32_t i;
for (i = 0U; i < NUM_E820_ENTRIES; i++) {
param_e820[i].baseaddr = e820_default_entries[i].baseaddr;
param_e820[i].length = e820_default_entries[i].length;
param_e820[i].type = e820_default_entries[i].type;
}
return NUM_E820_ENTRIES;
}
#else
static uint32_t create_e820_table(struct e820_entry *param_e820)
{
uint32_t i;
ASSERT(e820_entries > 0U,
"e820 should be inited");
for (i = 0U; i < e820_entries; i++) {
param_e820[i].baseaddr = e820[i].baseaddr;
param_e820[i].length = e820[i].length;
param_e820[i].type = e820[i].type;
}
return e820_entries;
}
#endif
#include <e820.h>
static void prepare_bsp_gdt(struct acrn_vm *vm)
{