Ask for some guidance...
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.
Signature · 3 lines
A.Ismael Olea González tlf +(34) 914 575 330 mailto:[email protected]
Quoted 11 lines · At 08:32 PM 7/24/2001 +0200, [email protected] 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.
Quoted 4 lines
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.
Quoted 1 line
- 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
Quoted 2 lines · Vipin Malik
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.
Quoted 2 lines
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>
Quoted 2 lines
What BIOS is it using? I know that General Software's Embedded BIOS supports that functionality.
Do you know the format used?
Quoted 2 lines
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 :)
Quoted 2 lines
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? :)
Quoted 6 lines
Quoted 1 line
- 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.
Signature · 1 line
dwmw2
Quoted 5 lines
Quoted 3 lines
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).
Quoted 2 lines
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
Quoted 2 lines · On Tue, 24 Jul 2001 [email protected] 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.
Quoted 1 line
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 :)
Quoted 6 lines
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.
Quoted 4 lines
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?
Quoted 1 line
- 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.
Signature · 1 line
dwmw2