Go to the documentation of this file.
12 #ifndef _ASM_SGIARCS_H
13 #define _ASM_SGIARCS_H
15 #include <asm/types.h>
19 #define PROM_ESUCCESS 0x00
20 #define PROM_E2BIG 0x01
21 #define PROM_EACCESS 0x02
22 #define PROM_EAGAIN 0x03
23 #define PROM_EBADF 0x04
24 #define PROM_EBUSY 0x05
25 #define PROM_EFAULT 0x06
26 #define PROM_EINVAL 0x07
28 #define PROM_EISDIR 0x09
29 #define PROM_EMFILE 0x0a
30 #define PROM_EMLINK 0x0b
31 #define PROM_ENAMETOOLONG 0x0c
32 #define PROM_ENODEV 0x0d
33 #define PROM_ENOENT 0x0e
34 #define PROM_ENOEXEC 0x0f
35 #define PROM_ENOMEM 0x10
36 #define PROM_ENOSPC 0x11
37 #define PROM_ENOTDIR 0x12
38 #define PROM_ENOTTY 0x13
39 #define PROM_ENXIO 0x14
40 #define PROM_EROFS 0x15
42 #define PROM_EADDRNOTAVAIL 0x1f
43 #define PROM_ETIMEDOUT 0x20
44 #define PROM_ECONNABORTED 0x21
45 #define PROM_ENOCONNECT 0x22
247 #define PROMBLOCK_MAGIC 0x53435241
270 #define PROMBLOCK ((PSYSTEM_PARAMETER_BLOCK) (int)0xA0001000)
271 #define ROMVECTOR ((struct linux_romvec *) (long)(PROMBLOCK)->romvec)
297 #define SGIPROM_STDIN 0
298 #define SGIPROM_STDOUT 1
301 #define SGIPROM_ROFILE 0x01
302 #define SGIPROM_HFILE 0x02
303 #define SGIPROM_SFILE 0x04
304 #define SGIPROM_AFILE 0x08
305 #define SGIPROM_DFILE 0x10
306 #define SGIPROM_DELFILE 0x20
311 #define SGIPART_UNUSED 0x00
312 #define SGIPART_ACTIVE 0x80
321 #define SGIBBLOCK_MAGIC 0xaa55
322 #define SGIBBLOCK_MAXPART 0x0004
352 #define SMB_DEBUG_MAGIC 0xfeeddead
369 #if defined(CONFIG_64BIT) && defined(CONFIG_ARC32)
371 #define __arc_clobbers \
372 "$2", "$3" , "$8", "$9", "$10", "$11", \
373 "$12", "$13", "$14", "$15", "$16", "$24", "$25", "$31"
375 #define ARC_CALL0(dest) \
377 long __vec = (long) romvec->dest; \
378 __asm__ __volatile__( \
379 "dsubu\t$29, 32\n\t" \
381 "daddu\t$29, 32\n\t" \
383 : "=r" (__res), "=r" (__vec) \
385 : __arc_clobbers, "$4", "$5", "$6", "$7"); \
386 (unsigned long) __res; \
389 #define ARC_CALL1(dest, a1) \
391 register signed int __a1 __asm__("$4") = (int) (long) (a1); \
392 long __vec = (long) romvec->dest; \
393 __asm__ __volatile__( \
394 "dsubu\t$29, 32\n\t" \
396 "daddu\t$29, 32\n\t" \
398 : "=r" (__res), "=r" (__vec) \
399 : "1" (__vec), "r" (__a1) \
400 : __arc_clobbers, "$5", "$6", "$7"); \
401 (unsigned long) __res; \
404 #define ARC_CALL2(dest, a1, a2) \
406 register signed int __a1 __asm__("$4") = (int) (long) (a1); \
407 register signed int __a2 __asm__("$5") = (int) (long) (a2); \
408 long __vec = (long) romvec->dest; \
409 __asm__ __volatile__( \
410 "dsubu\t$29, 32\n\t" \
412 "daddu\t$29, 32\n\t" \
414 : "=r" (__res), "=r" (__vec) \
415 : "1" (__vec), "r" (__a1), "r" (__a2) \
416 : __arc_clobbers, "$6", "$7"); \
420 #define ARC_CALL3(dest, a1, a2, a3) \
422 register signed int __a1 __asm__("$4") = (int) (long) (a1); \
423 register signed int __a2 __asm__("$5") = (int) (long) (a2); \
424 register signed int __a3 __asm__("$6") = (int) (long) (a3); \
425 long __vec = (long) romvec->dest; \
426 __asm__ __volatile__( \
427 "dsubu\t$29, 32\n\t" \
429 "daddu\t$29, 32\n\t" \
431 : "=r" (__res), "=r" (__vec) \
432 : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3) \
433 : __arc_clobbers, "$7"); \
437 #define ARC_CALL4(dest, a1, a2, a3, a4) \
439 register signed int __a1 __asm__("$4") = (int) (long) (a1); \
440 register signed int __a2 __asm__("$5") = (int) (long) (a2); \
441 register signed int __a3 __asm__("$6") = (int) (long) (a3); \
442 register signed int __a4 __asm__("$7") = (int) (long) (a4); \
443 long __vec = (long) romvec->dest; \
444 __asm__ __volatile__( \
445 "dsubu\t$29, 32\n\t" \
447 "daddu\t$29, 32\n\t" \
449 : "=r" (__res), "=r" (__vec) \
450 : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), \
456 #define ARC_CALL5(dest, a1, a2, a3, a4, a5) \
458 register signed int __a1 __asm__("$4") = (int) (long) (a1); \
459 register signed int __a2 __asm__("$5") = (int) (long) (a2); \
460 register signed int __a3 __asm__("$6") = (int) (long) (a3); \
461 register signed int __a4 __asm__("$7") = (int) (long) (a4); \
462 register signed int __a5 = (int) (long) (a5); \
463 long __vec = (long) romvec->dest; \
464 __asm__ __volatile__( \
465 "dsubu\t$29, 32\n\t" \
466 "sw\t%7, 16($29)\n\t" \
468 "daddu\t$29, 32\n\t" \
470 : "=r" (__res), "=r" (__vec) \
472 "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4), \
480 #if (defined(CONFIG_32BIT) && defined(CONFIG_ARC32)) || \
481 (defined(CONFIG_64BIT) && defined(CONFIG_ARC64))
483 #define ARC_CALL0(dest) \
485 long (*__vec)(void) = (void *) romvec->dest; \
491 #define ARC_CALL1(dest, a1) \
493 long __a1 = (long) (a1); \
494 long (*__vec)(long) = (void *) romvec->dest; \
496 __res = __vec(__a1); \
500 #define ARC_CALL2(dest, a1, a2) \
502 long __a1 = (long) (a1); \
503 long __a2 = (long) (a2); \
504 long (*__vec)(long, long) = (void *) romvec->dest; \
506 __res = __vec(__a1, __a2); \
510 #define ARC_CALL3(dest, a1, a2, a3) \
512 long __a1 = (long) (a1); \
513 long __a2 = (long) (a2); \
514 long __a3 = (long) (a3); \
515 long (*__vec)(long, long, long) = (void *) romvec->dest; \
517 __res = __vec(__a1, __a2, __a3); \
521 #define ARC_CALL4(dest, a1, a2, a3, a4) \
523 long __a1 = (long) (a1); \
524 long __a2 = (long) (a2); \
525 long __a3 = (long) (a3); \
526 long __a4 = (long) (a4); \
527 long (*__vec)(long, long, long, long) = (void *) romvec->dest; \
529 __res = __vec(__a1, __a2, __a3, __a4); \
533 #define ARC_CALL5(dest, a1, a2, a3, a4, a5) \
535 long __a1 = (long) (a1); \
536 long __a2 = (long) (a2); \
537 long __a3 = (long) (a3); \
538 long __a4 = (long) (a4); \
539 long __a5 = (long) (a5); \
540 long (*__vec)(long, long, long, long, long); \
541 __vec = (void *) romvec->dest; \
543 __res = __vec(__a1, __a2, __a3, __a4, __a5); \