I have implemented some minimal cd-write commands on Minix3. Everything
works perfectly until using a buffer size > 16K. When I try to write 32K
of data at once, Minix crashes: weird screen output and a total system
hang.
I've spent some time debugging the problem and found that "rep 016 outs"
in klib386.s/phys_outsw() triggers the crash. I played a bit with
phys_outsw, and found that the problem occurs when a outb() or outw() is
called more than 8240 times in a row.
This was all under Minix 3.1.5. I tried installing Minix 3.1.6, but I
couldn't boot from the 3.1.6 disc. Probably because of
http://groups.google.com/group/minix3/browse_thread/thread/4d4573824ba65c3c/6d27cc61efa9ca3b?lnk=raot
(using a Dell Optiplex 740). I've tried reproducing under Qemu, but it
seems that a virtual machine is not sufficient enough for testing (I
can't select the write mode-page using the MMC MODE SELECT command).
I am now wondering if anyone could reproduce the crash, so that I can't
blame my hardware.
For reproducing, you'll need to update /usr/src/drivers/at_wini.c. I've
uploaded a "should-crash" version at
- http://www.cs.vu.nl/~vvdveen/at_wini.c.crash.5 (3.1.5 version)
- http://www.cs.vu.nl/~vvdveen/at_wini.c.crash.6 (3.1.6 version)
(...a diff would have been better...)
After renaming at_wini.c.crash.X to /usr/src/drivers/at_wini/at_wini.c,
running make install in /usr/tools/make and rebooting, one could test
the bug with a simple
- eject <dev/cdrom> (eject /dev/c0d6 in my case).
Make sure you use a CD-RW, so that you don't need to throw away
corrupted CD-Rs ;)
Looking forward for some results and hoping that some of you have some
spare time to give this a try :) If someone thinks it is possible to
test my at_wini.c in a virtual environment, please let me know.
I will post more information here later about a working implementation.
If one thinks an iso-burning program is useful for Minix3, I may extend
my project a bit and write one :)
Best wishes,
Victor van der Veen