linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2] arm: socfpga: fix fetching cpu1start_addr for system with  > 2GB of ram
Date: Fri, 3 Oct 2014 22:58:44 +0100	[thread overview]
Message-ID: <20141003215844.GX5182@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1412370540-20670-1-git-send-email-dinguyen@opensource.altera.com>

On Fri, Oct 03, 2014 at 04:09:00PM -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, as it was just converting the virtual address
> of &cpu1start_addr into a physical address. But for systems with > 2BG, bit
> clearing 0x40000000 is not enough to get the physical address of &cpu1start_addr
> correctly.
> 
> This patch fixes the secondary_trampoline code to correctly fetch the physical
> address of cpu1start_addr directly.
> 
> While at it, change the name of cpu1start_addr to socfpga_cpu1start_addr
> to avoid any future naming collisions for multiplatform image.

I'm still not happy with this.  I see why my suggestion didn't work, but
this is still pretty dire - and will break when we add read-only text
support to the kernel (you are writing into the text segment.)

The reason my suggestion broke is because you aren't executing the code
in the kernel, you're copying it into SRAM and executing it there.  I
think you need to come up with some way to locate the physical address
in the SRAM, either before or after the function you're copying there.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2014-10-03 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 21:09 [PATCHv2] arm: socfpga: fix fetching cpu1start_addr for system with > 2GB of ram dinguyen at opensource.altera.com
2014-10-03 21:58 ` Russell King - ARM Linux [this message]
2014-10-06 15:56   ` 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=20141003215844.GX5182@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).