Bug correction : map before enumerate

This commit is contained in:
Adrien Bourmault 2020-02-15 11:11:49 +01:00
parent 3bbfa136eb
commit 783dc0e697
No known key found for this signature in database
GPG Key ID: AFEE5788AEE3F4EC
1 changed files with 2 additions and 2 deletions

View File

@ -157,8 +157,6 @@ void IoInitPCI()
pciConfigBaseAddress = MCFG_table->pciConfigBaseAddress; pciConfigBaseAddress = MCFG_table->pciConfigBaseAddress;
DebugLog("PCI Config Base address = 0x%p\n", pciConfigBaseAddress); DebugLog("PCI Config Base address = 0x%p\n", pciConfigBaseAddress);
IoPciEnumerate();
// Give R/W access to the configuration space // Give R/W access to the configuration space
int maxI = (256 * 32 * 8 * 4096) / KPAGESIZE; int maxI = (256 * 32 * 8 * 4096) / KPAGESIZE;
for(int i=0; i < maxI; i++) for(int i=0; i < maxI; i++)
@ -167,4 +165,6 @@ void IoInitPCI()
(void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE), (void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE),
PRESENT | READWRITE); PRESENT | READWRITE);
} }
IoPciEnumerate();
} }