From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] ARM: add CONFIG_PHYS_OFFSET default values
Date: Fri, 19 Feb 2016 16:34:51 +0100 [thread overview]
Message-ID: <14272873.q312Ii8Axy@wuerfel> (raw)
In-Reply-To: <HK2PR06MB056137892B6F968A8A1008C58AA00@HK2PR06MB0561.apcprd06.prod.outlook.com>
On Friday 19 February 2016 14:29:00 Chris Brandt wrote:
> On 19 Feb 2016, Arnd Bergmann wrote:
>
> > On Thursday 18 February 2016 11:02:33 Nicolas Pitre wrote:
> > >
> > > Acked-by: Nicolas Pitre <nico@linaro.org>
> > >
> > > Is there a way to provide a default for defaults?
> >
> > We could have something like
> >
> > config PHYS_OFFSET_0
> > bool
> >
> > config PHYS_OFFSET_1
> > bool
> >
> > config PHYS_OFFSET_2
> > bool
> >
> > ... (we need 8 of the 16 possible addresses)
> >
> >
> > config PHYS_OFFSET
> > hex "Physical address of main memory" if MMU
> > default DRAM_BASE if !MMU
> > default 0x00000000 if PHYS_OFFSET_0
> > default 0x10000000 if PHYS_OFFSET_1
> > default 0x20000000 if PHYS_OFFSET_2
> > default 0x30000000 if PHYS_OFFSET_3
> > default 0x70000000 if PHYS_OFFSET_7
> > default 0x80000000 if PHYS_OFFSET_8
> > default 0xa0000000 if PHYS_OFFSET_A
> > default 0xc0000000 if PHYS_OFFSET_C
> >
> >
> > and then select one of the bool symbols from each platform.
> > Would that address your question?
>
>
> Here's a question:
>
> Can we just get rid of PHYS_OFFSET???
>
> If it's only used at boot for XIP systems, we could:
>
> A) pass it in via an unused register like atags and DT
> or
> B) just assume that atags or DT is in RAM, so round down to the nearest section and assume that is the start of your RAM
>
> If it is needed after initial boot, then on first boot we save what was passed in from the boot loader for later use.
Hmm, you mean making phys_offset a runtime variable instead
of patching it at early boot time in the instructions?
I have no idea if that works, how much effort it would be,
or how much it would enlarge the kernel image size, but
you can definitely try.
Of course we must not break existing platforms using XIP_KERNEL
already, but the installed base among systems that are upgrading
to modern kernels is very small now, given how all modern platforms
don't support XIP_KERNEL today, or have no MMU to start with.
Arnd
next prev parent reply other threads:[~2016-02-19 15:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 14:01 [PATCH 0/9] ARM: randconfig testing fallout Arnd Bergmann
2016-02-18 14:01 ` [PATCH 1/9] ARM: ARMv7-M uses BE-8, not BE-32 Arnd Bergmann
2016-02-18 16:06 ` Nicolas Pitre
2016-02-18 16:12 ` Arnd Bergmann
2016-02-19 8:47 ` Vladimir Murzin
2016-02-19 10:17 ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 2/9] ARM: change NR_IPIS to 8 Arnd Bergmann
2016-02-18 14:26 ` Marc Zyngier
2016-02-18 14:37 ` Russell King - ARM Linux
2016-02-18 15:18 ` Arnd Bergmann
2018-09-18 8:19 ` Chunyan Zhang
2016-02-18 14:01 ` [PATCH 3/9] ARM: make free_memmap as __init Arnd Bergmann
2016-02-18 15:55 ` Nicolas Pitre
2016-02-18 14:01 ` [PATCH 4/9] ARM: add CONFIG_PHYS_OFFSET default values Arnd Bergmann
2016-02-18 16:02 ` Nicolas Pitre
2016-02-19 8:33 ` Arnd Bergmann
2016-02-19 14:29 ` Chris Brandt
2016-02-19 15:34 ` Arnd Bergmann [this message]
2016-02-19 16:43 ` Russell King - ARM Linux
2016-02-19 17:18 ` Chris Brandt
2016-02-19 17:57 ` Nicolas Pitre
2016-02-19 16:10 ` Nicolas Pitre
2016-02-19 16:23 ` Arnd Bergmann
2016-02-19 17:31 ` Nicolas Pitre
2016-02-19 18:07 ` Russell King - ARM Linux
2016-02-19 21:14 ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 5/9] ARM: atags_to_fdt: don't warn about stack size Arnd Bergmann
2016-02-18 16:13 ` Nicolas Pitre
2016-02-18 16:26 ` [PATCH v2] " Arnd Bergmann
2016-02-18 17:14 ` Nicolas Pitre
2016-02-19 16:58 ` Arnd Bergmann
2016-02-18 14:01 ` [PATCH 6/9] ARM: uaccess: avoid warning for NOMMU in access_ok Arnd Bergmann
2016-02-18 16:15 ` Nicolas Pitre
2016-02-18 14:01 ` [PATCH 7/9] ARM: move NO_DMA definition to ecard.h Arnd Bergmann
2016-02-18 16:17 ` Nicolas Pitre
2016-02-18 14:02 ` [PATCH 8/9] ARM: do not use optimized do_div for ARMv3 Arnd Bergmann
2016-02-18 17:20 ` Nicolas Pitre
2016-02-19 9:03 ` Arnd Bergmann
2016-02-19 18:44 ` Nicolas Pitre
2016-02-18 14:02 ` [PATCH 9/9] ARM: fix kprobe test with CONFIG_CPU_32v3 Arnd Bergmann
2016-02-18 14:21 ` Jon Medhurst (Tixy)
2016-02-18 16:21 ` Nicolas Pitre
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=14272873.q312Ii8Axy@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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