annotate defs/ide.d @ 2609:9dd4f422aac7

Added NitrOS-9 ROM Kit from Cloud-9
author Boisy Pitre <boisy.pitre@nuance.com>
date Tue, 31 Jan 2012 13:57:35 -0600
parents 17d43fd29ee2
children b8c7b7fbf3c9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2590
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
1 ********************************************************************
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
2 * ide.d - IDE definitions
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
3 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
4 * $Id$
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
5 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
6 * (C) 2004 Boisy G. Pitre - Licensed to Cloud-9
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
7 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
8 * Edt/Rev YYYY/MM/DD Modified by
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
9 * Comment
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
10 * ------------------------------------------------------------------
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
11 * 2005/12/11 Boisy G. Pitre
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
12 * Moved IDE base addresses and I/O offsets to here.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
13
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
14 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
15 * ATAPI Commands
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
16 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
17 A$READ2 EQU $A8
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
18 A$WRITE2 EQU $AA
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
19 A$READ EQU $28
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
20 A$WRITE EQU $2A
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
21 A$STOP EQU $1B
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
22
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
23 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
24 * ATA Commands
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
25 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
26 S$READ EQU $20
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
27 S$WRITE EQU $30
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
28
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
29 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
30 * IDE Registers
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
31 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
32 DataReg EQU 0 Data (1st 8 bits, non-latched)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
33 ErrorReg EQU 1 Error # when read
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
34 Features EQU 1 Features when write
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
35 SectCnt EQU 2 Sector count
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
36 SectNum EQU 3 Sector #
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
37 CylLow EQU 4 Low byte of cylinder
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
38 CylHigh EQU 5 High byte of cylinder
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
39 DevHead EQU 6 Device/Head
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
40 Status EQU 7 Status when read
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
41 Command EQU 7 Command when write
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
42 Latch EQU 8 Latch (2nd 8 bits of 16 bit word)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
43
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
44 BusyBit EQU %10000000 BUSY=1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
45 DrdyBit EQU %01000000 drive ready=1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
46 DscBit EQU %00010000 seek finished=1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
47 DrqBit EQU %00001000 data requested=1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
48 ErrBit EQU %00000001 error_reg has it
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
49 RdyTrk EQU %01010000 ready & over track
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
50 RdyDrq EQU %01011000 ready w/ data
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
51
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
52 **** IDE Interface Definitions
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
53 IFNE IDE
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
54 SDAddr SET $FF50
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
55 ENDC