http://defect.opensolaris.org/bz/show_bug.cgi?id=6113

           Summary: ASUS N4L-VM DH: panic in cpudrv_pm_set_topspeed
    Classification: Development
           Product: power-mgmt
           Version: unspecified
          Platform: i86pc/amd64
        OS/Version: Solaris
            Status: NEW
          Severity: major
          Priority: P2
         Component: c-state
        AssignedTo: bill.holler at sun.com
        ReportedBy: jk at tools.de
                CC: tesla-dev at opensolaris.org


System is a ASUS N4L-VM DH mainboard, using BIOS revision 0902;
Intel Core2 Duo T7200 64-bit cpu, 2GB memory.

When booting snv_106 on this system, the kernel crashes with a panic.
USB keyboard does not work at the time of the panic, but the stack backtrace
visible on the console is:

  cpudrv_pm_set_topspeed+8d()
  ppm_set_topspeed+32()
  ppm_redefine_topspeed+3c()
  ppm_init_topspeed+3c()
  cpudrv_post_startup+32()
  main+2da()



cpudrv_pm_set_topspeed+0x88:    call   +0x350547b       <mutex_exit>
cpudrv_pm_set_topspeed+0x8d:    movl   0x30(%r15),%edx
cpudrv_pm_set_topspeed+0x91:    movq   %r12,%rdi
cpudrv_pm_set_topspeed+0x94:    xorl   %esi,%esi
cpudrv_pm_set_topspeed+0x96:    call   +0x375fbc5       <pm_update_maxpower>

I do see that the panic register dump contains 'r15 == 0'

cpudrv_pm_set_topspeed+8d() should translate to
usr/src/uts/i86pc/io/cpudrv/cpudrv_mach.c, line 309:

   268  void
   269  cpudrv_pm_set_topspeed(void *ctx, int plat_level)
   270  {
   271          cpudrv_devstate_t       *cpudsp;
   272          cpudrv_pm_t             *cpupm;
   273          cpudrv_pm_spd_t *spd;
   274          cpudrv_pm_spd_t *top_spd;
   275          dev_info_t      *dip;
   276          int             pm_level;
   277          int             instance;
   278          int             i;
   279
   280          dip = ctx;
   281          instance = ddi_get_instance(dip);
   282          cpudsp = ddi_get_soft_state(cpudrv_state, instance);
   283          ASSERT(cpudsp != NULL);
   284
   285          mutex_enter(&cpudsp->lock);
   286          cpupm = &(cpudsp->cpudrv_pm);
   287          pm_level = PLAT_2_PM_LEVEL(cpupm, plat_level);
   288          for (i = 0, spd = cpupm->head_spd; spd; i++, spd =
spd->down_spd) {
   289                  /*
   290                   * Don't mess with speeds that are higher than the new
   291                   * top speed. They should be out of range anyway.
   292                   */
   293                  if (spd->pm_level > pm_level)
   294                          continue;
   295                  /*
   296                   * This is the new top speed.
   297                   */
   298                  if (spd->pm_level == pm_level)
   299                          top_spd = spd;
   300
   301                  spd->up_spd = top_spd;
   302          }
   303          cpupm->top_spd = top_spd;
   304
   305          cpupm->pm_governor_thread = curthread;
   306
   307          mutex_exit(&cpudsp->lock);
   308
   309          (void) pm_update_maxpower(dip, 0, top_spd->pm_level);


It seems that we crash because "top_spd == NULL".

Hmm, looking at the above code: shouldn't the compiler or lint have warned
that variable "top_spd" at line 309 could be uninitialized?


Btw. I just checked, 0902 is the latest RELEASE version of the BIOS;
but there are BETA BIOS versions available on ASUS' website
that are newer.  In fact BETA BIOS 0905 is supposed to fix
enhanced speedstep issues for Windows Vista, and (IIRC) flashing it
avoids the panic for Solaris, too.


Workaround:

Boot with -B disable-cpudrv=true

(Or flash the beta bios)

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to