From: John Hodge Date: Sat, 10 May 2014 07:44:32 +0000 (+0800) Subject: Modules/BochsGA - Comment on new MMIO registers, output full BAR set X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=8159c362f64c7f70d3c834bbf2e1c03df7f75ca2;p=tpg%2Facess2.git Modules/BochsGA - Comment on new MMIO registers, output full BAR set --- diff --git a/KernelLand/Modules/Display/BochsGA/bochsvbe.c b/KernelLand/Modules/Display/BochsGA/bochsvbe.c index a6338ae1..7674ed95 100644 --- a/KernelLand/Modules/Display/BochsGA/bochsvbe.c +++ b/KernelLand/Modules/Display/BochsGA/bochsvbe.c @@ -118,8 +118,15 @@ int BGA_Install(char **Arguments) dev = PCI_GetDevice(0x1234, 0x1111, 0); if(dev == -1) base = VBE_DISPI_LFB_PHYSICAL_ADDRESS; - else - base = PCI_GetBAR(dev, 0); + else { + Log_Debug("BGA", "BARs %x,%x,%x,%x,%x,%x", + PCI_GetBAR(dev, 0), PCI_GetBAR(dev, 1), PCI_GetBAR(dev, 2), + PCI_GetBAR(dev, 3), PCI_GetBAR(dev, 4), PCI_GetBAR(dev, 5)); + base = PCI_GetValidBAR(dev, 0, PCI_BARTYPE_MEM); + // TODO: Qemu/bochs have MMIO versions of the registers in BAR2 + // - This range is non-indexed + //mmio_base = PCI_GetValidBAR(dev, 2, PCI_BARTYPE_MEM); + } // Map Framebuffer to hardware address gBGA_Framebuffer = (void *) MM_MapHWPages(base, 768); // 768 pages (3Mb)