From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: fix bd pointer dereference prior initialization
Date: Wed, 17 Aug 2011 18:13:39 +0200 [thread overview]
Message-ID: <4E4BE8B3.6070907@aribaud.net> (raw)
In-Reply-To: <1313574503-8762-1-git-send-email-grinberg@compulab.co.il>
Hi Igor,
Le 17/08/2011 11:48, Igor Grinberg a ?crit :
> gd->bd pointer has been used prior been initialized.
> Move the relevant code after the initialization.
>
> Signed-off-by: Igor Grinberg<grinberg@compulab.co.il>
> ---
> v2: move it closer to the bd pointer set up as for Albert's suggestion.
>
> arch/arm/lib/board.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 646cf45..c899839 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -275,10 +275,6 @@ void board_init_f(ulong bootflag)
>
> gd->mon_len = _bss_end_ofs;
>
> -#ifdef CONFIG_MACH_TYPE
> - gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
> -#endif
> -
> for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
> if ((*init_fnc_ptr)() != 0) {
> hang ();
> @@ -376,6 +372,11 @@ void board_init_f(ulong bootflag)
> gd->bd = bd;
> debug("Reserving %zu Bytes for Board Info at: %08lx\n",
> sizeof (bd_t), addr_sp);
> +
> +#ifdef CONFIG_MACH_TYPE
> + gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
> +#endif
> +
> addr_sp -= sizeof (gd_t);
> id = (gd_t *) addr_sp;
> debug("Reserving %zu Bytes for Global Data at: %08lx\n",
Applied to u-boot-arm/master, thanks!
Amicalement,
--
Albert.
prev parent reply other threads:[~2011-08-17 16:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 9:04 [U-Boot] [PATCH] arm: fix bd pointer dereference prior initialization Igor Grinberg
2011-07-29 3:53 ` Chander Kashyap
2011-08-12 9:20 ` Albert ARIBAUD
2011-08-17 9:43 ` Igor Grinberg
2011-08-17 9:48 ` [U-Boot] [PATCH v2] " Igor Grinberg
2011-08-17 16:13 ` Albert ARIBAUD [this message]
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=4E4BE8B3.6070907@aribaud.net \
--to=albert.u.boot@aribaud.net \
--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.