* disabling MMU of ARMv7-A
@ 2014-03-28 7:15 Chanho Park
2014-03-28 7:23 ` Marc C
2014-03-28 10:43 ` Catalin Marinas
0 siblings, 2 replies; 8+ messages in thread
From: Chanho Park @ 2014-03-28 7:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
I want to know is there anyone who tried disabling MMU of ARMv7-A likes
cortex-a9.
Yes. I know this is a silly question :)
I turned off CONFIG_MMU option of my exynos4 board and specified
CONFIG_DRAM_BASE/SIZE and REMAP_VECTORS_TO_RAM.
The problem is occurred in here there is no way to specify the vector table
address.
As I know the cortex-M3/4 has VTOR(Vector table offset register) to specify
the vector table address.
However, ARMv7-A/R doesn't have such register. They can only control whether
use _HIGH_ vector or not.
In this situation, can I find a way to boot successfully with
nommu+cortex-a9?
Thanks.
Best Regards,
Chanho Park
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-03-28 7:15 disabling MMU of ARMv7-A Chanho Park
@ 2014-03-28 7:23 ` Marc C
2014-03-28 7:27 ` Chanho Park
2014-03-28 10:49 ` Catalin Marinas
2014-03-28 10:43 ` Catalin Marinas
1 sibling, 2 replies; 8+ messages in thread
From: Marc C @ 2014-03-28 7:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Chanho,
> However, ARMv7-A/R doesn't have such register. They can only control whether
> use _HIGH_ vector or no
Not entirely accurate. ARMv7-A, and the Cortex-A9, specify the Vector
Base Address
Register, or VBAR [1].
-Marc
[1]http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/CIHGDDEI.html
On Fri, Mar 28, 2014 at 12:15 AM, Chanho Park <chanho61.park@samsung.com> wrote:
> Hi all,
>
> I want to know is there anyone who tried disabling MMU of ARMv7-A likes
> cortex-a9.
> Yes. I know this is a silly question :)
> I turned off CONFIG_MMU option of my exynos4 board and specified
> CONFIG_DRAM_BASE/SIZE and REMAP_VECTORS_TO_RAM.
> The problem is occurred in here there is no way to specify the vector table
> address.
> As I know the cortex-M3/4 has VTOR(Vector table offset register) to specify
> the vector table address.
> However, ARMv7-A/R doesn't have such register. They can only control whether
> use _HIGH_ vector or not.
> In this situation, can I find a way to boot successfully with
> nommu+cortex-a9?
>
> Thanks.
>
> Best Regards,
> Chanho Park
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-03-28 7:23 ` Marc C
@ 2014-03-28 7:27 ` Chanho Park
2014-03-28 10:49 ` Catalin Marinas
1 sibling, 0 replies; 8+ messages in thread
From: Chanho Park @ 2014-03-28 7:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi Marc,
> -----Original Message-----
> From: linux-arm-kernel [mailto:linux-arm-kernel-
> bounces at lists.infradead.org] On Behalf Of Marc C
> Sent: Friday, March 28, 2014 4:24 PM
> To: Chanho Park
> Cc: Will Deacon; Russell King - ARM Linux; linux-arm-
> kernel at lists.arm.linux.org.uk; linux-arm-kernel at lists.infradead.org;
> Catalin Marinas
> Subject: Re: disabling MMU of ARMv7-A
>
> Hi Chanho,
>
> > However, ARMv7-A/R doesn't have such register. They can only control
> whether
> > use _HIGH_ vector or no
>
> Not entirely accurate. ARMv7-A, and the Cortex-A9, specify the Vector
> Base Address
> Register, or VBAR [1].
Thank you for your valuable information :)
I'll try this one.
Best Regards,
Chanho Park
>
> -Marc
>
> [1]http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/
> CIHGDDEI.html
>
> On Fri, Mar 28, 2014 at 12:15 AM, Chanho Park
> <chanho61.park@samsung.com> wrote:
> > Hi all,
> >
> > I want to know is there anyone who tried disabling MMU of ARMv7-A
> likes
> > cortex-a9.
> > Yes. I know this is a silly question :)
> > I turned off CONFIG_MMU option of my exynos4 board and specified
> > CONFIG_DRAM_BASE/SIZE and REMAP_VECTORS_TO_RAM.
> > The problem is occurred in here there is no way to specify the vector
> table
> > address.
> > As I know the cortex-M3/4 has VTOR(Vector table offset register) to
> specify
> > the vector table address.
> > However, ARMv7-A/R doesn't have such register. They can only control
> whether
> > use _HIGH_ vector or not.
> > In this situation, can I find a way to boot successfully with
> > nommu+cortex-a9?
> >
> > Thanks.
> >
> > Best Regards,
> > Chanho Park
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-03-28 7:15 disabling MMU of ARMv7-A Chanho Park
2014-03-28 7:23 ` Marc C
@ 2014-03-28 10:43 ` Catalin Marinas
2014-04-07 9:56 ` Dave Martin
1 sibling, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2014-03-28 10:43 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 28, 2014 at 07:15:28AM +0000, Chanho Park wrote:
> I want to know is there anyone who tried disabling MMU of ARMv7-A likes
> cortex-a9.
> Yes. I know this is a silly question :)
> I turned off CONFIG_MMU option of my exynos4 board and specified
> CONFIG_DRAM_BASE/SIZE and REMAP_VECTORS_TO_RAM.
> The problem is occurred in here there is no way to specify the vector table
> address.
> As I know the cortex-M3/4 has VTOR(Vector table offset register) to specify
> the vector table address.
> However, ARMv7-A/R doesn't have such register. They can only control whether
> use _HIGH_ vector or not.
> In this situation, can I find a way to boot successfully with
> nommu+cortex-a9?
There is no way to set a random vectors address on A9. But even if you
want a !MMU kernel, I would not recommend disabling the MMU entirely
because your memory accesses are strongly ordered (and slow and
unaligned accesses will not work). It's better to create some flat
mapping, possibly before starting the kernel and keep the MMU enabled.
Such mapping would contain a vectors page as well (low or high).
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-03-28 7:23 ` Marc C
2014-03-28 7:27 ` Chanho Park
@ 2014-03-28 10:49 ` Catalin Marinas
1 sibling, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2014-03-28 10:49 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 28, 2014 at 07:23:45AM +0000, Marc C wrote:
> > However, ARMv7-A/R doesn't have such register. They can only control whether
> > use _HIGH_ vector or no
>
> Not entirely accurate. ARMv7-A, and the Cortex-A9, specify the Vector
> Base Address
> Register, or VBAR [1].
Good point, I missed this. It only works if SCTLR.V is 0 (so low
vectors).
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-03-28 10:43 ` Catalin Marinas
@ 2014-04-07 9:56 ` Dave Martin
2014-04-07 10:33 ` Russell King - ARM Linux
0 siblings, 1 reply; 8+ messages in thread
From: Dave Martin @ 2014-04-07 9:56 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 28, 2014 at 10:43:49AM +0000, Catalin Marinas wrote:
> On Fri, Mar 28, 2014 at 07:15:28AM +0000, Chanho Park wrote:
> > I want to know is there anyone who tried disabling MMU of ARMv7-A likes
> > cortex-a9.
> > Yes. I know this is a silly question :)
> > I turned off CONFIG_MMU option of my exynos4 board and specified
> > CONFIG_DRAM_BASE/SIZE and REMAP_VECTORS_TO_RAM.
> > The problem is occurred in here there is no way to specify the vector table
> > address.
> > As I know the cortex-M3/4 has VTOR(Vector table offset register) to specify
> > the vector table address.
> > However, ARMv7-A/R doesn't have such register. They can only control whether
> > use _HIGH_ vector or not.
> > In this situation, can I find a way to boot successfully with
> > nommu+cortex-a9?
>
> There is no way to set a random vectors address on A9. But even if you
Picking up an old thread here, but just to clarify:
I think the vectors can be moved on A9 using the VBAR. All v6K and
later processors with the Security Extensions (including v7-A, v8-R)
have this. However, Linux still needs to work on CPUs that don't have
this feature. This may include a lot of platforms capable of running
nommu kernels.
> want a !MMU kernel, I would not recommend disabling the MMU entirely
> because your memory accesses are strongly ordered (and slow and
> unaligned accesses will not work). It's better to create some flat
> mapping, possibly before starting the kernel and keep the MMU enabled.
> Such mapping would contain a vectors page as well (low or high).
Agreed -- CONFIG_MMU=n does not need to imply that the MMU is turned off:
everything must be indentity-mapped (VA = PA), but it is still desirable
to define attributes. For SMP, it's *necessary* to define attributes,
otherwise we can't guarantee working spinlocks etc.
I don't actually know whether nommu works with SMP on v7+-A today. Maybe
someone else can comment on that.
Cheers
---Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-04-07 9:56 ` Dave Martin
@ 2014-04-07 10:33 ` Russell King - ARM Linux
2014-04-07 17:16 ` Dave Martin
0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2014-04-07 10:33 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 07, 2014 at 10:56:36AM +0100, Dave Martin wrote:
> Agreed -- CONFIG_MMU=n does not need to imply that the MMU is turned off:
> everything must be indentity-mapped (VA = PA), but it is still desirable
> to define attributes. For SMP, it's *necessary* to define attributes,
> otherwise we can't guarantee working spinlocks etc.
It's also necessary for UP as well, as the load-exclusive and
store-exclusive must still work. Remember these instructions get used
for more than just spinlocks.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* disabling MMU of ARMv7-A
2014-04-07 10:33 ` Russell King - ARM Linux
@ 2014-04-07 17:16 ` Dave Martin
0 siblings, 0 replies; 8+ messages in thread
From: Dave Martin @ 2014-04-07 17:16 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 07, 2014 at 11:33:12AM +0100, Russell King - ARM Linux wrote:
> On Mon, Apr 07, 2014 at 10:56:36AM +0100, Dave Martin wrote:
> > Agreed -- CONFIG_MMU=n does not need to imply that the MMU is turned off:
> > everything must be indentity-mapped (VA = PA), but it is still desirable
> > to define attributes. For SMP, it's *necessary* to define attributes,
> > otherwise we can't guarantee working spinlocks etc.
>
> It's also necessary for UP as well, as the load-exclusive and
> store-exclusive must still work. Remember these instructions get used
> for more than just spinlocks.
Agreed.
Nothing in head-nommu.S seems to create any initial page tables or
turn on the MMU, although we do set up an MPU instead if there is one,
Is !MMU known to work with v6 and later? I'm starting to have doubts.
My understanding of the ARM ARM is that a system may generate an abort
if ldrex/strex is attempted with the MMU off, though there are at least
some platforms that don't do that.
Cheers
---Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-07 17:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 7:15 disabling MMU of ARMv7-A Chanho Park
2014-03-28 7:23 ` Marc C
2014-03-28 7:27 ` Chanho Park
2014-03-28 10:49 ` Catalin Marinas
2014-03-28 10:43 ` Catalin Marinas
2014-04-07 9:56 ` Dave Martin
2014-04-07 10:33 ` Russell King - ARM Linux
2014-04-07 17:16 ` Dave Martin
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).