From 3bbfa136ebb338af6aa5f20eb21484d05f2c0b02 Mon Sep 17 00:00:00 2001 From: Antoine Cure Date: Thu, 13 Feb 2020 15:32:20 +0100 Subject: [PATCH] Little correction about KPAGESIZE --- kaleid/kernel/io/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kaleid/kernel/io/pci.c b/kaleid/kernel/io/pci.c index 7f5c66a..c80fcbe 100644 --- a/kaleid/kernel/io/pci.c +++ b/kaleid/kernel/io/pci.c @@ -160,7 +160,8 @@ void IoInitPCI() IoPciEnumerate(); // Give R/W access to the configuration space - for(int i=0; i < 65536; i++) // 65536 = 256 * 32 * 8 + int maxI = (256 * 32 * 8 * 4096) / KPAGESIZE; + for(int i=0; i < maxI; i++) { MmMapPage((void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE), (void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE),