Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2008 09:10:52 -0800
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Andrew Duane <aduane@juniper.net>
Cc:        bms@freebsd.org, freebsd-embedded@freebsd.org
Subject:   Re: /dev/cfi NOR flash driver
Message-ID:  <DE2F8828-49E5-48E0-9E4D-943C89CCDB66@mac.com>
In-Reply-To: <0FCFCF6165E968449991746EB91D614D010318EC@antipi.jnpr.net>
References:  <47C01F1B.3020107@FreeBSD.org> <47C03036.4040409@FreeBSD.org> <9C903216-6C19-4D6F-80D2-27C161845567@mac.com> <20080223.093044.282837835.imp@bsdimp.com> <33A08235-8501-432E-BB89-0F4A44D7F39A@mac.com> <0FCFCF6165E968449991746EB91D614D010318EC@antipi.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 25, 2008, at 6:30 AM, Andrew Duane wrote:

> Havig worked on projects with both NOR and NAND before, there isn't  
> much
> value to be had in combining them. The operations and control flows  
> just
> aren't close enough to make it worthwhile.

I didn't mean to write a signle driver to handle both,
but rather a single infratsructure in which both live.

> Also, what were you referring to with "eraseblock" operation? The
> concept of eraseblocks is critical, as when a page is written, an  
> entire
> eraseblock needs to be "allocated" and updated. It can get tricky,
> knowing which sectors in an eraseblock are available, and when a new  
> one
> needs to be allocated.

The OOB/metadata is on a per-page level. You don't have
to erase a block just to write to a page when you know
it's erased already. In particular: you can always flip
a bit from 1 to 0. You need to erase to flip it from 0
to 1. That may be used to design an algorithm that uses
the page as the primary granularity, while doing the
erase on the block level. An algorithm like that would
probably bundle pages with equivalent write frequencies
in the same block...

In any case: I don't know of any algorithms so I don't
know if such an approach would be efficient at all. It
may be something that just isn't going to work well and
that you might as well use the block as the primary
granularity. At this time I just don't see a reason to
close the door on more advanced algorithms...

-- 
Marcel Moolenaar
xcllnt@mac.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DE2F8828-49E5-48E0-9E4D-943C89CCDB66>