pc: Drop practically unused BOCHS BIOS debug ports
PATCH 1/1 pc: Drop practically unused BOCHS BIOS debug ports
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
--- hw/pc.c | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-)
hw/pc.c +0 -27
@@ -53,9 +53,6 @@#include "bitmap.h" #include "vga-pci.h" -/* output Bochs bios info messages */ -//#define DEBUG_BIOS -/* debug PC/ISA interrupts */ //#define DEBUG_IRQ
@@ -534,17 +531,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]) {
@@ -558,16 +544,9 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) }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 ; } }
@@ -596,17 +575,11 @@ 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 );
Signature · 1 line
1.7.3.4
Am 11.09.2012 16:38, schrieb Jan Kiszka:
Quoted 4 lines
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>
This looks pretty identical to Hervé's "pc: remove DEBUG_BIOS define and QEMU exit I/O ports", doesn't it? The discussion there concluded that compatibility needs to be provided for older machines.
http://patchwork.ozlabs.org/patch/169542/
http://patchwork.ozlabs.org/patch/169543/
Andreas
Quoted 72 lines
--- hw/pc.c | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-)hw/pc.c +0
-27@@ -53,9 +53,6 @@#include "bitmap.h" #include "vga-pci.h" -/* output Bochs bios info messages */ -//#define DEBUG_BIOS -/* debug PC/ISA interrupts */ //#define DEBUG_IRQ @@ -534,17 +531,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]) {@@ -558,16 +544,9 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) }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 ; } }@@ -596,17 +575,11 @@ 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 );
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 9 lines · Andreas Färber
Am 11.09.2012 16:38, schrieb Jan Kiszka:
Quoted 4 lines
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>This looks pretty identical to Hervé's "pc: remove
DEBUG_BIOSdefine and QEMU exit I/O ports", doesn't it? The discussion there concluded that compatibility needs to be provided for older machines.
I'm not removing any behaviour that can be achieved _without_ additionally patching QEMU. I'm just removing practically dead debug code, leaving in the bits that do have effects.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Am 11.09.2012 17:04, schrieb Jan Kiszka:
Quoted 7 lines · Andreas Färber
Quoted 6 lines
Am 11.09.2012 16:38, schrieb Jan Kiszka:
Quoted 4 lines
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>
Quoted 7 lines
Quoted 3 lines
This looks pretty identical to Hervé's "pc: remove
DEBUG_BIOSdefine and QEMU exit I/O ports", doesn't it? The discussion there concluded that compatibility needs to be provided for older machines.I'm not removing any behaviour that can be achieved _without_ additionally patching QEMU. I'm just removing practically dead debug code, leaving in the bits that do have effects.
Didn't want to argue about that, just pointing you to the discussion thread that you have snipped above. It was Anthony's request. ;)
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 12 lines · Andreas Färber
Am 11.09.2012 17:04, schrieb Jan Kiszka:
Quoted 11 lines · Andreas Färber
Quoted 9 lines
Am 11.09.2012 16:38, schrieb Jan Kiszka:
Quoted 4 lines
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>This looks pretty identical to Hervé's "pc: remove
DEBUG_BIOSdefine and QEMU exit I/O ports", doesn't it? The discussion there concluded that compatibility needs to be provided for older machines.
Quoted 6 lines
Quoted 3 lines
I'm not removing any behaviour that can be achieved _without_ additionally patching QEMU. I'm just removing practically dead debug code, leaving in the bits that do have effects.
Didn't want to argue about that, just pointing you to the discussion thread that you have snipped above. It was Anthony's request. ;)
The 2nd patch cited did more than what my patch does by making those ports optional (and apparently default off) that do have effect.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Quoted 4 lines · Jan Kiszka
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>
I'll pick this up after it goes through testing.
Regards,
Anthony Liguori
Quoted 73 lines
--- hw/pc.c | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-)hw/pc.c +0
-27@@ -53,9 +53,6 @@#include "bitmap.h" #include "vga-pci.h" -/* output Bochs bios info messages */ -//#define DEBUG_BIOS -/* debug PC/ISA interrupts */ //#define DEBUG_IRQ @@ -534,17 +531,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]) {@@ -558,16 +544,9 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) }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 ; } }@@ -596,17 +575,11 @@ 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 );Signature · 1 line
1.7.3.4
Anthony Liguori
AppliedQuoted 4 lines · Jan Kiszka
We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore.
Signed-off-by Jan Kiszka <[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 73 lines
--- hw/pc.c | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-)hw/pc.c +0
-27@@ -53,9 +53,6 @@#include "bitmap.h" #include "vga-pci.h" -/* output Bochs bios info messages */ -//#define DEBUG_BIOS -/* debug PC/ISA interrupts */ //#define DEBUG_IRQ @@ -534,17 +531,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]) {@@ -558,16 +544,9 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) }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 ; } }@@ -596,17 +575,11 @@ 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 );Signature · 1 line
1.7.3.4