public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Neundorf, Alexander" <Alexander.Neundorf@jenoptik.com>
To: "Retallack, Mark" <mark.retallack@siemens.com>,
	        <ecos-discuss@ecos.sourceware.org>
Subject: AW: [ECOS] Problem found with flash driver
Date: Thu, 02 Mar 2006 11:08:00 -0000	[thread overview]
Message-ID: <5A8A17126B73AC4C83968F6C4505E3C503A2982D@JO-EX01.JENOPTIK.NET> (raw)

Hi,

> Von: ecos-discuss-owner@ecos.sourceware.org
> 
> Hello everyone, I think I have found a minor problem with the io layer
> of the flash driver and before I continue with my fix, I just thought
> that I would ask if anyone else has seen it. 
> 
> I am using JFFS2 over a flash bank that I am not running code from, so
> interrupts can be enabled during flash access. The processor is an
> MPC850. 
> 
> With the virgin eCos flash.c code (from CVS), the system 
> crashes with a
> random memory corruption, I have tracked it down to a context switch
> within the flash_program function in flash.c. After looking 
> through the
> file and the eCos mailing list I found that the HAL_FLASH_CACHES_OFF
> define states that interrupts must be disabled. 

I had also crashes when interrupts occured during flash_program(). But since we don't write often on the flash, I simply disabled interrupts when calling flash_program(). This is not optimal, but was good enough for our purpose.
 
> After modding the code to disable interrupts before flushing and
> disabling the cache, the system works correctly with no problems.  

Sounds good :-)
There is also a different flash branch, maybe this is fixed there, I don't know.
 
> I have not created a patch because the HAL_FLASH_CACHES_OFF define in
> flash.h looks very generic and I cannot test the mod. But 
> this is what I
> have done:

Can you please send it as a patch ?

Bye
Alex

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

                 reply	other threads:[~2006-03-02 11:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5A8A17126B73AC4C83968F6C4505E3C503A2982D@JO-EX01.JENOPTIK.NET \
    --to=alexander.neundorf@jenoptik.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=mark.retallack@siemens.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).