HV: Add elf loader sketch

This patch adds a function elf_loader() to load elf image.
It checks the elf header, get its 32/64 bit type, then calls
the corresponding loading routines, which are empty, and
will be realized later.

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zhou, Wu
2021-08-12 15:34:10 +08:00
committed by wenlingz
parent 537f69dde9
commit c2468d2791
4 changed files with 97 additions and 1 deletions

View File

@@ -39,6 +39,11 @@ int32_t prepare_os_image(struct acrn_vm *vm)
case KERNEL_RAWIMAGE:
ret = rawimage_loader(vm);
break;
#endif
#ifdef CONFIG_GUEST_KERNEL_ELF
case KERNEL_ELF:
ret = elf_loader(vm);
break;
#endif
default:
ret = -EINVAL;