1. 16 1月, 2018 31 次提交
  2. 15 1月, 2018 9 次提交
    • T
      Merge git://git.denx.de/u-boot-mmc · 3dde8f20
      Tom Rini 提交于
      3dde8f20
    • B
      arm: imx: hab: Add hab_failsafe console command · 9587b0d6
      Bryan O'Donoghue 提交于
      hab_failsafe when called puts the part into BootROM recovery mode.
      This will allow u-boot scripts to script the dropping down into recovery
      mode.
      
      => hab_failsafe
      
      Shows the i.MX7 appear as "hiddev0,hidraw5: USB HID v1.10 Device [Freescale
      SemiConductor Inc  SP Blank ULT1] " in a Linux dmesg thus allowing download
      of a new image via the BootROM USB download protocol routine.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      9587b0d6
    • B
      arm: imx: hab: Implement hab_rvt_failsafe · 317956e8
      Bryan O'Donoghue 提交于
      This patch implements the basic callback hooks for
      hab_rvt_check_failsafe for BootROM code using the older BootROM address
      layout - in my test case the i.MX7. Code based on new BootROM callbacks
      will just do nothing and there's definitely a TODO to implement that extra
      functionality on the alternative BootROM API.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      317956e8
    • B
      arm: imx: hab: Define rvt_failsafe() · aeae70fa
      Bryan O'Donoghue 提交于
      The hab_rvt_failsafe() callback according to the HABv4 documentation:
      
      "This function provides a safe path when image authentication has failed
      and all possible boot paths have been exhausted. It is intended for use by
      post-ROM boot stage components, via the ROM Vector Table."
      
      Once invoked the part will drop down to its BootROM USB recovery mode.
      Should it be the case that the part is in secure boot mode - only an
      appropriately signed binary will be accepted by the ROM and subsequently
      executed.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      aeae70fa
    • B
      arm: imx: hab: Make imx_hab_is_enabled global · 07eefaf1
      Bryan O'Donoghue 提交于
      It will be helpful to boot commands to know if the HAB is enabled. Export
      imx_hab_is_enabled() now to facilitate further work with this data-point in
      a secure-boot context.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      07eefaf1
    • B
      arm: imx: hab: Make authenticate_image() return zero on open boards · 4467ae6c
      Bryan O'Donoghue 提交于
      The BootROM will not successfully process a HAB image passed by u-boot
      unless the board has been set into locked mode. Some of the existing usages
      of authenticate_image() expect and rely on unlocked boards doing the
      following
      
      1. Not calling into the BootROM authenticate_image() callback
      2. Returning a pass status for authenticate_image() calls anyway
      
      A previous patch removed the necessity to call into imx_hab_is_enabled()
      twice. This patch ensures the reliance on authenticate_image() returning
      zero is maintained.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Suggested-by: NBreno Matheus Lima <brenomatheus@gmail.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      4467ae6c
    • B
      arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled · e5b30e4a
      Bryan O'Donoghue 提交于
      Understanding if the HAB is enabled is something that we want to
      interrogate and report on outside of the HAB layer. First step to that is
      renaming the relevant function to match the previously introduced external
      naming convention imx_hab_function()
      
      The name imx_hab_is_hab_enabled() is a tautology. A more logical name is
      imx_hab_is_enabled().
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      e5b30e4a
    • B
      arm: imx: hab: Prefix authenticate_image with imx_hab · 57f65486
      Bryan O'Donoghue 提交于
      Tidy up the HAB namespace a bit by prefixing external functions with
      imx_hab. All external facing functions past this point will be prefixed in
      the same way to make the fact we are doing IMX HAB activities clear from
      reading the code. authenticate_image() could mean anything
      imx_hab_authenticate_image() is on the other hand very explicit.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      57f65486
    • B
      arm: imx: hab: Make internal functions and data static · 58bebfb7
      Bryan O'Donoghue 提交于
      There is no need to export these functions and data structures externally.
      Make them all static now.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Breno Matheus Lima <brenomatheus@gmail.com>
      Tested-by: NBreno Lima <breno.lima@nxp.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      58bebfb7