Received: from eggs.gnu.org ([208.118.235.92]:33511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAArD-00067e-2l for qemu-devel@nongnu.org; Tue, 20 Mar 2012 22:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAArB-0004eR-8w for qemu-devel@nongnu.org; Tue, 20 Mar 2012 22:00:58 -0400 Received: from mail-qa0-f45.google.com ([209.85.216.45]:60683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAArB-0004e9-38 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 22:00:57 -0400 Received: by qafi31 with SMTP id i31so1506472qaf.4 for ; Tue, 20 Mar 2012 19:00:55 -0700 (PDT) Date: Wed, 21 Mar 2012 09:59:43 +0800 From: walimis Message-ID: <20120321015943.GC5223@walimis-desktop> References: <1332254938-31023-1-git-send-email-walimisdev@gmail.com> <1332254938-31023-2-git-send-email-walimisdev@gmail.com> <4F691635.10006@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F691635.10006@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH 2/2] hw/pflash_cfi01: change print method to avoid complaint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Anthony Liguori , qemu-devel@nongnu.org On Wed, Mar 21, 2012 at 12:43:49AM +0100, Stefan Weil wrote: >Am 20.03.2012 15:48, schrieb Liming Wang: >>Linux guest os often writes invalid cmd data to reset into read mode, >>which leads many qemu complaint. Here we place all the debug >>message into macro PFLASH_DEBUG. We can turn on the all debug info by >>define PFLASH_DEBUG if we want to debug pflash_cfi01. >> >>Signed-off-by: Liming Wang >>--- >>hw/pflash_cfi01.c | 2 +- >>1 files changed, 1 insertions(+), 1 deletions(-) >> >>diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c >>index 2e6fa71..4e39ea6 100644 >>--- a/hw/pflash_cfi01.c >>+++ b/hw/pflash_cfi01.c >>@@ -433,7 +433,7 @@ static void pflash_write(pflash_t *pfl, >>target_phys_addr_t offset, >>return; >> >>error_flash: >>- printf("%s: Unimplemented flash cmd sequence " >>+ DPRINTF("%s: Unimplemented flash cmd sequence " >>"(offset " TARGET_FMT_plx ", wcycle 0x%x cmd 0x%x value 0x%x)\n", >>__func__, offset, pfl->wcycle, pfl->cmd, value); > >Using the trace mechanism of QEMU might be better here than DPRINTF >It allows users to enable trace messages without recompilation. >See docs/tracing.txt for details. Agree, I'm also using that. > >I personally like this special printf statement, because it shows me If we want to reserve it, also don't expect anonying complaint by Linux, I suggest to skip special cmds that not used in pflash_cfi01, such as 0xaa, 0x55. How do you think so? >since several years that there _are_ flash command sequences which should >be implemented (just boot MIPS Malta with Linux). Maybe one day I'll fix Do you remeber what issues the command sequences, by bootloader or Linux? I fixed one Unimplemented flash cmd sequence in my first patch, it prints: "pflash_write: Unimplemented flash cmd sequence (offset 00000000, wcycle 0x0 cmd 0x0 value 0xf0)" >them. With DPRINTF, I'll never again get a reminder. If I can reproduce that, I may help to fix them. Thanks Liming Wang > >Regards, >Stefan Weil >