Skip to content

Commit da43d97

Browse files
firscitykartben
authored andcommitted
Revert "arch: arm64: init xen in arch_kernel_init()"
This reverts commit 7c90f1b. Xen initialization maps enlighten page to Zephyr memory and also initializes Xen event channels. It is used for communication between Xen domains and based on interrupt connected to domain virtual GIC. Moving event channel initialization to arch_kernel_init() make it call irq_enable() when GIC is not initialized. Since GIC is initialized on PRE_KERNEL_1 stage, this lead to fatal error during boot. Revert these changes to make xenvm operable again. Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
1 parent f01498e commit da43d97

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

arch/arm64/core/xen/enlighten.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static int xen_map_shared_info(const shared_info_t *shared_page)
4242
return HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp);
4343
}
4444

45-
int xen_enlighten_init(void)
45+
static int xen_enlighten_init(void)
4646
{
4747
int ret = 0;
4848
shared_info_t *info = (shared_info_t *) shared_info_buf;
@@ -66,3 +66,5 @@ int xen_enlighten_init(void)
6666

6767
return 0;
6868
}
69+
70+
SYS_INIT(xen_enlighten_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

arch/arm64/include/kernel_arch_func.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,8 @@ extern "C" {
3030

3131
#ifndef _ASMLANGUAGE
3232

33-
extern void xen_enlighten_init(void);
34-
3533
static ALWAYS_INLINE void arch_kernel_init(void)
3634
{
37-
#ifdef CONFIG_XEN
38-
xen_enlighten_init();
39-
#endif
4035

4136
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
4237
soc_per_core_init_hook();

0 commit comments

Comments
 (0)