Keywords: Disk-On-Chip, CompactFlash, Compact Flash, Disk On Chip, M-Systems, Linux, MTD, Flash, Memory Technology Device

# M-Systems Disk-On-Chip 2000 and Linux

Please reload this page often, or join the Linux-MTD mailing list to keep updated of further developments. Latest news is at the bottom of this page.
DW.

M-Systems' Disk-On-Chip 2000 is now supported by the Linux Memory Technology Device subsystem. M-Systems have provided me with complete specifications and sample hardware, and are also being very helpful when I ask them stupid questions.

We have recently received a large amount of new code for the NFTL driver from Fabrice Bellard. The code now handles bad blocks and properly implements ECC, along with a number of other bug fixes.

Also, the DiskOnChip Millennium hardware is now supported, and the LinuxBIOS project are using the DiskOnChip Millennium to hold their system image and also in many cases the root filesystem.

I haven't tested it myself recently, but I believe it should be considered to be in late beta test. The only remaining issue that I'm aware of, other than the need to clean up the code a little and provide some better documentation, is that it does all flash accesses with interrupts disabled, which is a little suboptimal. That ought to be simple to fix.

There is also a binary-only Linux driver for i386 systems available from M-Systems themselves, but this suffers the from well-known problems of binary drivers, in addition to which, if it is to be used as a root filesystem, it must be statically linked into your kernel, which places you in blatant violation of the GPL if you distribute a solution using it.

If you aren't already aware of the nature of the the problems with binary-only drivers, then you can find more information in the ALSA Project's Call to Hardware Vendors. There is also a piece in the Linux Weekly News about Linus Torvalds' attitude to binary-only drivers - why he insists that they will be broken, and often. In Linus' mails, which are available here, here and here, he says:

> Basically, I want people to know that when they use binary-only modules, it's THEIR problem. I want people to know that in their bones, and I want it shouted out from the rooftops. I want people to wake up in a cold sweat every once in a while if they use binary-only modules.

## Current Status

I haven't made a snapshot recently, but the latest CVS tree contains all the above-mentioned code, and should be stable. Please test it in either a 2.2 or 2.4 kernel and let me know how you get on.
DW. 28/11/0

## Updates

Update 6/7/99 9pm (BST): I have now heard again from the President of M-Systems. He has not yet managed to arrange a meeting to discuss the issue internally, but he promised that he will get back to me by the end of the week with a proposal for a solution. He concludes with the following sentence: "We are looking forward to the success of Linux and we want to be part of it."

Update 8/7/99: I have received a message from the Vice President of Research and Development at M-Systems, Amir Ban. He responds to some of the technical issues to which I refer above. I have included his comments after each of my points, with a response from myself if appropriate. However, this was limited to technical concerns - the legal problems and other difficulties arising from the binary-only nature of the drivers were not addressed. We are still discussing possible options with regard to those.

Update 9/7/99: I have heard again from Amir Ban, explaining their reasoning and their concerns. His mail can be found here, along with my response to it, and my interpretation of the patent issues.

Update 19/7/99: The latest word from M-Systems seems to be that they are willing to give me enough details to write a driver capable of reading, writing and erasing the Disk-On-Chip 2000 hardware. The programming spec currently exists "only as an internal paper and is being worked on to be suitable for distribution." They haven't yet given an expected timescale for this.
They're extremely reluctant to release details of the NFTL filesystem, so we may have to come up with an alternative before the Disk-On-Chip is actually usable under Linux.

Update 25/7/99: The August issue of Linux Journal has just arrived, and incorrectly states that the driver developed by IGEL for the DiskOnChip 2000 is available under GPL from M-Systems' web site. I have responded to the Editor, Marjorie Richardson, about this, and I hope that a correction will be published in the next issue.

Update 1/8/99: Despite sending another reminder, I still have not heard from Linux Journal regarding their article on IGEL which mentions the Disk-On-Chip. This is surprising, considering the seriousness of their mistake. I hope that they contact me soon.

Update 2/8/99: I have heard again from M-Systems. They have provided me with the NFTL specification, and also the data sheet and programming specification for the Disk-On-Chip Millennium. I expect to be able to produce a GPL'd Linux driver for them very shortly. With this, every objection I have to using the Disk-On-Chip under Linux has gone. M-Systems have responded genuinely to our concerns, and have provided us with documentation which contains their hard-earned intellectual property. I can now wholeheartedly recommend their products for use under Linux. Now, I must get my head down and produce some code.

Update 10/8/99: A preliminary read-only driver for the DiskOnChip 2000 and NFTL has been incorporated into the latest release of the MTD code. In addition to complete documentation and a contact point for further questions, M-Systems have provided me with sample hardware for the DiskOnChip 2000 and DiskOnChip Millennium. These devices will soon be completely supported by Linux.

Update 17/8/99: I now have the ECC error detection working. It's taken longer than I expected, because there are subtle differences between the DiskOnChip 2000 (with which I'm testing) and the DiskOnChip Millennium (for which I have the specs). M-Systems are being extremely helpful and pointing out the places where I've gone wrong, however. Now this is working, I can get on with implementing the write support, first in the DiskOnChip hardware itself, and then in the NFTL layer.

Update 20/8/99: At last I have some form of write support for NFTL. It seems to work OK on the NFTL filesystems that I've formatted myself, but it gets confused on the NFTL filesystems which are produced by M-Systems' drivers. I need to correctly handle the cases where there are multiple Chains for the same Virtual Unit; which isn't covered in the spec, but it's not possible to replace a Chain without having the device in this state for a short period of time.

Update 1/11/99: I can now write to the NFTL repeatedly without confusing the M-Systems driver - I can bash on it for a long time, and it doesn't seem to leave it in a state where their driver no longer understands it. I'm not sure whether this is a good thing or not - I'm not aware that I did anything to fix it, and I don't like bugs that just mysteriously disappear. More testing and feedback is required - please.

Update 31/1/00: We can now boot Grub from a DiskOnChip - we can replace the DiskOnChip firmware with a version of Grub, which will be automatically started from the flash.
That's the good news. The not-so-good news is that we haven't yet got Grub itself to support the DiskOnChip, so it's fairly pointless for now - but it's a good start. Necessary, but not sufficient.

Update 28/11/0: People seem to be linking to this page so I suppose I'd best update it. I think the NFTL and DiskOnChip driver code is basically almost complete now. All that remains is some final cleanups and a large amount of testing. I'll see if I can get it into the 2.4 release.
In related news - Grub is also reported to be working completely with the DiskOnChip 2000, and someone's working on getting it to work with the Millennium.

$Id: doc2000.html,v 1.1.1.1 2003/11/25 22:15:12 jharrell Exp $