From: Michal Simek <monstr@monstr.eu>
To: linuxppc-dev@ozlabs.org
Cc: arnd@arndb.de, tmarri@apm.com, suzuki@in.ibm.com,
john.williams@petalogix.com
Subject: [RFC PATCH 1/7] powerpc: ppc440 remove zero physical memory base assumption
Date: Thu, 16 Jun 2011 16:14:22 +0200 [thread overview]
Message-ID: <1308233668-24166-2-git-send-email-monstr@monstr.eu> (raw)
In-Reply-To: <1308233668-24166-1-git-send-email-monstr@monstr.eu>
From: John Williams <john.williams@petalogix.com>
The macro PHYSICAL_START is available in this context, currently always with
the value zero. However, that will change in a future patchset.
For now, just remove the zero physical address start assumption in head_44x.S
where we setup the initial TLB, and in the later MMU setup where we map in
the remainder of low mem if required.
Signed-off-by: John Williams <john.williams@petalogix.com>
---
arch/powerpc/kernel/head_44x.S | 5 +++--
arch/powerpc/mm/44x_mmu.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 18d8a16..d80ce05 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -135,8 +135,9 @@ skpinv: addi r4,r4,1 /* Increment */
lis r3,PAGE_OFFSET@h
ori r3,r3,PAGE_OFFSET@l
- /* Kernel is at the base of RAM */
- li r4, 0 /* Load the kernel physical address */
+ /* Kernel is at PHYSICAL_START */
+ lis r4,PHYSICAL_START@h
+ ori r4,r4,PHYSICAL_START@l
/* Load the kernel PID = 0 */
li r0,0
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 98052ac..4a55061 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -94,7 +94,7 @@ unsigned long __init mmu_mapin_ram(void)
/* Pin in enough TLBs to cover any lowmem not covered by the
* initial 256M mapping established in head_44x.S */
- for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr;
+ for (addr = PHYSICAL_START + PPC_PIN_SIZE; addr < lowmem_end_addr;
addr += PPC_PIN_SIZE)
ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
--
1.5.5.6
next prev parent reply other threads:[~2011-06-16 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 14:14 [RFC] Relocatable kernel for ppc44x Michal Simek
2011-06-16 14:14 ` Michal Simek [this message]
2011-06-16 14:14 ` [RFC PATCH 2/7] powerpc: Permit non-zero physical start address for PPC44x Michal Simek
2011-06-16 14:14 ` [RFC PATCH 3/7] powerpc: simpleboot get load address from ELF instead of assuming zero Michal Simek
2011-06-16 14:14 ` [RFC PATCH 4/7] powerpc: Let simpleboot function with non zero-based memory maps Michal Simek
2011-06-16 14:14 ` [RFC PATCH 5/7] powerpc: Consider a non-zero boot address when computing the bootwrapper start Michal Simek
2011-06-16 14:14 ` [RFC PATCH 6/7] powerpc: Update the default FIT image to use the correct load/boot addresses Michal Simek
2011-06-16 14:14 ` [RFC PATCH 7/7] powerpc: Support RELOCATABLE kernel for PPC44x Michal Simek
2011-07-12 11:09 ` Suzuki Poulose
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=1308233668-24166-2-git-send-email-monstr@monstr.eu \
--to=monstr@monstr.eu \
--cc=arnd@arndb.de \
--cc=john.williams@petalogix.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=suzuki@in.ibm.com \
--cc=tmarri@apm.com \
/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;
as well as URLs for NNTP newsgroup(s).