mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv:Move severl variable declaration for boot code
-- add header file ld_sym.h in include/arch/x86/boot/ -- move 'ld_bss_start/end' from cpu.h to ld_sym.h, avoid reverse dependency -- move 'ld_text_end' from mmu.h to ld_sym.h -- move 'ld_trampoline_load/start/end' to ld_sym.h Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
c20d095a63
commit
6825043078
17
hypervisor/include/arch/x86/boot/ld_sym.h
Normal file
17
hypervisor/include/arch/x86/boot/ld_sym.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef LD_SYM_H
|
||||
#define LD_SYM_H
|
||||
|
||||
extern uint8_t ld_text_end;
|
||||
extern uint8_t ld_bss_start;
|
||||
extern uint8_t ld_bss_end;
|
||||
extern const uint8_t ld_trampoline_load;
|
||||
extern uint8_t ld_trampoline_start;
|
||||
extern uint8_t ld_trampoline_end;
|
||||
|
||||
#endif /* LD_SYM_H */
|
@@ -193,8 +193,6 @@ enum cpu_reg_name {
|
||||
/**********************************/
|
||||
/* EXTERNAL VARIABLES */
|
||||
/**********************************/
|
||||
extern uint8_t ld_bss_start;
|
||||
extern uint8_t ld_bss_end;
|
||||
|
||||
/* In trampoline range, hold the jump target which trampline will jump to */
|
||||
extern uint64_t main_entry[1];
|
||||
|
@@ -53,8 +53,6 @@
|
||||
/* IA32E Paging constants */
|
||||
#define IA32E_REF_MASK ((get_cpu_info())->physical_address_mask)
|
||||
|
||||
extern uint8_t ld_text_end;
|
||||
|
||||
static inline uint64_t round_page_up(uint64_t addr)
|
||||
{
|
||||
return (((addr + (uint64_t)PAGE_SIZE) - 1UL) & PAGE_MASK);
|
||||
|
@@ -13,9 +13,6 @@ extern uint64_t prepare_trampoline(void);
|
||||
extern uint64_t get_trampoline_start16_paddr(void);
|
||||
|
||||
/* external symbols that are helpful for relocation */
|
||||
extern const uint8_t ld_trampoline_load;
|
||||
extern uint8_t ld_trampoline_start;
|
||||
|
||||
extern uint8_t trampoline_fixup_cs;
|
||||
extern uint8_t trampoline_fixup_ip;
|
||||
extern uint8_t trampoline_fixup_target;
|
||||
|
Reference in New Issue
Block a user