public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bill Pringlemeir <bpringlemeir@nbsps.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 5/7] imx6: add some flexibility for defining macros
Date: Wed, 12 Nov 2014 10:56:07 -0500	[thread overview]
Message-ID: <87389o1kh4.fsf@nbsps.com> (raw)
In-Reply-To: <54631C88.20800@denx.de> (Stefano Babic's message of "Wed, 12 Nov 2014 09:38:32 +0100")


> On 12/11/2014 01:15, John Tobias wrote:

>> In iMX6DQ data sheet the stack address is 0x0093FFB8 (page 383).
>> While, in iMX6SDL datasheet (page 393) is 0x0091FFB8.

On 12 Nov 2014, sbabic at denx.de wrote:

> I admit that I should take a coffe, and after that maybe I can realize
> what you are saying. Anyway, it is normal for processors to set the
> stack pointer. If at a certain point the stack pointer is
> automatically set, well, this is another case. The internal ROM will
> set the stack pointer to a well defined address when it starts, but it
> does not mean that is fixed for other part of code. The problem arises
> if from our code (SPL) we call functions inside the ROM, and of course
> this can have conflicts if they share the same address range. This is
> also not your case - if that happens, two separate stack area must be
> taken.

> What you are referring is the stack pointer of the ROM. Well, the
> processors have different ROMs (only Freescale knows the differences)
> and of course they can use differently the IRAM. But when the ROM
> gives the control to the loaded image (SPL), this can use the whole
> IRAM (with the use case exception I mentioned before).

> That is the reason because ventana and Compulab have no problems at
> all.

Yes; this is my understanding as well.  I think there is some HABv4
document which says what IRAM offsets are used and should be reserved
fro all CPUs.  For the iMx25 at least, it seems you may set the stack
address to whatever you like when calling the ROM code.  It is the HAB
data that must not be touched.

So even if calls are made to the ROM code, I think you are free to set
the stack address to whatever you want.

On Tue, Nov 11, 2014 at 5:02 PM, Fabio Estevam <festevam@gmail.com> wrote:

>> iMX6SDL has 128KB OCRAM, 0x00900000 - 0x0091ffff
>> iMX6DQ  has 256KB OCRAM, 0x00900000 - 0x0093ffff
>>
>> So, if we want 1 image to support both, we should choose 0x0091FFB8.

This is true.  However, you will limit the size on the iMX6DQ platform.
Maybe that is fine for an SPL.  I think you can also use address
aliasing.  Does the iMX6SDL fully decode?  It maybe that 0x0093ffff on
the iMX6SDL will go to the 0x0091ffff address.  Did we try 0x0093FFB8 on
the iMX6SDL and it doesn't work?

I have used the aliasing to setup cache/non-cache ranges to the IRAM.
This is nice if you have L1 (primary 1M/4M MMU section entries) and need
to have non-cached entries for DMA (ethernet, usb, etc).  But that is
probably not relevant for the SPL?

Fwiw,
Bill Pringlemeir.

  reply	other threads:[~2014-11-12 15:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 22:50 [U-Boot] [PATCH v4 0/7] iMX6 SabreSD SPL Support John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 1/7] imx6: add spl config for mx6sabresd John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 2/7] kconfig: imx6: add SUPPORT_SPL John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 3/7] mmc: imx6: call spl_board_mmc_init John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 4/7] imx6: add spl in the header file John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 5/7] imx6: add some flexibility for defining macros John Tobias
2014-11-11 23:58   ` Otavio Salvador
2014-11-12  0:15     ` John Tobias
2014-11-12  0:52       ` Otavio Salvador
2014-11-12  0:59         ` John Tobias
2014-11-12  0:59         ` Troy Kisky
2014-11-12  1:02           ` Fabio Estevam
2014-11-12  1:10             ` John Tobias
2014-11-12  8:38       ` Stefano Babic
2014-11-12 15:56         ` Bill Pringlemeir [this message]
2014-11-11 22:50 ` [U-Boot] [PATCH v4 6/7] imx6: SPL support for iMX6 SabreSD John Tobias
2014-11-11 22:50 ` [U-Boot] [PATCH v4 7/7] imx6: add data configuration file for SPL John Tobias

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=87389o1kh4.fsf@nbsps.com \
    --to=bpringlemeir@nbsps.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox