Thread (53 messages) 53 messages, 8 authors, 2016-02-02
STALE3774d

[PATCH v3] ARM: xip: Use correct symbol for end of ROM marker

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2016-01-29 21:17:38
Also in: linux-sh

On Fri, 29 Jan 2016, Chris Brandt wrote:
On Wed, 18 Nov 2015, Nicolas Pitre wrote:
quoted
On Wed, 18 Nov 2015, Chris Brandt wrote:
quoted
quoted
Probably the best way to fix it would be something like:

in asm/memory.h or similar:

#ifdef CONFIG_XIP_KERNEL
#define PHYS_OFFSET_FIXUP \
( XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) - PAGE_OFFSET + \
  PLAT_PHYS_OFFSET - CONFIG_XIP_PHYS_ADDR ) #else #define  
PHYS_OFFSET_FIXUP 0 #endif

And then, after my patch is applied, changing:

__v7_setup_stack_ptr:
       .word   __v7_setup_stack - .

into:

__v7_setup_stack_ptr:
       .word   __v7_setup_stack - . + PHYS_OFFSET_FIXUP

should do the trick. This way it'll work for all those places where 
the code is getting at the data area when the MMU is off with no XIP 
conditionals in the code.

Tested....it works!
Excellent.


Nicolas

Nicolas,

I applied your PHYS_OFFSET_FIXUP macro code (shown above) to the current tree which already has your commit "ARM: 8453/2: proc-v7.S: don't locate temporary stack space in .text section".

After testing, it shows the same results for an XIP_KERNEL build as it did in November:

   No PHYS_OFFSET_FIXUP = crash

   with PHYS_OFFSET_FIXUP = good


Can I submit a patch with your code for review and inclusion to the kernel?
Sure.

Signed-off-by: Nicolas Pitre <redacted>


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help