soc/intel/denverton_ns: Ensure CPU device has a valid link

This change calls `add_more_links()` in `denverton_init_cpus()` if
`dev->link_list` is NULL. This condition can occur if mainboard does
not add any APIC device in the device tree.

Link: https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/YLMK2FBWWL6RKDNKBVZB3NJDYMEYHED7/
"A different lapic number in devicetree.cb needed for CPU with the
same SKU and steping (Intel Atom C3538)."

Change-Id: I6f453901b17f7eff22beed8dbf6995cdc9f9b776
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57152
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: King Sumo <kingsumos@gmail.com>
Reviewed-by: Suresh Bellampalli <suresh.bellampalli@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Furquan Shaikh 2021-08-25 15:49:22 -07:00 committed by Felix Held
parent c398a204b4
commit ba936ce5db
1 changed files with 8 additions and 0 deletions

View File

@ -287,6 +287,14 @@ static const struct mp_ops mp_ops = {
void denverton_init_cpus(struct device *dev)
{
/*
* Ensure there is at least one bus downstream to the CPU device. If not, then create a
* new link. This can occur if the mainboard does not add any APIC device in the device
* tree.
*/
if (!dev->link_list)
add_more_links(dev, 1);
/* Clear for take-off */
if (mp_init_with_smm(dev->link_list, &mp_ops) < 0)
printk(BIOS_ERR, "MP initialization failure.\n");