All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] imx6sx: Fix i.MX6SX HAB api function table offset
Date: Tue, 30 Sep 2014 19:43:10 +0200	[thread overview]
Message-ID: <542AEBAE.6000708@denx.de> (raw)
In-Reply-To: <CAOMZO5CwyL3Q6hAFoN5+LAZ-RLBzCL5AA7C8b6OdB2TPbp5ptw@mail.gmail.com>

Hi Fabio,

On 30/09/2014 18:31, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Tue, Sep 30, 2014 at 1:08 PM, Stefano Babic <sbabic@denx.de> wrote:
> 
>> I do not like this approach because we do not need an additional
>> CONFIG_, that remains undocumented. If CONFIG_MX6SX, HAB_RVT_BASE is
>> always 0x100 - CONFIG_ROM_UNIFIED_SECTIONS is like a redundant
>> information, because it is not possible (or is it ?) to have a sx
>> processor with a different base address.
> 
> Yes, I agree that we should avoid introducing a new config like
> CONFIG_ROM_UNIFIED_SECTIONS.
> 
> What about this?
> 
> diff --git a/arch/arm/include/asm/arch-mx6/hab.h b/arch/arm/include/asm/arch-mx6
> index 1f12695..c9e5318 100644
> --- a/arch/arm/include/asm/arch-mx6/hab.h
> +++ b/arch/arm/include/asm/arch-mx6/hab.h
> @@ -53,11 +53,17 @@ typedef void *hab_rvt_authenticate_image_t(uint8_t, ptrdiff_
>                 void **, size_t *, hab_loader_callback_f_t);
>  typedef void hapi_clock_init_t(void);
> 
> -#define HAB_RVT_REPORT_EVENT                   (*(uint32_t *)0x000000B4)
> -#define HAB_RVT_REPORT_STATUS                  (*(uint32_t *)0x000000B8)
> -#define HAB_RVT_AUTHENTICATE_IMAGE             (*(uint32_t *)0x000000A4)
> -#define HAB_RVT_ENTRY                          (*(uint32_t *)0x00000098)
> -#define HAB_RVT_EXIT                           (*(uint32_t *)0x0000009C)
> +#ifdef CONFIG_MX6SX
> +#define HAB_RVT_BASE                   0x00000100
> +#else
> +#define HAB_RVT_BASE                   0x00000094
> +#endif
> +
> +#define HAB_RVT_ENTRY                  (*(uint32_t *)(HAB_RVT_BASE + 0x04))
> +#define HAB_RVT_EXIT                   (*(uint32_t *)(HAB_RVT_BASE + 0x08))
> +#define HAB_RVT_AUTHENTICATE_IMAGE     (*(uint32_t *)(HAB_RVT_BASE + 0x10))
> +#define HAB_RVT_REPORT_EVENT           (*(uint32_t *)(HAB_RVT_BASE + 0x20))
> +#define HAB_RVT_REPORT_STATUS          (*(uint32_t *)(HAB_RVT_BASE + 0x24))
> 
>  #define HAB_RVT_REPORT_EVENT_NEW               (*(uint32_t *)0x000000B8)
>  #define HAB_RVT_REPORT_STATUS_NEW              (*(uint32_t *)0x000000BC)
> 


ok - I have seen V3, I will apply it.

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2014-09-30 17:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 15:40 [U-Boot] [PATCH v1] imx6sx: Fix i.MX6SX HAB api function table offset Nitin Garg
2014-09-30 15:56 ` Fabio Estevam
2014-09-30 16:08 ` Stefano Babic
2014-09-30 16:31   ` Fabio Estevam
2014-09-30 17:43     ` Stefano Babic [this message]
2014-09-30 17:51       ` Fabio Estevam
  -- strict thread matches above, loose matches on Subject: below --
2014-09-30 14:43 Nitin Garg
2014-09-30 15:17 ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542AEBAE.6000708@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.