From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvRkz-0006k9-Kv for qemu-devel@nongnu.org; Sun, 29 Jul 2012 07:33:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvRkb-00083m-AV for qemu-devel@nongnu.org; Sun, 29 Jul 2012 07:33:57 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:35831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvRka-00082q-PC for qemu-devel@nongnu.org; Sun, 29 Jul 2012 07:33:33 -0400 Message-ID: <50151F7B.3040805@reactos.org> Date: Sun, 29 Jul 2012 13:33:15 +0200 From: =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= MIME-Version: 1.0 References: <1341611595-9847-1-git-send-email-hpoussin@reactos.org> <1341611595-9847-2-git-send-email-hpoussin@reactos.org> In-Reply-To: <1341611595-9847-2-git-send-email-hpoussin@reactos.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] pc: remove DEBUG_BIOS define and QEMU exit I/O ports List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori Ping. Herv=C3=A9 Poussineau a =C3=A9crit : > Debug output ports (enabled by DEBUG_BIOS define) can be replaced by: > -chardev stdio,id=3Ddebugcon,mux=3Don > -device isa-debugcon,iobase=3D0x402,chardev=3Ddebugcon > -device isa-debugcon,iobase=3D0x403,chardev=3Ddebugcon > -device isa-debugcon,iobase=3D0x500,chardev=3Ddebugcon > -device isa-debugcon,iobase=3D0x503,chardev=3Ddebugcon >=20 > QEMU exit (which can be guest trigged) can be replaced by: > -device isa-debugexit,iobase=3D0x501 > -device isa-debugexit,iobase=3D0x501,access-size=3D2 > -device isa-debugexit,iobase=3D0x502,access-size=3D2 >=20 > Signed-off-by: Herv=C3=A9 Poussineau > --- >=20 > Anthony, this patch is a follow-up of a patch I sent in March 2012: > http://lists.gnu.org/archive/html/qemu-devel/2012-03/msg00031.html >=20 > Will you accept this approach, where your regression suite will require > a new parameter "-device isa-debugexit,iobase=3D0x501" ? >=20 > hw/pc.c | 35 ----------------------------------- > 1 file changed, 35 deletions(-) >=20 > diff --git a/hw/pc.c b/hw/pc.c > index c7e9ab3..a328fb2 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -49,9 +49,6 @@ > #include "exec-memory.h" > #include "arch_init.h" > =20 > -/* output Bochs bios info messages */ > -//#define DEBUG_BIOS > - > /* debug PC/ISA interrupts */ > //#define DEBUG_IRQ > =20 > @@ -540,17 +537,6 @@ static void bochs_bios_write(void *opaque, uint32_= t addr, uint32_t val) > static int shutdown_index =3D 0; > =20 > switch(addr) { > - /* Bochs BIOS messages */ > - case 0x400: > - case 0x401: > - /* used to be panic, now unused */ > - break; > - case 0x402: > - case 0x403: > -#ifdef DEBUG_BIOS > - fprintf(stderr, "%c", val); > -#endif > - break; > case 0x8900: > /* same as Bochs power off */ > if (val =3D=3D shutdown_str[shutdown_index]) { > @@ -563,17 +549,6 @@ static void bochs_bios_write(void *opaque, uint32_= t addr, uint32_t val) > shutdown_index =3D 0; > } > break; > - > - /* LGPL'ed VGA BIOS messages */ > - case 0x501: > - case 0x502: > - exit((val << 1) | 1); > - case 0x500: > - case 0x503: > -#ifdef DEBUG_BIOS > - fprintf(stderr, "%c", val); > -#endif > - break; > } > } > =20 > @@ -602,18 +577,8 @@ static void *bochs_bios_init(void) > uint64_t *numa_fw_cfg; > int i, j; > =20 > - register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL); > - register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL); > - register_ioport_write(0x402, 1, 1, bochs_bios_write, NULL); > - register_ioport_write(0x403, 1, 1, bochs_bios_write, NULL); > register_ioport_write(0x8900, 1, 1, bochs_bios_write, NULL); > =20 > - register_ioport_write(0x501, 1, 1, bochs_bios_write, NULL); > - register_ioport_write(0x501, 1, 2, bochs_bios_write, NULL); > - register_ioport_write(0x502, 1, 2, bochs_bios_write, NULL); > - register_ioport_write(0x500, 1, 1, bochs_bios_write, NULL); > - register_ioport_write(0x503, 1, 1, bochs_bios_write, NULL); > - > fw_cfg =3D fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0)= ; > =20 > fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1);