From: Jordan Justen <jljusten@gmail.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode
Date: Sun, 10 Apr 2011 11:29:38 -0700 [thread overview]
Message-ID: <BANLkTimT0=HxsH9iRWJ4141u4pPUfcCP=g@mail.gmail.com> (raw)
In-Reply-To: <4DA16C6A.7090303@web.de>
On Sun, Apr 10, 2011 at 01:38, Jan Kiszka <jan.kiszka@web.de> wrote:
> Indeed, that block looks weird to its author today as well. But
> inverting the logic completely defeats the purpose of lazy mode
> switching (will likely file a patch to remove the block).
Looking at the 2nd parameter to the call, and the
pflash_register_memory code, it seems it only makes sense with the
!pfl->rom_mode.
I thought that the goal was to allow multiple write operations before
exiting to rom mode, but that a read will return it to rom mode. In
that case, this change seemed to fix it.
> We should
> instead switch back using the timer.
>
> So the question is: Did you actually see a problem that the flash was
> stuck in write mode, or did you just stumble over this strange code? In
> the former case, please explain the sequence or provide a trace.
I had enabled the debug trace messages and was probing the flash from
the efi shell on x86-64. I found that I would always see the debug
messages for reads, after I started writing to the flash.
This change allowed the flash to go back to a rom mode where the debug
prints would then disappear for subsequent reads.
-Jordan
prev parent reply other threads:[~2011-04-10 18:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 20:16 [Qemu-devel] [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode Jordan Justen
2011-04-09 16:35 ` Aurelien Jarno
2011-04-10 8:38 ` [Qemu-devel] " Jan Kiszka
2011-04-10 10:53 ` [Qemu-devel] [PATCH] pflash: Restore & fix lazy ROMD switching Jan Kiszka
2011-04-10 19:33 ` Jordan Justen
2011-04-11 5:27 ` Jan Kiszka
2011-04-26 7:42 ` Jan Kiszka
2011-04-27 14:31 ` Aurelien Jarno
2011-04-10 18:29 ` Jordan Justen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTimT0=HxsH9iRWJ4141u4pPUfcCP=g@mail.gmail.com' \
--to=jljusten@gmail.com \
--cc=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).