“How to bring up CPU 4~7”的版本间的差异

来自个人维基
跳转至: 导航搜索
(以“Xen boot error: <source lang="c"> ... (XEN) Bringing up CPU3 (XEN) CPU3: Guest atomics will try 12 times before pausing the domain (XEN) CPU 3 booted. (XEN) Bringing...”为内容创建页面)
 
 
第25行: 第25行:
 
(XEN) CPU7 never came online
 
(XEN) CPU7 never came online
 
(XEN) Failed to bring up CPU 7 (error -5)
 
(XEN) Failed to bring up CPU 7 (error -5)
 +
</source>
 +
 +
Boot sequence:
 +
./xen/arch/arm/smpboot.c
 +
<source lang="c">
 +
int __cpu_up(unsigned int cpu)
 +
{
 +
    rc = init_secondary_pagetables(cpu);
 +
console_start_sync(); /* Secondary may use early_printk */
 +
    smp_up_cpu = cpu_logical_map(cpu);
 +
    clean_dcache(smp_up_cpu);
 +
    rc = arch_cpu_up(cpu);
 +
 +
    console_end_sync();
 +
    while ( !cpu_online(cpu) && NOW() < deadline )/
 +
 +
    {
 +
        cpu_relax();
 +
        process_pending_softirqs();
 +
    }
 +
    /*
 +
    * Ensure that other cpus' initializations are visible before
 +
    * proceeding. Corresponds to smp_wmb() in start_secondary.
 +
    */
 +
    smp_rmb();
 +
    clean_dcache(smp_up_cpu);
 +
 +
    if ( !cpu_online(cpu) )
 +
    {
 +
        printk("CPU%d never came online\n", cpu);
 +
        return -EIO;
 +
    }
 +
 +
}
 +
 +
/* Boot the current CPU */
 +
void start_secondary(void)
 +
{
 +
    /*
 +
    * Currently Xen assumes the platform has only one kind of CPUs.
 +
    * This assumption does not hold on big.LITTLE platform and may
 +
    * result to instability and insecure platform (unless cpu affinity
 +
    * is manually specified for all domains). Better to park them for
 +
    * now.
 +
    */
 +
    if ( !opt_hmp_unsafe &&
 +
        current_cpu_data.midr.bits != boot_cpu_data.midr.bits )
 +
    {
 +
        printk(XENLOG_ERR "CPU%u MIDR (0x%x) does not match boot CPU MIDR (0x%x),\n"
 +
              "disable cpu (see big.LITTLE.txt under docs/).\n",
 +
              smp_processor_id(), current_cpu_data.midr.bits,
 +
              boot_cpu_data.midr.bits);
 +
        stop_cpu();
 +
    }
 +
 +
}
 
</source>
 
</source>

2019年11月18日 (一) 18:38的最后版本

Xen boot error:

...
(XEN) Bringing up CPU3
(XEN) CPU3: Guest atomics will try 12 times before pausing the domain
(XEN) CPU 3 booted.
(XEN) Bringing up CPU4
(XEN) CPU4 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034),
(XEN) disable cpu (see big.LITTLE.txt under docs/).
(XEN) CPU4 never came online
(XEN) Failed to bring up CPU 4 (error -5)
(XEN) Bringing up CPU5
(XEN) CPU5 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034),
(XEN) disable cpu (see big.LITTLE.txt under docs/).
(XEN) CPU5 never came online
(XEN) Failed to bring up CPU 5 (error -5)
(XEN) Bringing up CPU6
(XEN) CPU6 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034),
(XEN) disable cpu (see big.LITTLE.txt under docs/).
(XEN) CPU6 never came online
(XEN) Failed to bring up CPU 6 (error -5)
(XEN) Bringing up CPU7
(XEN) CPU7 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034),
(XEN) disable cpu (see big.LITTLE.txt under docs/).
(XEN) CPU7 never came online
(XEN) Failed to bring up CPU 7 (error -5)

Boot sequence:
./xen/arch/arm/smpboot.c

int __cpu_up(unsigned int cpu)
{
    rc = init_secondary_pagetables(cpu);
 console_start_sync(); /* Secondary may use early_printk */
    smp_up_cpu = cpu_logical_map(cpu);
    clean_dcache(smp_up_cpu);
    rc = arch_cpu_up(cpu);
 
    console_end_sync();
    while ( !cpu_online(cpu) && NOW() < deadline )/
 
    {
        cpu_relax();
        process_pending_softirqs();
    }
    /*
     * Ensure that other cpus' initializations are visible before
     * proceeding. Corresponds to smp_wmb() in start_secondary.
     */
    smp_rmb();
    clean_dcache(smp_up_cpu);
 
    if ( !cpu_online(cpu) )
    {
        printk("CPU%d never came online\n", cpu);
        return -EIO;
    }
 
}
 
/* Boot the current CPU */
void start_secondary(void)
{
    /*
     * Currently Xen assumes the platform has only one kind of CPUs.
     * This assumption does not hold on big.LITTLE platform and may
     * result to instability and insecure platform (unless cpu affinity
     * is manually specified for all domains). Better to park them for
     * now.
     */
    if ( !opt_hmp_unsafe &&
         current_cpu_data.midr.bits != boot_cpu_data.midr.bits )
    {
        printk(XENLOG_ERR "CPU%u MIDR (0x%x) does not match boot CPU MIDR (0x%x),\n"
               "disable cpu (see big.LITTLE.txt under docs/).\n",
               smp_processor_id(), current_cpu_data.midr.bits,
               boot_cpu_data.midr.bits);
        stop_cpu();
    }
 
}