This source file includes following definitions.
- prom_reboot
- prom_feval
- prom_halt
- prom_die
- prom_setsync
- prom_getidp
- prom_version
- prom_getrev
- prom_getprev
1
2
3
4
5
6
7
8 #include <asm/openprom.h>
9 #include <asm/oplib.h>
10
11
12 void
13 prom_reboot(char *bcommand)
14 {
15 (*(romvec->pv_reboot))(bcommand);
16
17 return;
18 }
19
20
21 void
22 prom_feval(char *fstring)
23 {
24 if(!fstring || fstring[0] == 0) return;
25 if(prom_vers == PROM_V0)
26 (*(romvec->pv_fortheval.v0_eval))(strlen(fstring), fstring);
27 else
28 (*(romvec->pv_fortheval.v2_eval))(fstring);
29 return;
30 }
31
32
33
34
35 void
36 prom_halt(void)
37 {
38 (*(romvec->pv_abort))();
39 return;
40 }
41
42
43
44
45 void
46 prom_die(void)
47 {
48 (*(romvec->pv_halt))();
49
50 return;
51 }
52
53 typedef void (*sfunc_t)(void);
54
55
56 void
57 prom_setsync(sfunc_t funcp)
58 {
59 if(!funcp) return;
60 *romvec->pv_synchook = funcp;
61 return;
62 }
63
64
65
66
67
68 unsigned char
69 prom_getidp(char *idbuf, int num_bytes)
70 {
71 int len;
72
73 len = prom_getproplen(prom_root_node, "idprom");
74 if((len>num_bytes) || (len==-1)) return 0xff;
75 if(!prom_getproperty(prom_root_node, "idprom", idbuf, num_bytes))
76 return idbuf[0];
77
78 return 0xff;
79 }
80
81
82 int
83 prom_version(void)
84 {
85 return romvec->pv_romvers;
86 }
87
88
89 int
90 prom_getrev(void)
91 {
92 return prom_rev;
93 }
94
95
96 int
97 prom_getprev(void)
98 {
99 return prom_prev;
100 }