From 783dc0e697a1b13693752b743212cc183cd98022 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sat, 15 Feb 2020 11:11:49 +0100 Subject: [PATCH] Bug correction : map before enumerate --- kaleid/kernel/io/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kaleid/kernel/io/pci.c b/kaleid/kernel/io/pci.c index c80fcbe..671725c 100644 --- a/kaleid/kernel/io/pci.c +++ b/kaleid/kernel/io/pci.c @@ -157,8 +157,6 @@ void IoInitPCI() pciConfigBaseAddress = MCFG_table->pciConfigBaseAddress; DebugLog("PCI Config Base address = 0x%p\n", pciConfigBaseAddress); - IoPciEnumerate(); - // Give R/W access to the configuration space int maxI = (256 * 32 * 8 * 4096) / KPAGESIZE; for(int i=0; i < maxI; i++) @@ -167,4 +165,6 @@ void IoInitPCI() (void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE), PRESENT | READWRITE); } + + IoPciEnumerate(); }