From patchwork Tue Apr 2 10:53:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Damian, Alexandru" X-Patchwork-Id: 232943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CFD9E2C014B for ; Tue, 2 Apr 2013 21:54:27 +1100 (EST) Received: from localhost ([::1]:60908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMyrA-0005zB-I2 for incoming@patchwork.ozlabs.org; Tue, 02 Apr 2013 06:54:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMyqr-0005wb-7h for qemu-devel@nongnu.org; Tue, 02 Apr 2013 06:54:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMyqk-0001Aj-5G for qemu-devel@nongnu.org; Tue, 02 Apr 2013 06:54:05 -0400 Received: from mga11.intel.com ([192.55.52.93]:43610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMyqj-0001AH-Ta for qemu-devel@nongnu.org; Tue, 02 Apr 2013 06:53:58 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 02 Apr 2013 03:53:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,392,1363158000"; d="scan'208";a="315617111" Received: from adamian-desktop.rb.intel.com ([10.237.105.55]) by fmsmga002.fm.intel.com with ESMTP; 02 Apr 2013 03:53:53 -0700 Received: by adamian-desktop.rb.intel.com (Postfix, from userid 1000) id DB567560C23; Tue, 2 Apr 2013 13:53:55 +0300 (EEST) From: Alex DAMIAN To: kraxel@redhat.com, blauwirbel@gmail.com, pbonzini@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org Date: Tue, 2 Apr 2013 13:53:52 +0300 Message-Id: <1364900032-32400-1-git-send-email-alexandru.damian@intel.com> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Cc: Alexandru DAMIAN Subject: [Qemu-devel] [PATCH] vga.c: Debug messages go to stderr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alexandru DAMIAN Move debug messages to stderr since often in vga code debug stdio is used as serial console. Signed-off-by: Alexandru DAMIAN --- hw/vga.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index 59bfb22..2e337b8 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -391,7 +391,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr) case VGA_SEQ_D: val = s->sr[s->sr_index]; #ifdef DEBUG_VGA_REG - printf("vga: read SR%x = 0x%02x\n", s->sr_index, val); + fprintf(stderr, "vga: read SR%x = 0x%02x\n", s->sr_index, val); #endif break; case VGA_PEL_IR: @@ -419,7 +419,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr) case VGA_GFX_D: val = s->gr[s->gr_index]; #ifdef DEBUG_VGA_REG - printf("vga: read GR%x = 0x%02x\n", s->gr_index, val); + fprintf(stderr, "vga: read GR%x = 0x%02x\n", s->gr_index, val); #endif break; case VGA_CRT_IM: @@ -430,7 +430,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr) case VGA_CRT_DC: val = s->cr[s->cr_index]; #ifdef DEBUG_VGA_REG - printf("vga: read CR%x = 0x%02x\n", s->cr_index, val); + fprintf(stderr, "vga: read CR%x = 0x%02x\n", s->cr_index, val); #endif break; case VGA_IS1_RM: @@ -445,7 +445,7 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr) } } #if defined(DEBUG_VGA) - printf("VGA: read addr=0x%04x data=0x%02x\n", addr, val); + fprintf(stderr, "VGA: read addr=0x%04x data=0x%02x\n", addr, val); #endif return val; } @@ -462,7 +462,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) return; } #ifdef DEBUG_VGA - printf("VGA: write addr=0x%04x data=0x%02x\n", addr, val); + fprintf(stderr, "VGA: write addr=0x%04x data=0x%02x\n", addr, val); #endif switch(addr) { @@ -506,7 +506,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) break; case VGA_SEQ_D: #ifdef DEBUG_VGA_REG - printf("vga: write SR%x = 0x%02x\n", s->sr_index, val); + fprintf(stderr, "vga: write SR%x = 0x%02x\n", s->sr_index, val); #endif s->sr[s->sr_index] = val & sr_mask[s->sr_index]; if (s->sr_index == VGA_SEQ_CLOCK_MODE) { @@ -537,7 +537,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) break; case VGA_GFX_D: #ifdef DEBUG_VGA_REG - printf("vga: write GR%x = 0x%02x\n", s->gr_index, val); + fprintf(stderr, "vga: write GR%x = 0x%02x\n", s->gr_index, val); #endif s->gr[s->gr_index] = val & gr_mask[s->gr_index]; vga_update_memory_access(s); @@ -549,7 +549,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) case VGA_CRT_DM: case VGA_CRT_DC: #ifdef DEBUG_VGA_REG - printf("vga: write CR%x = 0x%02x\n", s->cr_index, val); + fprintf(stderr, "vga: write CR%x = 0x%02x\n", s->cr_index, val); #endif /* handle CR0-7 protection */ if ((s->cr[VGA_CRTC_V_SYNC_END] & VGA_CR11_LOCK_CR0_CR7) && @@ -848,7 +848,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val) uint32_t write_mask, bit_mask, set_mask; #ifdef DEBUG_VGA_MEM - printf("vga: [0x" TARGET_FMT_plx "] = 0x%02x\n", addr, val); + fprintf(stderr, "vga: [0x" TARGET_FMT_plx "] = 0x%02x\n", addr, val); #endif /* convert to VGA memory offset */ memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3; @@ -881,7 +881,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val) if (s->sr[VGA_SEQ_PLANE_WRITE] & mask) { s->vram_ptr[addr] = val; #ifdef DEBUG_VGA_MEM - printf("vga: chain4: [0x" TARGET_FMT_plx "]\n", addr); + fprintf(stderr, "vga: chain4: [0x" TARGET_FMT_plx "]\n", addr); #endif s->plane_updated |= mask; /* only used to detect font change */ memory_region_set_dirty(&s->vram, addr, 1); @@ -894,7 +894,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val) addr = ((addr & ~1) << 1) | plane; s->vram_ptr[addr] = val; #ifdef DEBUG_VGA_MEM - printf("vga: odd/even: [0x" TARGET_FMT_plx "]\n", addr); + fprintf(stderr, "vga: odd/even: [0x" TARGET_FMT_plx "]\n", addr); #endif s->plane_updated |= mask; /* only used to detect font change */ memory_region_set_dirty(&s->vram, addr, 1); @@ -969,7 +969,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val) (((uint32_t *)s->vram_ptr)[addr] & ~write_mask) | (val & write_mask); #ifdef DEBUG_VGA_MEM - printf("vga: latch: [0x" TARGET_FMT_plx "] mask=0x%08x val=0x%08x\n", + fprintf(stderr, "vga: latch: [0x" TARGET_FMT_plx "] mask=0x%08x val=0x%08x\n", addr * 4, write_mask, val); #endif memory_region_set_dirty(&s->vram, addr << 2, sizeof(uint32_t));