Changes between Version 3 and Version 4 of bdv_driver


Ignore:
Timestamp:
Oct 7, 2014, 6:23:37 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • bdv_driver

    v3 v4  
    11= GIET-VM / BDV Driver =
    22
    3 The [source:soft/giet_vm/giet_drivers/bdv_driver.c bdv_driver.c] and [source:soft/giet_vm/giet_drivers/bdv_driver.h bdv_driver.h] files define the blockdevice driver. This component is a single channel, block oriented, external mass storage peripheral, available in the SoCLib components library.
     3The [source:soft/giet_vm/giet_drivers/bdv_driver.c bdv_driver.c] and [source:soft/giet_vm/giet_drivers/bdv_driver.h bdv_driver.h] files define the block_device driver. This component is a single channel, block oriented, external mass storage peripheral, available in the SoCLib components library.
    44
    55[[PageOutline]]
     
    2020
    2121The SEG_IOC_BASE address must be defined in the hard_config.h file.
     22
     23 === unsigned int '''_bdv_init'''() ===
     24This function cheks block size == 512, and desactivates the interrupts.
     25Return 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 ) ===
     28This 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.
     33Returns 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 ) ===
     36This 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.
     41Returns 0 if success, > 0 if error.
     42
     43 === unsigned int '''_bdv_get_status'''() ===
     44This 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'''() ===
     47This function returns the block size (bytes).
     48
     49 === void '''_bdv_isr'''( unsigned irq_type,  unsigned irq_id,  unsigned channel ) ===
     50This 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