[coreboot-gerrit] New patch to review for coreboot: ad311e2 arm64: check for NULL bus on DEVICE_PATH_CPU_CLUSTER devices

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Fri Mar 27 09:39:53 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9066

-gerrit

commit ad311e2b579278695c992a950c36ef713d7c43ec
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Thu Sep 11 16:03:17 2014 -0500

    arm64: check for NULL bus on DEVICE_PATH_CPU_CLUSTER devices
    
    If there are no devices underneath a device in a devicetree the
    bus pointer in a struct device is NULL. Check for this condition
    before proceeding in walking through the children devices.
    
    BUG=chrome-os-partner:31761
    BRANCH=None
    TEST=Ran through coreboot w/o any devices under the cpu_cluster device.
         No more exceptions.
    
    Change-Id: I9aedbc0dffc638b878bd0ffacfa318b6eb30d504
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: d21e181077eba3c5ee03afca1738a24c21a8fc19
    Original-Change-Id: I891aeb36319dce67ce9e431156c85c74177c7ab7
    Original-Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/217511
    Original-Reviewed-by: Tom Warren <twarren at nvidia.com>
    Original-Reviewed-by: Furquan Shaikh <furquan at chromium.org>
---
 src/arch/arm64/cpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/arch/arm64/cpu.c b/src/arch/arm64/cpu.c
index f1733ea..66c8dde 100644
--- a/src/arch/arm64/cpu.c
+++ b/src/arch/arm64/cpu.c
@@ -299,6 +299,11 @@ void arch_initialize_cpus(device_t cluster, struct cpu_control_ops *cntrl_ops)
 	}
 
 	bus = cluster->link_list;
+
+	/* Check if no children under this device. */
+	if (bus == NULL)
+		return;
+
 	entry = prepare_secondary_cpu_startup();
 
 	/* Initialize the cpu_info structures. */



More information about the coreboot-gerrit mailing list