MLK-16787-1 HAB: Update hab codes to support ARM64 and i.MX8M
authorYe Li <ye.li@nxp.com>
Thu, 9 Nov 2017 03:25:44 +0000 (21:25 -0600)
committerYe Li <ye.li@nxp.com>
Mon, 13 Nov 2017 07:08:52 +0000 (01:08 -0600)
commit5f6ef97a9d13361895180df7014f4e4fb48a5875
treef48e113bc588ef363eca8af55c24397cff88edb3
parented37376b87591c55165d1a99817b564ec8462fb1
MLK-16787-1 HAB: Update hab codes to support ARM64 and i.MX8M

There are some changes to support ARM64 i.MX8M platform in this patches:
1. The hab_rvt base and function vectors are different as i.MX6/7

2. Need to bypass an workaround for i.MX6 to fix problem in MMU.

3. The x18 register needed save & restore before calling any HAB API. According
   to ARM procedure call spec, the x18 is caller saved when it is used as
   temporary register. So calling HAB API may scratch this register, and
   cause crash once accessing the gd pointer.

   On ARMv7, the r9 is callee saved when it is used as variable register. So
   no need to save & restore it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/imx-common/hab.c
arch/arm/include/asm/imx-common/hab.h