Browse Source

Revert "arch: arm64: init xen in arch_kernel_init()"

This reverts commit 7c90f1bca1.

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>
pull/82664/head
Dmytro Firsov 7 months ago committed by Benjamin Cabé
parent
commit
da43d97627
  1. 4
      arch/arm64/core/xen/enlighten.c
  2. 5
      arch/arm64/include/kernel_arch_func.h

4
arch/arm64/core/xen/enlighten.c

@ -42,7 +42,7 @@ static int xen_map_shared_info(const shared_info_t *shared_page) @@ -42,7 +42,7 @@ static int xen_map_shared_info(const shared_info_t *shared_page)
return HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp);
}
int xen_enlighten_init(void)
static int xen_enlighten_init(void)
{
int ret = 0;
shared_info_t *info = (shared_info_t *) shared_info_buf;
@ -66,3 +66,5 @@ int xen_enlighten_init(void) @@ -66,3 +66,5 @@ int xen_enlighten_init(void)
return 0;
}
SYS_INIT(xen_enlighten_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

5
arch/arm64/include/kernel_arch_func.h

@ -30,13 +30,8 @@ extern "C" { @@ -30,13 +30,8 @@ extern "C" {
#ifndef _ASMLANGUAGE
extern void xen_enlighten_init(void);
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_XEN
xen_enlighten_init();
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();

Loading…
Cancel
Save