File: loaderlib.h

package info (click to toggle)
vmelilo 1.1.1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 360 kB
  • ctags: 761
  • sloc: ansic: 7,361; makefile: 98
file content (72 lines) | stat: -rw-r--r-- 2,464 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 *	VME Linux/m68k Loader
 *
 *	(c) Copyright 1997 by Nick Holgate
 *
 *	This file is subject to the terms and conditions of the GNU General Public
 *	License.  See the file COPYING for more details.
 */

/*--------------------------------------------------------------------------*/

#ifndef SEEK_SET
#define	SEEK_SET	0				/* Seek from beginning of file.			*/
#define	SEEK_CUR	1				/* Seek from current position.			*/
#define	SEEK_END	2				/* Seek from end of file.				*/
#endif

#ifndef NULL
#define	NULL		((void *)0)
#endif

/*--------------------------------------------------------------------------*/
/* Prototypes for utility functions
 */

void loader_init (unsigned long arg);
void mem_clear (void *mem,unsigned long count);
void mem_move (void *dest,const void *srce,unsigned long count);
int mem_cmp (void *mem1,void *mem2,unsigned long count);
void Printf (const char *fmt,...);
void put_str (const char *str);
void put_char (const int c);
int get_char (unsigned long timeout);
unsigned long get_time(void);
void panic (const char *fmt,...);
int file_size (const char *path);
int file_open (const char *path);
int file_seek (int where,int whence);
long file_tell (void);
int file_read (char *buf,int count);
void file_close (void);
unsigned long get_compat_booti_version (void);
unsigned long get_booti_version (void);
unsigned long get_compat_machtype (void);
unsigned long get_machtype (void);
int can_do_symbols(void);
void clear_symbols (void);
int add_symbol (char *data);
void * get_startcode_entry (void);
void print_model (int cpu, int hasfpu);

void mem_alloc_init (void *heap_base,unsigned long heap_size);
void * mem_alloc (unsigned long size);
unsigned long mem_maxalloc(void);
int mem_resize(void *memaddr, unsigned long newsize);
int mem_free (void *memaddr);
int str_len (const char *s);
void str_cpy (char *d,const char *s);
void str_cat (char *d,const char *s);
void str_ncat (char *d,const char *s,unsigned long n);
void str_ncpy (char *d,const char *s,unsigned long n);
int prefix_string (const char *s,const char *p);
int equal_strings (const char *s1,const char *s2);
int case_equal_strings (const char *s1,const char *s2);
unsigned long enable_icache (void);
unsigned long disable_icache (void);
void invalidate_icache (void);
void percent_init (unsigned long total);
void percent_term (const char *msg);
void percent_show (unsigned long current);

/*-----------------------------< end of file >------------------------------*/