When I get my floppy driver up and working, perhaps it could be given a syscall function. But when a PL3 task wants to get data from the drive, where should it be stored? Should the task send a segm:offs pair, or should it just give the offset relative to the task's DS?
I would not like to read the floppy into my scheduler.
Adrian
PS Memory management makes me sick
floppy driver
RE:floppy driver
You should make a call gate: it will change code level it the one you need like PL1, when it returns it changes the code level back.
Anton
Anton
RE:floppy driver
Your driver should get the address for where the user wants to store the data from the system call
eg
read(buffer,size,file handle);
the floppy controller uses DMA to transfer data via channel 2. But the DMA chip can only handle address in the 0 - 16MB range! so there are two options
1. the driver reads the sectors/file into a buffer and then copies the relevent info to the user buffer supplied
2. Alllocates tasks fixed buffer for file i/o in the 16mb memory area
option 1 seems more efficient! of course there are others but these are the only ones i can think of right now.
eg
read(buffer,size,file handle);
the floppy controller uses DMA to transfer data via channel 2. But the DMA chip can only handle address in the 0 - 16MB range! so there are two options
1. the driver reads the sectors/file into a buffer and then copies the relevent info to the user buffer supplied
2. Alllocates tasks fixed buffer for file i/o in the 16mb memory area
option 1 seems more efficient! of course there are others but these are the only ones i can think of right now.