|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT 386 Device Driver Kit release 2.0 ! 3: * Copyright (c) 1982, 1992 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * fakeff.h ! 8: * Include file to simulate all the far memory calls from COH 286. ! 9: * Far pointers are simulated with virtual addresses. ! 10: */ ! 11: #ifndef __SYS_FAKEFF_H__ ! 12: #define __SYS_FAKEFF_H__ ! 13: ! 14: typedef unsigned long faddr_t; ! 15: ! 16: /* ! 17: * Read a byte from far address 'fp'. Note that if an address fault ! 18: * occurs, the system will panic. ! 19: */ ! 20: #define ffbyte(fp) (*((unsigned char *) (fp))) ! 21: ! 22: /* ! 23: * Read a word from far address 'fp'. Note that if an address fault ! 24: * occurs, the system will panic. ! 25: */ ! 26: #define ffword(fp) (*((unsigned short *) (fp))) ! 27: ! 28: /* ! 29: * Copy 'n' bytes from far address 'fp' to address 'k' in the kernel ! 30: * data segment. Returns the number of bytes copied. ! 31: * Note that if an address fault occurs, the system will panic. ! 32: */ ! 33: #define fkcopy(fp, k, n) kkcopy(fp, k, n) ! 34: ! 35: /* ! 36: * Copy 'count' bytes from 'from_fp' to 'to_fp'. ! 37: * Note that if an address fault occurs, the system will panic. ! 38: */ ! 39: #define ffcopy(from_fp, to_fp, count) (void) kkcopy(from_fp, to_fp, count) ! 40: ! 41: /* ! 42: * Write byte 'b' to address 'fp'. Note that if an address ! 43: * fault occurs, the system will panic. ! 44: */ ! 45: #define sfbyte(fp, b) {*(unsigned char *)(fp) = (unsigned char)(b);} ! 46: ! 47: /* ! 48: * Write word 'w' to address 'fp'. Note that if an address ! 49: * fault occurs, the system will panic. ! 50: */ ! 51: #define sfword(fp, w) {*((unsigned short *)(fp)) = (unsigned short)(w);} ! 52: ! 53: faddr_t ptov(); ! 54: void vrelse(); ! 55: ! 56: #endif /* FAKEFF_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.