x86/quark_se: don't start ARC if reset vector is NULL

This adds a NULL check against the reset vector for ARC.
If the reset vector is null, do not start the ARC core
as there is nothing to execute, and will probably cause
the whole SoC to stall.

Change-Id: I78d77b3e5940a205e05c13369f889cf9c5955487
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2016-02-19 10:49:28 -08:00 committed by Gerrit Code Review
commit fb84242956

View file

@ -68,6 +68,12 @@ static int arc_init(struct device *arg)
shared_data->arc_start = *reset_vector;
shared_data->flags = 0;
#ifndef CONFIG_ARC_INIT_DEBUG
if (!shared_data->arc_start) {
/* Reset vector points to NULL => skip ARC init. */
arc_init_debug("Reset vector is NULL, skipping ARC init.\n");
goto skip_arc_init;
}
/* Start the CPU */
SCSS_REG_VAL(SCSS_SS_CFG) |= ARC_RUN_REQ_A;
@ -81,6 +87,8 @@ static int arc_init(struct device *arg)
arc_init_debug("Waiting for arc to init...\n");
while (!shared_data->flags & ARC_READY) {
}
skip_arc_init:
#endif
return DEV_OK;