NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/48431 CVS commit: src/sys/arch/alpha/pci
The following reply was made to PR port-alpha/48431; it has been noted by GNATS.
From: "Naruaki.Etomi" <nullnilaki%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: tsutsui%netbsd.org@localhost
Subject: Re: PR/48431 CVS commit: src/sys/arch/alpha/pci
Date: Mon, 20 Jan 2014 01:43:26 +0900
Dear Tsutsui-san.
Thank you for your mail!
> After some thoughts, I notice x86 ports have device_pci_register()
> in sys/arch/x86/pci/pci_machidep.c and now I think it's better to put
> a common PCI specific device_register function in alpha/pci/pci_machidep.c.
>
> Could you also try the following patch (after revert previous
> dec_6600.c diff)?
>
> ---
> Index: alpha/autoconf.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/alpha/alpha/autoconf.c,v
> retrieving revision 1.52
> diff -u -p -r1.52 autoconf.c
> --- alpha/autoconf.c 29 Jul 2012 18:05:39 -0000 1.52
> +++ alpha/autoconf.c 18 Jan 2014 14:08:35 -0000
> @@ -44,6 +44,8 @@
>
> __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.52 2012/07/29 18:05:39 mlelstv
> Exp $");
>
> +#include "pci.h"
> +
> #include <sys/param.h>
> #include <sys/systm.h>
> #include <sys/buf.h>
> @@ -53,6 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
> #include <sys/conf.h>
> #include <dev/cons.h>
>
> +#include <dev/pci/pcivar.h>
> +
> #include <machine/autoconf.h>
> #include <machine/alpha.h>
> #include <machine/cpu.h>
> @@ -172,6 +176,13 @@ atoi(const char *s)
> void
> device_register(device_t dev, void *aux)
> {
> +#if NPCI > 0
> + device_t parent = device_parent(dev);
> +
> + if (parent != NULL && device_is_a(parent, "pci"))
> + device_pci_register(dev, aux);
> +#endif
> +
> if (bootdev_data == NULL) {
> /*
> * There is no hope.
> Index: include/pci_machdep.h
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/alpha/include/pci_machdep.h,v
> retrieving revision 1.15
> diff -u -p -r1.15 pci_machdep.h
> --- include/pci_machdep.h 6 Feb 2012 02:14:13 -0000 1.15
> +++ include/pci_machdep.h 18 Jan 2014 14:08:35 -0000
> @@ -109,3 +109,4 @@ void pci_display_console(bus_space_tag_t
> ((c)->pc_pciide_compat_intr_establish == NULL ? NULL : \
> (*(c)->pc_pciide_compat_intr_establish)((c)->pc_conf_v, (d), (p),
> \
> (ch), (f), (a)))
> +void device_pci_register(device_t, void *);
> Index: pci/pci_machdep.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/alpha/pci/pci_machdep.c,v
> retrieving revision 1.19
> diff -u -p -r1.19 pci_machdep.c
> --- pci/pci_machdep.c 6 Feb 2012 02:14:15 -0000 1.19
> +++ pci/pci_machdep.c 18 Jan 2014 14:08:35 -0000
> @@ -59,6 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: pci_machdep.
> #include <dev/pci/tgavar.h>
> #endif
>
> +#include <machine/rpb.h>
> +
> void
> pci_display_console(bus_space_tag_t iot, bus_space_tag_t memt,
> pci_chipset_tag_t pc, int bus, int device, int function)
> {
> @@ -101,3 +103,20 @@ pci_display_console(bus_space_tag_t iot,
> panic("pci_display_console: unconfigured device at %d/%d/%d",
> bus, device, function);
> }
> +
> +void
> +device_pci_register(device_t dev, void *aux)
> +{
> + struct pci_attach_args *pa = aux;
> + struct ctb *ctb;
> + prop_dictionary_t dict;
> +
> + /* set properties for PCI framebuffers */
> + ctb = (struct ctb *)(((char *)hwrpb) + hwrpb->rpb_ctb_off);
> + if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY &&
> + ctb->ctb_term_type == CTB_GRAPHICS) {
> + /* XXX should consider multiple displays? */
> + dict = device_properties(dev);
> + prop_dictionary_set_bool(dict, "is_console", true);
> + }
> +}
> ---
I apply this patch.
It work fine and radeonfb attached correctly!(vga(4) attached
correctly as a matter of course)
> If this problem is not port specific, I wonder if we should make
> 32BPP default..
I think so too, but I am not designer of radeonfb....
I have attached dmesg.(AlphaStation DS15 with radeonfb and
AlphaStation XP1000 with vga(PowerStorm 300)).
Please see dmesg.
-----------------------------------------------------------------------------------------------------
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
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 6.99.29 (GENERIC-$Revision: 1.356 $) #1: Sun Jan 19 23:05:47 JST 2014
naruaki@NetBSD:/usr/obj.alpha/sys/arch/alpha/compile/GENERIC
AlphaStation DS15, 1000MHz, s/n AY42501857
8192 byte page size, 1 processor.
total memory = 512 MB
(2880 KB reserved for PROM, 509 MB used by NetBSD)
avail memory = 490 MB
timecounter: Timecounters tick every 0.976 msec
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264C-6
cpu0: Architecture extensions: 0x1307<PAT,MVI,CIX,FIX,BWX>
tsc0 at mainbus0: 21274 Core Logic Chipset, Cchip rev 0
tsc0: 2 Dchips, 1 memory bus of 16 bytes
tsc0: arrays present: 512MB, 0MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
sio0 at pci0 dev 7 function 0: Acer Labs M1533 PCI-ISA Bridge (rev. 0xc3)
ahc0 at pci0 dev 8 function 0: Adaptec aic7899 Ultra160 SCSI adapter
ahc0: interrupting at dec 6600 irq 13
ahc0: aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
scsibus0 at ahc0: 16 targets, 8 luns per target
ahc1 at pci0 dev 8 function 1: Adaptec aic7899 Ultra160 SCSI adapter
ahc1: interrupting at dec 6600 irq 12
ahc1: aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs
scsibus1 at ahc1: 16 targets, 8 luns per target
fxp0 at pci0 dev 9 function 0: Intel i82559ER Ethernet (rev. 0x09)
fxp0: interrupting at dec 6600 irq 28
fxp0: May need receiver lock-up workaround
fxp0: Ethernet address 00:0f:20:2b:e1:24
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1 at pci0 dev 10 function 0: Intel i82559ER Ethernet (rev. 0x09)
fxp1: interrupting at dec 6600 irq 4
fxp1: May need receiver lock-up workaround
fxp1: Ethernet address 00:0f:20:2b:e1:23
inphy1 at fxp1 phy 1: i82555 10/100 media interface, rev. 4
inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
aceride0 at pci0 dev 13 function 0: Acer Labs M5229 UDMA IDE
Controller (rev. 0xc1)
aceride0: bus-master DMA support present
aceride0: using PIO transfers above 137GB as workaround for 48bit DMA
access bug, expect reduced performance
aceride0: primary channel configured to compatibility mode
aceride0: primary channel interrupting at isa irq 14
atabus0 at aceride0 channel 0
aceride0: secondary channel configured to compatibility mode
aceride0: secondary channel interrupting at isa irq 15
atabus1 at aceride0 channel 1
isa0 at sio0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
attimer0: attached to pcppi0
tsp1 at tsc0
pci1 at tsp1 bus 0
pci1: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
radeonfb0 at pci1 dev 7 function 0: ATI Technologies Radeon 7500 QW (rev. 0x00)
radeonfb0: Found 48 KB Legacy BIOS
radeonfb0: refclk = 27.000 MHz, refdiv = 8 minpll = 200000, maxpll = 350000
radeonfb0: 64 MB aperture at 0x40000000, 64 KB registers at 0x01080000
radeonfb0: display 0: initial virtual resolution 1920x1200 at 8 bpp
radeonfb0: using 32 MB per display
radeonfb0: port 0: physical 1920x1200 60Hz
radeonfb0: port 1: physical 1920x1200 60Hz
wsdisplay0 at radeonfb0 kbdmux 1: console (fb, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at radeonfb0 not configured
tlp0 at pci1 dev 9 function 0: DECchip 21140A Ethernet, pass 2.0
tlp0: interrupting at dec 6600 irq 24
tlp0: DEC DE500-AA, Ethernet address 00:00:f8:03:dd:a1
nsphy0 at tlp0 phy 5: DP83840 10/100 media interface, rev. 0
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
esiop0 at pci1 dev 10 function 0: Symbios Logic 53c895 (ultra2-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at dec 6600 irq 20
scsibus2 at esiop0: 16 targets, 8 luns per target
timecounter: Timecounter "clockinterrupt" frequency 1024 Hz quality 0
timecounter: Timecounter "PCC" frequency 999723072 Hz quality 1000
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
scsibus2: waiting 2 seconds for devices to settle...
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST RW/DVD GCC-4480B, , 2.06> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 3
cd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
sd0 at scsibus0 target 0 lun 0: <FUJITSU, MAU3073NP, 3502> disk fixed
sd0: 70007 MB, 49158 cyl, 4 head, 729 sec, 512 bytes/sect x 143374744 sectors
sd0: sync (12.50ns offset 127), 16-bit (160.000MB/s) transfers, tagged queueing
Kernelized RAIDframe activated
root on sd0a dumps on sd0b
root file system type: ffs
-----------------------------------------------------------------------------------------------------
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
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 6.99.29 (GENERIC-$Revision: 1.356 $) #1: Sun Jan 19 23:05:47 JST 2014
naruaki@NetBSD:/usr/obj.alpha/sys/arch/alpha/compile/GENERIC
COMPAQ Professional Workstation XP1000, 500MHz, s/n
8192 byte page size, 1 processor.
total memory = 512 MB
(2128 KB reserved for PROM, 509 MB used by NetBSD)
avail memory = 491 MB
timecounter: Timecounters tick every 0.976 msec
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264-5
cpu0: Architecture extensions: 0x303<PAT,MVI,FIX,BWX>
tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
tsc0: 4 Dchips, 1 memory bus of 32 bytes
tsc0: arrays present: 512MB (split), 0MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
sio0 at pci0 dev 7 function 0: Contaq Microsystems 82C693 PCI-ISA
Bridge (rev. 0x00)
cypide0 at pci0 dev 7 function 1: Cypress 82C693 IDE Controller (rev. 0x00)
cypide0: bus-master DMA support present
, but unused (registers at unsafe address 0x10000)cypide0: primary
channel wired to compatibility mode
cypide0: primary channel interrupting at isa irq 14
atabus0 at cypide0 channel 0
cypide1 at pci0 dev 7 function 2: Cypress 82C693 IDE Controller (rev. 0x00)
cypide1: hardware does not support DMA
cypide1: primary channel wired to compatibility mode
cypide1: secondary channel interrupting at isa irq 15
atabus1 at cypide1 channel 0
ohci0 at pci0 dev 7 function 3: Contaq Microsystems 82C693 PCI-ISA
Bridge (rev. 0x00)
ohci0: interrupting at isa irq 10
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
isa0 at sio0
lpt0 at isa0 port 0x3bc-0x3bf irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43
sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v3.01
audio0 at sb0: half duplex, playback, capture, mmap, independent
midi0 at sb0: SB MIDI UART
opl0 at sb0: model OPL3
midi1 at opl0: SB Yamaha OPL3
pcppi0 at isa0 port 0x61
midi2 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
attimer0: attached to pcppi0
tsp1 at tsc0
pci1 at tsp1 bus 0
pci1: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
tlp0 at pci1 dev 3 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at dec 6600 irq 45
tlp0: DEC, Ethernet address 00:00:f8:71:71:15
tlp0: 10baseT, 10base2, 10base5, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isp0 at pci1 dev 6 function 0: QLogic 1020 Fast Wide SCSI HBA
isp0: interrupting at dec 6600 irq 47
ppb0 at pci1 dev 8 function 0: Digital Equipment DC21152 PCI-PCI
Bridge (rev. 0x03)
pci2 at ppb0 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
vga0 at pci2 dev 9 function 0: Mitsubishi Electronics product 0x0304 (rev.
0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga0 not configured
timecounter: Timecounter "clockinterrupt" frequency 1024 Hz quality 0
timecounter: Timecounter "PCC" frequency 500029680 Hz quality 1000
scsibus0 at isp0: 16 targets, 8 luns per target
atapibus0 at atabus0: 2 targets
scsibus0: waiting 2 seconds for devices to settle...
cd0 at atapibus0 drive 0: <JLMS XJ-HD166S, , D3S4> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(cypide0:0:0): using PIO mode 4
uhub0 at usb0: Contaq Microsystems OHCI root hub, class 9/0, rev
1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
sd0 at scsibus0 target 0 lun 0: <WDIGTL, WDE9100-1807A4, 1.30> disk fixed
sd0: 8683 MB, 6932 cyl, 12 head, 213 sec, 512 bytes/sect x 17783204 sectors
sd0: sync (50.00ns offset 8), 16-bit (40.000MB/s) transfers, tagged queueing
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
st0 at scsibus0 target 5 lun 0: <SONY, SDT-9000, 0123> tape removable
st0 : drive empty
st0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers
Kernelized RAIDframe activated
root on sd0a dumps on sd0b
root file system type: ffs
-----------------------------------------------------------------------------------------------------
Sincerely,
Naruaki Etomi
--
nullnilaki%gmail.com@localhost
Home |
Main Index |
Thread Index |
Old Index