source: soft/giet_vm/giet_drivers/rdk_driver.h @ 729

Last change on this file since 729 was 529, checked in by alain, 10 years ago

1) Removing the IOC driver (integrated in the FAT library).
2) Simplifying the BDV, HBA, SDC, RDK drivers: they support
only two modes (synchronous => polling / descheduling => IRQ),
and only one access function (for both read/write).

File size: 2.0 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2// File      : rdk_driver.h
3// Date      : 13/02/2014
4// Author    : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////
7// The rdk_driver.c and rdk_driver.h files are part ot the GIET-VM kernel.
8//
9// This driver supports a virtual disk implemented as a memory segment,
10// in the physical address space.
11//
12// The _rdk_access() function use a software memcpy to implement both the read
13// and write accesses, whatever the selected IRQ mode. It returns only when
14// the transfer is completed. The memory buffer address is a virtual address.
15//
16// As the number of concurrent accesses is not bounded, it does not use any lock.
17//
18// The SEG_RDK_BASE virtual address must be defined in the hard_config.h
19// file when the USE_RAMDISK flag is set.
20///////////////////////////////////////////////////////////////////////////////
21
22#ifndef _GIET_RDK_DRIVERS_H_
23#define _GIET_RDK_DRIVERS_H_
24
25///////////////////////////////////////////////////////////////////////////////
26// Transfer data between a memory buffer and the RAMDISK.
27// - use_irq   : not used: accees is always synchronous.
28// - to_mem    : to memory buffer when non zero
29// - lba       : first block index on the block device
30// - buf_vaddr : virtual base address of the memory buffer
31// - count     : number of blocks to be transfered.
32// Returns 0 if success, > 0 if error.
33///////////////////////////////////////////////////////////////////////////////
34extern unsigned int _rdk_access( unsigned int use_irq,
35                                 unsigned int to_mem,
36                                 unsigned int lba, 
37                                 unsigned long long buf_vaddr,
38                                 unsigned int count );
39
40#endif
41
42// Local Variables:
43// tab-width: 4
44// c-basic-offset: 4
45// c-file-offsets:((innamespace . 0)(inline-open . 0))
46// indent-tabs-mode: nil
47// End:
48// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
49
Note: See TracBrowser for help on using the repository browser.