FFS2 and MTDs (flash)

Jason Gunthorpe jgg at ualberta.ca
Mon Jul 5 15:33:12 EDT 1999

On Mon, 5 Jul 1999, David Woodhouse wrote:

> jgg at ualberta.ca said:
> >  Things will also run a bit faster if the buffer cache is used to hang
> > onto some often used filesystem meta data in main memory.
> Think of CFI-compliant flash mapped into the host's address space. Why cache 
> it in RAM when you can just point a page table at the original?

CFI? The point here is that flash is not nearly as fast as system memory.
My boards have the flash configured with an 8bit memory bus and the
latency isn't exactly amazing either. It is not a huge deal, but if you
are accessing the same memory again and again to do lookups like FFS2 does
then a caching in system ram does speed things, and you get it for free ;>
> > XIP is not directly possible with FFS2 as it places no constraints on
> > alignment (like romfs).
> So what they say on their web site about XIP is all crap? Of course, I suppose 
> that shouldn't surprise me :)

For WinCE? I donno. I -could- be done, but you'd need to page align the
datablocks explicity, some sort of special flag when you create the file I
guess. I only have one board that has un-paged flash (16 bits wide too)
but the flash is small and I'm thinking of using compression, so I am
not very concerned. (and again there is that issue with flash being slower
than system memory)

> Is it possible to run Linux on FFS2 without some kind on UMSDOS-like 
> translation layer? Are we going to want to write our own version which is 
> POSIX-compliant?

The FFS2 spec has room for some extension structures. I'm going to see
what QNX uses for their implementation and follow the same pattern. I need
to have at least devices to be supported..

Unfortunately the QNX folks have decided to create a new FFS for Neutrino
2, and they are not willing to give out any information about it's format

> Yes please - that'd be useful.


Startup looks something like:

# insmod mtd; insmod octagon-5066
Octagon 5066 SSD IO:0x208 MEM:0xe8000-0xf0000
mtd0: 5066 Socket ROM 512KB (RO)
mtd1: 5066 Internal Flash (AMD Am29F016) 2048KB (RW)

The flash chip type is autoprobed and my board has support for two
distinct 'sockets' The VMax board starts with

mtd1: VMax 301 Internal Flash (3*[AMD Am29F080]) 6144KB (RW)

Indicating three chips were found. It doesn't yet support interleved flash
(flash that address based on the lowest adress bit) And I haven't ported
over the PCMICA driver, I'm not sure what to make of it.. The autoprober
also needs some work to detect ROM/RAM sizes (looking for wrap around)


To unsubscribe, send "unsubscribe mtd" to majordomo at imladris.demon.co.uk

More information about the linux-mtd mailing list