Booting Imac G5

J. Mayer l_indien at magic.fr
Sun Nov 7 06:25:23 EST 2004


On Sat, 2004-11-06 at 01:56, Benjamin Herrenschmidt wrote:
> On Fri, 2004-11-05 at 13:14 +0100, J. Mayer wrote:
> > Hi,
> > 
> > I have a new Imac G5 and I made Linux boot on it. Here's a patch
> > proposal to get the Sungem ethernet device, the firewire and the IDE
> > controler recognized.
> > There still are major issues:
> > - serial ATA freezes during disc probe
> > - the RTC isn't recongnized
> > - of course, there is no power / fan management.
> > My patch is a very minimal one which made me able to boot from CDROM and
> > firewire disk drive, that's a start ;-)
> > Note that this patch was originally done against the gentoo version of
> > linux-2.6.8 but applies well against kernel.org 2.6.9.
> > I'll try to take a look and solve the SATA issue during this week-end.
> 

Hi again,

as I can see you wrote the SATA driver for Pmac, you may have an idea of
what going wrong on the Imac.
I did activate DPRINTK and VPRINTK in libata and added a few messages.
It seems that the SET_FEATURES command never completes. So the insmod
stays blocked but the machine is still fully usable from another shell.
I attach here the complete dmesg I got when booting.
Please note that the message:
"ata_dev_set_xfermode: qc_issue xfer_mode=12" used to be "... xfer=70"
(note the printk I added is decimal) but I tried to force it to the
xfer_mode I saw from  ata_host_set_pio trace, and it changed nothing.

Regards.

-- 
J. Mayer <l_indien at magic.fr>
Never organized
-------------- next part --------------
Found initrd at 0xc000000001b00000:0xc000000001b76aad
trying to initialize btext ...
Starting Linux PPC64 2.6.9
-----------------------------------------------------
naca                          = 0xc000000000004000
naca->pftSize                 = 0x17
naca->debug_switch            = 0x0
naca->interrupt_controller    = 0x1
systemcfg                     = 0xc000000000005000
systemcfg->processorCount     = 0x0
systemcfg->physicalMemorySize = 0x20000000
systemcfg->dCacheL1LineSize   = 0x80
systemcfg->iCacheL1LineSize   = 0x80
htab_data.htab                = 0xc00000001f800000
htab_data.num_ptegs           = 0x10000
-----------------------------------------------------
[boot]0100 MM Init
[boot]0100 MM Init Done
Linux version 2.6.9 (root at imac) (gcc version 3.4.1 20040803 (Gentoo Linux 3.4.1-r3, ssp-3.4-2, pie-8.7.6.5)) #6 Sat Nov 6 19:21:12 CET 2004
[boot]0012 Setup Arch
Using native/NAP idle loop
Found U3 memory controller & host bridge, revision: 57
Mapped at 0xe000000080152000
Found a K2 mac-io controller, rev: 0, mapped at 0xe000000080193000
PowerMac motherboard: IMac G5
nvram: Checking bank 0...
nvram: gen0=118, gen1=117
nvram: Active bank is: 0
Adding PCI host bridge /pci at 0,f0000000
Found U3-AGP PCI host bridge. Firmware bus number: 240->255
Adding PCI host bridge /ht at 0,f2000000
Can't get bus-range for /ht at 0,f2000000, assume bus 0
U3/HT: hole, 0 end at 8fffffff, 1 start at b0000000
Found U3-HT PCI host bridge. Firmware bus number: 0->239
Can't get bus-range for /ht at 0,f2000000
PCI Host 0, io start: fffffffffd800000; io end: fffffffffdffffff
PCI Host 1, io start: 0; io end: 3fffff
Top of RAM: 0x20000000, Total RAM: 0x20000000
Memory hole size: 0MB
On node 0 totalpages: 131072
  DMA zone: 131072 pages, LIFO batch:16
  Normal zone: 0 pages, LIFO batch:1
  HighMem zone: 0 pages, LIFO batch:1
[boot]0015 Setup Done
Built 1 zonelists
Kernel command line: root=/dev/ram rw ramdisk_size=11000 init=/linuxrc devfs real_root=/dev/scsi/host0/bus0/target0/lun0/part14 devf real_root=/dev/scsi/host0/bus0/target0/lun0/part14
PowerMac using OpenPIC irq controller at 0x80040000
[boot]0020 OpenPic Init
OpenPIC Version 1.2 (4 CPUs and 124 IRQ sources) at e000000082e1c000
[boot]0025 OpenPic Done
Slave OpenPIC at 0xf8040000 hooked on IRQ 96
[boot]0020 OpenPic U3 Init
OpenPIC (U3) Version 1.2
[boot]0025 OpenPic U3 Done
PID hash table entries: 4096 (order: 12, 131072 bytes)
time_init: decrementer frequency = 33.333333 MHz
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Memory: 500480k/524288k available (3244k kernel code, 23472k reserved, 1484k data, 322k bss, 164k init)
Calibrating delay loop... 66.56 BogoMIPS (lpj=33280)
Mount-cache hash table entries: 256 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 474k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
U3-DART: table not allocated, using direct DMA
PCI: Probing PCI hardware done
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
nvram_init: Could not find nvram partition for nvram buffered error logging.
devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
Initializing Cryptographic API
Using unsupported 1440x900 NVDA,Display-A at a0008000, depth=8, pitch=1536
Console: switching to colour frame buffer device 180x56
fb0: Open Firmware frame buffer device on /pci at 0,f0000000/NVDA,Parent at 10/NVDA,Display-A at 0
RAMDISK driver initialized: 16 RAM disks of 11000K size 1024 blocksize
loop: loaded (max 8 devices)
sungem.c:v0.98 8/24/03 David S. Miller (davem at redhat.com)
eth0: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:0d:93:57:f6:f6 
PHY ID: 4061e4, addr: 0
eth0: Found BCM5221 PHY
MacIO PCI driver attached to K2 chipset
Warning: no ADB interface detected
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PCI: Enabling device: (0001:02:0d.0), cmd 2
ide0: Found Apple OHare ATA controller, bus ID 3, irq 38
Probing IDE interface ide0...
hda: MATSHITADVD-R UJ-825, ATAPI CD/DVD-ROM drive
hda: MDMA, cycleTime: 150, accessTime: 75, recTime: 75
hda: Set MDMA timing for mode 2, reg: 0x00221526
hda: Enabling MultiWord DMA 2
Using anticipatory io scheduler
ide0 at 0xe0000000831f0000-0xe0000000831f0007,0xe0000000831f0160 on irq 38
hda: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, (U)DMA
Uniform CD-ROM driver Revision: 3.20
ieee1394: Initialized config rom entry `ip1394'
ohci1394: $Rev: 1223 $ Ben Collins <bcollins at debian.org>
PCI: Enabling device: (0001:02:0e.0), cmd 2
ohci1394: fw-host0: Unexpected PCI resource length of 1000!
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[39]  MMIO=[80100000-801007ff]  Max Packet=[2048]
sbp2: $Rev: 1219 $ Ben Collins <bcollins at debian.org>
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
PCI: Enabling device: (0001:01:0b.0), cmd 2
ohci_hcd 0001:01:0b.0: NEC Corporation USB
ohci_hcd 0001:01:0b.0: irq 70, pci mem e0000000831f3000
ohci_hcd 0001:01:0b.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
PCI: Enabling device: (0001:01:0b.1), cmd 2
ohci_hcd 0001:01:0b.1: NEC Corporation USB (#2)
ohci_hcd 0001:01:0b.1: irq 70, pci mem e0000000831f4000
ohci_hcd 0001:01:0b.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Found KeyWest i2c on "u3", 2 channels, stepping: 4 bits
Found KeyWest i2c on "mac-io", 1 channel, stepping: 4 bits
NET: Registered protocol family 26
NET: Registered protocol family 2
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 131072 bind 65536)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
Freeing unused kernel memory: 164k freed
usb 1-1: new full speed USB device using address 2
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-2: new low speed USB device using address 3
input: USB HID v1.10 Mouse [Logitech Trackball] on usb-0001:01:0b.0-2
usb 1-3: new full speed USB device using address 4
ieee1394: Node added: ID:BUS[0-00:1023]  GUID[0030e000e0000e1c]
ieee1394: Host added: ID:BUS[0-01:1023]  GUID[000d93fffe57f6f6]
scsi0 : SCSI emulation for IEEE-1394 SBP-2 Devices
input: USB HID v1.11 Keyboard [05ac:1000] on usb-0001:01:0b.0-3
input: USB HID v1.11 Mouse [05ac:1000] on usb-0001:01:0b.0-3
usb 2-1: new low speed USB device using address 2
input: USB HID v1.10 Keyboard [CHICONY USB Keyboard] on usb-0001:01:0b.1-1
input,hiddev0: USB HID v1.10 Device [CHICONY USB Keyboard] on usb-0001:01:0b.1-1
usb 1-1.3: new full speed USB device using address 5
input: USB HID v1.10 Keyboard [Mitsumi Electric Apple Extended USB Keyboard] on usb-0001:01:0b.0-1.3
input: USB HID v1.10 Device [Mitsumi Electric Apple Extended USB Keyboard] on usb-0001:01:0b.0-1.3
ieee1394: sbp2: Logged into SBP-2 device
ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
  Vendor: IBM-DTLA  Model: -307030           Rev:     
  Type:   Direct-Access                      ANSI SCSI revision: 06
SCSI device sda: 60036480 512-byte hdwr sectors (30739 MB)
sda: asking for cache data failed
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0: [mac] p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
ieee1394: unsolicited response packet received - no tlabel match
EXT2-fs warning: checktime reached, running e2fsck is recommended
EXT2-fs warning: checktime reached, running e2fsck is recommended
PCI: Enabling device: (0001:01:0b.2), cmd 6
ehci_hcd 0001:01:0b.2: NEC Corporation USB 2.0
ehci_hcd 0001:01:0b.2: irq 70, pci mem e0000000831f8000
ehci_hcd 0001:01:0b.2: new USB bus registered, assigned bus number 3
ehci_hcd 0001:01:0b.2: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10
usb 2-1: USB disconnect, address 2
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 5 ports detected
drivers/usb/input/hid-core.c: can't resubmit intr, 0001:01:0b.1-1/input1, status -19
usb 1-1: USB disconnect, address 2
usb 1-1.3: USB disconnect, address 5
usb 1-2: USB disconnect, address 3
usb 1-3: USB disconnect, address 4
usb 1-1: new full speed USB device using address 6
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-2: new low speed USB device using address 7
input: USB HID v1.10 Mouse [Logitech Trackball] on usb-0001:01:0b.0-2
usb 1-3: new full speed USB device using address 8
input: USB HID v1.11 Keyboard [05ac:1000] on usb-0001:01:0b.0-3
input: USB HID v1.11 Mouse [05ac:1000] on usb-0001:01:0b.0-3
usb 2-1: new low speed USB device using address 3
input: USB HID v1.10 Keyboard [CHICONY USB Keyboard] on usb-0001:01:0b.1-1
input,hiddev0: USB HID v1.10 Device [CHICONY USB Keyboard] on usb-0001:01:0b.1-1
usb 1-1.3: new full speed USB device using address 9
input: USB HID v1.10 Keyboard [Mitsumi Electric Apple Extended USB Keyboard] on usb-0001:01:0b.0-1.3
input: USB HID v1.10 Device [Mitsumi Electric Apple Extended USB Keyboard] on usb-0001:01:0b.0-1.3
PHY ID: 4061e4, addr: 0
NET: Registered protocol family 10
Disabled Privacy Extensions on device c00000000048a7a8(lo)
IPv6 over IPv4 tunneling driver
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Pause is disabled
hda: MDMA, cycleTime: 150, accessTime: 75, recTime: 75
hda: Set MDMA timing for mode 2, reg: 0x00221526
hda: Enabling MultiWord DMA 2
libata version 1.02 loaded.
sata_svw version 1.04
ata_device_add: ENTER
ata_host_add: ENTER
ata_port_start: prd alloc, virt c000000012a7f000, dma 12a7f000
ata1: SATA max UDMA/133 cmd 0xE0000000831F9000 ctl 0xE0000000831F9020 bmdma 0xE0000000831F9030 irq 0
ata_host_add: ENTER
ata_port_start: prd alloc, virt c000000012a73000, dma 12a73000
ata2: SATA max UDMA/133 cmd 0xE0000000831F9100 ctl 0xE0000000831F9120 bmdma 0xE0000000831F9130 irq 0
ata_host_add: ENTER
ata_port_start: prd alloc, virt c00000001291b000, dma 1291b000
ata3: SATA max UDMA/133 cmd 0xE0000000831F9200 ctl 0xE0000000831F9220 bmdma 0xE0000000831F9230 irq 0
ata_host_add: ENTER
ata_port_start: prd alloc, virt c000000011430000, dma 11430000
ata4: SATA max UDMA/133 cmd 0xE0000000831F9300 ctl 0xE0000000831F9320 bmdma 0xE0000000831F9330 irq 0
ata_device_add: probe begin
ata_device_add: ata1: probe begin
ata_bus_reset: ENTER, host 1, port 0
ata_dev_classify: found ATA device by sig
ata_bus_reset: EXIT
ata_dev_identify: ENTER, host 1, dev 0
ata_dev_select: ENTER, ata1: device 0, wait 1
ata_dev_identify: do ATA identify
ata_sg_setup_one: mapped buffer of 512 bytes for read
ata_fill_sg: PRD[0] = (0x12A7B3C0, 0x200)
ata_dev_select: ENTER, ata1: device 0, wait 1
ata_exec_command_mmio: ata1: cmd 0xEC
ata_pio_sector: data read
ata_sg_clean: unmapping 1 sg elements
ata_qc_complete: EXIT
ata1: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4003 85:3469 86:3c01 87:4003 88:007f
ata_dump_id: 49==0x2f00  53==0x0007  63==0x0407  64==0x0003  75==0x0000  
ata_dump_id: 80==0x007e  81==0x001b  82==0x346b  83==0x7d01  84==0x4003  
ata_dump_id: 88==0x007f  93==0x0000
ata1: dev 0 ATA, max UDMA/133, 156301488 sectors: lba48
ata_dev_identify: EXIT, drv_stat = 0x50
ata_dev_identify: ENTER/EXIT (host 1, dev 1) -- nodev
ata_host_set_pio: base 0x8 xfer_mode 0xc mask 0x1f x 4
ata_dev_set_xfermode: set features - xfer mode
ata_dev_set_xfermode: qc_issue xfer_mode=12
ata_dev_select: ENTER, ata1: device 0, wait 1
ata_exec_command_mmio: ata1: cmd 0xEF
ata_dev_set_xfermode: wait for completion


More information about the Linuxppc64-dev mailing list