From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: socfpga: fix fetching cpu1start_addr for system with > 2GB of ram
Date: Wed, 1 Oct 2014 14:20:57 +0100 [thread overview]
Message-ID: <20141001132057.GO5182@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1412161334-12359-1-git-send-email-dinguyen@opensource.altera.com>
On Wed, Oct 01, 2014 at 06:02:14AM -0500, dinguyen at opensource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>
> When CPU1 is brought out of reset, it's MMU is not turned yet, so it will only
> be able to use physical addresses. For systems with 1GB or less, clearing
> 0x40000000 will work just fine. However for systems with 2GB or more, we
> need to clear at least 0x80000000.
>
> Essentially, the bic instruction is converting the cpu1start_addr from a
> virtual to a physical address. We should be using bic 0xf0000000 for all
> systems.
Err. Why not do the job properly rather than create this type of hack?
This is not a fast path, so it's really not required to code it for an
absolute minimum number of cycles. So...
adr r0, 1f @ physical address of '1'
ldmia r0, {r1, r2} @ load virtual address of '1' and 'cpu1start_addr'
sub r0, r0, r1 @ offset between virtual and physical
ldr r2, [r2, r0] @ load *cpu1start_addr
bx r2
...
.align
1: .long .
.long cpu1start_addr
will fix it properly.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2014-10-01 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 11:02 [PATCH] arm: socfpga: fix fetching cpu1start_addr for system with > 2GB of ram dinguyen at opensource.altera.com
2014-10-01 13:20 ` Russell King - ARM Linux [this message]
2014-10-02 22:43 ` Dinh Nguyen
2014-10-02 23:04 ` Dinh Nguyen
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=20141001132057.GO5182@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).