disabling MMU of ARMv7-A
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
Hi Chanho,
Quoted 2 lines
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
Quoted 26 lines · Chanho Park
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 offCONFIG_MMUoption of my exynos4 board and specified CONFIG_DRAM_BASE/SIZE andREMAP_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
Hi Marc,
Quoted 12 lines
-----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-AHi Chanho,
Quoted 7 lines
Quoted 1 line
However, ARMv7-A/R doesn't have such register. They can only control
whether
Quoted 1 line
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
Quoted 43 lines
-Marc
[1]http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/ CIHGDDEI.html
Quoted 3 lines · Chanho Park
Hi all,
I want to know is there anyone who tried disabling MMU of ARMv7-A
likes
Quoted 5 lines
cortex-a9.
Yes. I know this is a silly question :)
I turned offCONFIG_MMUoption of my exynos4 board and specified CONFIG_DRAM_BASE/SIZE andREMAP_VECTORS_TO_RAM.
The problem is occurred in here there is no way to specify the vectortable
Quoted 2 lines
address.
As I know the cortex-M3/4 has VTOR(Vector table offset register) tospecify
Quoted 2 lines
the vector table address.
However, ARMv7-A/R doesn't have such register. They can only controlwhether
Quoted 6 lines
use _HIGH_ vector or not.
In this situation, can I find a way to boot successfully with nommu+cortex-a9?Thanks.
Quoted 8 lines
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
Quoted 5 lines · Chanho Park
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 offCONFIG_MMUoption of my exynos4 board and specified CONFIG_DRAM_BASE/SIZE andREMAP_VECTORS_TO_RAM.
Quoted 8 lines
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).
Signature · 1 line
Catalin
Quoted 6 lines · Marc C
Quoted 2 lines
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).
Signature · 1 line
Catalin
Quoted 15 lines · Catalin Marinas
Quoted 5 lines · Chanho Park
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 offCONFIG_MMUoption of my exynos4 board and specified CONFIG_DRAM_BASE/SIZE andREMAP_VECTORS_TO_RAM.Quoted 8 lines
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?
Quoted 1 line
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.
Quoted 5 lines
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
Quoted 4 lines · Dave Martin
Agreed --
CONFIG_MMU=ndoes 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.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Quoted 9 lines · Russell King - ARM Linux
Quoted 4 lines · Dave Martin
Agreed --
CONFIG_MMU=ndoes 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