[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); |
---|
| 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,...); |
---|
[158] | 24 | |
---|
| 25 | /* GCD coprocessor related functions */ |
---|
[165] | 26 | unsigned int giet_gcd_set_opa(unsigned int val); |
---|
| 27 | unsigned int giet_gcd_set_opb(unsigned int val); |
---|
| 28 | unsigned int giet_gcd_start(); |
---|
| 29 | unsigned int giet_gcd_get_result(unsigned int *val); |
---|
| 30 | unsigned int giet_gcd_get_status(unsigned int *val); |
---|
[158] | 31 | |
---|
| 32 | /* Block device related functions */ |
---|
[165] | 33 | unsigned int giet_ioc_read( unsigned int lba, |
---|
| 34 | void* buffer, |
---|
| 35 | unsigned int count); |
---|
| 36 | unsigned int giet_ioc_write(unsigned int lba, |
---|
| 37 | void* buffer, |
---|
| 38 | unsigned int count); |
---|
| 39 | unsigned int giet_ioc_completed(); |
---|
[158] | 40 | |
---|
| 41 | /* Frame buffer device related functions */ |
---|
[165] | 42 | unsigned int giet_fb_sync_read( unsigned int offset, |
---|
| 43 | void* buffer, |
---|
| 44 | unsigned int length ); |
---|
| 45 | unsigned int giet_fb_sync_write(unsigned int offset, |
---|
| 46 | void* buffer, |
---|
| 47 | unsigned int length ); |
---|
| 48 | unsigned int giet_fb_read( unsigned int offset, |
---|
| 49 | void* buffer, |
---|
| 50 | unsigned int length ); |
---|
| 51 | unsigned int giet_fb_write( unsigned int offset, |
---|
| 52 | void* buffer, |
---|
| 53 | unsigned int length ); |
---|
[218] | 54 | unsigned int giet_nic_write( unsigned int offset, |
---|
| 55 | void* buffer, |
---|
| 56 | unsigned int length ); |
---|
| 57 | unsigned int giet_nic_read( unsigned int offset, |
---|
| 58 | void* buffer, |
---|
| 59 | unsigned int length ); |
---|
[165] | 60 | unsigned int giet_fb_completed(); |
---|
[218] | 61 | unsigned int giet_nic_completed(); |
---|
[158] | 62 | |
---|
| 63 | /* Misc */ |
---|
[165] | 64 | unsigned int giet_vobj_get_vbase( char* vspace_name, |
---|
| 65 | char* vobj_name, |
---|
| 66 | unsigned int vobj_type, |
---|
| 67 | unsigned int* vobj_vaddr ); |
---|
| 68 | void giet_exit(); |
---|
| 69 | unsigned int giet_rand(); |
---|
[189] | 70 | unsigned int giet_ctx_switch(); |
---|
[165] | 71 | unsigned int giet_procnumber(); |
---|
[158] | 72 | |
---|
[189] | 73 | #endif |
---|
[158] | 74 | |
---|