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

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

Introducing a new release where all initialisation
is done in the boot code.

File size: 4.7 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
[189]17unsigned int _timer_access( unsigned int        read,           // reas if non 0
18                            unsigned int        cluster_id,
19                            unsigned int        local_id, 
20                            unsigned int        register_id, 
21                            unsigned int*       buffer);
[158]22
[189]23unsigned int _timer_read(   unsigned int        register_id, 
24                            unsigned int*       buffer);
25
26unsigned int _timer_write(  unsigned int        register_id, 
27                            unsigned int        value);
28
29///////////////////////////////////////////////////////////////////////////////////
30// TTY access functions and variables
31///////////////////////////////////////////////////////////////////////////////////
32
[158]33extern volatile unsigned char _tty_get_buf[];
34extern volatile unsigned char _tty_get_full[];
[165]35extern unsigned int           _tty_put_lock;
[158]36
[189]37unsigned int _tty_write(    const char*         buffer, 
38                            unsigned int        length);
[158]39
[189]40unsigned int _tty_read(     char*                       buffer, 
41                            unsigned int        length);
[158]42
[189]43unsigned int _tty_read_irq( char*                       buffer, 
44                            unsigned int        length);
[158]45
[189]46///////////////////////////////////////////////////////////////////////////////////
47// ICU access functions (both vci_multi_icu and vci_xicu)
48///////////////////////////////////////////////////////////////////////////////////
[165]49
50unsigned int _icu_read(     unsigned int        cluster_id,
51                            unsigned int        proc_id, 
52                            unsigned int        register_id, 
53                            unsigned int*       buffer);
54
[189]55unsigned int _icu_write(        unsigned int    cluster_id,
56                                                        unsigned int    proc_id,
57                                                        unsigned int    register_id, 
58                                                        unsigned int    value );
[165]59
[189]60///////////////////////////////////////////////////////////////////////////////////
61// IOC access functions and variables (vci_block_device)
62///////////////////////////////////////////////////////////////////////////////////
[165]63
[189]64extern volatile unsigned int    _ioc_status;
65extern volatile unsigned int    _ioc_done;
66extern unsigned int                             _ioc_lock;
67extern unsigned int                             _ioc_iommu_ix1;
68extern unsigned int                             _ioc_iommu_npages; 
[165]69
[189]70
[165]71unsigned int _ioc_write(    unsigned int        lba, 
72                            const void*         buffer, 
73                            unsigned int        count);
74
75unsigned int _ioc_read(     unsigned int        lba, 
76                            void*                       buffer, 
77                            unsigned int        count);
78
[158]79unsigned int _ioc_completed();
80
[189]81///////////////////////////////////////////////////////////////////////////////////
82// Multi DMA variables                  (vci_multi_dma)
83///////////////////////////////////////////////////////////////////////////////////
84 
85extern volatile unsigned int    _dma_status[];
86extern volatile unsigned int    _dma_done[];
87extern unsigned int                             _dma_lock[];
88extern unsigned int                             _dma_iommu_ix1;
89extern unsigned int                             _dma_iommu_npages[];
[158]90
[189]91///////////////////////////////////////////////////////////////////////////////////
92// Frame Buffer access functions  (vci_frame_buffer)
93///////////////////////////////////////////////////////////////////////////////////
94 
[165]95unsigned int _fb_sync_write(unsigned int        offset, 
96                            const void*         buffer, 
97                            unsigned int        length);
98
99unsigned int _fb_sync_read( unsigned int        offset, 
100                            const void*         buffer, 
101                            unsigned int        length);
102
103unsigned int _fb_write(     unsigned int        offset, 
104                            const void*         buffer, 
105                            unsigned int        length);
106
107unsigned int _fb_read(      unsigned int        offset, 
108                            const void*         buffer, 
109                            unsigned int        length);
110
[158]111unsigned int _fb_completed();
112
[189]113///////////////////////////////////////////////////////////////////////////////////
114// GCD access functions
115///////////////////////////////////////////////////////////////////////////////////
116
117unsigned int _gcd_write(    unsigned int        register_index, 
118                            unsigned int        value);
119
120unsigned int _gcd_read(     unsigned int        register_index, 
121                            unsigned int*       buffer);
122
123
[158]124#endif
125
Note: See TracBrowser for help on using the repository browser.