[U-Boot] [PATCH] vexpress: disable cci ace slave ports when booting in non-sec/hyp mode

Sudeep Holla sudeep.holla at arm.com
Fri Sep 23 18:13:30 CEST 2016



On 23/09/16 17:03, Jon Medhurst (Tixy) wrote:
> On Fri, 2016-09-23 at 16:10 +0100, Sudeep Holla wrote:
>> +#ifdef CONFIG_OF_BOARD_SETUP
>> +int ft_board_setup(void *fdt, bd_t *bd)
>> +{
>> +       int offset, tmp, len;
>> +       const struct fdt_property *prop;
>> +       const char *cci_compatible = "arm,cci-400-ctrl-if";
>> +
>> +       if (!armv7_boot_nonsec_default())
>> +               return 0; /* Do nothing */
>> +
>
> That's just testing the default not whether the board is actually going
> to boot in nonsec (hyp) mode or not, which also also depends on
> environment variables.

Ah ok, wasn't aware of that. Thanks for pointing that out.

> So you probably want instead to call
> armv7_boot_nonsec() here. That function only exists if
> CONFIG_ARMV7_NONSEC is defined, so the 'if' statement above probably
> wants to be something like...
>
> #ifdef CONFIG_ARMV7_NONSEC
> 	if (!armv7_boot_nonsec())
> 		return 0;
> #else
> 	return 0;
> #endif
> 	/* We only get here if board will boot in nonsec mode */
>

OK, will update accordingly.

-- 
Regards,
Sudeep


More information about the U-Boot mailing list