hv: fixup addresses in the c code for relocation

- Trampoline code doesn't have the same relocation delta with HV,
  Need to manually patch them when referenced from HV
- replace all references to CONFIG_RAM_START with the actual HV load
  address

Signed-off-by: Zheng Gen <gen.zheng@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Zide Chen
2018-06-22 10:16:17 -07:00
committed by lijinxia
parent bc8b3a40f8
commit 92cd2612fc
7 changed files with 57 additions and 30 deletions

View File

@@ -10,6 +10,8 @@ extern void _relocate(void);
extern uint64_t get_hv_image_delta(void);
extern uint64_t get_hv_image_base(void);
extern uint64_t trampoline_relo_addr(void *addr);
extern uint64_t read_trampoline_sym(void *sym);
extern void write_trampoline_sym(void *sym, uint64_t val);
/* external symbols that are helpful for relocation */
extern uint8_t _DYNAMIC[];