[PlanetCCRMA] alsa-kernel on a VIA C3 Centaur

Aaron Heller heller@ai.sri.com
Sun Oct 26 15:50:02 2003


I run the Planet on a homebrew machine with a VIA EPIA M9000 mini-ITX 
motherboard, which has a C3 "Centaur" processor.  This is an i686 
without the optional CMOV (conditional move) instruction.  When you 
specify "C3" in a LInux kernel build, it compiles with march=i586, which 
less than optimal but still OK.

I have been running with a 6-month-old planetdev kernel and alsa-driver:

http://www-ccrma.stanford.edu/planetccrma/mirror/redhat/linux/planetdev/8.0/en/os/i386/   
  kernel-up-2.4.20-1.12.ll.acpi.i386.rpm
  alsa-driver-2.4.20-1.12.ll.acpi-0.9.0-45.i386.rpm
(there was no i586 specific build of this)

When I do a dist-upgrade, apt-get correctly installs the i586 versions of packages when their available.  The newer kernels boot up, but anything that touches code in the alsa-kernel modules gets a segfault or SIGILL (illegal instruction) indicating that there are CMOV instructions in the compiled code.  This can be confirmed with objdump -d.  For example on the new RH9 alsa-kernel (I upgraded hoping the problem would be fixed):
  
 [root@blumlein sound]# cd /lib/modules/2.4.22-6.ll.rh90/kernel/sound/
 [root@blumlein sound]# objdump -d snd-ice1712.o |grep cmov
     482:       0f 44 f8                cmove  %eax,%edi
     a5d:       0f 45 44 24 04          cmovne 0x4(%esp,1),%eax
     a6d:       0f 45 44 24 04          cmovne 0x4(%esp,1),%eax
     a98:       0f 43 e8                cmovae %eax,%ebp
     ba6:       0f 45 44 24 10          cmovne 0x10(%esp,1),%eax
     bb6:       0f 45 44 24 10          cmovne 0x10(%esp,1),%eax
     bdb:       0f 43 e8                cmovae %eax,%ebp
     ebf:       0f 44 c2                cmove  %edx,%eax
     f52:       0f 44 c2                cmove  %edx,%eax
  (lots more ....)

I ran this over all the kernel module files and CMOVs are only present in the files installed by the alsa-kernel rpm. 

I down loaded and hand installed the i586 and i386 versions of the newer kernel and modules and still see the CMOVs in the alsa kernel modules.

This suggests to me that there is something wrong in the alsa-kernel module build process that results in them being compiled with march=i686 regardless of the specified architecture.  Again this is just in the alsa-modules (snd-*.o), the rest of the kernel is fine.  (Actually, I do get SIGILLs on some of the LADSPA plugins too).

Thanks for any help you can offer.  Please let me know if there is anything I can do to help track this down. (Perhaps I'm the only person running the Planet on a non-i686 machine, in which case the right thing may be for me to upgrade the motherboard to an M10000 with a C3 Nehemiah, which does have CMOV).

Aaron Heller <heller@ai.sri.com>
Menlo Park, CA