mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-31 03:15:42 +00:00
- 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>
25 lines
661 B
C
Executable File
25 lines
661 B
C
Executable File
/*
|
|
* Copyright (C) <2018> Intel Corporation
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef RELOCATE_H
|
|
#define RELOCATE_H
|
|
|
|
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[];
|
|
|
|
extern uint8_t cpu_primary_start_32[];
|
|
extern uint8_t cpu_primary_start_64[];
|
|
|
|
extern uint8_t trampoline_spinlock_ptr[];
|
|
|
|
#endif /* RELOCATE_H */
|