source: soft/giet_vm/sys/drivers.h @ 203

Last change on this file since 203 was 203, checked in by alain, 12 years ago

Introducing support for XICU

File size: 4.5 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : drivers.h
3// Date     : 01/04/2012
4// Author   : alain greiner and joel porquet
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_SYS_DRIVERS_H_
9#define _GIET_SYS_DRIVERS_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12// Timer access functions (used for both vci_multi_timer and vci_xicu)
13///////////////////////////////////////////////////////////////////////////////////
14
15extern volatile unsigned char _timer_event[];
16
17unsigned int _timer_start( unsigned int cluster_id,
18                           unsigned int local_id, 
19                           unsigned int period );
20
21unsigned int _timer_stop(  unsigned int cluster_id, 
22                           unsigned int local_id );
23
24
25unsigned int _timer_reset_irq( unsigned int     cluster_id, 
26                               unsigned int local_id );
27
28///////////////////////////////////////////////////////////////////////////////////
29// TTY access functions and variables
30///////////////////////////////////////////////////////////////////////////////////
31
32extern volatile unsigned char _tty_get_buf[];
33extern volatile unsigned char _tty_get_full[];
34extern unsigned int           _tty_put_lock;
35
36unsigned int _tty_write(    const char*         buffer, 
37                            unsigned int        length);
38
39unsigned int _tty_read(     char*                       buffer, 
40                            unsigned int        length);
41
42unsigned int _tty_read_irq( char*                       buffer, 
43                            unsigned int        length);
44
45///////////////////////////////////////////////////////////////////////////////////
46// ICU access functions (both vci_multi_icu and vci_xicu)
47///////////////////////////////////////////////////////////////////////////////////
48
49unsigned int _icu_get_index(unsigned int        cluster_id,
50                            unsigned int        proc_id, 
51                            unsigned int*       buffer );
52
53unsigned int _icu_set_mask( unsigned int        cluster_id,
54                                                        unsigned int    proc_id,
55                                                        unsigned int    mask, 
56                                                        unsigned int    is_timer );
57
58///////////////////////////////////////////////////////////////////////////////////
59// IOC access functions and variables (vci_block_device)
60///////////////////////////////////////////////////////////////////////////////////
61
62extern volatile unsigned int    _ioc_status;
63extern volatile unsigned int    _ioc_done;
64extern unsigned int                             _ioc_lock;
65extern unsigned int                             _ioc_iommu_ix1;
66extern unsigned int                             _ioc_iommu_npages; 
67
68
69unsigned int _ioc_write(    unsigned int        lba, 
70                            const void*         buffer, 
71                            unsigned int        count);
72
73unsigned int _ioc_read(     unsigned int        lba, 
74                            void*                       buffer, 
75                            unsigned int        count);
76
77unsigned int _ioc_completed();
78
79///////////////////////////////////////////////////////////////////////////////////
80// Multi DMA variables                  (vci_multi_dma)
81///////////////////////////////////////////////////////////////////////////////////
82 
83extern volatile unsigned int    _dma_status[];
84extern volatile unsigned int    _dma_done[];
85extern unsigned int                             _dma_lock[];
86extern unsigned int                             _dma_iommu_ix1;
87extern unsigned int                             _dma_iommu_npages[];
88
89///////////////////////////////////////////////////////////////////////////////////
90// Frame Buffer access functions  (vci_frame_buffer)
91///////////////////////////////////////////////////////////////////////////////////
92 
93unsigned int _fb_sync_write(unsigned int        offset, 
94                            const void*         buffer, 
95                            unsigned int        length);
96
97unsigned int _fb_sync_read( unsigned int        offset, 
98                            const void*         buffer, 
99                            unsigned int        length);
100
101unsigned int _fb_write(     unsigned int        offset, 
102                            const void*         buffer, 
103                            unsigned int        length);
104
105unsigned int _fb_read(      unsigned int        offset, 
106                            const void*         buffer, 
107                            unsigned int        length);
108
109unsigned int _fb_completed();
110
111///////////////////////////////////////////////////////////////////////////////////
112// GCD access functions
113///////////////////////////////////////////////////////////////////////////////////
114
115unsigned int _gcd_write(    unsigned int        register_index, 
116                            unsigned int        value);
117
118unsigned int _gcd_read(     unsigned int        register_index, 
119                            unsigned int*       buffer);
120
121
122#endif
123
Note: See TracBrowser for help on using the repository browser.