[158] | 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 */ |
---|
[165] | 12 | unsigned int giet_procid(); |
---|
| 13 | unsigned int giet_proctime(); |
---|
[158] | 14 | |
---|
| 15 | /* TTY device related functions */ |
---|
[165] | 16 | unsigned int giet_tty_putc(char byte); |
---|
[253] | 17 | unsigned int giet_tty_puts(char* buf); |
---|
[165] | 18 | unsigned int giet_tty_putw(unsigned int val); |
---|
[253] | 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,...); |
---|
[158] | 24 | |
---|
[253] | 25 | /* TIMER device related functions */ |
---|
| 26 | unsigned int giet_timer_start(); |
---|
| 27 | unsigned int giet_timer_stop(); |
---|
| 28 | |
---|
[158] | 29 | /* GCD coprocessor related functions */ |
---|
[165] | 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(); |
---|
[253] | 33 | unsigned int giet_gcd_get_result(unsigned int* val); |
---|
| 34 | unsigned int giet_gcd_get_status(unsigned int* val); |
---|
[158] | 35 | |
---|
| 36 | /* Block device related functions */ |
---|
[253] | 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); |
---|
[165] | 39 | unsigned int giet_ioc_completed(); |
---|
[237] | 40 | unsigned int giet_ioc_block_size(); |
---|
[158] | 41 | |
---|
| 42 | /* Frame buffer device related functions */ |
---|
[253] | 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(); |
---|
[158] | 51 | |
---|
[255] | 52 | /* Network controller related functions */ |
---|
[253] | 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 | |
---|
[255] | 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 | |
---|
[158] | 65 | /* Misc */ |
---|
[253] | 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(); |
---|
[228] | 69 | void giet_exit(); |
---|
| 70 | unsigned int giet_context_switch(); |
---|
[232] | 71 | unsigned int giet_proc_task_id(); |
---|
[253] | 72 | unsigned int giet_heap_info(unsigned int* vaddr, unsigned int* size); |
---|
[232] | 73 | unsigned int giet_global_task_id(); |
---|
[253] | 74 | void giet_assert( unsigned int, char* string); |
---|
| 75 | unsigned int giet_rand(); |
---|
[232] | 76 | |
---|
[189] | 77 | #endif |
---|
[158] | 78 | |
---|
[228] | 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 | |
---|