qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH 2/2] pc: remove DEBUG_BIOS define and QEMU exit I/O ports
Date: Fri,  6 Jul 2012 23:53:14 +0200	[thread overview]
Message-ID: <1341611595-9847-2-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1341611595-9847-1-git-send-email-hpoussin@reactos.org>

Debug output ports (enabled by DEBUG_BIOS define) can be replaced by:
-chardev stdio,id=debugcon,mux=on
-device isa-debugcon,iobase=0x402,chardev=debugcon
-device isa-debugcon,iobase=0x403,chardev=debugcon
-device isa-debugcon,iobase=0x500,chardev=debugcon
-device isa-debugcon,iobase=0x503,chardev=debugcon

QEMU exit (which can be guest trigged) can be replaced by:
-device isa-debugexit,iobase=0x501
-device isa-debugexit,iobase=0x501,access-size=2
-device isa-debugexit,iobase=0x502,access-size=2

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---

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

Will you accept this approach, where your regression suite will require
a new parameter "-device isa-debugexit,iobase=0x501" ?

 hw/pc.c |   35 -----------------------------------
 1 file changed, 35 deletions(-)

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"
 
-/* output Bochs bios info messages */
-//#define DEBUG_BIOS
-
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
 
@@ -540,17 +537,6 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
     static int shutdown_index = 0;
 
     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 == shutdown_str[shutdown_index]) {
@@ -563,17 +549,6 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
             shutdown_index = 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;
     }
 }
 
@@ -602,18 +577,8 @@ static void *bochs_bios_init(void)
     uint64_t *numa_fw_cfg;
     int i, j;
 
-    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);
 
-    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 = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0);
 
     fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1);
-- 
1.7.10

  reply	other threads:[~2012-07-06 21:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 21:53 [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (e.g LGPL'ed VGA BIOS port 0x501) Hervé Poussineau
2012-07-06 21:53 ` Hervé Poussineau [this message]
2012-07-29 11:33   ` [Qemu-devel] [PATCH 2/2] pc: remove DEBUG_BIOS define and QEMU exit I/O ports Hervé Poussineau
2012-08-01 13:59   ` Anthony Liguori
2012-08-01 15:21     ` Hervé Poussineau
2012-08-01 15:37       ` Anthony Liguori
2012-08-01 15:48         ` Hervé Poussineau
2012-09-11 14:50           ` Andreas Färber
2012-09-11 18:30             ` Hervé Poussineau
2012-08-01 14:30 ` [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (e.g LGPL'ed VGA BIOS port 0x501) Andreas Färber
2012-08-01 14:58   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341611595-9847-2-git-send-email-hpoussin@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).