diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
commit | 2b235826098bb653982894dfc3f70fd029f6c2e4 (patch) | |
tree | ec525ddba74f58017a3f145bb68cf94376648c1c /include/asm-sparc64/oplib.h | |
parent | b4b52db71529bbe46da914eda772fb574914c94d (diff) | |
parent | c77054e518d9163578cfcad09826d7b959f95ece (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-sparc64/oplib.h')
-rw-r--r-- | include/asm-sparc64/oplib.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index a432d9e7daaa..d02f1e8ae1a6 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
@@ -38,6 +38,20 @@ extern int prom_stdin, prom_stdout; | |||
38 | */ | 38 | */ |
39 | extern int prom_chosen_node; | 39 | extern int prom_chosen_node; |
40 | 40 | ||
41 | /* Helper values and strings in arch/sparc64/kernel/head.S */ | ||
42 | extern const char prom_finddev_name[]; | ||
43 | extern const char prom_chosen_path[]; | ||
44 | extern const char prom_getprop_name[]; | ||
45 | extern const char prom_mmu_name[]; | ||
46 | extern const char prom_callmethod_name[]; | ||
47 | extern const char prom_translate_name[]; | ||
48 | extern const char prom_map_name[]; | ||
49 | extern const char prom_unmap_name[]; | ||
50 | extern int prom_mmu_ihandle_cache; | ||
51 | extern unsigned int prom_boot_mapped_pc; | ||
52 | extern unsigned int prom_boot_mapping_mode; | ||
53 | extern unsigned long prom_boot_mapping_phys_high, prom_boot_mapping_phys_low; | ||
54 | |||
41 | struct linux_mlist_p1275 { | 55 | struct linux_mlist_p1275 { |
42 | struct linux_mlist_p1275 *theres_more; | 56 | struct linux_mlist_p1275 *theres_more; |
43 | unsigned long start_adr; | 57 | unsigned long start_adr; |
@@ -68,7 +82,7 @@ extern char *prom_getbootargs(void); | |||
68 | * of the string is different on V0 vs. V2->higher proms. The caller must | 82 | * of the string is different on V0 vs. V2->higher proms. The caller must |
69 | * know what he/she is doing! Returns the device descriptor, an int. | 83 | * know what he/she is doing! Returns the device descriptor, an int. |
70 | */ | 84 | */ |
71 | extern int prom_devopen(char *device_string); | 85 | extern int prom_devopen(const char *device_string); |
72 | 86 | ||
73 | /* Close a previously opened device described by the passed integer | 87 | /* Close a previously opened device described by the passed integer |
74 | * descriptor. | 88 | * descriptor. |
@@ -81,27 +95,13 @@ extern int prom_devclose(int device_handle); | |||
81 | extern void prom_seek(int device_handle, unsigned int seek_hival, | 95 | extern void prom_seek(int device_handle, unsigned int seek_hival, |
82 | unsigned int seek_lowval); | 96 | unsigned int seek_lowval); |
83 | 97 | ||
84 | /* Machine memory configuration routine. */ | ||
85 | |||
86 | /* This function returns a V0 format memory descriptor table, it has three | ||
87 | * entries. One for the total amount of physical ram on the machine, one | ||
88 | * for the amount of physical ram available, and one describing the virtual | ||
89 | * areas which are allocated by the prom. So, in a sense the physical | ||
90 | * available is a calculation of the total physical minus the physical mapped | ||
91 | * by the prom with virtual mappings. | ||
92 | * | ||
93 | * These lists are returned pre-sorted, this should make your life easier | ||
94 | * since the prom itself is way too lazy to do such nice things. | ||
95 | */ | ||
96 | extern struct linux_mem_p1275 *prom_meminfo(void); | ||
97 | |||
98 | /* Miscellaneous routines, don't really fit in any category per se. */ | 98 | /* Miscellaneous routines, don't really fit in any category per se. */ |
99 | 99 | ||
100 | /* Reboot the machine with the command line passed. */ | 100 | /* Reboot the machine with the command line passed. */ |
101 | extern void prom_reboot(char *boot_command); | 101 | extern void prom_reboot(const char *boot_command); |
102 | 102 | ||
103 | /* Evaluate the forth string passed. */ | 103 | /* Evaluate the forth string passed. */ |
104 | extern void prom_feval(char *forth_string); | 104 | extern void prom_feval(const char *forth_string); |
105 | 105 | ||
106 | /* Enter the prom, with possibility of continuation with the 'go' | 106 | /* Enter the prom, with possibility of continuation with the 'go' |
107 | * command in newer proms. | 107 | * command in newer proms. |
@@ -154,7 +154,7 @@ extern char prom_getchar(void); | |||
154 | extern void prom_putchar(char character); | 154 | extern void prom_putchar(char character); |
155 | 155 | ||
156 | /* Prom's internal routines, don't use in kernel/boot code. */ | 156 | /* Prom's internal routines, don't use in kernel/boot code. */ |
157 | extern void prom_printf(char *fmt, ...); | 157 | extern void prom_printf(const char *fmt, ...); |
158 | extern void prom_write(const char *buf, unsigned int len); | 158 | extern void prom_write(const char *buf, unsigned int len); |
159 | 159 | ||
160 | /* Query for input device type */ | 160 | /* Query for input device type */ |
@@ -215,7 +215,7 @@ extern int prom_getunumber(int syndrome_code, | |||
215 | char *buf, int buflen); | 215 | char *buf, int buflen); |
216 | 216 | ||
217 | /* Retain physical memory to the caller across soft resets. */ | 217 | /* Retain physical memory to the caller across soft resets. */ |
218 | extern unsigned long prom_retain(char *name, | 218 | extern unsigned long prom_retain(const char *name, |
219 | unsigned long pa_low, unsigned long pa_high, | 219 | unsigned long pa_low, unsigned long pa_high, |
220 | long size, long align); | 220 | long size, long align); |
221 | 221 | ||
@@ -269,28 +269,28 @@ extern int prom_getsibling(int node); | |||
269 | /* Get the length, at the passed node, of the given property type. | 269 | /* Get the length, at the passed node, of the given property type. |
270 | * Returns -1 on error (ie. no such property at this node). | 270 | * Returns -1 on error (ie. no such property at this node). |
271 | */ | 271 | */ |
272 | extern int prom_getproplen(int thisnode, char *property); | 272 | extern int prom_getproplen(int thisnode, const char *property); |
273 | 273 | ||
274 | /* Fetch the requested property using the given buffer. Returns | 274 | /* Fetch the requested property using the given buffer. Returns |
275 | * the number of bytes the prom put into your buffer or -1 on error. | 275 | * the number of bytes the prom put into your buffer or -1 on error. |
276 | */ | 276 | */ |
277 | extern int prom_getproperty(int thisnode, char *property, | 277 | extern int prom_getproperty(int thisnode, const char *property, |
278 | char *prop_buffer, int propbuf_size); | 278 | char *prop_buffer, int propbuf_size); |
279 | 279 | ||
280 | /* Acquire an integer property. */ | 280 | /* Acquire an integer property. */ |
281 | extern int prom_getint(int node, char *property); | 281 | extern int prom_getint(int node, const char *property); |
282 | 282 | ||
283 | /* Acquire an integer property, with a default value. */ | 283 | /* Acquire an integer property, with a default value. */ |
284 | extern int prom_getintdefault(int node, char *property, int defval); | 284 | extern int prom_getintdefault(int node, const char *property, int defval); |
285 | 285 | ||
286 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ | 286 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ |
287 | extern int prom_getbool(int node, char *prop); | 287 | extern int prom_getbool(int node, const char *prop); |
288 | 288 | ||
289 | /* Acquire a string property, null string on error. */ | 289 | /* Acquire a string property, null string on error. */ |
290 | extern void prom_getstring(int node, char *prop, char *buf, int bufsize); | 290 | extern void prom_getstring(int node, const char *prop, char *buf, int bufsize); |
291 | 291 | ||
292 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | 292 | /* Does the passed node have the given "name"? YES=1 NO=0 */ |
293 | extern int prom_nodematch(int thisnode, char *name); | 293 | extern int prom_nodematch(int thisnode, const char *name); |
294 | 294 | ||
295 | /* Puts in buffer a prom name in the form name@x,y or name (x for which_io | 295 | /* Puts in buffer a prom name in the form name@x,y or name (x for which_io |
296 | * and y for first regs phys address | 296 | * and y for first regs phys address |
@@ -300,7 +300,7 @@ extern int prom_getname(int node, char *buf, int buflen); | |||
300 | /* Search all siblings starting at the passed node for "name" matching | 300 | /* Search all siblings starting at the passed node for "name" matching |
301 | * the given string. Returns the node on success, zero on failure. | 301 | * the given string. Returns the node on success, zero on failure. |
302 | */ | 302 | */ |
303 | extern int prom_searchsiblings(int node_start, char *name); | 303 | extern int prom_searchsiblings(int node_start, const char *name); |
304 | 304 | ||
305 | /* Return the first property type, as a string, for the given node. | 305 | /* Return the first property type, as a string, for the given node. |
306 | * Returns a null string on error. Buffer should be at least 32B long. | 306 | * Returns a null string on error. Buffer should be at least 32B long. |
@@ -310,21 +310,21 @@ extern char *prom_firstprop(int node, char *buffer); | |||
310 | /* Returns the next property after the passed property for the given | 310 | /* Returns the next property after the passed property for the given |
311 | * node. Returns null string on failure. Buffer should be at least 32B long. | 311 | * node. Returns null string on failure. Buffer should be at least 32B long. |
312 | */ | 312 | */ |
313 | extern char *prom_nextprop(int node, char *prev_property, char *buffer); | 313 | extern char *prom_nextprop(int node, const char *prev_property, char *buffer); |
314 | 314 | ||
315 | /* Returns 1 if the specified node has given property. */ | 315 | /* Returns 1 if the specified node has given property. */ |
316 | extern int prom_node_has_property(int node, char *property); | 316 | extern int prom_node_has_property(int node, const char *property); |
317 | 317 | ||
318 | /* Returns phandle of the path specified */ | 318 | /* Returns phandle of the path specified */ |
319 | extern int prom_finddevice(char *name); | 319 | extern int prom_finddevice(const char *name); |
320 | 320 | ||
321 | /* Set the indicated property at the given node with the passed value. | 321 | /* Set the indicated property at the given node with the passed value. |
322 | * Returns the number of bytes of your value that the prom took. | 322 | * Returns the number of bytes of your value that the prom took. |
323 | */ | 323 | */ |
324 | extern int prom_setprop(int node, char *prop_name, char *prop_value, | 324 | extern int prom_setprop(int node, const char *prop_name, char *prop_value, |
325 | int value_size); | 325 | int value_size); |
326 | 326 | ||
327 | extern int prom_pathtoinode(char *path); | 327 | extern int prom_pathtoinode(const char *path); |
328 | extern int prom_inst2pkg(int); | 328 | extern int prom_inst2pkg(int); |
329 | 329 | ||
330 | /* CPU probing helpers. */ | 330 | /* CPU probing helpers. */ |
@@ -334,7 +334,7 @@ int cpu_find_by_mid(int mid, int *prom_node); | |||
334 | /* Client interface level routines. */ | 334 | /* Client interface level routines. */ |
335 | extern void prom_set_trap_table(unsigned long tba); | 335 | extern void prom_set_trap_table(unsigned long tba); |
336 | 336 | ||
337 | extern long p1275_cmd (char *, long, ...); | 337 | extern long p1275_cmd(const char *, long, ...); |
338 | 338 | ||
339 | 339 | ||
340 | #if 0 | 340 | #if 0 |