Powermac G4 (Digital Audio) freezes before openfirmware with new SATA card

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Powermac G4 (Digital Audio) freezes before openfirmware with new SATA card

Justin Haynes
I am running OpenBSD 5.0 on a Powermac G4 (Digital Audio) with an unmodified
GENERIC kernel.  It has run just fine for days at a time with no obvious
problems of any kind until i tried to add new 32-bit PCI SATA cards to it.
When i add the SATA card to one of the slots and power the machine on,
I hear the power come on, and see the screen become active but black.
openfirmware does not display at all and it only stays indefinately in
this state until I power it off.

When i remove the card it works just fine.  I have three of these cards which
I have purchased new from newegg and I have tried all three one at a time
in each of the four PCI slots.

I apologize in advance as my question is probably hardware related, and
not strictly speaking OpenBSD related; but after searching for my answers I
have been unable to find them so far.  I hope the list can help to point me in
the right direction so I can get on with the task of building out my OpenBSD
NAS.

My question is, can I reaonsably expect this card which i believe to be
supported by OpenBSD to work with this Powermac G4?  If not, why; and if so
how can i troubleshoot?  I hope someone from this list can at least point me
in the right direction.  I'll be happy to gather any information necessary.
More appears below.

Before adding the SATA card, the machine had been running with no PCI cards in
any of its 4 slots.  the AGP slot has a video card in it.  
 - One USB port had one keyboard attached.  No other USB devices are attached.
 - The VGA port on the video card is attached to a big screen TV which the
   Openfirmware and OpenBSD framebuffer displays at 1920x1080.
 - 2 IDE hard drives are attached: ultra0 and ultra1 , and a cd drive to ide0
 - a dmesg appears at the end of this email.
 - I don't have a setenv of the openfirmware at this time.

I power off the machine and carefully add one "MASSCOOL PCI Card, 4 internal
SATA Model XWT-RC040" which I purchased from newegg
(http://www.newegg.com/Product/Product.aspx?Item=15-280-003).  This is a 32-bit
PCI card which the Mac G4's 64-bit slot should accept and work with as far as I
know.  I power on the machine and the screen remains blank.  Openfirmware never
displays.  I see that the machine has power, i heard the two IDE drives settle,
the screen is active but black.

I selected these cards because i believed they would probably work with OpenBSD:
 - The OpenBSD macppc port page states that SATA does not work on the G5
   XServes.  I took this to mean that that particular SATA hardware did not
   work and that any chipset supported by OpenBSD should be supported.
 - this SATA card has an SiI3114 chip which I saw mentioned as supported in the
   i386 port page.
 - two comments on the newegg page dating from 2009 for this product mentioned
   it worked well with the FreeBSD, OpenSolaris and the FreeBSD based FreeNAS



$ dmesg
[ using 490376 bytes of bsd ELF symbol table ]
console out [NVDA,NVMac]console in [keyboard] , using USB
: memaddr 98000000 size 8000000, : consaddr 98004000, : ioaddr 91000000, size 1000000: memtag 8000, iotag 8000: width 1920 linebytes 2048 height 1080 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2011 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.0 (GENERIC) #69: Wed Aug 17 10:17:02 MDT 2011
    [hidden email]:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 805306368 (768MB)
avail mem = 768524288 (732MB)
mainbus0 at root: model PowerMac3,4
cpu0 at mainbus0: 7450 (Revision 0x200): 733 MHz: 256KB L2 cache, 1MB L3 cache
mem0 at mainbus0
spdmem0 at mem0: 512MB SDRAM non-parity PC133CL3
spdmem1 at mem0: 256MB SDRAM non-parity PC133CL3
memc0 at mainbus0: uni-n
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
mpcpcibr0 at mainbus0 pci: uni-north, Revision 0xff
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Uni-N2 AGP" rev 0x00
vgafb0 at pci0 dev 16 function 0 "NVIDIA GeForce2 MX" rev 0xa1, mmio
wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
mpcpcibr1 at mainbus0 pci: uni-north, Revision 0x0
pci1 at mpcpcibr1 bus 0
pchb1 at pci1 dev 11 function 0 "Apple Uni-N2 Host" rev 0x00
macobio0 at pci1 dev 23 function 0 "Apple Keylargo" rev 0x03
openpic0 at macobio0 offset 0x40000: version 0x4614 little endian
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 irq 47
pgs0 at macgpio0: irq 55
"gpio5" at macgpio0 not configured
"gpio6" at macgpio0 not configured
"gpio11" at macgpio0 not configured
"extint-gpio15" at macgpio0 not configured
"extint-gpio16" at macgpio0 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zsc0 at macobio0 offset 0x13000: irq 22,50
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
tumbler0 at macobio0 offset 0x10000: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000 irq 25: via-pmu, 0 targets
apm0 at adb0: battery flags 0x9, 0% charged
kiic1 at macobio0 offset 0x18000
iic1 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0: <IBM-IC35L060AVER07-0>
wd0: 16-sector PIO, LBA, 58644MB, 120103200 sectors
wd1 at wdc0 channel 0 drive 1: <ST380021A>
wd1: 16-sector PIO, LBA, 76319MB, 156301488 sectors
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
wd1(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
wdc1 at macobio0 offset 0x20000 irq 20: DMA
atapiscsi0 at wdc1 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <PIONEER, DVD-RW DVR-103, 1.90> ATAPI 5/cdrom removable
cd0(wdc1:0:0): using BIOS timings, DMA mode 2
wdc2 at macobio0 offset 0x21000 irq 21: DMA
audio0 at tumbler0
ohci0 at pci1 dev 24 function 0 "Apple USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north, Revision 0x16
pci2 at mpcpcibr2 bus 0
pchb2 at pci2 dev 11 function 0 "Apple Uni-N2 Host" rev 0x00
"AT&T/Lucent FW322 1394" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Uni-N GMAC" rev 0x01: irq 41, address 00:03:93:48:ef:2e
brgphy0 at gem0 phy 0: BCM5401 10/100/1000baseT PHY, rev. 3
uhidev0 at uhub0 port 1 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/12.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 1 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/12.01 addr 2
uhidev1: iclass 3/1, 8 report ids
ums0 at uhidev1 reportid 2: 16 buttons, Z dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 8: input=1, output=0, feature=0
uhidev2 at uhub0 port 1 configuration 1 interface 2 "Logitech USB Receiver" rev 2.00/12.01 addr 2
uhidev2: iclass 3/0, 33 report ids
uhid3 at uhidev2 reportid 16: input=6, output=6, feature=0
uhid4 at uhidev2 reportid 17: input=19, output=19, feature=0
uhid5 at uhidev2 reportid 32: input=14, output=14, feature=0
uhid6 at uhidev2 reportid 33: input=31, output=31, feature=0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:/bsd
root on wd0a swap on wd0b dump on wd0b

Reply | Threaded
Open this post in threaded view
|

Re: Powermac G4 (Digital Audio) freezes before openfirmware with new SATA card

Mark Kettenis
> Date: Wed, 18 Apr 2012 22:33:48 -0500
> From: Justin H Haynes <[hidden email]>
>
> I am running OpenBSD 5.0 on a Powermac G4 (Digital Audio) with an unmodified
> GENERIC kernel.  It has run just fine for days at a time with no obvious
> problems of any kind until i tried to add new 32-bit PCI SATA cards to it.
> When i add the SATA card to one of the slots and power the machine on,
> I hear the power come on, and see the screen become active but black.
> openfirmware does not display at all and it only stays indefinately in
> this state until I power it off.
>
> When i remove the card it works just fine.  I have three of these cards which
> I have purchased new from newegg and I have tried all three one at a time
> in each of the four PCI slots.
>
> I apologize in advance as my question is probably hardware related, and
> not strictly speaking OpenBSD related; but after searching for my answers I
> have been unable to find them so far.  I hope the list can help to point me in
> the right direction so I can get on with the task of building out my OpenBSD
> NAS.
>
> My question is, can I reaonsably expect this card which i believe to be
> supported by OpenBSD to work with this Powermac G4?  If not, why; and if so
> how can i troubleshoot?

Sorry, no, there is no guarantee that this will work.  In any machine,
the firmware gets to have a go at doing some minimal configuration of
the hardware.  If there are bugs in the firmware, or the hardware
deviates from the relevant standards too much, this may fail.  As
OpenBSD developers we've never been impressed by the quality of
Apple's OpenFirmware implementation.  The Sun implementation (on
sparc/sparc64) is much better.  But even there you may run into
issues.  Heck I've even seen this happen on i386/amd64 machines.

The only suggestion I have is to try exchanging the card for a
different model.

Reply | Threaded
Open this post in threaded view
|

Re: Powermac G4 (Digital Audio) freezes before openfirmware with new SATA card

Justin Haynes
On Thu, Apr 19, 2012 at 2:08 AM, Mark Kettenis <[hidden email]>
wrote:
>
> > Date: Wed, 18 Apr 2012 22:33:48 -0500
> > From: Justin H Haynes <[hidden email]>
> >

> >
> > My question is, can I reaonsably expect this card which i believe to be
> > supported by OpenBSD to work with this Powermac G4?  If not, why; and if
so
> > how can i troubleshoot?
>

>
> The only suggestion I have is to try exchanging the card for a
> different model.

Thanks Mark.  I have now tried 7 cards with the intent of finding a
card for my own purposes and sharing the results.  I'll provide
a summary of the results for those interested at the end of
this post, but will stay to my original purpose of adding storage
so that I can use the Powermac as a NAS and as a database
server.  I have run into another problem in adding storage
to this machine and will describe the problem here.

Of the three cards I tested that work I chose the VIA 6421based
Rosewill RC-215, which has 2 1.5gb/s sata ports and one IDE port.
This card can sit in the machine with no targets as the machine
runs without any problems for days until I shut it down manually.

   $ diff nocards.dmesg rosewill_rc-215.dmesg
   27a28,29
   > pciide0 at pci1 dev 20 function 0 "VIA VT6421 SATA" rev 0x50: DMA
   > pciide0: using irq 54 for native-PCI interrupt

The machine is stock and has only one pci card installed
(the Rosewill RC-215).  The machine's root disk is an IDE
disk and also has a secondary disk IDE installed

The 2 IDE disks are identified as wd0 and wd1. Both are identified in
fstab by DUIDs.  wd0a is root.  wd0b is swap.

The problem comes when I add storage.  I add 1 1TB sata
drive to the rosewill and power up.  Now, the new sata drive
is found as wd0, and the two IDE drives are found as wd1
and wd2

The kernel tries to mount wd0a as root and use wd0b as swap.
Then the system drops to ddb>.

I will type the last few lines as the machine attempts to boot as
I do not have a way to capture terminal output from the machine
at this time.

vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootpath: /pci@f20000000/mac-io@17/ata-4@1F000/disk@0:/bsd
root on wd0a swap on wd0b dump on wd0b
panic: root filesystem has size 0
Stopped at      Debugger+0x10:  lwz r0,20(r1)
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE  OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
000000fc: tlbdmsmsize+0x14 fp 79ec50 nfp 79ec60
0027f144: panic+0xc8 fp 79ec60 nfp 79ecc0
00275688: dk_mountroot+0x110 fp 79ecc0 nfp 79eee0
00255334: main+0x51c fp 79eee0 nfp 79ef40
001001bc: kernel_text+0xa8 fp 79ef40 nfp 0


Perhaps I don't understand how the kernel uses DUIDs, but my
understanding was that by identifying disks by DUID in fstab,
I could avoid situations like this one; because the kernel
would identify the disk by this handle and then use that
to find the disks.  I guess there is some point at which the DUID is
resolved to a device name, and once resolved only the device name
would be used. So the cause of this problem may have
to do with the timing of that resolution from DUID to device name.
Is this correct?

What should I do next to try to solve the problem?

Also, I did create a filesystem on the sata drive by booting
up with the bsd.rd and running newfs on it.  So the drive is
addressable and usable through this PCI card.

Thanks for your time.  The results to my tests on SATA cards are
found below,

Justin

-----------------------


The results can be found at the following link with dmesg lines for each
card,
and a link to the hardware as it appears on newegg. An outline also
appears below:
http://justinhaynes.com/wiki/index.php?title=Power_Mac_G4_Digital_Audio

2.2 sata
2.2.1 works or seems to work
2.2.1.1 VIA 6421 (StarTech 1 Port eSATA + 1 Port SATA PCI Controller
Card w/ LP Bracket Model PCIESATA2I)
2.2.1.2 VIA 6421 (Rosewill RC-215 VIA PCI SATA 1.5G x2 / ATA 133 (IDE)
x1 Controller Card)
2.2.1.3 SiI3112 (VANTEC 2-Port SATA II-150 PCI Host Card Model UGT-ST200)
2.2.2 appears in dmesg but not supported
2.2.2.1 SiI3124 (Rosewill RC-217 SATA II 4 Port RAID 0/1/5/10 PCI RAID Card)
2.2.3 hangs before openfirmware displays
2.2.3.1 SiI3114 (MASSCOOL PCI Card, 4 internal SATA Model XWT-RC040)
2.2.3.2 SiI3114 (SYBA SY-SA3114-4R PCI SATA PCI SATA Raid Card)
2.2.3.3 Silicon Image SIL3512A (SYBA SD-SATA150R PCI SATA Controller Card)

Reply | Threaded
Open this post in threaded view
|

Re: Powermac G4 (Digital Audio) freezes before openfirmware with new SATA card

Justin Haynes
ppc -

Is the kernel assuming root should be on the same disk it was booted from,
and inferring where root should be based on the bootpath?:

scsibus2 at softraid0: 256 targets
bootpath: /pci@f20000000/mac-io@17/ata-4@1F000/disk@0:/bsd
root on wd0a swap on wd0b dump on wd0b
panic: root filesystem has size 0

This is my only guess since wd1a and wd1b would be the disks specified by
the DUIDs in /etc/fstab....

In other words, the kernel seems to me to be trying to mount partitions
which are not specified in /etc/fstab...

-Justin


On Sat, May 12, 2012 at 10:28 AM, Justin Haynes <[hidden email]>wrote:

> On Thu, Apr 19, 2012 at 2:08 AM, Mark Kettenis <[hidden email]>
> wrote:
> >
> > > Date: Wed, 18 Apr 2012 22:33:48 -0500
> > > From: Justin H Haynes <[hidden email]>
> > >
>
> > >
> > > My question is, can I reaonsably expect this card which i believe to be
> > > supported by OpenBSD to work with this Powermac G4?  If not, why; and
> if so
> > > how can i troubleshoot?
> >
>
> >
> > The only suggestion I have is to try exchanging the card for a
> > different model.
>
> Thanks Mark.  I have now tried 7 cards with the intent of finding a
> card for my own purposes and sharing the results.  I'll provide
> a summary of the results for those interested at the end of
> this post, but will stay to my original purpose of adding storage
> so that I can use the Powermac as a NAS and as a database
> server.  I have run into another problem in adding storage
> to this machine and will describe the problem here.
>
> Of the three cards I tested that work I chose the VIA 6421based
> Rosewill RC-215, which has 2 1.5gb/s sata ports and one IDE port.
> This card can sit in the machine with no targets as the machine
> runs without any problems for days until I shut it down manually.
>
>   $ diff nocards.dmesg rosewill_rc-215.dmesg
>   27a28,29
>   > pciide0 at pci1 dev 20 function 0 "VIA VT6421 SATA" rev 0x50: DMA
>   > pciide0: using irq 54 for native-PCI interrupt
>
> The machine is stock and has only one pci card installed
> (the Rosewill RC-215).  The machine's root disk is an IDE
> disk and also has a secondary disk IDE installed
>
> The 2 IDE disks are identified as wd0 and wd1. Both are identified in
> fstab by DUIDs.  wd0a is root.  wd0b is swap.
>
> The problem comes when I add storage.  I add 1 1TB sata
> drive to the rosewill and power up.  Now, the new sata drive
> is found as wd0, and the two IDE drives are found as wd1
> and wd2
>
> The kernel tries to mount wd0a as root and use wd0b as swap.
> Then the system drops to ddb>.
>
> I will type the last few lines as the machine attempts to boot as
> I do not have a way to capture terminal output from the machine
> at this time.
>
> vscsi0 at root
> scsibus1 at vscsi0: 256 targets
> softraid0 at root
> scsibus2 at softraid0: 256 targets
> bootpath: /pci@f20000000/mac-io@17/ata-4@1F000/disk@0:/bsd
> root on wd0a swap on wd0b dump on wd0b
> panic: root filesystem has size 0
> Stopped at      Debugger+0x10:  lwz r0,20(r1)
> RUN AT LEAST 'trace' AND 'ps' AND INCLUDE  OUTPUT WHEN REPORTING THIS
> PANIC!
> DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
> ddb> trace
> 000000fc: tlbdmsmsize+0x14 fp 79ec50 nfp 79ec60
> 0027f144: panic+0xc8 fp 79ec60 nfp 79ecc0
> 00275688: dk_mountroot+0x110 fp 79ecc0 nfp 79eee0
> 00255334: main+0x51c fp 79eee0 nfp 79ef40
> 001001bc: kernel_text+0xa8 fp 79ef40 nfp 0
>
>
> Perhaps I don't understand how the kernel uses DUIDs, but my
> understanding was that by identifying disks by DUID in fstab,
> I could avoid situations like this one; because the kernel
> would identify the disk by this handle and then use that
> to find the disks.  I guess there is some point at which the DUID is
> resolved to a device name, and once resolved only the device name
> would be used. So the cause of this problem may have
> to do with the timing of that resolution from DUID to device name.
> Is this correct?
>
> What should I do next to try to solve the problem?
>
> Also, I did create a filesystem on the sata drive by booting
> up with the bsd.rd and running newfs on it.  So the drive is
> addressable and usable through this PCI card.
>
> Thanks for your time.  The results to my tests on SATA cards are
> found below,
>
> Justin
>
> -----------------------
>
>
> The results can be found at the following link with dmesg lines for each
> card,
> and a link to the hardware as it appears on newegg. An outline also
> appears below:
> http://justinhaynes.com/wiki/index.php?title=Power_Mac_G4_Digital_Audio
>
> 2.2 sata
> 2.2.1 works or seems to work
> 2.2.1.1 VIA 6421 (StarTech 1 Port eSATA + 1 Port SATA PCI Controller
> Card w/ LP Bracket Model PCIESATA2I)
> 2.2.1.2 VIA 6421 (Rosewill RC-215 VIA PCI SATA 1.5G x2 / ATA 133 (IDE)
> x1 Controller Card)
> 2.2.1.3 SiI3112 (VANTEC 2-Port SATA II-150 PCI Host Card Model UGT-ST200)
> 2.2.2 appears in dmesg but not supported
> 2.2.2.1 SiI3124 (Rosewill RC-217 SATA II 4 Port RAID 0/1/5/10 PCI RAID
> Card)
> 2.2.3 hangs before openfirmware displays
> 2.2.3.1 SiI3114 (MASSCOOL PCI Card, 4 internal SATA Model XWT-RC040)
> 2.2.3.2 SiI3114 (SYBA SY-SA3114-4R PCI SATA PCI SATA Raid Card)
> 2.2.3.3 Silicon Image SIL3512A (SYBA SD-SATA150R PCI SATA Controller Card)