[unix-pc.general] Hardware addresses for unix-pc

cmv@cbnewsc.ATT.COM (C M Votava) (01/15/90)

Sombody was complaining a little while ago about not being able
to write device drivers because they don't know what the hardware
addresses for anything is in the unixpc.

I got the following list by egrep-ing the header files in 
/usr/include/sys and doing some fancy editing. If you're interested
in any of these devices, find the header file that they are defined
in, and you'll find many more defines that will indicate to you how
to use them. It does make things easier to have the hardware manual
at your fingertips, but it's not impossible to figure things out
without it.

I actually started this list some weeks ago, with the idea to post it,
but I've only been able to get to it now. I'm hoping to propose some
neat projects in the future, and this research is helping me define
things now. Feel free to ask questions!

The list has the hex address, an indication of wether it's read only,
write only, read/write, or unknown (blank), the #define to grep for
in /usr/include/sys/*.h and a helpful description. Sometimes comments
from the header files are included where I thought they would be helpful.

-Craig Votava

Address	 R/W	#define		Description
======== ===	=============	======================================
0x4B0400	DIALER_LOWER	838A Lower control byte address
0x4B0800	DIALER_HIGHER	838A Higher control byte address
0x490000	HNDSET_RELAY	Handset relay
0x491000 	LINE_SELECT	Line select relay (line 0 or line 1)
0x492000	HOOK1_RELAY	Line 1 onhook/offhook relay
0x493000	HOOK2_RELAY	Line 2 onhook/offhook relay
0x494000	LINE1_ACTIVE	Line 1 active/on hold relay
0x495000	LINE2_ACTIVE	Line 2 active/on hold relay
0x496000	A_LEAD1_RELAY	Line 1 A-lead
0x497000	A_LEAD2_RELAY	Line 2 A-lead

0xE40000 W	SYSERR_GCR_ADDR	General Control Register (NMI/BERR)
0xE41000	PE_INT_GCR_ADDR	General Control Register (PIE+)
0xE42000	PE_FRC_GCR_ADDR	General Control Register (BP+)
0xE43000	ROM_GCR_ADDR	General Control Register (ROMLMAP-)
0xE44000	L1MD_GCR_ADDR	General Control Register (L1MD-)
0xE45000	L2MD_GCR_ADDR	General Control Register (L2MD-)
0xE46000	DNCT_GCR_ADDR	General Control Register (D/NCD1-)

0x4A0000 W	MCR_ADDR	Miscellaneous Control Register #1
0xE20000 W	MCR2_ADDR	Miscellaneous Control Register #2

0x410000 R	GSR_ADDR	General Status Register
0x4C0000 RW	CSR_ADDR	Clear Status Register (Clears GSR,BSR0,BSR1)

0x430000 R	BSR0_ADDR	Bus Status Register 0
0x440000 R	BSR1_ADDR	Bus Status Register 1

0x420000	VIDMEM		Video Memory

---------------------------------------------------------
|	RS-232 Ports A + B Registers  - 8274		|
|	Port A is used for RS-232, port B is used for	|
|	the SCM modem.					|
|	Uses the least significant byte of 16 bit word	|
---------------------------------------------------------
*/
0xE50000 RW	A_DATA_ADDR	8274 Data Port for rs232 line
0xE50002 RW	B_DATA_ADDR	8274 Data Port for SCM Modem 
0xE50004 RW	A_CMND_ADDR	8274 Command Port for RS232 line
0xE50006 RW	B_CMND_ADDR	8274 Command Port for SCM Modem

0xE70002 RW	C_DATA_ADDR	6850 Data Port for keyboard
0xE70000 RW	C_CMND_ADDR	6850 Command Port for keyboard

0x4B0000 W	A_BAUD_ADDR	Baud Generator Divisor Address for RS232 (8274)

0x450000 R	PHONE_STATUS	Phone Status Register

0x470000 R	LP_STATUS_ADDR	Parrellel Port Status Register
0x4F0000 WO	LP_DATA_ADDR	Parrellel Port Data Port

0xE00000	HD_BASE		Hard Disk Bus Interface Port
0xE10000	FD_BASE		Floppy Disk Bus Interface Port

0x460000 RW	DMA_CNT		DMA Count Register
0x4D0000 W	DMA_LOADDR	DMA Lower Start Address Register
0x4D4000 W	DMA_HIADDR	DMA Upper Start Address Register
0x4E0000 RW	DISK_CNTRL	Disk Control Register

0xE60000 W	SCM_0W_Control	Modem Control Register
0xE61000 W	SCM_1W_Control	Modem Control Register
0xE62000 R	SCM_2R_Control	Modem Control Register
0xE63000 R	SCM_3R_Control	Modem Control Register
0xE64000 W	SCM_4W_Control	Modem Control Register
0xE65000 W	SCM_5W_Control	Modem Control Register
0xE66000 W	SCM_6W_Control	Modem Control Register
0xE68000 W	SCM_8W_Control	Modem Control Register
0xE69000 W	SCM_9W_Control	Modem Control Register
0xE6A000 R	SCM_10R_Control	Modem Control Register

/*	REAL TIME CLOCK TC8250P	*/
/*	WRITE MODE	*/
/*	Uses upper byte of I/O address 0x480000	*/
/*	Upper 4 bits used to control chip operation */
/*      Lower 4 bits used for internal chip addressing and I/O data */

0x480000 W	RTC_WRITE_ADDR	RTC write address

0xC00000	SLOT0		Expansion Slot
0xC40000	SLOT1		Expansion Slot
0xC80000	SLOT2		Expansion Slot
0xCC0000	SLOT3		Expansion Slot
0xD00000	SLOT4		Expansion Slot
0xD40000	SLOT5		Expansion Slot
0xD80000	SLOT6		Expansion Slot
0xDC0000	SLOT7		Expansion Slot