acrn-hypervisor/hypervisor/boot
Zide Chen 49ffe168af hv: fixup relocation delta for symbols belong to entry section
This is to enable relocation for code32.

- RIP relative addressing is available in x86-64 only so we manually add
  relocation delta to the target symbols to fixup code32.

- both code32 and code64 need to load GDT hence both need to fixup GDT
  pointer. This patch declares separate GDT pointer cpu_primary64_gdt_ptr
  for code64 to avoid double fixup.

- manually fixup cpu_primary64_gdt_ptr in code64, but not rely on relocate()
  to do that. Otherwise it's very confusing that symbols from same file could
  be fixed up externally by relocate() or self-relocated.

- to make it clear, define a new symbol ld_entry_end representing the end of
  the boot code that needs manually fixup, and use this symbol in relocate()
  to filter out all symbols belong to the entry sections.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
..
guest HV: init module and rsdp info with multiboot2 2020-02-26 09:24:16 +08:00
include hv: fixup relocation delta for symbols belong to entry section 2020-03-06 08:27:46 +08:00
acpi_base.c HV: search rsdp from e820 acpi reclaim region 2019-12-25 13:50:11 +08:00
cmdline.c HV: init and sanitize acrn multiboot info 2020-02-26 09:24:16 +08:00
multiboot2.c HV: init efi info with multiboot2 2020-02-26 09:24:16 +08:00
multiboot.c HV: init mmap info with multiboot2 2020-02-26 09:24:16 +08:00
reloc.c hv: fixup relocation delta for symbols belong to entry section 2020-03-06 08:27:46 +08:00