|
|
1.1 root 1:
2: #define NBPG 1024
3: #define PGSHIFT 10 /* LOG2(NBPG) */
4:
5: /*
6: * Provide about n microseconds of delay
7: */
8: #define DELAY(n) { register int N = (n); while (--N > 0); }
9:
10: #define IOBASE 0xff000000
11: #define XADDR 0xffee40 /* I/O addr of Xylogics controller */
12: #define XBASE 0xffec00 /* I/O page of Xylogics controller */
13: #define XOFFS 0x000240 /* Offset of Xylogics ctlr */
14: #define XYVEC 0xc0
15:
16: /* Bits used for CSR register */
17: #define GBSY 0x80 /* Go/busy bit */
18: #define ERR 0x40 /* General error bit */
19: #define DERR 0x20 /* double error */
20: #define IPND 0x10 /* Interrupt pending bit */
21: #define ADRM 0x8 /* Addressing mode : 1-24_bit, 0-20_bit */
22: /* Selected by jumper (Sec.3.2.2) */
23: #define AREQ 0x4 /* Attention request */
24: #define AACK 0x2 /* Attention ackownledge */
25: #define DRDY 0x1 /* Drive ready */
26:
27: /* Bits used for status byte in IOPB */
28: #define XS_ERR 0x80
29: #define XS_DONE 0x1
30: #define XS_ECODE 0xff
31:
32:
33: #define MAXXYDRIVES 4
34: #define EAGLE 0
35:
36: struct DTYPE {
37: long type;
38: };
39:
40:
41: struct TYPEPAR {
42: long noheads;
43: long nosecs;
44: long nocyls;
45: char name[8];
46: };
47:
48:
49: struct Xreg {
50: char relow; /* IOPB relocation reg. low byte */
51: char rehig; /* IOPB relocation reg. high byte */
52: char adlow; /* IOPB address reg. low byte */
53: char adhig; /* IOPB address reg. high byte */
54: char csr; /* Controller status register */
55: char crr; /* Controller reset/update register */
56: };
57:
58: struct IOPB {
59: char comm; /* Opcode */
60: char imode; /* Interrupt mode */
61: char stat1; /* status 1 */
62: char stat2; /* status 2 */
63: char throt; /* throttle word */
64: char devno; /* Drive type, unit select */
65: char headr; /* head address */
66: char secadr; /* sector address */
67: char calow; /* Cylinder address low */
68: char cahig; /* Cylinder address high */
69: char sclow; /* Sector count low */
70: char schig; /* Sector count high */
71: char dalow; /* Data address low */
72: char dahig; /* Data address high */
73: char drlow; /* Data relocation low */
74: char drhig; /* Data relocation high */
75: char hoffs; /* Head offset */
76: char unused;
77: char niolow; /* Next IOPB address low */
78: char niohig; /* Next IOPB address high */
79: char ecclow; /* ECC mask pattern low */
80: char ecchig; /* ECC mask pattern high */
81: char ebalow; /* ECC bit address low */
82: char ebahig; /* ECC bit address high */
83: };
84:
85: /* Used in COMM byte of IOPB */
86: #define IEN 0x10
87: #define AUD 0x80
88:
89: /* Used in IMODE byte of IOPB */
90: #define IEI 0x40
91:
92: /* Opcodes */
93: #define XFORMAT 7
94: #define SETDRIVE 0xb
95: #define XYREAD 2
96: #define XYWRITE 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.