source: soft/giet_vm/giet_drivers/bdv_driver.h @ 333

Last change on this file since 333 was 295, checked in by alain, 10 years ago

Introducing a major release, to suppoort the tsar_generic_leti platform
and the various (external or internal) peripherals configurations.
The map.xml format has been modified, in order to support the new
vci_iopic componentand a new policy for peripherals initialisation.
The IRQs are nom described in the XICU and IOPIC components
(and not anymore in the processors).
To enforce this major change, the map.xml file signature changed:
The signature value must be: 0xDACE2014

This new release has been tested on the tsar_generic_leti platform
for the following mappings:

  • 4c_4p_sort_leti
  • 4c_4p_sort_leti_ext
  • 4c_4p_transpose_leti
  • 4c_4p_transpose_leti_ext
  • 4c_1p_four_leti_ext
File size: 2.7 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File      : bdv_driver.h
3// Date      : 01/11/2013
4// Author    : alain greiner
5// Maintainer: cesar fuguet
6// Copyright (c) UPMC-LIP6
7///////////////////////////////////////////////////////////////////////////////////
8
9#ifndef _GIET_BDV_DRIVER_H_
10#define _GIET_BDV_DRIVER_H_
11
12///////////////////////////////////////////////////////////////////////////////////
13// BDV global variables
14///////////////////////////////////////////////////////////////////////////////////
15
16extern unsigned int          _bdv_lock;    // BDV is a shared ressource
17extern volatile unsigned int _bdv_status;  // required for IRQ signaling
18extern volatile unsigned int _bdv_gtid;    // descheduled task id = gpid<<16 + ltid
19
20///////////////////////////////////////////////////////////////////////////////////
21// BDV registers, operations and status values
22///////////////////////////////////////////////////////////////////////////////////
23
24enum BDV_registers
25{
26    BLOCK_DEVICE_BUFFER,
27    BLOCK_DEVICE_LBA,
28    BLOCK_DEVICE_COUNT,
29    BLOCK_DEVICE_OP,
30    BLOCK_DEVICE_STATUS,
31    BLOCK_DEVICE_IRQ_ENABLE,
32    BLOCK_DEVICE_SIZE,
33    BLOCK_DEVICE_BLOCK_SIZE,
34    BLOCK_DEVICE_BUFFER_EXT,
35};
36
37enum BDV_operations
38{
39    BLOCK_DEVICE_NOOP,
40    BLOCK_DEVICE_READ,
41    BLOCK_DEVICE_WRITE,
42};
43
44enum BDV_status
45{
46    BLOCK_DEVICE_IDLE,
47    BLOCK_DEVICE_BUSY,
48    BLOCK_DEVICE_READ_SUCCESS,
49    BLOCK_DEVICE_WRITE_SUCCESS,
50    BLOCK_DEVICE_READ_ERROR,
51    BLOCK_DEVICE_WRITE_ERROR,
52    BLOCK_DEVICE_ERROR,
53};
54
55///////////////////////////////////////////////////////////////////////////////////
56// BDV access functions (vci_block_device)
57///////////////////////////////////////////////////////////////////////////////////
58
59extern unsigned int _bdv_init();
60
61extern unsigned int _bdv_write( unsigned int       mode,
62                                unsigned int       lba, 
63                                unsigned long long buffer, 
64                                unsigned int       count );
65
66extern unsigned int _bdv_read(  unsigned int       mode,
67                                unsigned int       lba, 
68                                unsigned long long buffer,
69                                unsigned int       count );
70
71extern unsigned int _bdv_get_status();
72
73extern unsigned int _bdv_get_block_size();
74
75extern void _bdv_isr( unsigned irq_type,
76                      unsigned irq_id,
77                      unsigned channel );
78
79///////////////////////////////////////////////////////////////////////////////////
80
81#endif
82
83// Local Variables:
84// tab-width: 4
85// c-basic-offset: 4
86// c-file-offsets:((innamespace . 0)(inline-open . 0))
87// indent-tabs-mode: nil
88// End:
89// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
90
Note: See TracBrowser for help on using the repository browser.