1/* 2 * file vos.h 3 * 4 * layer to map operating system dependent system calls 5 */ 6 7#ifndef __VOS_H__ 8#define __VOS_H__ 9 10 11/* Define IODEBUG if you need to debug out/in functions. <DI> */ 12/* IODEBUG define is used in compiler.h. DON'T MOVE DOWN! */ 13 14/* #define IODEBUG */ 15 16/* 17 * includes 18 */ 19 20#include "compiler.h" 21#include "vtypes.h" 22 23/* 24 * function prototypes 25 */ 26#define /*void*/ verite_out8(/*unsigned long*/ port, /*vu8*/ data) \ 27 outb(port, data) 28 29#define /*void*/ verite_out16(/*unsigned long*/ port, /*vu16*/ data) \ 30 outw(port, data) 31 32#define /*void*/ verite_out32(/*unsigned long*/ port, /*vu32*/ data) \ 33 outl(port, data) 34 35#define /*vu8*/ verite_in8(/*unsigned long*/ io_base) ((vu8)inb(io_base)) 36#define /*vu16*/ verite_in16(/*unsigned long*/ io_base) ((vu16)inw(io_base)) 37#define /*vu32*/ verite_in32(/*unsigned long*/ io_base) ((vu32)inl(io_base)) 38 39/* memory accesses */ 40#define verite_read_memory32(base, offset) MMIO_IN32(base, offset) 41#define verite_read_memory16(base, offset) MMIO_IN16(base, offset) 42#define verite_read_memory8(base, offset) MMIO_IN8(base, offset) 43#define verite_write_memory32(base, offset, data) MMIO_OUT32(base, offset, data) 44#define verite_write_memory16(base, offset, data) MMIO_OUT16(base, offset, data) 45#define verite_write_memory8(base, offset, data) MMIO_OUT8(base, offset, data) 46 47/* the rest of it */ 48void verite_enableio(void); 49void verite_disableio(void); 50vu8 *verite_mapmemory(vu8 *membase, vu32 size); 51void verite_unmapmemory(vu8 *vmembase, vu32 size); 52 53#endif /* #ifndef _VOS_H_ */ 54 55/* 56 * end of file vos.h 57 */ 58