From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBOmo-0005Nw-EQ for qemu-devel@nongnu.org; Mon, 10 May 2010 04:56:26 -0400 Received: from [140.186.70.92] (port=60087 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBOmi-0005LC-Um for qemu-devel@nongnu.org; Mon, 10 May 2010 04:56:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBNmU-00081o-Vq for qemu-devel@nongnu.org; Mon, 10 May 2010 03:55:25 -0400 Message-ID: <4BE7BB01.4080702@redhat.com> Date: Mon, 10 May 2010 09:51:29 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/5] Add defines for PCI IDs. References: <1273226987-10066-1-git-send-email-kraxel@redhat.com> <1273226987-10066-2-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: vgabios-developers@nongnu.org, qemu-devel@nongnu.org On 05/07/10 17:32, Blue Swirl wrote: > On 5/7/10, Gerd Hoffmann wrote: >> This patch allows to set PCI vendor and device IDs using defines >> (PCI_VID and PCI_DID). Use it for vgabios.bin. >> >> Signed-off-by: Gerd Hoffmann >> --- >> Makefile | 4 ++-- >> vbe.c | 6 +++++- >> vgabios.c | 5 +++++ >> 3 files changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index c3c744c..d440b93 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 >> -vgabios.debug.bin : VGAFLAGS := -DVBE -DDEBUG >> +vgabios.bin : VGAFLAGS := -DVBE -DPCI_VID=0x1234 >> +vgabios.debug.bin : VGAFLAGS := -DVBE -DPCI_VID=0x1234 -DDEBUG > > -DPCI_DID missing... Not needed here. >> @@ -210,8 +210,13 @@ vgabios_pci_data: >> .word 0x1013 >> .word 0x00b8 // CLGD5446 >> #else >> +#ifdef PCI_VID >> +.word PCI_VID >> +.word PCI_DID > > ... so this generates: > .word 0x1234 > .word PCI_DID The whole construct is wrapped into a #ifdef PCIBIOS (not visible in the patch as it would have needed more context). cheers, Gerd