Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1780
Line 37... Line 37...
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
39
 
39
 
40
#define MAX_OFW_ARGS    10
40
#define MAX_OFW_ARGS    10
41
 
41
 
42
typedef __native ofw_arg_t;
42
typedef unative_t ofw_arg_t;
43
typedef int ihandle;
43
typedef int ihandle;
44
typedef int phandle;
44
typedef int phandle;
45
 
45
 
46
/** OpenFirmware command structure
46
/** OpenFirmware command structure
47
 *
47
 *
48
 */
48
 */
49
typedef struct {
49
typedef struct {
50
    const char *service;          /**< Command name */
50
    const char *service;          /**< Command name */
51
    __native nargs;               /**< Number of in arguments */
51
    unative_t nargs;               /**< Number of in arguments */
52
    __native nret;                /**< Number of out arguments */
52
    unative_t nret;                /**< Number of out arguments */
53
    ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
53
    ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
54
} ofw_args_t;
54
} ofw_args_t;
55
 
55
 
56
typedef void (*ofw_entry)(ofw_args_t *);
56
typedef void (*ofw_entry)(ofw_args_t *);
57
 
57
 
58
extern ofw_entry ofw;
58
extern ofw_entry ofw;
59
 
59
 
60
extern void ofw_init(void);
60
extern void ofw_init(void);
61
extern void ofw_done(void);
61
extern void ofw_done(void);
62
extern __native ofw_call(const char *service, const int nargs, const int nret, ...);
62
extern unative_t ofw_call(const char *service, const int nargs, const int nret, ...);
63
extern void ofw_putchar(const char ch);
63
extern void ofw_putchar(const char ch);
64
extern char ofw_getchar(void);
64
extern char ofw_getchar(void);
65
extern phandle ofw_find_device(const char *name);
65
extern phandle ofw_find_device(const char *name);
66
extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen);
66
extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen);
67
extern void *ofw_claim(const void *addr, const int size, const int align);
67
extern void *ofw_claim(const void *addr, const int size, const int align);