[Milkymist-devel] fix broken compile & minor development for milkymist bios

sebastien.bourdeauducq at lekernel.net sebastien.bourdeauducq at lekernel.net
Sun Aug 2 14:16:42 PDT 2009




On Sun, 02 Aug 2009 23:04:54 +0200, <sebastien.bourdeauducq at lekernel.net>
wrote:
> 
>> Another patch is for character view of memory when using mr command.
>> I am using it for some debug purposes. like, viewing stack area or
>> a character array after a kernel crash.
> 
> Be careful with this - keep in mind that when the memory is written by
the
> kernel, data remains in the level 2 (L2) cache (between WISHBONE and FML)
> and is not flushed immediately to the SDRAM. So you have a risk of
getting
> old data when you read it afterward from the BIOS.
> 
> If you run the BIOS by pressing the "CPU reset" button on the ML401,
> you're
> OK

Now that I think about it - it's not 100% OK, because between the time when
the reset is pressed and the BIOS has brought up the memory controller,
there is a small time during which the SDRAM is not correctly refreshed and
might lose data. Also the memory test routine erases the first 8MB, but I
think you already spotted that one.

SDRAM usually keeps data for quite some time (maybe a few seconds) without
refresh (and this is used to steal passwords) but be careful.

The best option would be to have a JTAG CPU debugger. A quick hack can be
to have a second reset button which resets everything except the memory
controller.




More information about the Devel mailing list