From 7d95bec148d1c03e559b0f7c1a47d34642834484 Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Wed, 6 Mar 2024 15:20:20 +0100 Subject: [PATCH] qemu-intel64: move PCI initialization back to board logic this partly revert 4123615621 which works OK for PCI serial and network cards but breaks QEMU EDU due to usage of sem and usleep in IDLE thread context. Another solution will be provided later. Signed-off-by: p-szafonimateusz --- arch/x86_64/src/common/x86_64_initialize.c | 6 ------ boards/x86_64/intel64/qemu-intel64/src/qemu_bringup.c | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86_64/src/common/x86_64_initialize.c b/arch/x86_64/src/common/x86_64_initialize.c index 0c6c25b6d4..f59dc5106b 100644 --- a/arch/x86_64/src/common/x86_64_initialize.c +++ b/arch/x86_64/src/common/x86_64_initialize.c @@ -115,12 +115,6 @@ void up_initialize(void) x86_64_serialinit(); #endif - /* Initialize the PCI bus */ - -#ifdef CONFIG_PCI - x86_64_pci_init(); -#endif - /* Initialize the network */ #ifndef CONFIG_NETDEV_LATEINIT diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_bringup.c b/boards/x86_64/intel64/qemu-intel64/src/qemu_bringup.c index 8a3d0df35c..38675a887e 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_bringup.c +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_bringup.c @@ -36,6 +36,7 @@ # include #endif +#include "x86_64_internal.h" #include "qemu_intel64.h" /**************************************************************************** @@ -54,6 +55,12 @@ int qemu_bringup(void) int ret = OK; + /* Initialize the PCI bus */ + +#ifdef CONFIG_PCI + x86_64_pci_init(); +#endif + #ifdef CONFIG_FS_PROCFS /* Mount the procfs file system */