From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA0OE-0002V8-1P for qemu-devel@nongnu.org; Tue, 20 Mar 2012 10:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SA0O7-0003YP-SW for qemu-devel@nongnu.org; Tue, 20 Mar 2012 10:50:21 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:43201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA0O7-0003Y3-Ln for qemu-devel@nongnu.org; Tue, 20 Mar 2012 10:50:15 -0400 Received: by ggnj2 with SMTP id j2so138580ggn.4 for ; Tue, 20 Mar 2012 07:50:13 -0700 (PDT) From: Liming Wang Date: Tue, 20 Mar 2012 22:48:57 +0800 Message-Id: <1332254938-31023-1-git-send-email-walimisdev@gmail.com> Subject: [Qemu-devel] [PATCH 1/2] hw/pflash_cfi01: add "0xf0" to select and deselect read mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori In CFI Specification, "0xff" and "0xf0" are both the data to select and deselect read mode, so add "0xf0" here. Linux guest os often uses "0xf0" to select read mode, which leads qemu printing "pflash_write: Unimplemented flash cmd sequence (offset 00000000, wcycle 0x0 cmd 0x0 value 0xf0)". This patch fixes this mistake. Signed-off-by: Liming Wang --- hw/pflash_cfi01.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index b03f623..2e6fa71 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -313,7 +313,8 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset, DPRINTF("%s: Write to buffer\n", __func__); pfl->status |= 0x80; /* Ready! */ break; - case 0xff: /* Read array mode */ + case 0xf0: /* Read array mode */ + case 0xff: DPRINTF("%s: Read array mode\n", __func__); goto reset_flash; default: @@ -367,7 +368,7 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset, } break; case 0x98: - if (cmd == 0xff) { + if (cmd == 0xff || cmd == 0xf0) { goto reset_flash; } else { DPRINTF("%s: leaving query mode\n", __func__); -- 1.7.0.4