From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] nios2 - adjust gbl data off to account for bd_info
Date: Thu, 23 Feb 2012 19:49:19 +1100 [thread overview]
Message-ID: <4F45FD8F.8060900@gmail.com> (raw)
In-Reply-To: <4F45F546.30209@alexhornung.com>
Hi Alex,
On 02/23/2012 07:13 PM, Alex Hornung wrote:
> Hi Graeme,
>
> On 21/02/12 10:33, Graeme Russ wrote:
>> Hi Alex,
>>
>> On 02/21/2012 10:45 AM, Alex Hornung wrote:
>>> * Adjust the GBL_DATA_OFFSET to account for the fact that we'll be
>>> using the space between that offset and the start of the malloc
>>> region to allocate both a gd structure and a board info structure.
>>>
>>> * This fixes a memory corruption bug due to overlap of the malloc
>>> region and the bd_info structure.
>>>
>>> Signed-off-by: Alex Hornung <alex@alexhornung.com>
>>> ---
>>> include/configs/nios2-generic.h | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>
[snip]
>> And for the sake of one more copy and pointer adjustment, even gd could be
>> moved into bss which would save all the hackish calculations of sticking gd
>> and bd in a magic void below the stack
>>
>> But maybe that's a battle for another day...
>
> To be honest I just started using u-boot, and for that matter, just
> started using Nios2. I just ran across the issue and had to fix it to
> get u-boot working on my system.
>
> Nonetheless I'd generally agree that less hackery is a better idea, and
> putting it in BSS is a good option - but reality is, as you point out,
> that most other platforms don't do that, either. For now I think the
> above patch should do.
I agree - as I said, a battle for another day :)
Regards,
Graeme
next prev parent reply other threads:[~2012-02-23 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 23:45 [U-Boot] [PATCH 1/1] nios2 - adjust gbl data off to account for bd_info Alex Hornung
2012-02-21 10:33 ` Graeme Russ
2012-02-23 8:13 ` Alex Hornung
2012-02-23 8:49 ` Graeme Russ [this message]
2012-02-23 23:54 ` Mike Frysinger
2012-02-24 3:03 ` Thomas Chou
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=4F45FD8F.8060900@gmail.com \
--to=graeme.russ@gmail.com \
--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.