| 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 | #include <mapping_info.h> |
|---|
| 12 | #include <common.h> |
|---|
| 13 | |
|---|
| 14 | /* MIPS32 related functions */ |
|---|
| 15 | unsigned int giet_procid(); |
|---|
| 16 | unsigned int giet_proctime(); |
|---|
| 17 | |
|---|
| 18 | /* TTY device related functions */ |
|---|
| 19 | unsigned int giet_tty_putc(char byte); |
|---|
| 20 | unsigned int giet_tty_puts(char *buf); |
|---|
| 21 | unsigned int giet_tty_putw(unsigned int val); |
|---|
| 22 | unsigned int giet_tty_getc_no_irq(char *byte); |
|---|
| 23 | unsigned int giet_tty_getc(char *byte); |
|---|
| 24 | unsigned int giet_tty_gets(char *buf, unsigned int bufsize); |
|---|
| 25 | unsigned int giet_tty_getw(unsigned int *val); |
|---|
| 26 | unsigned int giet_tty_printf(char *format,...); |
|---|
| 27 | |
|---|
| 28 | /* GCD coprocessor related functions */ |
|---|
| 29 | unsigned int giet_gcd_set_opa(unsigned int val); |
|---|
| 30 | unsigned int giet_gcd_set_opb(unsigned int val); |
|---|
| 31 | unsigned int giet_gcd_start(); |
|---|
| 32 | unsigned int giet_gcd_get_result(unsigned int *val); |
|---|
| 33 | unsigned int giet_gcd_get_status(unsigned int *val); |
|---|
| 34 | |
|---|
| 35 | /* Block device related functions */ |
|---|
| 36 | unsigned int giet_ioc_read( unsigned int lba, |
|---|
| 37 | void* buffer, |
|---|
| 38 | unsigned int count); |
|---|
| 39 | unsigned int giet_ioc_write(unsigned int lba, |
|---|
| 40 | void* buffer, |
|---|
| 41 | unsigned int count); |
|---|
| 42 | unsigned int giet_ioc_completed(); |
|---|
| 43 | |
|---|
| 44 | /* Frame buffer device related functions */ |
|---|
| 45 | unsigned int giet_fb_sync_read( unsigned int offset, |
|---|
| 46 | void* buffer, |
|---|
| 47 | unsigned int length ); |
|---|
| 48 | unsigned int giet_fb_sync_write(unsigned int offset, |
|---|
| 49 | void* buffer, |
|---|
| 50 | unsigned int length ); |
|---|
| 51 | unsigned int giet_fb_read( unsigned int offset, |
|---|
| 52 | void* buffer, |
|---|
| 53 | unsigned int length ); |
|---|
| 54 | unsigned int giet_fb_write( unsigned int offset, |
|---|
| 55 | void* buffer, |
|---|
| 56 | unsigned int length ); |
|---|
| 57 | unsigned int giet_fb_completed(); |
|---|
| 58 | |
|---|
| 59 | /* Misc */ |
|---|
| 60 | unsigned int giet_vobj_get_vbase( char* vspace_name, |
|---|
| 61 | char* vobj_name, |
|---|
| 62 | unsigned int vobj_type, |
|---|
| 63 | unsigned int* vobj_vaddr ); |
|---|
| 64 | void giet_exit(); |
|---|
| 65 | unsigned int giet_rand(); |
|---|
| 66 | unsigned int ctx_switch(); |
|---|
| 67 | unsigned int giet_procnumber(); |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | #endif |
|---|