> -----Original Message-----
> From: York Sun
> Sent: Monday, January 15, 2018 10:43 PM
> 
> On 01/15/2018 09:09 AM, Sumit Garg wrote:
> >> From: York Sun
> >> Sent: Monday, January 15, 2018 10:16 PM
> >>
> >> On 01/14/2018 08:55 PM, Sumit Garg wrote:
> >>> Enable support for multiple loadable images in SEC firmware FIT image.
> >>>
> >>> Signed-off-by: Sumit Garg <sumit.g...@nxp.com>
> >>> ---
> >>>  arch/arm/cpu/armv8/sec_firmware.c | 51
> >>> +++++++++++++++++++++++++++++++--------
> >>>  1 file changed, 41 insertions(+), 10 deletions(-)
> >>>
> >>> diff --git a/arch/arm/cpu/armv8/sec_firmware.c
> >>> b/arch/arm/cpu/armv8/sec_firmware.c
> >>> index 927eae4..28de81c 100644
> >>> --- a/arch/arm/cpu/armv8/sec_firmware.c
> >>> +++ b/arch/arm/cpu/armv8/sec_firmware.c
> >>> @@ -116,11 +116,13 @@ static int
> >>> sec_firmware_check_copy_loadable(const
> >> void *sec_firmware_img,
> >>>                                       u32 *loadable_l, u32 *loadable_h)  {
> >>>   phys_addr_t sec_firmware_loadable_addr = 0;
> >>> - int conf_node_off, ld_node_off;
> >>> + int conf_node_off, ld_node_off, images;
> >>>   char *conf_node_name = NULL;
> >>>   const void *data;
> >>>   size_t size;
> >>>   ulong load;
> >>> + const char *name, *str, *type;
> >>> + int len;
> >>>
> >>>   conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME;
> >>>
> >>> @@ -130,11 +132,32 @@ static int
> >>> sec_firmware_check_copy_loadable(const
> >> void *sec_firmware_img,
> >>>   return -ENOENT;
> >>>   }
> >>>
> >>> - ld_node_off = fit_conf_get_prop_node(sec_firmware_img,
> >> conf_node_off,
> >>> -                                      FIT_LOADABLE_PROP);
> >>> - if (ld_node_off >= 0) {
> >>> -         printf("SEC Firmware: '%s' present in config\n",
> >>> -                FIT_LOADABLE_PROP);
> >>> + /* find the node holding the images information */
> >>> + images = fdt_path_offset(sec_firmware_img, FIT_IMAGES_PATH);
> >>> + if (images < 0) {
> >>> +         debug("%s: Cannot find /images node: %d\n", __func__,
> >> images);
> >>
> >> Do you expect this often? If it should happen, change debug to printf.
> >
> > No this isn't expected as fit image should at least have ppa monitor image.
> 
> The idea is to reduce unnecessary messages and make sure the error is raised.
> In this case, if the image is not found, you cannot proceed with secure 
> booting.
> So a visible error is needed.
> 
> York
 
Sure I will put up a printf instead of debug here.

-Sumit
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to