On 09/15/08 23:54, Li, Aubrey wrote:
> Bill.Holler wrote:
>
>
>> Hi Aubrey,
>>
>> My test machine has an invalid cstate->cs_type with the new
>> C4 support. The type is not system_hardware nor fixed_io.
>> This is probably from C4. I do not know what the type value is.
>>
>> if (type == ACPI_ADR_SPACE_FIXED_HARDWARE) { ...
>> } else if (type == ACPI_ADR_SPACE_SYSTEM_IO) { ...
>> } else {
>> cmn_err(CE_WARN, "!_CST: unsupported address space id
>> type\n"); }
>>
>>
>> The machine then hits an ASSERT in turnstile_block called
>> by cmn_err(). The ASSERT is probably failing because
>> only CPU 0 have been brought online so far.
>>
>>
>
> This may be caused by a buggy BIOS implementation.
> I already committed a patch to be tolerant of it. Please pull and have a
> try.
>
> Thanks,
> -Aubrey
> _______________________________________________
> tesla-dev mailing list
> tesla-dev at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/tesla-dev
>
Hi Aubrey,
My test machine has the same problem with the new push.
The problem was a miss-merge; sorry it was probably my fault. :-(
The promotion code can promote passed the end of the cstate list.
The promotion code at the end of cpu_acpi_idle():
if ((cs_type < cpu_max_cstates) && (delta > cstate->promotion))
mcpu->mcpu_idle_type++;
cs_type can be decremented allowing mcpu->mcpu_idle_type to overflow.
/*
* OSPM uses the BM_STS bit to determine the power state to enter
* when considering a transition to or from the C2/C3 power state.
* if C3 is determined, bus master activity demotes the power state
* to C2.
*/
if ((cs_type >= CPU_ACPI_C3) && cpu_acpi_bm_sts())
cs_type = CPU_ACPI_C2;
Here is the fix:
bash-3.2$ hg diff
diff -r 6f8e3a34c30f usr/src/uts/i86pc/io/cpudrv/cpu_idle.c
--- a/usr/src/uts/i86pc/io/cpudrv/cpu_idle.c Tue Sep 16 19:01:39 2008
+0800
+++ b/usr/src/uts/i86pc/io/cpudrv/cpu_idle.c Tue Sep 16 13:00:43 2008
-0700
@@ -380,7 +380,8 @@
&value, 32);
tlb_service();
} else {
- cmn_err(CE_WARN, "!_CST: unsupported address space id
type\n");
+ cmn_err(CE_WARN, "!_CST: cs_type %lx bad asid type %lx\n",
+ (long)cs_type, (long)type);
}
delta = (gethrtime() - start) / 1000ul;
CPU->cpu_m.cstate_delta[highbit(delta)]++;
@@ -526,7 +527,8 @@
delta -= cstate->cs_latency;
/* promotion */
- if ((cs_type < cpu_max_cstates) && (delta > cstate->promotion))
+ if ((mcpu->mcpu_idle_type < cpu_max_cstates) &&
+ (delta > cstate->promotion))
mcpu->mcpu_idle_type++;
/* demotion */
Regards,
Bill