Changes between Initial Version and Version 1 of hba_driver


Ignore:
Timestamp:
Oct 9, 2014, 3:11:14 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • hba_driver

    v1 v1  
     1= GIET-VM / HBA Driver =
     2
     3[[PageOutline]]
     4
     5The [source:soft/giet_vm/giet_drivers/hba_driver.c hba_driver.c] and [source:soft/giet_vm/giet_drivers/hba_driver.h hba_driver.h] files define the HBA driver.
     6
     7The ''vci_multi_ahci'' component is a multi-channels, block oriented, external mass storage controller respecting the AHCI standard.
     8
     9It is one of the physical disk driver that can be called by the generic IOC driver, and the SEG_IOC_BASE address must be defined in the hard_config.h file.
     10
     11The addressable registers map is defined [source:soft/giet_vm/giet_drivers/hba_driver.h here].
     12
     13 === unsigned int '''_hba_init'' ( unsigned int channel ) ===
     14This function initializes for a given channel
     15 *  the HBA hardware registers,
     16 *  the command list pointer,
     17 *  the command lists physical addresse,
     18 *  the command tables physical addresses array,
     19
     20 === unsigned int '''_hba_write'''( unsigned int channel,   unsigned int mode,  unsigned int lba,  unsigned long long paddr,  unsigned int count ) ===   
     21This function register a write command in Command List and Command Table for a single physical buffer, and updates the HBA_PXCI register.
     22 * channel : channel index
     23 * mode :   BOOT / KERNEL / USER
     24 * lba :  logic bloc address on device
     25 * paddr : memory buffer physical base address
     26 * count : number of blocs
     27Returns 0 if success, > 0 if error.
     28
     29 === unsigned int '''_hba_read'''( unsigned int channel,   unsigned int mode,  unsigned int lba,  unsigned long long paddr,  unsigned int count ) ===   
     30This function register a read command in Command List and Command Table for a single physical buffer, and updates the HBA_PXCI register.
     31 * channel : channel index
     32 * mode :   BOOT / KERNEL / USER
     33 * lba :  logic bloc address on device
     34 * paddr : memory buffer physical base address
     35 * count : number of blocs
     36Returns 0 if success, > 0 if error.
     37
     38 === unsigned int '''_hba_get_block_size''' () ===
     39This function returns the block_size of HBA controller
     40
     41 === unsigned int '''_hba_get_status'''( unsigned int   channel ) ===
     42This function returns the content of the HBA_PXIS register for a given channel,  and reset this register to acknoledge IRQ.
     43Return 0 if success, > 0 if error
     44