1 | ////////////////////////////////////////////////////////////////////////////////// |
---|
2 | // File : stdio.h |
---|
3 | // Date : 01/04/2010 |
---|
4 | // Author : alain greiner & Joel Porquet |
---|
5 | // Copyright (c) UPMC-LIP6 |
---|
6 | /////////////////////////////////////////////////////////////////////////////////// |
---|
7 | |
---|
8 | #ifndef _STDIO_H |
---|
9 | #define _STDIO_H |
---|
10 | |
---|
11 | /* MIPS32 related functions */ |
---|
12 | unsigned int giet_procid(); |
---|
13 | unsigned int giet_proctime(); |
---|
14 | |
---|
15 | /* TTY device related functions */ |
---|
16 | unsigned int giet_tty_putc(char byte); |
---|
17 | unsigned int giet_tty_puts(char* buf); |
---|
18 | unsigned int giet_tty_putw(unsigned int val); |
---|
19 | unsigned int giet_tty_getc_no_irq(char* byte); |
---|
20 | unsigned int giet_tty_getc(char* byte); |
---|
21 | unsigned int giet_tty_gets(char* buf, unsigned int bufsize); |
---|
22 | unsigned int giet_tty_getw(unsigned int* val); |
---|
23 | unsigned int giet_tty_printf(char* format,...); |
---|
24 | |
---|
25 | /* TIMER device related functions */ |
---|
26 | unsigned int giet_timer_start(); |
---|
27 | unsigned int giet_timer_stop(); |
---|
28 | |
---|
29 | /* GCD coprocessor related functions */ |
---|
30 | unsigned int giet_gcd_set_opa(unsigned int val); |
---|
31 | unsigned int giet_gcd_set_opb(unsigned int val); |
---|
32 | unsigned int giet_gcd_start(); |
---|
33 | unsigned int giet_gcd_get_result(unsigned int* val); |
---|
34 | unsigned int giet_gcd_get_status(unsigned int* val); |
---|
35 | |
---|
36 | /* Block device related functions */ |
---|
37 | unsigned int giet_ioc_read(unsigned int lba, void* buffer, unsigned int count); |
---|
38 | unsigned int giet_ioc_write(unsigned int lba, void* buffer, unsigned int count); |
---|
39 | unsigned int giet_ioc_completed(); |
---|
40 | unsigned int giet_ioc_block_size(); |
---|
41 | |
---|
42 | /* Frame buffer device related functions */ |
---|
43 | unsigned int giet_fb_sync_read(unsigned int offset, void* buffer, unsigned int length ); |
---|
44 | unsigned int giet_fb_sync_write(unsigned int offset, void* buffer, unsigned int length); |
---|
45 | unsigned int giet_fb_dma_read(unsigned int offset, void* buffer, unsigned int length); |
---|
46 | unsigned int giet_fb_dma_write(unsigned int offset, void* buffer, unsigned int length); |
---|
47 | unsigned int giet_fb_dma_completed(); |
---|
48 | unsigned int giet_fb_cma_init(void* buf0, void* buf1, unsigned int length); |
---|
49 | unsigned int giet_fb_cma_write(unsigned int buf_id); |
---|
50 | unsigned int giet_fb_cma_stop(); |
---|
51 | |
---|
52 | /* Network controller related functions */ |
---|
53 | unsigned int giet_nic_cma_rx_init(void* buf0, void* buf1, unsigned int length); |
---|
54 | unsigned int giet_nic_cma_tx_init(void* buf0, void* buf1, unsigned int length); |
---|
55 | unsigned int giet_nic_cma_stop(); |
---|
56 | |
---|
57 | /* Simulation Helper related functions */ |
---|
58 | unsigned int giet_sc_stop(); |
---|
59 | unsigned int giet_end_simu(unsigned int retval); |
---|
60 | unsigned int giet_throw_soclib_exception(unsigned int val); |
---|
61 | unsigned int giet_pause_simu(); |
---|
62 | unsigned int giet_raise_sigint(); |
---|
63 | unsigned int giet_simhelper_cycles(unsigned int * retval); |
---|
64 | |
---|
65 | /* Misc */ |
---|
66 | unsigned int giet_vobj_get_vbase(char* vspace_name, char* vobj_name, |
---|
67 | unsigned int vobj_type, unsigned int* vobj_vaddr); |
---|
68 | unsigned int giet_procnumber(); |
---|
69 | void giet_exit(); |
---|
70 | unsigned int giet_context_switch(); |
---|
71 | unsigned int giet_proc_task_id(); |
---|
72 | unsigned int giet_heap_info(unsigned int* vaddr, unsigned int* size); |
---|
73 | unsigned int giet_global_task_id(); |
---|
74 | void giet_assert( unsigned int, char* string); |
---|
75 | unsigned int giet_rand(); |
---|
76 | |
---|
77 | #endif |
---|
78 | |
---|
79 | // Local Variables: |
---|
80 | // tab-width: 4 |
---|
81 | // c-basic-offset: 4 |
---|
82 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
83 | // indent-tabs-mode: nil |
---|
84 | // End: |
---|
85 | // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
86 | |
---|