Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1764 → Rev 1771

/boot/trunk/genarch/ofw.h
29,16 → 29,12
#ifndef __OFW_H__
#define __OFW_H__
 
#define NULL 0
#define MEMMAP_MAX_RECORDS 32
#define false 0
#define true 1
#include <types.h>
#include <stdarg.h>
 
typedef __builtin_va_list va_list;
#define BUF_SIZE 1024
 
#define va_start(ap, last) __builtin_va_start(ap, last)
#define va_arg(ap, type) __builtin_va_arg(ap, type)
#define va_end(ap) __builtin_va_end(ap)
#define MEMMAP_MAX_RECORDS 32
 
typedef struct {
void *start;
64,10 → 60,30
unsigned int size;
} keyboard_t;
 
typedef struct {
unsigned int info;
unsigned int addr_hi;
unsigned int addr_lo;
} pci_addr_t;
 
typedef struct {
pci_addr_t addr;
unsigned int size_hi;
unsigned int size_lo;
} pci_reg_t;
 
typedef unsigned long ofw_arg_t;
typedef unsigned int ihandle;
typedef unsigned int phandle;
 
extern phandle ofw_aliases;
 
extern void init(void);
extern void ofw_write(const char *str, const int len);
 
extern int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen);
extern phandle ofw_find_device(const char *name);
 
extern void *ofw_translate(const void *virt);
extern int ofw_map(const void *phys, const void *virt, const int size, const int mode);
extern int ofw_memmap(memmap_t *map);