qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mod


From: Jordan Justen
Subject: Re: [Qemu-devel] Re: [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode
Date: Sun, 10 Apr 2011 11:29:38 -0700

On Sun, Apr 10, 2011 at 01:38, Jan Kiszka <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]