Patchwork it boots! [was: re: H8DME-2 woes, continued....]

login
register
about
Submitter Joe Korty
Date 2010-05-11 21:54:29
Message ID <20100511215429.GA5588@tsunami.ccur.com>
Download mbox | patch
Permalink /patch/1315/
State Rejected
Headers show

Comments

Joe Korty - 2010-05-11 21:54:29
On Tue, May 11, 2010 at 03:56:20PM -0400, Joe Korty wrote:
> Hi Everyone,
> Well, I've replaced the AMD 2378 CPUs on my SuperMicro H8DME-2 mb with
> a pair of AMD 2212 CPUs, and I get much much further along in the boot.
> But it still locks up.  The starting and ending messages on the serial
> console are:
> 
> 	[0x50] <-- 0xf0000000
> 	PCI: 00:06.1 init
> 	base = 0xfc140000
> 	codec_mask = 01



It boots!!!!!

I applied the below patch to skip 'codec' initialization (whatever that is)
and I was able to boot up to linux.

Can anyone explain what the codec is; perhaps we can turn this 'feature'
off permanently?  (or make it a .config option).

Joe
Peter Stuge - 2010-05-12 00:01:28
Joe Korty wrote:
> I applied the below patch to skip 'codec' initialization (whatever
> that is) and I was able to boot up to linux.

Where did you find the suggestion to do it?


> Can anyone explain what the codec is; perhaps we can turn this
> 'feature' off permanently?  (or make it a .config option).

The codec in this case is the chip that converts digital signals into
audible sound. It's part of the integrated soundcard in the chipset.
It should certainly not cause a hang..

The bad part is that we have no docs for MCP55.

In any case, there is code like this in
southbridge/nvidia/mcp55/mcp55_aza.c:

        do {
                dword = read32(base + 0x68);
        } while (dword & 1);

And that's bad. We shouldn't have code like this anywhere in
coreboot. It should get a timeout of some sort, so that it doesn't
hang forever.

A simple counter would be a great start, but it would of course be
best to understand why the code doesn't work on your system..

Can you check which codec you have please? Linux reports this. From
my laptop:

[    3.509587] ALSA device list:
[    3.509593]   #0: Intel 82801DB-ICH4 with AD1981B at irq 17

AD1981B is the codec.


//Peter
Joe Korty - 2010-05-12 03:54:18
On Tue, May 11, 2010 at 08:01:28PM -0400, Peter Stuge wrote:
> Joe Korty wrote:
> > I applied the below patch to skip 'codec' initialization (whatever
> > that is) and I was able to boot up to linux.
> 
> Where did you find the suggestion to do it?

I merely looked at the code around the last message to be printed.  There
was another printk a few lines down that wasn't being reached.  As the
'codec' feature sounded worthless (at least at boot time), I decided to
comment it out and see how much further in the boot I proceeded.


> > Can anyone explain what the codec is; perhaps we can turn this
> > 'feature' off permanently?  (or make it a .config option).
> 
> The codec in this case is the chip that converts digital signals into
> audible sound. It's part of the integrated soundcard in the chipset.
> It should certainly not cause a hang..

Thanks!  Now I as least know what it is.  


> The bad part is that we have no docs for MCP55.
> 
> In any case, there is code like this in
> southbridge/nvidia/mcp55/mcp55_aza.c:
> 
>         do {
>                 dword = read32(base + 0x68);
>         } while (dword & 1);
>
> And that's bad. We shouldn't have code like this anywhere in
> coreboot. It should get a timeout of some sort, so that it doesn't
> hang forever.

I'll write up a patch to do that, if no one else beats me to it
first.

Regards,
Joe
Peter Stuge - 2010-05-12 04:28:10
Joe Korty wrote:
> >         do {
> >                 dword = read32(base + 0x68);
> >         } while (dword & 1);
> >
> > And that's bad. We shouldn't have code like this anywhere in
> > coreboot. It should get a timeout of some sort, so that it doesn't
> > hang forever.
> 
> I'll write up a patch to do that, if no one else beats me to it
> first.

Awesome! Go for it!

(Btw what codec is on your board?)


//Peter
Joe Korty - 2010-05-13 17:12:22
On Tue, May 11, 2010 at 08:01:28PM -0400, Peter Stuge wrote:
> Can you check which codec you have please? Linux reports this. From
> my laptop:
> 
> [    3.509587] ALSA device list:
> [    3.509593]   #0: Intel 82801DB-ICH4 with AD1981B at irq 17
> 
> AD1981B is the codec.

Hi Peter,
Sorry, I didn't see your request in this, your earlier email.

I don't have an 'ALSA' labeled line in either dmesg or in
/var/log/messages.  I've grepped for other strings that
might indicate the sound card used (eg, sound, audio, nvidia,
mcp55, ICH) but nothing has come up yet.

lspci says:
00:06.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)

Joe
Peter Stuge - 2010-05-13 17:17:23
Hi Joe,

Joe Korty wrote:
> > Can you check which codec you have please? Linux reports this. From
> > my laptop:
> > 
> > [    3.509587] ALSA device list:
> > [    3.509593]   #0: Intel 82801DB-ICH4 with AD1981B at irq 17
> > 
> > AD1981B is the codec.
> 
> Hi Peter,
> Sorry, I didn't see your request in this, your earlier email.

No problem - thanks for checking this!


> I don't have an 'ALSA' labeled line in either dmesg or in
> /var/log/messages.

Ahh - then the sound drivers simply aren't loaded. There's noone else
in the system that would care about the codec so then the info isn't
to be found.

Unfortunately they manual doesn't mention audio hardware at all. :\


Thanks!

//Peter
Joe Korty - 2010-05-14 15:38:18
On Thu, May 13, 2010 at 01:17:23PM -0400, Peter Stuge wrote:
> Can you check which codec you have please? Linux reports this. From
> my laptop:
> 
> [    3.509587] ALSA device list:
> [    3.509593]   #0: Intel 82801DB-ICH4 with AD1981B at irq 17
> 
> Joe Korty wrote:
>> I don't have an 'ALSA' labeled line in either dmesg or in
>> /var/log/messages.
> 
> Ahh - then the sound drivers simply aren't loaded. There's noone else
> in the system that would care about the codec so then the info isn't
> to be found.
> 
> Unfortunately they manual doesn't mention audio hardware at all. :\


Hi Peter,
I just booted with the original flash rather than with coreboot. This
is to get the audio properly initialized by BIOS as Sefan mentions is
required. Although I don't have the ALSA line (still), I do have these
lines in /var/log/messages from the Linux azalia driver:

  mount used greatest stack depth: 5960 bytes left
  HDA Intel 0000:00:06.1: PCI->APIC IRQ transform: INT B -> IRQ 23
  input: PC Speaker as /class/input/input2
  eth1: no link during initialization.
  hda-intel: azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
  hda-intel: Codec #0 probe error; disabling it...
  hda_intel: azx_get_response timeout, switching to single_cmd mode: last cmd=0x000f0000
  hda-intel: no codecs initialized
  
Also, my mainboard has no audio-out jack....

Regards,
Joe

Patch

Index: trunk/src/southbridge/nvidia/mcp55/mcp55_aza.c
===================================================================
--- trunk.orig/src/southbridge/nvidia/mcp55/mcp55_aza.c	2010-05-06 10:54:13.000000000 -0400
+++ trunk/src/southbridge/nvidia/mcp55/mcp55_aza.c	2010-05-11 13:57:59.000000000 -0400
@@ -237,7 +237,7 @@ 
 
 	if(codec_mask) {
 		printk(BIOS_DEBUG, "codec_mask = %02x\n", codec_mask);
-		codecs_init(base, codec_mask);
+		// codecs_init(base, codec_mask);
 	}
 }