source: soft/giet_vm/libs/stdio.h @ 255

Last change on this file since 255 was 255, checked in by meunier, 11 years ago
  • Added a syscall and some user functions to manipulate the Simulation Helper
  • Changed the the way the Vseg -> Pseg mapping is made during the boot to better utilize the address space (+ adaptation of the algorithm in memo)
  • Fixed a bug in boot_init (vobj_init): the vobj initialization could only be made for the first application (ptpr was not changed)
File size: 3.2 KB
Line 
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 */
12unsigned int giet_procid();
13unsigned int giet_proctime();
14
15/* TTY device related functions */
16unsigned int giet_tty_putc(char byte);
17unsigned int giet_tty_puts(char* buf);
18unsigned int giet_tty_putw(unsigned int val);
19unsigned int giet_tty_getc_no_irq(char* byte);
20unsigned int giet_tty_getc(char* byte);
21unsigned int giet_tty_gets(char* buf, unsigned int bufsize);
22unsigned int giet_tty_getw(unsigned int* val);
23unsigned int giet_tty_printf(char* format,...);
24
25/* TIMER device related functions */
26unsigned int giet_timer_start();
27unsigned int giet_timer_stop();
28 
29/* GCD coprocessor related functions */
30unsigned int giet_gcd_set_opa(unsigned int val);
31unsigned int giet_gcd_set_opb(unsigned int val);
32unsigned int giet_gcd_start();
33unsigned int giet_gcd_get_result(unsigned int* val);
34unsigned int giet_gcd_get_status(unsigned int* val);
35
36/* Block device related functions */
37unsigned int giet_ioc_read(unsigned int lba, void* buffer, unsigned int count);
38unsigned int giet_ioc_write(unsigned int lba, void* buffer, unsigned int count);
39unsigned int giet_ioc_completed();
40unsigned int giet_ioc_block_size();
41
42/* Frame buffer device related functions */
43unsigned int giet_fb_sync_read(unsigned int offset, void* buffer, unsigned int length );
44unsigned int giet_fb_sync_write(unsigned int offset, void* buffer, unsigned int length);
45unsigned int giet_fb_dma_read(unsigned int offset, void* buffer, unsigned int length);
46unsigned int giet_fb_dma_write(unsigned int offset, void* buffer, unsigned int length);
47unsigned int giet_fb_dma_completed();
48unsigned int giet_fb_cma_init(void* buf0, void* buf1, unsigned int length);
49unsigned int giet_fb_cma_write(unsigned int buf_id);
50unsigned int giet_fb_cma_stop();
51
52/* Network controller related functions */
53unsigned int giet_nic_cma_rx_init(void* buf0, void* buf1, unsigned int length);
54unsigned int giet_nic_cma_tx_init(void* buf0, void* buf1, unsigned int length);
55unsigned int giet_nic_cma_stop();
56
57/* Simulation Helper related functions */
58unsigned int giet_sc_stop();
59unsigned int giet_end_simu(unsigned int retval);
60unsigned int giet_throw_soclib_exception(unsigned int val);
61unsigned int giet_pause_simu();
62unsigned int giet_raise_sigint();
63unsigned int giet_simhelper_cycles(unsigned int * retval);
64
65/* Misc */
66unsigned int giet_vobj_get_vbase(char* vspace_name, char* vobj_name, 
67                                 unsigned int vobj_type, unsigned int* vobj_vaddr);
68unsigned int giet_procnumber();
69void giet_exit();
70unsigned int giet_context_switch();
71unsigned int giet_proc_task_id();
72unsigned int giet_heap_info(unsigned int* vaddr, unsigned int* size);
73unsigned int giet_global_task_id();
74void giet_assert( unsigned int, char* string);
75unsigned 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
Note: See TracBrowser for help on using the repository browser.