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
RevLine 
[158]1///////////////////////////////////////////////////////////////////////////////////
2// File     : drivers.h
3// Date     : 01/04/2012
4// Author   : alain greiner and joel porquet
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
[165]8#ifndef _GIET_SYS_DRIVERS_H_
9#define _GIET_SYS_DRIVERS_H_
[158]10
11///////////////////////////////////////////////////////////////////////////////////
[189]12// Timer access functions (used for both vci_multi_timer and vci_xicu)
[158]13///////////////////////////////////////////////////////////////////////////////////
14
[189]15extern volatile unsigned char _timer_event[];
[158]16
[203]17unsigned int _timer_start( unsigned int cluster_id,
18                           unsigned int local_id, 
19                           unsigned int period );
[158]20
[203]21unsigned int _timer_stop(  unsigned int cluster_id, 
22                           unsigned int local_id );
[189]23
24
[203]25unsigned int _timer_reset_irq( unsigned int     cluster_id, 
26                               unsigned int local_id );
27
[189]28///////////////////////////////////////////////////////////////////////////////////
29// TTY access functions and variables
30///////////////////////////////////////////////////////////////////////////////////
31
[158]32extern volatile unsigned char _tty_get_buf[];
33extern volatile unsigned char _tty_get_full[];
[165]34extern unsigned int           _tty_put_lock;
[158]35
[189]36unsigned int _tty_write(    const char*         buffer, 
37                            unsigned int        length);
[158]38
[189]39unsigned int _tty_read(     char*                       buffer, 
40                            unsigned int        length);
[158]41
[189]42unsigned int _tty_read_irq( char*                       buffer, 
43                            unsigned int        length);
[158]44
[189]45///////////////////////////////////////////////////////////////////////////////////
46// ICU access functions (both vci_multi_icu and vci_xicu)
47///////////////////////////////////////////////////////////////////////////////////
[165]48
[203]49unsigned int _icu_get_index(unsigned int        cluster_id,
[165]50                            unsigned int        proc_id, 
[203]51                            unsigned int*       buffer );
[165]52
[203]53unsigned int _icu_set_mask( unsigned int        cluster_id,
[189]54                                                        unsigned int    proc_id,
[203]55                                                        unsigned int    mask, 
56                                                        unsigned int    is_timer );
[165]57
[189]58///////////////////////////////////////////////////////////////////////////////////
59// IOC access functions and variables (vci_block_device)
60///////////////////////////////////////////////////////////////////////////////////
[165]61
[189]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; 
[165]67
[189]68
[165]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
[158]77unsigned int _ioc_completed();
78
[189]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[];
[158]88
[189]89///////////////////////////////////////////////////////////////////////////////////
90// Frame Buffer access functions  (vci_frame_buffer)
91///////////////////////////////////////////////////////////////////////////////////
92 
[165]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
[158]109unsigned int _fb_completed();
110
[189]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
[158]122#endif
123
Note: See TracBrowser for help on using the repository browser.