public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address
Date: Mon, 07 Nov 2011 17:10:29 -0700	[thread overview]
Message-ID: <4EB87375.1040100@nvidia.com> (raw)
In-Reply-To: <20111107232514.C0E7C189301B@gemini.denx.de>

On 11/07/2011 04:25 PM, Wolfgang Denk wrote:
> Dear Nicolas Pitre,
> 
> In message <alpine.LFD.2.02.1111071736280.3307@xanadu.home> you wrote:
>>
>>> 1) zImages are are relocatable. They should be loaded and started at
>>>    offsets between 32 KiB and 128 MiB in system RAM.
>>>
>>> 2) Raw images (without the preloader) have to be started at a fixed
>>>    address, virt_to_phys(PAGE_OFFSET + TEXT_OFFSET), which usually is
>>>    at an offset of 32 KiB in system RAM (with very few exzceptions).
>>>
>>> Both sitations can be handled perfectly find with offset addresses in
>>> the images.
>>
>> No.  Please, we're trying to remove _all_ hardcoded addresses from the 
>> kernel boot process, absolute or relative.  ...
> 
> I understand you are referring here to zImages only. Correct?
> 
> Or will raw images (without the preloader) be fully relocatable, too?
> 
>>                                        ...  This is why zImage can be 
>> loaded at practically any address.  If uImage insists on having a 
>> relative offset encoded into it, this is slightly better than the 
>> absolute address but not by much.  Having the ability to use the _same_ 
>> uImage file and load it at _different_ addresses as specified by an 
>> argument to the load command is highly desirable...
> 
> Why is it so important to load it at specific (different) addresses
> when it can be started from any address?
> 
> Maybe this is a key point.  I simply fail to understand this.

Yes, that's probably the key point.

The central issue is that the memory map on different SoCs is different.
Equally, the U-Boot environment on different SoCs is different. This
means that the uImage /will/ be loaded at different addresses on
different SoCs, and equally nobody can necessarily definea single
address (absolute /or/ relative) where it could then be copied to
without trashing initrd/FDT/...

The only place that has full knowledge of the board's memory layout is
the U-Boot environment for that board, and hence I assert that the
U-Boot environment should define where to load the kernel (and initrd
and FDT), and if U-Boot must copy them, where to copy them to. In
particular, the creator of the uImage can't possibly pick these values
and expect them to work everywhere.

(as an aside, why do CC's keep getting dropped from all these emails?)

-- 
nvpublic

  reply	other threads:[~2011-11-08  0:10 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 16:28 [U-Boot] [PATCH v2 1/3] image: Make image_get_fdt work like image_get_{ram_disk, kernel} Stephen Warren
2011-11-01 16:28 ` [U-Boot] [PATCH v2 2/3] image: Support FDTs already loaded at their load address Stephen Warren
2012-03-06 21:18   ` Wolfgang Denk
2011-11-01 16:28 ` [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address Stephen Warren
2011-11-05 22:20   ` Wolfgang Denk
2011-11-07 16:56     ` Stephen Warren
2011-11-07 17:09       ` Stephen Warren
2011-11-07 19:47         ` Simon Glass
2011-11-07 20:29           ` Wolfgang Denk
2011-11-07 21:17           ` Stephen Warren
2011-11-07 22:11             ` Wolfgang Denk
2011-11-07 22:30               ` Stephen Warren
2011-11-07 23:08                 ` Wolfgang Denk
2011-11-08  0:00                   ` Stephen Warren
2011-11-08  0:27                     ` Wolfgang Denk
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF173F9A5035@HQMAIL01.nvidia.com>
2011-11-07 20:26       ` Wolfgang Denk
2011-11-07 21:04         ` Marek Vasut
2011-11-07 21:38           ` Stephen Warren
2011-11-07 21:59             ` Marek Vasut
2011-11-07 22:08               ` Stephen Warren
2011-11-07 22:27           ` Wolfgang Denk
2011-11-07 22:41             ` Stephen Warren
2011-11-07 23:10               ` Wolfgang Denk
2011-11-07 23:43                 ` Stephen Warren
2011-11-07 22:57             ` Nicolas Pitre
2011-11-07 23:25               ` Wolfgang Denk
2011-11-08  0:10                 ` Stephen Warren [this message]
2011-11-08  0:29                   ` Wolfgang Denk
2011-11-08  0:48                     ` Nicolas Pitre
2011-11-08  8:38                       ` Wolfgang Denk
2011-11-08 11:35                         ` Marek Vasut
2011-11-08 11:50                           ` Wolfgang Denk
2011-11-08 11:52                             ` Marek Vasut
2011-11-08 18:17                             ` Stephen Warren
     [not found]                             ` <74CDBE0F657A3D45AFBB94109FB122FF173F9A5424@HQMAIL01.nvidia.com>
2011-11-08 19:44                               ` Wolfgang Denk
2011-11-08 21:17                                 ` Wolfgang Denk
2011-11-08 22:27                                   ` Stephen Warren
2011-11-08 22:46                                     ` Wolfgang Denk
2011-11-08  0:35                 ` Nicolas Pitre
2011-11-08  1:10                   ` Simon Glass
2011-11-08  3:51                     ` Nicolas Pitre
2011-11-08  5:37                       ` Simon Glass
2011-11-08  8:45                         ` Wolfgang Denk
2011-11-08 14:22                         ` Loïc Minier
2011-11-08 14:52                       ` Jason
2011-11-08 20:18                         ` Nicolas Pitre
2011-12-10 22:42                     ` Linus Walleij
2011-12-10 22:53                       ` Wolfgang Denk
2011-12-10 23:21                         ` Linus Walleij
2011-12-12 16:25                       ` Stephen Warren
2011-11-08  8:33                   ` Wolfgang Denk
2011-11-08 14:26                     ` Nicolas Pitre
2011-11-08 15:01                       ` Marek Vasut
2011-11-08 15:59                       ` Wolfgang Denk
2011-11-08 16:57                         ` Detlev Zundel
2011-11-08 20:05                         ` Nicolas Pitre
2011-11-07 21:27         ` Stephen Warren
2011-11-07 21:41           ` Nicolas Pitre
2011-11-07 22:42             ` Wolfgang Denk
2011-11-05 18:41 ` [U-Boot] [PATCH v2 1/3] image: Make image_get_fdt work like image_get_{ram_disk, kernel} Marek Vasut
2011-11-05 19:21   ` Simon Glass
2011-11-05 19:39     ` Marek Vasut
2011-11-05 20:38       ` Simon Glass
2011-11-05 20:41         ` Marek Vasut
2011-11-05 20:49           ` Simon Glass
2011-11-05 22:15           ` Wolfgang Denk
2011-11-05 22:18             ` Marek Vasut
2011-11-05 22:06       ` Wolfgang Denk
2011-11-05 21:53     ` Wolfgang Denk
2011-11-05 22:06       ` Marek Vasut
2011-11-05 22:22         ` Wolfgang Denk
2011-11-06  4:52       ` Simon Glass
2011-11-06  8:57         ` Wolfgang Denk
2011-11-05 21:40   ` Wolfgang Denk
2011-11-05 22:06     ` Marek Vasut
2011-11-05 22:24       ` Wolfgang Denk
2011-11-05 22:38         ` Marek Vasut
2011-11-08 14:24   ` Loïc Minier
2011-11-08 16:06 ` Wolfgang Denk
2011-11-08 18:15   ` Stephen Warren
     [not found]   ` <74CDBE0F657A3D45AFBB94109FB122FF173F9A5415@HQMAIL01.nvidia.com>
2011-11-08 19:33     ` Wolfgang Denk

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=4EB87375.1040100@nvidia.com \
    --to=swarren@nvidia.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