Subject: README: BWX support added for PCI on ALCOR2/Pyxis
To: None <port-alpha@NetBSD.ORG>
From: Jason Thorpe <>
List: port-alpha
Date: 06/04/1998 14:29:41
Hi folks...

I have added support for using BWX (Byte/Word eXtentions) for PCI config
space and PCI i/o and mem space on the ALCOR2 (21172) and Pyxis (21174)
core logic chipsets.  Affected systems:

	- AlphaStation 500 (ALCOR2)
	- AlphaPC 164LX (Pyxis)
	- AlphaPC 164SX (Pyxis)
	- Digital Personal Workstation (Pyxis) - not yet in the tree

This should speed up access of bus devices somewhat, and may be necessary
for some systems (e.g. the Digital Personal Workstation) to function

I had been running w/ these changes for some time on my AlphaStation 500
when I wrote the code last year (!), but didn't commit it because of a
bug.  I found and fixed the bug, and now everything is working Nicely
on my system:

[ preserving 150920 bytes of netbsd symbol table ]
Copyright (c) 1996, 1997, 1998
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.3E (BISHOP) #374: Thu Jun  4 08:46:33 PDT 1998
Digital AlphaStation 500/500, 500MHz
8192 byte page size, 1 processor.
real mem = 268435456 (2252800 reserved for PROM, 266182656 used by NetBSD)
avail mem = 228540416
using 3249 buffers containing 26615808 bytes of memory
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21164A (reserved minor type)
cia0 at mainbus0: DECchip 2117x Core Logic Chipset (ALCOR/ALCOR2), pass 3
cia0: extended capabilities: 21<DWEN,BWEN>
cia0: using BWX for PCI config and device access
pci0 at cia0 bus 0
pci0: i/o enabled, memory enabled
de0 at pci0 dev 6 function 0
de0: interrupting at kn20aa irq 13
de0: DEC 21040 [10Mb/s] pass 2.6
de0: address 00:00:f8:25:56:c5
de0: enabling 10baseT port
fxp0 at pci0 dev 8 function 0: Intel EtherExpress Pro 10+/100B Ethernet
fxp0: interrupting at kn20aa irq 16
fxp0: Ethernet address 00:a0:c9:27:e1:d3
isp0 at pci0 dev 9 function 0
isp0: Board Revision 1020A, loaded F/W Revision 2.10
isp0: interrupting at kn20aa irq 12
scsibus0 at isp0: 16 targets
sd0 at scsibus0 targ 0 lun 0: <DEC, RZ1CB-BS (C) DEC, 0658> SCSI2 0/direct fixed
sd0: 4091MB, 3708 cyl, 20 head, 113 sec, 512 bytes/sect x 8380080 sectors
cd0 at scsibus0 targ 4 lun 0: <DEC, RRD46   (C) DEC, 0557> SCSI2 5/cdrom removab
pceb0 at pci0 dev 10 function 0: Intel 82375EB/SB PCI-EISA Bridge (PCEB) (rev. 0
ppb0 at pci0 dev 11 function 0: Digital Equipment DECchip 21052 PCI-PCI Bridge (
rev. 0x01)
pci1 at ppb0 bus 1
pci1: memory enabled
de1 at pci1 dev 4 function 0
de1: interrupting at kn20aa irq 0
de1: ZNYX ZX34X 21140A [10-100Mb/s] pass 2.0
de1: address 00:c0:95:e0:02:8c
de1: enabling 100baseTX port
de2 at pci1 dev 5 function 0
de2: interrupting at kn20aa irq 1
de2: ZNYX ZX34X 21140A [10-100Mb/s] pass 2.0
de2: address 00:c0:95:e0:02:8d
de2: enabling 100baseTX port
de3 at pci1 dev 6 function 0
de3: interrupting at kn20aa irq 2
de3: ZNYX ZX34X 21140A [10-100Mb/s] pass 2.0
de3: address 00:c0:95:e0:02:8e
de3: enabling 100baseTX port
de4 at pci1 dev 7 function 0
de4: interrupting at kn20aa irq 3
de4: ZNYX ZX34X 21140A [10-100Mb/s] pass 2.0
de4: address 00:c0:95:e0:02:8f
de4: enabling 100baseTX port
epic0 at pci0 dev 12 function 0: SMC EPIC/100 Fast Ethernet
epic0: interrupting at kn20aa irq 4
epic0: SMC9432TX, Ethernet address 00:e0:29:07:17:c4
eisa0 at pceb0
isa0 at pceb0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x3bc-0x3bf irq 7
pckbc0 at isa0 port 0x60-0x64
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
root on sd0a dumps on sd0b
root file system type: ffs
uvm_swap: allocated 256 swap buffer headers
de1: enabling 100baseTX port

Note that if you have problems, you may disable the use of BWX by patching
the kernel variable `cia_use_bwx' to 0, or by putting CIA_USE_BWX=0 in
your kernel config, and rebuilding cia.o.

That said, I don't anticipate any problems... I ran with this code for
quite some time before I noticed the bug (by fixing a bug in the de driver :-),
and fixed it today (forgot to actually do the store in cia_bwx_mem_write_4()).


Jason R. Thorpe                             
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 428 6939