Re: Mapping an executable page

2011-06-22 Thread Thomas De Schampheleire
On Tue, Jun 14, 2011 at 10:02 PM, Timur Tabi ti...@freescale.com wrote: Thomas De Schampheleire wrote: * However, if you jump to an address in that page, you'll have to make sure that the entire code that executes is mapped (make map_size large enough). Well, that seems obvious. Agreed.

Re: Mapping an executable page

2011-06-22 Thread Thomas De Schampheleire
On Tue, Jun 14, 2011 at 10:07 PM, Timur Tabi ti...@freescale.com wrote: Timur Tabi wrote: Hmmm I find that surprising.  Memory allocated via ioremap() is supposed to be available in interrupt handlers, where TLB mappings can't be created on-the-fly.  I'm not sure that your observation is

Re: Mapping an executable page

2011-06-22 Thread Thomas De Schampheleire
On Tue, Jun 14, 2011 at 10:26 PM, Scott Wood scottw...@freescale.com wrote: On Tue, 14 Jun 2011 10:56:31 +0200 Thomas De Schampheleire patrickdepinguin+linux...@gmail.com wrote: * Therefore, to make sure that the mapping I intended with __ioremap() is actually reflected in the TLB tables, I

Re: Mapping an executable page

2011-06-22 Thread Tabi Timur-B04825
Thomas De Schampheleire wrote: I think I can make it more reliable by dummy reading the pages*after* I disabled interrupts on that processor, immediately before jumping to the boot code. Is that correct? That sounds logical to me. BTW, since you're already doing something non-standard with

Re: Mapping an executable page

2011-06-22 Thread Thomas De Schampheleire
On Wed, Jun 22, 2011 at 1:40 PM, Tabi Timur-B04825 b04...@freescale.com wrote: Thomas De Schampheleire wrote: I think I can make it more reliable by dummy reading the pages*after* I disabled interrupts on that processor, immediately before jumping to the boot code. Is that correct? That

Re: Mapping an executable page

2011-06-14 Thread Thomas De Schampheleire
Hi, On Sun, May 29, 2011 at 4:53 PM, Tabi Timur-B04825 b04...@freescale.com wrote: On Fri, May 27, 2011 at 8:25 AM, Thomas De Schampheleire patrickdepinguin+linux...@gmail.com wrote: Although I realize that what I need to achieve is unconventional, what is the correct way of mapping a

Re: Mapping an executable page

2011-06-14 Thread Timur Tabi
Thomas De Schampheleire wrote: * However, if you jump to an address in that page, you'll have to make sure that the entire code that executes is mapped (make map_size large enough). Well, that seems obvious. * When that range spanned multiple pages, I faced the issue of only one page being

Re: Mapping an executable page

2011-06-14 Thread Timur Tabi
Timur Tabi wrote: Hmmm I find that surprising. Memory allocated via ioremap() is supposed to be available in interrupt handlers, where TLB mappings can't be created on-the-fly. I'm not sure that your observation is correct. Ok, it turns out I'm wrong. As long as the page is in the

Re: Mapping an executable page

2011-06-14 Thread Scott Wood
On Tue, 14 Jun 2011 10:56:31 +0200 Thomas De Schampheleire patrickdepinguin+linux...@gmail.com wrote: * Therefore, to make sure that the mapping I intended with __ioremap() is actually reflected in the TLB tables, I added dummy reads of each page in the TLB, prior to jumping to the boot code,

Re: Mapping an executable page

2011-05-31 Thread McClintock Matthew-B29882
On Fri, May 27, 2011 at 8:25 AM, Thomas De Schampheleire patrickdepinguin+linux...@gmail.com wrote: Although I realize that what I need to achieve is unconventional, what is the correct way of mapping a certain address range into memory, and be able to execute from it? Can you look at using

Re: Mapping an executable page

2011-05-29 Thread Tabi Timur-B04825
On Fri, May 27, 2011 at 8:25 AM, Thomas De Schampheleire patrickdepinguin+linux...@gmail.com wrote: Although I realize that what I need to achieve is unconventional, what is the correct way of mapping a certain address range into memory, and be able to execute from it? Have you tried looking

Mapping an executable page

2011-05-27 Thread Thomas De Schampheleire
Hi, To cover a specific reset scenario, I need to jump back to the reset vector of a powerpc processor (e500mc core). In order to be able to jump there directly, the code where I jump to should have a TLB mapping associated with it. I tried achieving this as follows: typedef