| 22 | |
| 23 | === unsigned int '''_bdv_init'''() === |
| 24 | This function cheks block size == 512, and desactivates the interrupts. |
| 25 | Return 0 for success, > 0 if error |
| 26 | |
| 27 | === unsigned int '''_bdv_read'''( unsigned int mode, unsigned int lba, unsigned long long buffer, unsigned int count ) === |
| 28 | This function transfer data from the block device to a memory buffer. |
| 29 | * mode : BOOT / KERNEL / USER |
| 30 | * lba : first block index on the block device |
| 31 | * buffer : physical base address of the memory buffer (word aligned) |
| 32 | * count : number of blocks to be transfered. |
| 33 | Returns 0 if success, > 0 if error. |
| 34 | |
| 35 | === unsigned int '''_bdv_write'''( unsigned int mode, unsigned int lba, unsigned long long buffer, unsigned int count ) === |
| 36 | This function transfer data from a memory buffer to the block device. |
| 37 | * mode : BOOT / KERNEL / USER |
| 38 | * lba : first block index on the block device |
| 39 | * buffer : physical base address of the memory buffer (word aligned) |
| 40 | * count : number of blocks to be transfered. |
| 41 | Returns 0 if success, > 0 if error. |
| 42 | |
| 43 | === unsigned int '''_bdv_get_status'''() === |
| 44 | This function returns device status. Status values are defined in the [source:soft/giet_vm/giet_drivers/bdv_driver.h bdv_driver.h] file. |
| 45 | |
| 46 | === unsigned int '''_bdv_get_block_size'''() === |
| 47 | This function returns the block size (bytes). |
| 48 | |
| 49 | === void '''_bdv_isr'''( unsigned irq_type, unsigned irq_id, unsigned channel ) === |
| 50 | This Interrupt Service Routine save the status, acknowledge the IRQ, and activates the task waiting on IO transfer. It can be an HWI or a SWI. |
| 51 | |
| 52 | |
| 53 | |