OpenSolaris

Printable Version Enter a New Search
Bug ID 6631159
Synopsis cpr_wakecode.s will call APIC initialization, even if no APIC, or APIC disabled
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:pm
Keywords
Responsible Engineer Joseph Townsend
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_82
Fixed In snv_82
Release Fixed solaris_nevada(snv_82)
Related Bugs 6381827 , 6583859 , 6726128
Submit Date 16-November-2007
Last Update Date 31-January-2008
Description
As discovered by Juergen Keil:

======
The Tecra S1 is a uniprocessor PC and the BIOS doesn't
enable the APIC.  On this system there is no function to enable the APIC:

# mdb -k
Loading modules: [ unix genunix specfssrn open OK
 dtrace cpu.generic uppc scsi_vhci ufs ip hook neti sctp arp usba fctl nca
zfs 
random lofs audiosup cpc fcip nsctl ptm sppp ]
> ap_mlsetup::print
0

It seems cpr_wakecode.s just calls this NULL function pointer:

        /*
         * APIC initialization 
         */
        call    *ap_mlsetup


Hmm, uppc.c defines psm_post_cpu_start as a NULL pointer in
struct psm_ops uppc_ops.  This replaces the initialization 
in usr/src/uts/i86pc/os/mp_machdep.c, which had set
int (*ap_mlsetup)() = (int (*)(void))return_instr;



Here we need something like the following fix:

@@ -1003,9 +1107,12 @@ kernel_wc_code:
        movw    WC_GS(%ebx), %gs
 
        /*
-        * APIC initialization 
-        */
+        * APIC initialization, skip this on UPPC machines without APIC
+        */
+       cmpl    $0, ap_mlsetup
+       je      2f
        call    *ap_mlsetup
+2:
 
        call    *cpr_start_cpu_func
 
------
Work Around
N/A
Comments
N/A