DeviceFS Block Devices?
Chris Johns (8262) 242 posts |
Hello There is a bit in the DeviceFS flags to say it is a block device, but I can’t find much more out about that and how it works. I also can’t see a way to get data to/from DeviceFS other than calling a SWI to do it one byte at a time, which seems somewhat inefficient for large amounts of data… Thanks Chris |
Rick Murray (539) 13840 posts |
For older machines, PRM2 says: DeviceFS currently only supports character devices; block devices have yet to be implemented. For RiscPC and later, it looks like you need to register a buffer with DeviceFS, and then there is a service routine that can be used to put bytes or blocks into buffers, or retrieve them from buffers “without the overheads of calling SWIs”. See PRM 5a-218/219. If the device can support blocks, shouldn’t just calling OS_GBPB on an opened handle suffice? Or are you using the DeviceFS_CallDevice method? |
Colin (478) 2433 posts |
The BlockDevice flag just generates an error when registering with DeviceFS. |
Chris Johns (8262) 242 posts |
Thanks for the replies. I was getting block and buffered devices mixed up, so I have made some progress now. |