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:
Jason Chen CJ
2018-12-10 10:24:23 +08:00
committed by wenlingz
parent 9a7d32f024
commit 2d469a5e5f
6 changed files with 162 additions and 140 deletions

View File

@@ -127,6 +127,9 @@ S_SRCS += arch/x86/boot/cpu_save_boot_ctx.S
S_SRCS += arch/x86/boot/trampoline.S
C_SRCS += boot/reloc.c
# initilization component
C_SRCS += arch/x86/init.c
C_SRCS += boot/acpi.c
C_SRCS += boot/dmar_parse.c
S_SRCS += arch/x86/idt.S