xref: /netbsd/sys/arch/bebox/stand/boot/boot.h (revision 6550d01e)
1 /*	$NetBSD: boot.h,v 1.9 2010/10/14 06:12:54 kiyohara Exp $	*/
2 
3 #define	TICKS_PER_SEC	(33000000 / 4)		/* 33MHz */
4 #define	NS_PER_TICK	(1000000000 / TICKS_PER_SEC)
5 
6 /*
7  * srt0
8  */
9 int endaddr(void);
10 void run(void *, void *, void *, void *, void *);
11 
12 /*
13  * clock
14  */
15 void delay(u_int);
16 
17 /*
18  * com
19  */
20 int comspeed(long);
21 
22 /*
23  * console
24  */
25 char *cninit(int *, int *);
26 int cngetc(void);
27 void cnputc(int);
28 int cnscan(void);
29 
30 /*
31  * CPU
32  */
33 volatile int CPU1_alive;
34 void cpu1(void);
35 void resetCPU1(void);
36 unsigned long cpuState(void);
37 void runCPU1(void *);
38 void start_CPU1(void);
39 void wait_for(volatile int *);
40 int whichCPU(void);
41 
42 /*
43  * inkernel
44  */
45 void init_in(void);
46 
47 /*
48  * io
49  */
50 void outb(int, u_char);
51 void outw(int, u_short);
52 u_char inb(int);
53 u_short inw(int);
54 u_short inwrb(int);
55 void writeb(u_long, u_char);
56 void writel(u_long, u_long);
57 u_char readb(u_long);
58 u_short readw(u_long);
59 u_long readl(u_long);
60 u_long local_to_PCI(u_long);
61 void _wbinv(uint32_t, uint32_t);
62 void _inv(uint32_t, uint32_t);
63 
64 /*
65  * kbd
66  */
67 int kbd(int);
68 void kbdreset(void);
69 int kbd_getc(void);
70 int kbd_test(void);
71 
72 /*
73  * monitor
74  */
75 int db_monitor(void);
76 
77 /*
78  * pci
79  */
80 void scanPCI(void);
81 int findPCIVga(void);
82 void enablePCI(int, int, int, int);
83 int PCISlotnum(u_int, u_int, u_int);
84 int PCIVendor(int);
85 u_long PCIAddress(int, u_int, int);
86 #ifdef DEBUG
87 void printslots(void);
88 #endif
89 
90 /*
91  * tgets
92  */
93 int tgets(char *);
94 
95 /*
96  * vga
97  */
98 void vga_init(u_char *);
99 void vga_putc(int);
100 void vga_puts(char *);
101 
102 /*
103  * vreset
104  */
105 void vga_reset(u_char *);
106 
107 /*
108  * video
109  */
110 void video_init(u_char *);
111 void video_putc(int);
112