Date: Tue, 18 Dec 2001 14:17:07 +0100 From: "Petr Holub" <hopet@ics.muni.cz> To: <freebsd-current@freebsd.org>, <freebsd-stable@freebsd.org>, <freebsd-hackers@freebsd.org> Subject: firewire driver Message-ID: <003801c187c6$4aee4c50$d2e86cc2@kloboucek>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi all!
I'm struggling my FireWire OHCI based card in my notebook.
I'm using driver from DVTS project (that's what I finally
want to have up and running). I'm running FreeBSD 4.4 Release.
dmesg of my machine is in the attachement (using boot -v).
I've already added proper id for my card in both files
required (0x8027).
The problem is when booting I get "could not map memory" error
in this part of code:
-------------------------------------------------------------------
fwohci.c:
#define DEF_CACHE_LINE 0x10
cache_line = DEF_CACHE_LINE;
pci_write_config(dev, PCIR_CACHELNSZ, cache_line, 1);
/**/
fun = pci_read_config(dev, 0xf0, 4);
fun |= 7;
pci_write_config(dev, 0xf0, fun, 4);
/**/
rid = PCI_MAP_REG_START;
sc->fc.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
0, ~0, 1, RF_ACTIVE);
if (!sc->fc.mem) {
device_printf(dev, "could not map memory\n");
error = ENXIO;
goto fail;
}
sc->base = rman_get_virtual(sc->fc.mem);
#endif /* __FreeBSD__ */
ifp->if_flags &= ~IFF_UP;
/* Stop all DMA operation db.immediately */
fwohci_stop_dma(sc, -1);
-------------------------------------------------------------------
I tried to use
#define PCI_ENABLE_IO_MODES
in pci/pci.c but got no difference. I've noticed there is
a option PCI_ENABLE_IO_MODES in -CURRENT kernel, but I'm
not able to use it since this machine is a production one.
I think this option can help somehow - at least it seems so
from the description of this option in LINT. But I haven't
seen it in 4-STABLE.
What I'm suspicious about is this part of dmesg:
found-> vendor=0x104c, dev=0x8027, revid=0x00
class=0c-00-10, hdrtype=0x00, mfdev=1
subordinatebus=0 secondarybus=0
cmdreg=0x0006, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0x02 (500 ns), maxlat=0x04 (1000 ns)
intpin=a, irq=11
which seems to me like BIOS forgot to allocate some memory for
this card.
Just to mention: card itself is OK since it's working on the same machine
in Windows 2000 (e.g. in Adobe Premiere 6.0). But it's possible
Windows driver does the allocation on its own (btw: Windows drivers
are the default ones: 1394bus.sys and ohci1394.sys).
Does anybody have some idea how to move on?
With best regards,
Petr Holub
================================================================
Petr Holub
CESNET z.s.p.o. Supercomputing Center Brno
Zikova 2 Institute of Compt. Science
10200 Praha, CZ Masaryk University
Czech Republic Botanicka 68a, 60200 Brno, CZ
e-mail: Petr.Holub@cesnet.cz phone: +420-5-41512278
e-mail: hopet@ics.muni.cz
[-- Attachment #2 --]
Copyright (c) 1992-2001 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.4-RELEASE #6: Mon Dec 10 15:16:37 CET 2001
toor@kloboucek.ics.muni.cz:/usr/src/sys/compile/KLOBOUCEK
Calibrating clock(s) ... TSC clock: 902080409 Hz, i8254 clock: 1193228 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254" frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
CPU: Pentium III/Pentium III Xeon/Celeron (902.05-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0x68a Stepping = 10
Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory = 267292672 (261028K bytes)
Physical memory chunk(s):
0x00001000 - 0x0009efff, 647168 bytes (158 pages)
0x0041f000 - 0x0fee0fff, 262938624 bytes (64194 pages)
avail memory = 256208896 (250204K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00f1c80
bios32: Entry = 0xf14a0 (c00f14a0) Rev = 0 Len = 1
pcibios: PCI BIOS entry at 0x16a0
pnpbios: Found PnP BIOS data at 0xc00fbce0
pnpbios: Entry = f0000:bd10 Rev = 1.0
pnpbios: OEM ID cd041
Other BIOS signatures found:
ACPI: 000f7220
Preloaded elf kernel "kernel" at 0xc03f9000.
netsmb_dev: loaded
Pentium Pro MTRR support enabled
md0: Malloc disk
Creating DISK md0
Math emulator present
pci_open(1): mode 1 addr port (0x0cf8) is 0x80001004
pci_open(1a): mode1res=0x80000000 (0x80000000)
pci_cfgcheck: device 0 [class=060000] [hdr=00] is there (id=11308086)
Using $PIR table, 4 entries at 0xc00f1c10
apm0: <APM BIOS> on motherboard
apm: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
found-> vendor=0x8086, dev=0x1130, revid=0x11
class=06-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0006, statreg=0x2090, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found-> vendor=0x8086, dev=0x1132, revid=0x11
class=03-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0007, statreg=0x02b0, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=a, irq=11
map[10]: type 1, range 32, base f8000000, size 26
map[14]: type 1, range 32, base f7800000, size 19
found-> vendor=0x8086, dev=0x2448, revid=0x03
class=06-04-00, hdrtype=0x01, mfdev=0
subordinatebus=1 secondarybus=1
cmdreg=0x0107, statreg=0x0080, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x06 (1500 ns), maxlat=0x00 (0 ns)
found-> vendor=0x8086, dev=0x244c, revid=0x03
class=06-01-00, hdrtype=0x00, mfdev=1
subordinatebus=0 secondarybus=0
cmdreg=0x010f, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found-> vendor=0x8086, dev=0x244a, revid=0x03
class=01-01-80, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0005, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
map[20]: type 1, range 32, base 0000b800, size 4
found-> vendor=0x8086, dev=0x2442, revid=0x03
class=0c-03-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0005, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=d, irq=9
map[20]: type 1, range 32, base 0000b400, size 5
found-> vendor=0x8086, dev=0x2444, revid=0x03
class=0c-03-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0005, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=c, irq=9
map[20]: type 1, range 32, base 0000b000, size 5
found-> vendor=0x8086, dev=0x2445, revid=0x03
class=04-01-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0005, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=b, irq=10
map[10]: type 1, range 32, base 0000e000, size 8
map[14]: type 1, range 32, base 0000e100, size 6
found-> vendor=0x8086, dev=0x2446, revid=0x03
class=07-03-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0005, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=b, irq=10
map[10]: type 1, range 32, base 0000e500, size 8
map[14]: type 1, range 32, base 0000e300, size 7
pci0: <PCI bus> on pcib0
agp0: <Intel 82815 (i815 GMCH) SVGA controller> mem 0xf7800000-0xf787ffff,0xf8000000-0xfbffffff irq 11 at device 2.0 on pci0
agp0: allocating GATT for aperture of size 64M
pcib1: <PCI to PCI bridge (vendor=8086 device=2448)> at device 30.0 on pci0
found-> vendor=0x10ec, dev=0x8139, revid=0x10
class=02-00-00, hdrtype=0x00, mfdev=0
subordinatebus=0 secondarybus=0
cmdreg=0x0007, statreg=0x0290, cachelnsz=0 (dwords)
lattimer=0x40 (1920 ns), mingnt=0x20 (8000 ns), maxlat=0x40 (16000 ns)
intpin=a, irq=4
map[10]: type 1, range 32, base 0000d800, size 8
map[14]: type 1, range 32, base f7000000, size 8
found-> vendor=0x104c, dev=0xac42, revid=0x00
class=06-07-00, hdrtype=0x02, mfdev=1
subordinatebus=0 secondarybus=0
cmdreg=0x0007, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0x40 (16000 ns), maxlat=0x03 (750 ns)
intpin=a, irq=11
found-> vendor=0x104c, dev=0xac42, revid=0x00
class=06-07-00, hdrtype=0x02, mfdev=1
subordinatebus=0 secondarybus=0
cmdreg=0x0007, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0x40 (16000 ns), maxlat=0x03 (750 ns)
intpin=a, irq=11
found-> vendor=0x104c, dev=0x8027, revid=0x00
class=0c-00-10, hdrtype=0x00, mfdev=1
subordinatebus=0 secondarybus=0
cmdreg=0x0006, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0x02 (500 ns), maxlat=0x04 (1000 ns)
intpin=a, irq=11
pci1: <PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xd800-0xd8ff mem 0xf7000000-0xf70000ff irq 4 at device 4.0 on pci1
rl0: Ethernet address: 00:e0:18:2c:ea:6a
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bpf: rl0 attached
pcic0: <TI PCI-4451 PCI-CardBus Bridge> irq 11 at device 7.0 on pci1
pcic0: PCI Memory allocated: 0x44000000
pcic0: TI12XX PCI Config Reg: [speaker enable][FUNC pci int + CSC serial isa irq]
pccard0: <PC Card bus (classic)> on pcic0
pcic1: <TI PCI-4451 PCI-CardBus Bridge> irq 11 at device 7.1 on pci1
pcic1: PCI Memory allocated: 0x44001000
pcic1: TI12XX PCI Config Reg: [speaker enable][FUNC pci int + CSC serial isa irq]
using shared irq11.
pccard1: <PC Card bus (classic)> on pcic1
fwohci0: <Texas Instruments TSB43AA99> irq 11 at device 7.2 on pci1
pcilynx0: PCI bus latency was changing to 200.
fwohci0: could not map memory
device_probe_and_attach: fwohci0 attach returned 6
isab0: <PCI to ISA bridge (vendor=8086 device=244c)> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xb800-0xb80f at device 31.1 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xb800
ata0: mask=03 status0=50 status1=00
ata0: mask=03 ostat0=50 ostat2=00
ata0-master: ATAPI probe a=00 b=00
ata0-slave: ATAPI probe a=00 b=00
ata0: mask=03 status0=50 status1=00
ata0-master: ATA probe a=01 b=a5
ata0: devices=01
ata0: at 0x1f0 irq 14 on atapci0
ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xb808
ata1: mask=03 status0=00 status1=00
ata1: mask=03 ostat0=00 ostat2=00
ata1-master: ATAPI probe a=00 b=00
ata1-slave: ATAPI probe a=00 b=00
ata1: mask=03 status0=00 status1=00
ata1: devices=00
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xb400-0xb41f irq 9 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xb000-0xb01f irq 9 at device 31.4 on pci0
using shared irq9.
usb1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pcm0: <Intel 82801BA (ICH2)> port 0xe100-0xe13f,0xe000-0xe0ff irq 10 at device 31.5 on pci0
pcm0: ac97 codec id 0x83847600 (SigmaTel STAC9700/9783/9784)
pcm0: ac97 codec features 18 bit DAC, 18 bit ADC, 5 bit master volume, SigmaTel 3D Enhancement
pcm: setmap 2e000, 4000; 0xcf722000 -> 2e000
pcm: setmap 32000, 4000; 0xcf726000 -> 32000
pcm: setmap 36000, 4000; 0xcf72a000 -> 36000
pci0: <unknown card> (vendor=0x8086, dev=0x2446) at 31.6 irq 10
ata-: ata0 exists, using next available unit number
ata-: ata1 exists, using next available unit number
pcic-: pcic0 exists, using next available unit number
pcic-: pcic1 exists, using next available unit number
Trying Read_Port at 203
Trying Read_Port at 243
Trying Read_Port at 283
Trying Read_Port at 2c3
Trying Read_Port at 303
Trying Read_Port at 343
Trying Read_Port at 383
Trying Read_Port at 3c3
isa_probe_children: disabling PnP devices
isa_probe_children: probing non-PnP devices
orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
fdc0: direction bit not set
fdc0: cmd 3 failed at out byte 1 of 3
fdc0 failed to probe at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
ata2 failed to probe at port 0x1f0 irq 14 on isa0
ata3 failed to probe at port 0x170 irq 15 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
atkbd: the current kbd controller command byte 0045
atkbd: keyboard ID 0x41ab (2)
kbd0 at atkbd0
kbd0: atkbd0, AT 101/102 (2), config:0x1, flags:0x3d0000
psm0: current command byte:0045
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0-00, 2 buttons
psm0: config:00000000, flags:00000000, packet size:3
psm0: syncmask:c0, syncbits:00
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fb0: vga0, vga, type:VGA (5), flags:0x7007f
fb0: port:0x3c0-0x3df, crtc:0x3d4, mem:0xa0000 0x20000
fb0: init mode:24, bios mode:3, current mode:24
fb0: window:0xc00b8000 size:32k gran:32k, buf:0 size:32k
VGA parameters upon power-up
50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 55 81
bf 1f 00 4f 0d 0e 00 00 07 80 9c 8e 8f 28 1f 96
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff
VGA parameters in BIOS for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff
EGA/VGA parameters to be used for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sc0: fb0, kbd0, terminal emulator: sc (syscons terminal)
pcic2 failed to probe at port 0x3e0 iomem 0xd0000 on isa0
pcic3: not probed (disabled)
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: irq maps: 0x1 0x1 0x1 0x1
sio0: probe failed test(s): 0 1 2 4 6 7 9
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250
sio1: irq maps: 0x1 0x9 0x1 0x1
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
sio2: not probed (disabled)
sio3: not probed (disabled)
ppc0: parallel port found at 0x378
ppc0: using extended I/O port range
ppc0: ECP SPP ECP+EPP SPP
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
plip0: <PLIP network interface> on ppbus0
bpf: lp0 attached
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
isa_probe_children: probing PnP devices
BIOS Geometries:
0:03fffe3f 0..1023=1024 cylinders, 0..254=255 heads, 1..63=63 sectors
0 accounted for
Device configuration finished.
bpf: sl0 attached
bpf: faith0 attached
bpf: lo0 attached
bpf: ppp0 attached
new masks: bio 68c200, tty 631c8a, net 671c9a
ata0-master: success setting UDMA5 on Intel chip
Creating DISK ad0
ad0: <TOSHIBA MK2018GAP/M1.42 A> ATA-5 disk at ata0-master
ad0: 19077MB (39070080 sectors), 38760 cyls, 16 heads, 63 S/T, 512 B/S
ad0: 16 secs/int, 1 depth queue, UDMA100
ad0: piomode=4 dmamode=2 udmamode=5 cblid=1
ad0: 19077MB <TOSHIBA MK2018GAP> [38760/16/63] at ata0-master UDMA100
Mounting root from ufs:/dev/ad0s1a
ad0s1: type 0xa5, start 63, end = 963899, size 963837 : OK
ad0s2: type 0x7, start 963900, end = 20884499, size 19920600 : OK
ad0s3: type 0x7, start 20884500, end = 30844799, size 9960300 : OK
ad0s4: type 0xa5, start 30844800, end = 39070079, size 8225280 : OK
start_init: trying /sbin/init
splash: image decoder found: matrix_saver
Linux-ELF exec handler installed
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003801c187c6$4aee4c50$d2e86cc2>
