librtas_src/syscall.h File Reference

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  rtas_args
struct  region

Defines

#define __NR_rtas   255
#define MAX_ARGS   16
#define BITS32_LO(_num)   (uint32_t) (_num & 0xffffffffll)
#define BITS32_HI(_num)   (uint32_t) (_num >> 32)
#define BITS64(_high, _low)   (uint64_t) (((uint64_t) _high << 32) | _low)

Typedefs

typedef uint32_t rtas_arg_t

Functions

int sc_get_rmo_buffer (size_t size, void **buf, uint32_t *phys_addr)
int sc_free_rmo_buffer (void *buf, uint32_t phys_addr, size_t size)
int sc_interface_exists ()


Detailed Description

Copyright (C) 2005 IBM Corporation Common Public License Version 1.0 (see COPYRIGHT)

Author:
John Rose <johnrose@us.ibm.com>

Define Documentation

#define __NR_rtas   255

#define BITS32_HI ( _num   )     (uint32_t) (_num >> 32)

#define BITS32_LO ( _num   )     (uint32_t) (_num & 0xffffffffll)

#define BITS64 ( _high,
_low   )     (uint64_t) (((uint64_t) _high << 32) | _low)

#define MAX_ARGS   16


Typedef Documentation

typedef uint32_t rtas_arg_t


Function Documentation

int sc_free_rmo_buffer ( void *  buf,
uint32_t  phys_addr,
size_t  size 
)

sc_free_rmo_buffer

Parameters:
buf virtual address of mmap()'ed buffer
phys_addr physical address of low mem buffer
size size of buffer
Returns:
0 on success, !0 otherwise RTAS_FREE_ERR - Free called before get RTAS_IO_ASSERT - Unexpected I/O Error

int sc_get_rmo_buffer ( size_t  size,
void **  buf,
uint32_t *  phys_addr 
)

sc_get_rmo_buffer

Parameters:
size Size of requested region. Must be a multiple of 4096.
buf Assigned to mmap'ed buffer of acquired region
phys_addr Assigned to physical address of acquired region
Returns:
0 on success, !0 otherwise RTAS_NO_MEM - Out of heap memory RTAS_NO_LOWMEM - Out of rmo memory RTAS_IO_ASSERT - Unexpected I/O Error

int sc_interface_exists (  ) 

sc_interface_exists

Returns:
0 on success, !0 otherwise


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