public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: bugfix: Move vector table before jumping relocated code
Date: Wed, 26 Dec 2012 08:18:45 +0900	[thread overview]
Message-ID: <50DA3455.3020301@kmckk.co.jp> (raw)
In-Reply-To: <CAD=GYpacXt2ZkiBNxdrN6D_eDLmeT3WKRty6q_Ptj0=7M=9w-Q@mail.gmail.com>

Hello, Joel

(2012/12/22 0:17), Joel A Fernandes wrote:
> Hi Tesuyuki and friends,
>
> I had a question with this patch.
>
> On Wed, Jun 27, 2012 at 8:27 PM, Tetsuyuki Kobayashi <koba@kmckk.co.jp> wrote:
>>>> This patch moves vector table before jumping relocated code.
>>>>
>>>> Signed-off-by: Tetsuyuki Kobayashi<koba@kmckk.co.jp>
>>>> ---
>>>>    arch/arm/cpu/armv7/start.S |   12 ++++++++++++
>>>>    1 file changed, 12 insertions(+)
>>>>
>>>> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
>>>> index 52f7f6e..5098f7b 100644
>>>> --- a/arch/arm/cpu/armv7/start.S
>>>> +++ b/arch/arm/cpu/armv7/start.S
>>>> @@ -277,6 +277,18 @@ jump_2_ram:
>>>>          mcr     p15, 0, r0, c7, c10, 4  @ DSB
>>>>          mcr     p15, 0, r0, c7, c5, 4   @ ISB
>>>>    #endif
>>>> +/*
>>>> + * Move vector table
>>>> + */
>>>> +#if !defined(CONFIG_TEGRA2)
>>>> +#if !(defined(CONFIG_OMAP44XX)&&  defined(CONFIG_SPL_BUILD))
>>>>
>>>> +       /* Set vector address in CP15 VBAR register */
>>>> +       ldr     r0, =_start
>>>> +       add     r0, r0, r9
>>>> +       mcr     p15, 0, r0, c12, c0, 0  @Set VBAR
>>>> +#endif
>
> Why is c12 (VBAR) setup only for SPL builds? Because main u-boot does
> relocation too, shouldn't we setup c12 to point to new table addr
> after relocation?

You may mis-understand. ! means NOT.

  reply	other threads:[~2012-12-25 23:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 12:40 [U-Boot] [PATCH] arm: bugfix: Move vector table before jumping relocated code Tetsuyuki Kobayashi
2012-06-25 15:10 ` Stephen Warren
2012-06-26  1:03   ` Tetsuyuki Kobayashi
2012-06-26 16:24     ` Stephen Warren
2012-07-05  9:27       ` Albert ARIBAUD
2012-06-27 18:23 ` Tom Rini
2012-06-28  1:27   ` Tetsuyuki Kobayashi
2012-12-21 15:17     ` Joel A Fernandes
2012-12-25 23:18       ` Tetsuyuki Kobayashi [this message]
2012-12-26  0:08         ` Joel A Fernandes
2012-07-05 12:00 ` Albert ARIBAUD

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=50DA3455.3020301@kmckk.co.jp \
    --to=koba@kmckk.co.jp \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox