public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Ask for some guidance...
@ 2001-07-24 18:32 olea
  2001-07-25  3:12 ` Vipin Malik
  2001-07-25 19:06 ` David Woodhouse
  0 siblings, 2 replies; 5+ messages in thread
From: olea @ 2001-07-24 18:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: juan

   
Hi.

We are porting Linux to a kind of PDA built on a ELAN SC400 processor.
It has two Samsung KM29U128T flash chips running as an IDE hard disk.

The system runs DOS perfectly without drivers.

Our problem is that Linux can't see the IDE device.

Since the machine is designed and built by a third company (other than
our client) we don't have any information about the implementation.

We have investigated the machine and we have some suppositions:

        - the bios doesn't look modified to access the flash ide disk;
        - there isn't any Samsung flash controler chip in the board;
        - the board has some chips looking as programmable roms;
        - it's looks that this chips are a firmware for doing the FTL.


Our questions are:

        - How can we probe that there is a firmware doing the FTL and
which firmware is it?
	- Do you think we could access to the flash disk using MTD?

If you need more info, please ask it.

Thank you very much for your time.

-- 
	A.Ismael Olea González
	tlf +(34) 914 575 330
	mailto:olea@hispafuentes.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ask for some guidance...
  2001-07-24 18:32 Ask for some guidance olea
@ 2001-07-25  3:12 ` Vipin Malik
  2001-07-25 19:15   ` David Woodhouse
  2001-07-25 19:06 ` David Woodhouse
  1 sibling, 1 reply; 5+ messages in thread
From: Vipin Malik @ 2001-07-25  3:12 UTC (permalink / raw)
  To: olea, linux-mtd; +Cc: juan

At 08:32 PM 7/24/2001 +0200, olea@hispafuentes.com wrote:


>Our problem is that Linux can't see the IDE device.
>
>Since the machine is designed and built by a third company (other than
>our client) we don't have any information about the implementation.
>
>We have investigated the machine and we have some suppositions:
>
>         - the bios doesn't look modified to access the flash ide disk;
>         - there isn't any Samsung flash controler chip in the board;
>         - the board has some chips looking as programmable roms;
>         - it's looks that this chips are a firmware for doing the FTL.


It's not trivial to do FTL inside some "prom's". Depending on how large 
(rather small) they are, they may be doing just chip decoding.

Most of the times IDE disk's are emulated under a "special" BIOS that 
translate the BIOS IDE int (int 13?) into read/writes of the Flash sectors.
What BIOS is it using? I know that General Software's Embedded BIOS 
supports that functionality.

There is not much that you can do re. accessing this disk under Linux as 
Linux does not use the BIOS for IDE disk access.



>Our questions are:
>
>         - How can we probe that there is a firmware doing the FTL and
>which firmware is it?

Simple (!), use "Debug" under DOS, to trace into the BIOS IDE interrupt and 
see that it does.


>         - Do you think we could access to the flash disk using MTD?

That's probably the most sensible approach in my mind- though you would not 
access the flash _disk_, rather just the flash under MTD, which would show 
up as a char and block device on which you could then mount JFFS2 and then 
access it like a regular file system through Linux, including booting from it.

Vipin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ask for some guidance...
  2001-07-24 18:32 Ask for some guidance olea
  2001-07-25  3:12 ` Vipin Malik
@ 2001-07-25 19:06 ` David Woodhouse
  1 sibling, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2001-07-25 19:06 UTC (permalink / raw)
  To: olea; +Cc: linux-mtd, juan

On Tue, 24 Jul 2001 olea@hispafuentes.com wrote:

> We are porting Linux to a kind of PDA built on a ELAN SC400 processor.
> It has two Samsung KM29U128T flash chips running as an IDE hard disk.

Why do you say 'IDE'? It's most likely that there's just a BIOS extension 
which makes it appear as a block device under DOS via INT 13h.

> Our problem is that Linux can't see the IDE device.

You've given no reason to assume it's actually connected through a real
IDE interface. I assume Linux doesn't see any SCSI block devices or USB
block devices either :)

> We have investigated the machine and we have some suppositions:
> 
>         - the bios doesn't look modified to access the flash ide disk;
>         - there isn't any Samsung flash controler chip in the board;
>         - the board has some chips looking as programmable roms;
>         - it's looks that this chips are a firmware for doing the FTL.

All sounds sane.

> Our questions are:
> 
>         - How can we probe that there is a firmware doing the FTL and
> which firmware is it?

Scan the BIOS extension areas (0xc0000-0xeffff) and use 'strings' on any
which you find. What does it say when it's booting?

> 	- Do you think we could access to the flash disk using MTD?

If it's actually _the_ FTL, rather than just _a_ flash translation layer,
then yes - we have code do to that if you just make it find the flash
chips - the 'physmap' driver, appropriately configured, will probably do
that for you.

First find out where in the physical memory map the flash chips are mapped
and make them work under Linux. Then we can look at the BIOS extension and
the current contents of the flash chips to see if it's actually FTL or
something else that we recognise.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ask for some guidance...
  2001-07-25  3:12 ` Vipin Malik
@ 2001-07-25 19:15   ` David Woodhouse
  2001-07-25 20:53     ` Vipin Malik
  0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2001-07-25 19:15 UTC (permalink / raw)
  To: Vipin Malik; +Cc: olea, linux-mtd, juan

On Tue, 24 Jul 2001, Vipin Malik wrote:

> It's not trivial to do FTL inside some "prom's". Depending on how large 
> (rather small) they are, they may be doing just chip decoding.

lapdancer /home/dwmw2/working/mtd/drivers/mtd $ size ftl.o
   text	   data	    bss	    dec	    hex	filename
  12947	    128	   9216	  22291	   5713	ftl.o

Not too hard to put it in prom. The DiskOnChip 1000 did.

> Most of the times IDE disk's are emulated under a "special" BIOS that 
> translate the BIOS IDE int (int 13?) into read/writes of the Flash sectors.

<pedant> INT 13h is generic block device. Not IDE-specific. </pedant>

> What BIOS is it using? I know that General Software's Embedded BIOS 
> supports that functionality.

Do you know the format used?

> There is not much that you can do re. accessing this disk under Linux as 
> Linux does not use the BIOS for IDE disk access.

There are patches for the 1.1 kernel to do that :)

> Simple (!), use "Debug" under DOS, to trace into the BIOS IDE interrupt and 
> see that it does.

This works, although it tends to make my head hurt. Guess how we got 
DiskOnChip working? :)

> >         - Do you think we could access to the flash disk using MTD?
> 
> That's probably the most sensible approach in my mind- though you would not 
> access the flash _disk_, rather just the flash under MTD, which would show 
> up as a char and block device on which you could then mount JFFS2 and then 
> access it like a regular file system through Linux, including booting from it.

For booting, compatibility with the existing BIOS extension is useful. 
Until someone provides MTD and JFFS2 support for Grub, that is - I have 
Grub booting from prom (actually from DiskOnChip) quite happily.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ask for some guidance...
  2001-07-25 19:15   ` David Woodhouse
@ 2001-07-25 20:53     ` Vipin Malik
  0 siblings, 0 replies; 5+ messages in thread
From: Vipin Malik @ 2001-07-25 20:53 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Vipin Malik, olea, linux-mtd, juan

>
> > What BIOS is it using? I know that General Software's Embedded BIOS
> > supports that functionality.
>
> Do you know the format used?

Nope-sorry! Though GSW may be willing to share that info (if it is that).

>
> For booting, compatibility with the existing BIOS extension is useful.

Actually, for a x86 solution, most of these BIOS int 13 extensions can detect and
load a "floppy boot sector" format from resident flash disk (I think so, unless
I've lost my mind- which is quite a possibility :)

One can then use rolo (see web site www.embeddedlinuxworks.com under "ROLO: A
developers guide") to load a bzImage kernel into ram and boot it. The kernel can
then just detect the flash as MTD and mount JFFS2 on it.

You really don't even need the BIOS if you don't need thinks like video etc. in
your system- but having a BIOS makes life a bit easy- you don't have to figure out
chipset/peripheral initializations etc.

Vipin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-07-25 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-24 18:32 Ask for some guidance olea
2001-07-25  3:12 ` Vipin Malik
2001-07-25 19:15   ` David Woodhouse
2001-07-25 20:53     ` Vipin Malik
2001-07-25 19:06 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox