Subversion Repositories HelenOS-historic

Rev

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

Rev 1764 Rev 1771
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __OFW_H__
29
#ifndef __OFW_H__
30
#define __OFW_H__
30
#define __OFW_H__
31
 
31
 
32
#define NULL 0
-
 
33
#define MEMMAP_MAX_RECORDS 32
-
 
34
#define false 0
32
#include <types.h>
35
#define true 1
33
#include <stdarg.h>
36
 
34
 
37
typedef __builtin_va_list va_list;
35
#define BUF_SIZE        1024
38
 
36
 
39
#define va_start(ap, last)      __builtin_va_start(ap, last)
-
 
40
#define va_arg(ap, type)        __builtin_va_arg(ap, type)
-
 
41
#define va_end(ap)          __builtin_va_end(ap)
37
#define MEMMAP_MAX_RECORDS  32
42
 
38
 
43
typedef struct {
39
typedef struct {
44
    void *start;
40
    void *start;
45
    unsigned int size;
41
    unsigned int size;
46
} memzone_t;
42
} memzone_t;
Line 62... Line 58...
62
typedef struct {
58
typedef struct {
63
    void *addr;
59
    void *addr;
64
    unsigned int size;
60
    unsigned int size;
65
} keyboard_t;
61
} keyboard_t;
66
 
62
 
-
 
63
typedef struct {
-
 
64
    unsigned int info;
-
 
65
    unsigned int addr_hi;
-
 
66
    unsigned int addr_lo;
-
 
67
} pci_addr_t;
-
 
68
 
-
 
69
typedef struct {
-
 
70
    pci_addr_t addr;
-
 
71
    unsigned int size_hi;
-
 
72
    unsigned int size_lo;
-
 
73
} pci_reg_t;
-
 
74
 
-
 
75
typedef unsigned long ofw_arg_t;
-
 
76
typedef unsigned int ihandle;
-
 
77
typedef unsigned int phandle;
-
 
78
 
-
 
79
extern phandle ofw_aliases;
67
 
80
 
68
extern void init(void);
81
extern void init(void);
69
extern void ofw_write(const char *str, const int len);
82
extern void ofw_write(const char *str, const int len);
70
 
83
 
-
 
84
extern int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen);
-
 
85
extern phandle ofw_find_device(const char *name);
-
 
86
 
71
extern void *ofw_translate(const void *virt);
87
extern void *ofw_translate(const void *virt);
72
extern int ofw_map(const void *phys, const void *virt, const int size, const int mode);
88
extern int ofw_map(const void *phys, const void *virt, const int size, const int mode);
73
extern int ofw_memmap(memmap_t *map);
89
extern int ofw_memmap(memmap_t *map);
74
extern int ofw_screen(screen_t *screen);
90
extern int ofw_screen(screen_t *screen);
75
extern int ofw_keyboard(keyboard_t *keyboard);
91
extern int ofw_keyboard(keyboard_t *keyboard);