acrn-hypervisor/hypervisor/boot
Zhou, Wu b394777908 HV: Add implements of 32bit and 64bit elf loader
This is a simply implement for the 32bit and 64bit elf loader.

The loading function first reads the image header, and finds the program
entries that are marked as PT_LOAD, then loads segments from elf file to
guest ram. After that, it finds the bss section in the elf section entries, and
clear the ram area it points to.

Limitations:
1. The e_type of the elf image must be ET_EXEC(executable). Relocatable or
   dynamic code is not supported.
2. The loader only copies program segments that has a p_type of
   PT_LOAD(loadable segment). Other segments are ignored.
3. The loader doesn’t support Sections that are relocatable
   (sh_type is SHT_REL or SHT_RELA)
4. The 64bit elf’s entry address must below 4G.
5. The elf is assumed to be able to put segments to valid guest memory.

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-08-19 20:00:45 +08:00
..
guest HV: Add implements of 32bit and 64bit elf loader 2021-08-19 20:00:45 +08:00
include HV: Add elf loader sketch 2021-08-19 20:00:45 +08:00
multiboot HV: modularization: rename mi_acpi_rsdp_va to acpi_rsdp_va 2021-06-11 10:06:02 +08:00
acpi_base.c HV: modularization: rename mi_acpi_rsdp_va to acpi_rsdp_va 2021-06-11 10:06:02 +08:00
boot.c HV: place kernel and ramdisk by find_space_from_ve820() 2021-06-11 10:06:02 +08:00
reloc.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00