Trident TGUI9680 linear framebuffer PCI BAR is now correctly 4 MB aligned.

This commit is contained in:
Miran Grča
2021-07-06 19:40:16 +02:00
committed by GitHub
parent 202c31d7be
commit 0297243a50

View File

@@ -895,6 +895,9 @@ void tgui_pci_write(int func, int addr, uint8_t val, void *p)
break;
case 0x12:
if (tgui->type == TGUI_9680)
tgui->linear_base = (tgui->linear_base & 0xff000000) | ((val & 0xc0) << 16);
else
tgui->linear_base = (tgui->linear_base & 0xff000000) | ((val & 0xe0) << 16);
tgui->linear_size = tgui->vram_size;
svga->decode_mask = tgui->vram_mask;
@@ -902,6 +905,9 @@ void tgui_pci_write(int func, int addr, uint8_t val, void *p)
tgui_recalcmapping(tgui);
break;
case 0x13:
if (tgui->type == TGUI_9680)
tgui->linear_base = (tgui->linear_base & 0xc00000) | (val << 24);
else
tgui->linear_base = (tgui->linear_base & 0xe00000) | (val << 24);
tgui->linear_size = tgui->vram_size;
svga->decode_mask = tgui->vram_mask;