[LinuxBIOS] Epia MII, Compact Flash and device nodes

Markus Törnqvist mjt at nysv.org
Wed Sep 19 17:30:14 CEST 2007


On Mon, Sep 17, 2007 at 07:03:29PM +0200, Peter Stuge wrote:
>Hi,

Thank you for your excellent reply!

>On Mon, Sep 17, 2007 at 10:43:35AM +0300, Markus Tornqvist wrote:

>> I've been reading dmesg and tested sda, I should have mentioned
>> that, but that didn't help...
>Please send us your dmesg output.

I actually have a mount now!! :)

I will explain details further below, but here's what I hope is relevant:

pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
Probing IDE interface ide2...
hde: ELITE PRO CF CARD 1GB, CFA DISK drive
usbcore: registered new driver hiddev
input:   USB Multimedia Keyboard  as /class/input/input0
input: USB HID v1.00 Keyboard [  USB Multimedia Keyboard ] on
usb-0000:00:10.0-2
ide2 at 0x100-0x107,0x10e on irq 5
hde: max request size: 128KiB
hde: 2031120 sectors (1039 MB) w/1KiB Cache, CHS=2015/16/63
 hde: hde1
ide-cs: hde: Vpp = 0.0

The entirety is attached.

So the driver is broken wrt irq handling?

>> It appears to be abstracted behind a cardbus whatever interface and
>> therefore it would probably need something extra to work, right?
>The CF slot is PCMCIA slot #1 in the Ricoh RL5c476 controller, which
>by the way appears to be quite a crappy piece of hardware. (There are
>known, unfixed, hard-to-fix bugs with it specifically mentioned on
>the Linux PCMCIA page.)

http://pcmcia-cs.sf.net/'s mail archives speak of irq problems at least.

I will definitely look into this further later.

>> But I couldn't get it running..
>First of all, make sure you build your own kernel so you have control
>of things.

This I am doing, fortunately.

>Then; are you using new PATA or old ATAPI/IDE drivers? Make sure you

I'm on the new one, CONFIG_IDE

>have PCMCIA PATA support or PCMCIA IDE support enabled, respectively.

Here I made a stupid mistake, didn't notice it under the pcmcia menus
so I searched for PCMCIA, so I missed it, as it's under the IDE menu
with the name CONFIG_BLK_DEV_IDECS so my bad there :(

I recompiled my FAI installer kernel with that on and it Just Worked :)

So that was the faulty point.

>Either way, the particular flash card you are using needs to be
>recognized by the kernel driver in order for things to work
>automagically. Run pccardctl info with the card inserted to get the
>PRODID_* strings you need - then calculate the CRC32 hash that needs
>to go into the kernel - see
>/usr/src/linux/Documentation/pcmcia/crc32hash.c and add the hashes to
>both drivers. Please send a patch to the linux-pcmcia mailing list
>with them as well.

I'm not sure I understand this part, at least completely, sorry.

This is not handleable by udev, to have the rules there for creating
nodes? Or do I need to patch the drivers to have udev play along?

Documentation/pcmcia/devicetable.txt isn't really clear either
on where I'm supposed to put those crc32 hashes...

Anyway, seems my card is supported anyway but it would be interesting
to know this stuff :>

>When using LB there are at least two tricky problems with what you
>(and I) want to accomplish:

>1. If FILO is to load the kernel from the Ricoh slot #1, the Ricoh
>chip seems to need to be configured in a way which later causes Linux
>to not be able to pick it up as a PCMCIA controller. This is surely a
>problem with how LB initializes the Ricoh, combined with, ehm,
>"design decisions" in the FILO IDE driver.

I'm actually thinking about skipping FILO if possible, so I have the
kernel and and a small-enough initrd as the payload.

Have to admit I haven't really checked sizes yet, but the via
spec said the bios is 2/4Mbit, so 4Mbit should fit pretty much...

Any thoughts on this?

It is still always sad when hardware doesn't really work or is
very hard to fix :/

>2. Pluggable device events are handled in a separate kernel thread,
>which means that the root device may not be available by the time
>Linux wants to mount root even though the card is physically plugged
>in - because the coldplug event has not been processed and the device
>has not yet been added to the kernel-internal device tree.

This may turn out to be a severe problem.

Anyway, my roadmap is pretty much that next up I'll set up a local
debian repository so I can install a kernel.

Then I'll have FAI install on the cf.

After that (because seems it's now supported) I'll test boot with the 
factory bios and grub.

.. And then there will be linuxbios, finally :)

>1 needs further investigation. I gave up on it because I did not
>understand 2 completely when I first looked at this. If you search
>the LB archives for September 2006 you'll find some posts by me
>babbling about the CF situation on the EPIA-MII.

After I get this message out.

>IBM has an article on this from early 2.4 kernel times. The suggested
>workaround was to add a few seconds delay to the kernel before it
>tries to mount root, so that the coldplug event is handled first.
>That's crazy ugly of course, but it works. Unfortunately the patch
>for the ancient kernels is no longer available so it will have to be
>re-invented. :(

Even if it were available I doubt it would patch in very cleanly,
so something needs to be figured out.

>It's also possible to configure the Ricoh slot #1 as a static IDE
>device - ie. not hot-pluggable and using the plain PATA/IDE drivers,
>not the PCMCIA ones. Then it works fine in FILO, and it almost worked
>with 2.6.18. A lot has happened in the kernel since so I think

What is "almost worked", please? :)

>chances are good for it to work perfectly now. The problem with this
>is that the slot IS hot-pluggable so I do not want to be dumbing it
>down with a non-hotplug-aware driver. You may be fine with that.

That's almost the same type of defeat-admission as using a separate
cf-ide adapter, which I'd rather pass up on.

>Finally, if you haven't gotten to booting with LB yet and are still
>working with the factory BIOS you are just having some silly driver
>issue in your kernel. Get that fixed (possibly you need to add your
>card CRC32 hashes to the drivers) and you'll be on your way.

Would seem to be limited to whatever bad mojo's still coming
wrt the ricoh.

Thank you once again!

-- 
mjt

-------------- next part --------------
Linux version 2.6.18-etch-fai-kernels () (root at coraline) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #2 SMP Sun Sep 16 11:46:37 UTC 2007
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003dff0000 (usable)
 BIOS-e820: 000000003dff0000 - 000000003dff3000 (ACPI NVS)
 BIOS-e820: 000000003dff3000 - 000000003e000000 (ACPI data)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
95MB HIGHMEM available.
896MB LOWMEM available.
On node 0 totalpages: 253936
  DMA zone: 4096 pages, LIFO batch:0
  Normal zone: 225280 pages, LIFO batch:31
  HighMem zone: 24560 pages, LIFO batch:3
DMI 2.2 present.
Allocating PCI resources starting at 40000000 (gap: 3e000000:c1ff0000)
Detected 1199.847 MHz processor.
Built 1 zonelists.  Total pages: 253936
Kernel command line: console=ttyS0,9600 console=tty0 netconsole=6665@/eth0,6666 at 192.168.1.33/ ip=dhcp root=/dev/nfs nfsroot=/opt/fai/nfsroot FAI_FLAGS=verbose,createvt,sshd FAI_ACTION=install BOOT_IMAGE=vmlinuz-install auto
netconsole: local port 6665
netconsole: interface eth0
netconsole: remote port 6666
netconsole: remote IP 192.168.1.33
netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
No local APIC present or hardware disabled
mapped APIC to ffffd000 (017cc000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1003312k/1015744k available (1959k kernel code, 11932k reserved, 742k data, 164k init, 98240k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 2401.70 BogoMIPS (lpj=4803402)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0381b83f 00000000 00000000 00000000 00000000 00000000 00000000
CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 64K (32 bytes/line)
CPU: After all inits, caps: 0381b93f 00000000 00000000 00000000 00000000 000000dd 00000000
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
Checking for popad bug... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 16k freed
CPU0: Centaur VIA Nehemiah stepping 08
SMP motherboard not detected.
Local APIC not detected. Using dummy APIC emulation.
Brought up 1 CPUs
migration_cost=0
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfb2d0, last bus=3
PCI: Using configuration type 1
Setting up standard PCI resources
VIA RNG detected
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 0400-047f claimed by vt8235 PM
PCI quirk: region 0500-050f claimed by vt8235 SMB
Boot video device is 0000:01:00.0
PCI: Using IRQ router VIA [1106/3177] at 0000:00:11.0
PCI: Bridge: 0000:00:01.0
  IO window: disabled.
  MEM window: dc000000-ddffffff
  PREFETCH window: d8000000-dbffffff
PCI: Bus 2, cardbus bridge: 0000:00:0a.0
  IO window: 00001000-000010ff
  IO window: 00001400-000014ff
  PREFETCH window: 40000000-41ffffff
  MEM window: 42000000-43ffffff
PCI: Bus 6, cardbus bridge: 0000:00:0a.1
  IO window: 00001800-000018ff
  IO window: 00001c00-00001cff
  PREFETCH window: 44000000-45ffffff
  MEM window: 46000000-47ffffff
PCI: Setting latency timer of device 0000:00:01.0 to 64
PCI: setting IRQ 12 as level-triggered
PCI: Found IRQ 12 for device 0000:00:0a.0
PCI: setting IRQ 5 as level-triggered
PCI: Found IRQ 5 for device 0000:00:0a.1
PCI: Sharing IRQ 5 with 0000:00:0d.0
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
highmem bounce pool size: 64 pages
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.1.9-k4
Copyright (c) 1999-2006 Intel Corporation.
pcnet32.c:v1.32 18.Mar.2006 tsbogend at alpha.franken.de
e100: Intel(R) PRO/100 Network Driver, 3.5.10-k2-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
ns83820.c: National Semiconductor DP83820 10/100/1000 driver.
via-rhine.c:v1.10-LK1.4.1 July-24-2006 Written by Donald Becker
eth0: VIA Rhine II at 0x1c800, 00:40:63:ee:b1:9e, IRQ 12.
eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.
forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.56.
dmfe: Davicom DM9xxx net driver, version 1.36.4 (2002-01-17)
winbond-840.c:v1.01-d (2.4 port) Nov-17-2001  Donald Becker <becker at scyld.com>
  http://www.scyld.com/network/drivers.html
uli526x: ULi M5261/M5263 net driver, version 0.9.3 (2005-7-29)
netconsole: device eth0 not up yet, forcing it
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
netconsole: carrier detect appears untrustworthy, waiting 4 seconds
netconsole: no IP address for eth0, aborting
block2mtd: version $Revision: 1.30 $
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
Time: tsc clocksource has been installed.
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.1.33, my address is 192.168.1.32
IP-Config: Complete:
      device=eth0, addr=192.168.1.32, mask=255.255.255.0, gw=192.168.1.1,
     host=install, domain=mjt.home, nis-domain=(none),
     bootserver=192.168.1.33, rootserver=192.168.1.33, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.33
Looking up port of RPC 100005/1 on 192.168.1.33
VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 164k freed
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected VIA CLE266 chipset
agpgart: AGP aperture is 128M @ 0xd0000000
Yenta: CardBus bridge found at 0000:00:0a.0 [1106:aa01]
Yenta: ISA IRQ mask 0x0c00, PCI irq 12
Socket status: 30000006
Yenta: CardBus bridge found at 0000:00:0a.1 [1106:aa01]
Yenta: ISA IRQ mask 0x0c00, PCI irq 5
Socket status: 30000810
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Found IRQ 5 for device 0000:00:0d.0
PCI: Sharing IRQ 5 with 0000:00:0a.1
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[5]  MMIO=[de00a000-de00a7ff]  Max Packet=[2048]  IR/IT contexts=[4/8]
ehci_hcd 0000:00:10.3: EHCI Host Controller
ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:10.3: irq 12, io mem 0xde00b000
ehci_hcd 0000:00:10.3: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
USB Universal Host Controller Interface driver v3.0
uhci_hcd 0000:00:10.0: UHCI Host Controller
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.0: irq 12, io base 0x0000b400
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
uhci_hcd 0000:00:10.1: UHCI Host Controller
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.1: irq 5, io base 0x0000b800
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
pccard: PCMCIA card inserted into slot 1
uhci_hcd 0000:00:10.2: UHCI Host Controller
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:10.2: irq 9, io base 0x0000bc00
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:11.1
PCI: VIA IRQ fixup for 0000:00:11.1, from 255 to 0
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
    ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
usb 2-2: new low speed USB device using uhci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice
hda: SAMSUNG HD400LD, ATA DISK drive
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[004063500009c68d]
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xdbfff 0xf0000-0xfffff
cs: memory probe 0x60000000-0x60ffffff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
pcmcia: registering new device pcmcia1.0
hda: max request size: 512KiB
hda: 781422768 sectors (400088 MB) w/8192KiB Cache, CHS=48641/255/63, UDMA(33)
hda: cache flushes supported
 hda: hda1
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
Probing IDE interface ide2...
hde: ELITE PRO CF CARD 1GB, CFA DISK drive
usbcore: registered new driver hiddev
input:   USB Multimedia Keyboard  as /class/input/input0
input: USB HID v1.00 Keyboard [  USB Multimedia Keyboard ] on usb-0000:00:10.0-2
ide2 at 0x100-0x107,0x10e on irq 5
hde: max request size: 128KiB
hde: 2031120 sectors (1039 MB) w/1KiB Cache, CHS=2015/16/63
 hde: hde1
ide-cs: hde: Vpp = 0.0
input:   USB Multimedia Keyboard  as /class/input/input1
input: USB HID v1.00 Device [  USB Multimedia Keyboard ] on usb-0000:00:10.0-2
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon!
Real Time Clock Driver v1.12ac
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
usbcore: registered new driver usbkbd
drivers/usb/input/usbkbd.c: :USB HID Boot Protocol keyboard driver
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
usbcore: registered new driver usbmouse
drivers/usb/input/usbmouse.c: v1.6:USB HID Boot Protocol mouse driver
Probing IDE interface ide1...
SCSI subsystem initialized
Fusion MPT base driver 3.04.01
Copyright (c) 1999-2005 LSI Logic Corporation
Fusion MPT SPI Host driver 3.04.01
libata version 2.00 loaded.
eth0: no IPv6 routers present
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070919/e0e4d0d9/attachment.sig>


More information about the coreboot mailing list