xref: /netbsd-src/sys/arch/landisk/stand/boot/boot.h (revision 1fd097bf157cce123eb2413f2d91732bb8e70bdc)
1 /*	$NetBSD: boot.h,v 1.1 2006/09/01 21:26:18 uwe Exp $	*/
2 
3 #ifndef	LANDISK_STAND_BOOT_H__
4 #define	LANDISK_STAND_BOOT_H__
5 
6 #ifndef	PCLOCK
7 #define	PCLOCK	33333333
8 #endif
9 
10 #ifndef	NELEMENTS
11 #define	NELEMENTS(a)	(sizeof(a) / sizeof(a[0]))
12 #endif
13 
14 #ifndef	roundup
15 #define	roundup(v,s)	((v + ((s) - 1)) & (~((s) - 1)))
16 #endif
17 
18 int parsebootfile(const char *fname, char **devname,
19     uint *unit, uint *partition, const char **file);
20 int bios2dev(int biosdev, char **devname, u_int *unit, u_int sector,
21     u_int *ptnp);
22 
23 void halt(void);
24 void reboot(void);
25 
26 int bioscons_getc(void);
27 void bioscons_putc(int c);
28 
29 int biosdisk_read(int dev, uint32_t blkaddr, void *buf, size_t nblks);
30 
31 void cache_enable(void);
32 void cache_disable(void);
33 void cache_flush(void);
34 
35 int tick_init(void);
36 void tick_stop(void);
37 uint32_t gettick(void);
38 void delay(int ms);
39 
40 int db_monitor(void);
41 
42 void puthex(int val, int size);
43 
44 #endif	/* LANDISK_STAND_BOOT_H__ */
45