From 52163a1fdfd225dab20a3eeaf5d3aee6ffc0380d Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 20 Jul 2022 21:40:18 +0900 Subject: [PATCH] vga: set pci revision to 0 to avoid falsely advertising mmio registers (for serenityos, #299) --- src/vga.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vga.js b/src/vga.js index d25b4431..a5b9c8d7 100644 --- a/src/vga.js +++ b/src/vga.js @@ -212,10 +212,12 @@ function VGAScreen(cpu, bus, vga_memory_size) */ this.svga_offset = 0; + const pci_revision = 0; // set to 2 for qemu extended registers + // Experimental, could probably need some changes // 01:00.0 VGA compatible controller: NVIDIA Corporation GT216 [GeForce GT 220] (rev a2) this.pci_space = [ - 0x34, 0x12, 0x11, 0x11, 0x03, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x34, 0x12, 0x11, 0x11, 0x03, 0x01, 0x00, 0x00, pci_revision, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x08, VGA_LFB_ADDRESS >>> 8, VGA_LFB_ADDRESS >>> 16, VGA_LFB_ADDRESS >>> 24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x1a, 0x00, 0x11,