qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] pc: remove DEBUG_BIOS define and QEMU exit


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2] pc: remove DEBUG_BIOS define and QEMU exit I/O ports
Date: Wed, 01 Aug 2012 08:59:56 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 07/06/2012 04:53 PM, Hervé Poussineau wrote:
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<address@hidden>
---

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);

Removing this from the default PC breaks compatibility. I don't mind having a way to disable it but it needs to be there by default.

Among other things, my test suite depends on these ports.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]