librtas_src/syscall.h

Go to the documentation of this file.
00001 
00010 #ifndef _SYSCALL_H_
00011 #define _SYSCALL_H_
00012 
00013 #include <stdint.h>
00014 
00015 /* Syscall number */
00016 #ifndef __NR_rtas
00017 #define __NR_rtas 255
00018 #endif
00019 
00020 #define MAX_ARGS 16
00021 
00022 typedef uint32_t rtas_arg_t;
00023 
00024 /* Based on include/asm-ppc64/rtas.h */
00025 struct rtas_args {
00026         uint32_t token;
00027         uint32_t ninputs;
00028         uint32_t nret; 
00029         rtas_arg_t args[MAX_ARGS];
00030         rtas_arg_t *rets;     /* Pointer to return values in args[]. */
00031 };  
00032 
00033 struct region {
00034         uint64_t addr;
00035         uint32_t size;
00036         struct region *next;
00037 };
00038 
00039 extern int sc_get_rmo_buffer(size_t size, void **buf, uint32_t *phys_addr);
00040 extern int sc_free_rmo_buffer(void *buf, uint32_t phys_addr, size_t size);
00041 extern int sc_interface_exists();
00042 
00043 #define BITS32_LO(_num) (uint32_t) (_num & 0xffffffffll)
00044 #define BITS32_HI(_num) (uint32_t) (_num >> 32) 
00045 #define BITS64(_high, _low) (uint64_t) (((uint64_t) _high << 32) | _low)
00046 
00047 #endif

Generated on Sat Sep 22 08:52:51 2007 for librtas by  doxygen 1.5.3