From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxkVT-0001pi-94 for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:45:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxkVO-0001pE-QG for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:45:50 -0400 Received: from [199.232.76.173] (port=36190 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxkVO-0001pB-KS for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:45:46 -0400 Received: from mail-fx0-f214.google.com ([209.85.220.214]:40922) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxkVO-0000Kr-8m for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:45:46 -0400 Received: by fxm10 with SMTP id 10so9268246fxm.8 for ; Tue, 13 Oct 2009 09:45:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4AD49CCB.5060600@redhat.com> References: <1255431978-4992-1-git-send-email-kraxel@redhat.com> <1255431978-4992-3-git-send-email-kraxel@redhat.com> <4AD49CCB.5060600@redhat.com> From: Blue Swirl Date: Tue, 13 Oct 2009 19:45:25 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH 2/4] rom loader: make vga+rom loading target specific Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Tue, Oct 13, 2009 at 6:29 PM, Gerd Hoffmann wrote: > On 10/13/09 16:58, Blue Swirl wrote: >> >> On Tue, Oct 13, 2009 at 2:06 PM, Gerd Hoffmann =C2=A0= wrote: >>> >>> This patch adds a loader-target.c file for target-specific >>> rom loading functions. =C2=A0The rom_add_vga() and rom_add_option() >>> macros are transformed into functions and sticked in there. =C2=A0They >>> load the bios on TARGET_I386 and no nothing on other targets. >> >> IIRC the VGA cards on non-x86 machines contain ROMs too, some (PPC? >> Alpha?) machine had a simple x86 emulator just to run the ROM code. >> Then you could enable the VGA ROM loading unconditionally. So maybe >> the patch isn't necessary? > > Is the vgabios actually loaded to 0xc0000 (like x86 does) or does it just > sit in the PCI ROM bar? No idea, probably not loaded. >> Otherwise you could add two files without macros, then the files can >> be compiled just once. > > ... with lot of Makefile.target changes which I wanted to avoid. > > Or is there a simple way to say "all but i386 please use $thisfile.c"? ifdef TARGET_I386 obj-y +=3D loader-target.o else obj-y +=3D loader-dummy.o endif ?