HV: enable load zephyr kernel

Zephyr kernel is stripped ram image, its entry and load address
are explicitly defined in vm configurations, hypervisor will load
Zephyr directly based on these configurations.

Currently we only support boot Zephyr from protected mode.

Tracked-On: #3214

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Victor Sun
2019-06-03 00:14:45 +08:00
committed by wenlingz
parent 6940cabd22
commit 1906def29e
3 changed files with 19 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ static void *get_kernel_load_addr(struct acrn_vm *vm)
void *load_addr = NULL;
struct vm_sw_info *sw_info = &vm->sw;
struct zero_page *zeropage;
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
switch (sw_info->kernel_type) {
case KERNEL_BZIMAGE:
@@ -110,6 +111,9 @@ static void *get_kernel_load_addr(struct acrn_vm *vm)
}
load_addr = (void *)zeropage;
break;
case KERNEL_ZEPHYR:
load_addr = (void *)vm_config->os_config.kernel_load_addr;
break;
default:
pr_err("Unsupported Kernel type.");
break;