Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34540 )
Change subject: src/mainboard: Add PCI device for IUO1 and IOU2 to devicetree ......................................................................
src/mainboard: Add PCI device for IUO1 and IOU2 to devicetree
With commit 8950cfb66f8f1fd4b047fbef2347134be0aeacec (soc/intel: Use config_of()) a new function was introduced to get the pointer to the devicetree-config for a given device. This function has now discovered a bug in the IOU PCI-driver of FSP based Broadwell-DE implementation. This implementation assigned the value to the config_t pointer in the way 'const config_t *config = dev->chip_info;' without checking that the dev->chip_info value is not NULL. On mainboards touched in this patch the static devicetree does not have entries for the PCI devices handled by this IOU driver. This leads to a NULL-pointer for dev->chip_info and hence the driver dereferences this NULL-pointer.
With the patch mentioned above the config_of() function now performs the NULL-pointer check and enters a devtree_die(); call which leads to a non booting mainboard.
I have checked on mc_bdx1 mainboard which value was used for config->pcie_compltoval if the NULL-pointer is derefferenced and got the following result:
IOU: config=00000000, config->pcie_compltoval=0
So it will be the same if we add this PCI devices to devicetree and do not provide a register entry for pcie_compltoval (defaults to 0 then).
This patch adds now the missing PCI devices to the mainboards in question which prevents this boards now from calling devtree_die().
Change-Id: I00a2e7ac14cf006718de55aa7a843442892d6280 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M src/mainboard/facebook/watson/devicetree.cb M src/mainboard/intel/camelbackmountain_fsp/devicetree.cb M src/mainboard/ocp/monolake/devicetree.cb M src/mainboard/siemens/mc_bdx1/devicetree.cb 4 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/34540/1
diff --git a/src/mainboard/facebook/watson/devicetree.cb b/src/mainboard/facebook/watson/devicetree.cb index 92fe9c3..1cff425 100644 --- a/src/mainboard/facebook/watson/devicetree.cb +++ b/src/mainboard/facebook/watson/devicetree.cb @@ -4,6 +4,8 @@ end device domain 0 on device pci 00.0 on end # SoC router + device pci 01.0 on end # IOU 2 + device pci 03.0 on end # IOU 1 device pci 14.0 on end # xHCI Controller device pci 19.0 on end # Gigabit LAN Controller device pci 1d.0 on end # EHCI Controller diff --git a/src/mainboard/intel/camelbackmountain_fsp/devicetree.cb b/src/mainboard/intel/camelbackmountain_fsp/devicetree.cb index 30d99c2..7d2c3dd 100644 --- a/src/mainboard/intel/camelbackmountain_fsp/devicetree.cb +++ b/src/mainboard/intel/camelbackmountain_fsp/devicetree.cb @@ -4,6 +4,8 @@ end device domain 0 on device pci 00.0 on end # SoC router + device pci 01.0 on end # IOU 2 + device pci 03.0 on end # IOU 1 device pci 14.0 on end # xHCI Controller device pci 19.0 on end # Gigabit LAN Controller device pci 1d.0 on end # EHCI Controller diff --git a/src/mainboard/ocp/monolake/devicetree.cb b/src/mainboard/ocp/monolake/devicetree.cb index 2d91b73..6fdae0c 100644 --- a/src/mainboard/ocp/monolake/devicetree.cb +++ b/src/mainboard/ocp/monolake/devicetree.cb @@ -4,6 +4,8 @@ end device domain 0 on device pci 00.0 on end # SoC router + device pci 01.0 on end # IOU 2 + device pci 03.0 on end # IOU 1 device pci 14.0 on end # xHCI Controller device pci 19.0 on end # Gigabit LAN Controller device pci 1d.0 on end # EHCI Controller diff --git a/src/mainboard/siemens/mc_bdx1/devicetree.cb b/src/mainboard/siemens/mc_bdx1/devicetree.cb index fd7d83f..6b4d192 100644 --- a/src/mainboard/siemens/mc_bdx1/devicetree.cb +++ b/src/mainboard/siemens/mc_bdx1/devicetree.cb @@ -4,6 +4,8 @@ end device domain 0 on device pci 00.0 on end # SoC router + device pci 01.0 on end # IOU 2 + device pci 03.0 on end # IOU 1 device pci 14.0 on end # xHCI Controller device pci 19.0 on end # Gigabit LAN Controller device pci 1d.0 on end # EHCI Controller