[U-Boot] [PATCH] Support i.MX6 High Assurance Boot (HAB) authentication of images

Otavio Salvador otavio at ossystems.com.br
Wed Sep 3 03:49:05 CEST 2014


On Tue, Sep 2, 2014 at 10:47 PM, Nitin Garg <nitin.garg at freescale.com> wrote:
> On 09/02/2014 08:41 PM, Otavio Salvador wrote:
>> Hello Nitin,
>>
>> On Tue, Sep 2, 2014 at 10:36 PM, Nitin Garg <nitin.garg at freescale.com> wrote:
>>> On 08/31/2014 08:09 PM, Otavio Salvador wrote:
>>>>> diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
>>>>> index 306d699..2bbb86e 100644
>>>>> --- a/arch/arm/include/asm/arch-mx6/sys_proto.h
>>>>> +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
>>>> ...
>>>>> @@ -11,7 +13,7 @@
>>>>>  #include <asm/imx-common/regs-common.h>
>>>>>  #include "../arch-imx/cpu.h"
>>>>>
>>>>> -#define soc_rev() (get_cpu_rev() & 0xFF)
>>>>> +#define soc_rev() ((int)(get_cpu_rev() & 0xFF))
>>>>
>>>> This seems unrelated change, isn't it?
>>>>
>>> Since get_cpu_rev returns unsigned int, this was causing
>>> a mix of unsigned int and int across binary operators.
>>>
>>> e.g:
>>> if(soc_rev() >= CHIP_REV_1_5)
>>
>> In this case, please split this change.
>>
>> Shouldn't this to be fixed in the get_cpu_rev?
>>
>> Cheers,
>>
> But get_cpu_rev is correct, it returns unsigned int.
> The problem happens in hab code where there are
> comparisons between int and unsigned int, hence
> I think it should not be split. Pls advice.

Well, this is not up to me however in this case wouldn't be better to
fix the HAB code?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the U-Boot mailing list