This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: MMU Off / Strict Alignment
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Wed, 18 Dec 2013 15:11:50 +0000
- Subject: Re: MMU Off / Strict Alignment
- Authentication-results: sourceware.org; auth=none
- References: <528CF7F1 dot 5050001 at codeaurora dot org> <CADSXKXqJgD3cq594+NeRk9=QHA1DKh3o7aPjsVYOx5OqT1Y6pw at mail dot gmail dot com> <52AF3E5A dot 4050507 at codeaurora dot org> <52B00D46 dot 6050302 at arm dot com> <CAAP=3QN-NHH+bONrB3P6oCEQ8R-aaULxJcR2_T_EdH5_EkZyQg at mail dot gmail dot com> <20131218141016 dot GU30010 at calimero dot vinschen dot de> <8A6D8E6D161CD644B982513286072E8D0B6326D3 at DEFTHW99EJ1MSX dot ww902 dot siemens dot net>
>> > Second, this is a contract issue. If newlib intends to support
>> > embedded platforms, then it needs to implement algorithms that are
>> > functionally correct without relying on an MMU. By all means use
>> > simpler or smarter algorithms when an MMU can be assumed to be
>> > available in a given configuration, but provide an algorithm that is
>> > functionally correct when no MMU is available. "Good overall
>> > performance in memcpy" is a fine thing, but it is subject to the
>> > requirement of meeting functional specifications. As Jochen Liedtke
>> > famously put it (read this in a heavy German accent): "Fast, ya. But
>> > correct? (shrug) Eh!"
The ARMv8 reference manual defines three profiles of which only A
profile cores support A64 instruction set. An A profile core has an
MMU.
> Initializing an MMU oversteps the definition of "a few low-level routines" in
> my book, especially since this is intended to refer to callbacks to UARTs
> and so on.
There is an implementation of the MMU initialization provided in
libgloss/aarch64. This initialization comprises 1 routine of 24
instructions.
/Marcus