public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
Date: Tue, 26 Oct 2010 16:41:07 +0200	[thread overview]
Message-ID: <20101026144107.58E851365DB@gemini.denx.de> (raw)
In-Reply-To: <201010261622.57768.sr@denx.de>

Dear Stefan Roese,

In message <201010261622.57768.sr@denx.de> you wrote:
> 
> One thing that comes to my mind while looking into this patchset is, if we 
> need to make sure that the replacement for CONFIG_SYS_GBL_DATA_SIZE is (still) 
> aligned. Till now CONFIG_SYS_GBL_DATA_SIZE has been defined mostly to 
> something like 64/128/256. Now with using sizeof(struct global_data) this is 
> may not the case any more. Perhaps I'm missing something (didn't look through 
> the patchset too closely), but shouldn't we make sure that the new values used 
> for the memory-reservation is at least 4-byte aligned?

You are right, especially as the resulting start address of the global
data is usually also used as the top of the internal stack. Guess we
should align it on 16 bytes, to be sure.

BTW - this uncovers a number of other problems.

commit 800eb096 "POST cleanup." inserts a single data word between
global data and initial stack, thus also breaking stack alignment.

I think this approach is wrong, the POST word should be made part of
the global_data instead.

[This was one of the reasons I did not replace
CONFIG_SYS_GBL_DATA_OFFSET yet, which usually is always
"(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)", nor
CONFIG_SYS_INIT_SP_OFFSET, which usually is the same as
CONFIG_SYS_GBL_DATA_OFFSET.] 

Patch v3 following.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Witch!  Witch!  They'll burn ya!
	-- Hag, "Tomorrow is Yesterday", stardate unknown

  parent reply	other threads:[~2010-10-26 14:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 13:59 [U-Boot] [PATCH 0/3] Introduce asm-offsets and fix CONFIG_SYS_GBL_DATA_SIZE problems Wolfgang Denk
2010-10-26 13:59 ` [U-Boot] [PATCH 1/3] Rename CONFIG_SYS_INIT_RAM_END into CONFIG_SYS_INIT_RAM_SIZE Wolfgang Denk
2010-10-26 19:02   ` Wolfgang Denk
2010-10-26 14:00 ` [U-Boot] [PATCH 2/3] include/asm-offsets.h: automatically generate assembler constants Wolfgang Denk
2010-10-26 14:11   ` Alexander Stein
2010-10-26 14:16     ` Wolfgang Denk
2010-10-26 14:19   ` [U-Boot] [PATCH 2/3 v2] " Wolfgang Denk
2010-10-26 19:04     ` Wolfgang Denk
2010-10-26 14:00 ` [U-Boot] [PATCH 3/3] Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value Wolfgang Denk
2010-10-26 14:22   ` Stefan Roese
2010-10-26 14:32     ` Kumar Gala
2010-10-26 14:41     ` Wolfgang Denk [this message]
2010-10-26 15:22       ` Stefan Roese
2010-10-26 14:52   ` [U-Boot] [PATCH 3/3 v2] " Wolfgang Denk
2010-10-26 19:05     ` Wolfgang Denk
2010-10-26 19:54     ` Alessandro Rubini
2010-10-26 20:38       ` Wolfgang Denk
2010-10-26 20:57         ` Alessandro Rubini
2010-10-26 21:12           ` Wolfgang Denk
2010-10-26 21:18             ` Alessandro Rubini
2010-10-26 21:31               ` Wolfgang Denk
2010-10-26 21:40                 ` Alessandro Rubini
2010-10-27 18:41                   ` Wolfgang Denk
2010-10-26 15:17   ` [U-Boot] [PATCH 3/3] " Mike Frysinger
2010-10-26 16:42     ` Wolfgang Denk
2010-10-26 14:16 ` [U-Boot] [PATCH 0/3] Introduce asm-offsets and fix CONFIG_SYS_GBL_DATA_SIZE problems Kumar Gala

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=20101026144107.58E851365DB@gemini.denx.de \
    --to=wd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox