mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 12:49:24 +00:00
modularization: hypervisor initilization component
hypervisor initilization component triggered by boot component, and it calls different components initilization functions from the highest layer. this patch added init.c and move reorged cpu init functions into it, keep hardware management functions in cpu.c but move other components' init function into init.c. the hypervisor initilization components will call: - init_cpu_pre - init_cpu_post - init_bsp - init_debug_pre - init_debug_post - init_guest - init_passthru - enter_guest_mode the hypervisor initilization component include files: arch/x86/init.c include/arch/x86/init.h this component is higest layer, so there is no reverse dependencies for it. v2: - separate into 2 patches, 1 for reorg, 1 for pure move. Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
@@ -127,9 +127,6 @@
|
||||
/* Boot CPU ID */
|
||||
#define BOOT_CPU_ID 0U
|
||||
|
||||
/* hypervisor stack bottom magic('intl') */
|
||||
#define SP_BOTTOM_MAGIC 0x696e746cUL
|
||||
|
||||
/* type of speculation control
|
||||
* 0 - no speculation control support
|
||||
* 1 - raw IBRS + IPBP support
|
||||
@@ -317,8 +314,8 @@ bool is_apicv_posted_intr_supported(void);
|
||||
bool is_ept_supported(void);
|
||||
bool cpu_has_cap(uint32_t bit);
|
||||
void load_cpu_state_data(void);
|
||||
void bsp_boot_init(void);
|
||||
void cpu_secondary_init(void);
|
||||
void init_cpu_pre(uint16_t pcpu_id);
|
||||
void init_cpu_post(uint16_t pcpu_id);
|
||||
void start_cpus(void);
|
||||
void stop_cpus(void);
|
||||
void wait_sync_change(uint64_t *sync, uint64_t wake_sync);
|
||||
|
14
hypervisor/include/arch/x86/init.h
Normal file
14
hypervisor/include/arch/x86/init.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) <2018> Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef INIT_H
|
||||
|
||||
/* hypervisor stack bottom magic('intl') */
|
||||
#define SP_BOTTOM_MAGIC 0x696e746cUL
|
||||
|
||||
void bsp_boot_init(void);
|
||||
void cpu_secondary_init(void);
|
||||
|
||||
#endif /* INIT_H*/
|
Reference in New Issue
Block a user