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

Chris Brandt Chris.Brandt at renesas.com
Fri Jan 29 13:12:45 PST 2016


On Wed, 18 Nov 2015, Nicolas Pitre wrote:

> On Wed, 18 Nov 2015, Chris Brandt wrote:
>
> > > 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?


Chris




More information about the linux-arm-kernel mailing list