From ac29d6eed18acbee4816c109fee9d1ac70695669 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 24 Jan 2012 21:18:02 -0600 Subject: [PATCH 1/4] Re-add complete defines for PCI IDs. Based on the patch from Gerd Hoffmann bb44e12f, upstream appears to have accepted his patch but with modifications which make his further patches for qxl, vmware and stdvga builds of the BIOS not work. This commit just tweaks the code back to how he patched it originally. --- Makefile | 4 ++-- vbe.c | 2 +- vgabios.c | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index bdc0abd..4411cb2 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,8 @@ VGA_FILES := vgabios.c vgabios.h vgafonts.h vgatables.h VBE_FILES := vbe.h vbe.c vbetables.h # build flags -vgabios.bin : VGAFLAGS := -DVBE -DPCIBIOS -vgabios.debug.bin : VGAFLAGS := -DVBE -DPCIBIOS -DDEBUG +vgabios.bin : VGAFLAGS := -DVBE -DPCIBIOS -DPCI_VID=0x1234 -DPCI_DID=0x1111 +vgabios.debug.bin : VGAFLAGS := -DVBE -DPCIBIOS -DPCI_VID=0x1234 -DPCI_DID=0x1111 -DDEBUG vgabios-cirrus.bin : VGAFLAGS := -DCIRRUS -DPCIBIOS vgabios-cirrus.debug.bin : VGAFLAGS := -DCIRRUS -DPCIBIOS -DCIRRUS_DEBUG diff --git a/vbe.c b/vbe.c index 5636758..ae4488d 100644 --- a/vbe.c +++ b/vbe.c @@ -928,7 +928,7 @@ Bit16u *AX;Bit16u CX; Bit16u ES;Bit16u DI; #ifdef PCI_VID lfb_addr = pci_get_lfb_addr(PCI_VID); #else - lfb_addr = pci_get_lfb_addr(0x1234); // experimental vendor + lfb_addr = 0; #endif if (lfb_addr > 0) { info.PhysBasePtr = ((Bit32u)lfb_addr << 16); diff --git a/vgabios.c b/vgabios.c index 48c10f2..3588f7d 100644 --- a/vgabios.c +++ b/vgabios.c @@ -210,12 +210,9 @@ vgabios_pci_data: #ifdef CIRRUS .word 0x1013 .word 0x00b8 // CLGD5446 -#elif defined(PCI_VID) && defined(PCI_DID) +#elif defined(PCI_VID) .word PCI_VID .word PCI_DID -#elif defined(VBE) -.word 0x1234 -.word 0x1111 // Bochs VBE support #else #error "Unknown PCI vendor and device id" #endif -- 1.7.8.4