[coreboot] Broadwell-DE hang in coreboot: mp_init.c

Zeh, Werner werner.zeh at siemens.com
Tue Feb 27 07:11:30 CET 2018


Hi Mark.

I saw a very similar issue (similar because I have not analyzed it in detail due to missing time) with a 6 core Broadwell-DE. It hangs as well in SMM relocation.
Same mainboard and coreboot binary with a 4 core Broadwell-DE does not have this effect.

Werner

>Von: coreboot [mailto:coreboot-bounces at coreboot.org] Im Auftrag von mark pleso via coreboot
>Gesendet: Montag, 26. Februar 2018 23:40
>An: coreboot at coreboot.org
>Betreff: [coreboot] Broadwell-DE hang in coreboot: mp_init.c
>
>Has anyone else seen a hang during coreboot booting on a Broadwell-DE?  The issue appears to be in mp_init.c, in the function smm_do_relocation().  This is coreboot 4.7, but I think the issue exists in 4.6 >as well.
>
>Enabling the printk will stop the hang. Or, just adding a wbinvd() instruction will stop the hang, and things proceed normally.  Code is below.
>
>Any help would be appreciated.
>
>btw - This not a commercial motherboard.
>
>coreboot/src/cpu/x86/mp_init.c
>static void asmlinkage smm_do_relocation(void *arg)
>{
>        const struct smm_module_params *p;
>       const struct smm_runtime *runtime;
>      int cpu;
>        uintptr_t curr_smbase;
>        uintptr_t perm_smbase;
>
>        p = arg;
>        runtime = p->runtime;
>        cpu = p->cpu;
>        curr_smbase = runtime->smbase;
>
>        if (cpu >= CONFIG_MAX_CPUS) {
>                printk(BIOS_CRIT,
>                       "Invalid CPU number assigned in SMM stub: %d\n", cpu);
>                return;
>        }
>
>        /*
>         * The permanent handler runs with all cpus concurrently. Precalculate
>         * the location of the new SMBASE. If using SMM modules then this
>         * calculation needs to match that of the module loader.
>         */
>        perm_smbase = mp_state.perm_smbase;
>        perm_smbase -= cpu * runtime->save_state_size;
>
>        printk(BIOS_DEBUG, "New SMBASE 0x%08lx\n", perm_smbase);
>
>        /* write cache to DRAM before calling relocation handler */ /* will stop hang */
>        wbinvd();  /* <<=== OR NEW INSTRUCTION w/o printk STOPS HANG */
>
>        /* Setup code checks this callback for validity. */
>        mp_state.ops.relocation_handler(cpu, curr_smbase, perm_smbase);
>}



More information about the coreboot mailing list