Age | Commit message (Collapse) | Author |
|
non-executable.
ok visa@, deraadt@
|
|
to access it.
|
|
L2_S_COHERENT_v7 such that bus_dmamap_sync(9) avoids unnecessary cache
flushes again for DMA'able memory mapped with the BUS_DMA_COHERENT flag.
I broke this in pmap7.c rev 1.35.
ok tom@
|
|
ok visa@
|
|
armv7 pmap.
ok tom@
|
|
numbers serve as a warning not to touch them.
|
|
|
|
These are functionally equivolent so it didn't matter and the resulting
code doesn't change.
|
|
|
|
other ARMv7 CPUs have a L2 cache that is larger than 32KB. And some of those
even have L1 caches larger than that. So bailing out after 32KB will leave
the cache partially dirty.
Fixes the SATA problems on Allwinner A20 based boards.
ok patrick@
|
|
Generic xscale support and support for pxa2x0 used by zaurus remains.
|
|
toggling the bit, clearing it when already set. On Cortex-A7 setting the SMP
bit is essential since without it the CPU doesn't actually use its caches.
The SMP bit supposed to be set before turning on the caches and the MMU, so
move the setting of the Auxiliary Control Register before setting the
System Control Register.
ok jsg@
|
|
ok tedu@
|
|
level of the translation table, including entries that point to further
levels of the tables. This means that we have to do a TLB flush whenever
we invalidate an L1 slot too. Doing so fixes the pmap_fault_fixup
issue on Cortex-A7 processors.
|
|
non Global bit Small page desciptions. iConsistently name the S-bit
Sharable in comments.
|
|
with setting the Access Flag Enable bit in the System Control Register.
The new settings mean that read-only userland pages are no longer writable
by the kernel, which is a good thing. Set the Access Flag Enable bit.
ok patrick@
|
|
function for platforms that have it, rework the code a bit such that it can
be used before agtimer(4) attaches. Introduce a new agtimer_init()
function that checks whether the CPU implements the Generic Timer feature
and switches to agtimer_delay() if that feature is present. Call this
function from the generic platform initialization code.
ok jsg@
|
|
Remove the code to do so from cpuswitch().
ok guenther@
|
|
don't think we'll ever go back. So let's ditch the code that tries to
check and patch up incorrect memory attributes.
Also realize that pmap_clean_page(pg, FALSE) doesn't do anything
anymore so remove those calls and drop the 2nd argument from
pmap_clean_page(pg, TRUE) calls.
Last but not least, get rid of pmap_pte_init_generic() here. The only
useful thing it did was setting pmap_copy_page_func() and
pmap_zero_page_func().
This diff should not introduce any change in behaviour.
ok visa@
|
|
atomic instructions don't work unless the data cache is enabled. This happens
in cpu_setup(), but that gets currently called from cpu_startup() which runs
after a number of kernel subsystems have been initialized. Since some of
these subsystems use locks, which need atomic instructions, we fault on
Cortex-A53. Since at the end of initarm() we're done setting up the pmap
and initializing other low-level sense, calling cpu_setup() here makes much
more sense.
Remove setting up proc0paddr as well from cpu_startup(), since that already
happens in initarm().
Tested on zaurus by deraadt@.
ok jsg@, patrick@
|
|
to non-cachable is retarded. Fix this by introducing PMAP_NOCACHE and
PMAP_DEVICE flags that can be or'ed into the physical address passed to
pmap_kenter(9), like we have on many of our other architectures. This way we
can also properly distinguish between device memory and normal (non-cachable)
memory.
ok visa@
|
|
no need to clean and/or invalidate cached pages. So remove most of the
cache cleaning and invalidation from the pmap. We still need to synchronize
the instruction cache with the data cache in various places though. And we
also need to make sure that we clean and invalidate when we make a page
non-cachable.
Tested by Daniel Bolgheroni, mglocker@ and jsg@. on Cortex-A8 and myself on
Cortex-A9.
ok visa@
|
|
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall.
ok deraadt@ kettenis@
|
|
Requested by and ok kettenis@
|
|
This will be helpful for interrupt combiner that need to re-establish
their main interrupt when their interrupt priorities change.
ok kettenis@
|
|
generic arm files list. There is no point in building it on armish or
zaurus.
ok patrick@
|
|
the page tables coherently and also skip flushing modified ptes out of the
cache in that case. Speeds up building a kernel with a factor of two on
Cortex-A9 (tested by me) and Cortex-A8 (tested by mglocker@).
ok patrick@
|
|
its job. Recalculate the mask after the handler is taken from the
list to properly set the new prioritization.
ok kettenis@
|
|
the same way as for those that attach to simplebus.
ok kettenis@ patrick@
|
|
No binary change.
|
|
ok patrick@, jsg@
|
|
controller. Switch all i.MX6 devices over to the new FDT-aware interrupt
establish API and enable imxgpc(4).
This may break other platforms that use ampintc(4) as their interrupt
controller. We will fix this as soon as possible by switching them over
to the new interrupt establish API as well.
This also removes the hack in fec(4) to avoid the gpio-based interrupt
workaround. This commit is an essential step on the road to fix that
issue properly.
ok patrick@, jsg@
|
|
establish interrupts before their interrupt controller attaches, solving
dependency problems in various device trees.
Also add support for handing interrupt handlers over to parent interrupt
controllers.
ok jsg@ patrick@ (on an earlier diff)
|
|
unified TLB there is not much point in optimizing TLB flushing for pages
that have never been executable. The only difference is a flush of the
branch predictor and even that isn't necessary anymore on all but the oldest
Cortex cores.
ok patrick@
|
|
maintanenance instruction and recommends to only use the instructions that
operate on the unified TLB. Those instructions will flush both TLBs on
implementations that still have separate Instruction and Data TLBs. Switch
the TLB maintenance primitives over to use those. This allows us to reduce
the number of primitives on armv7. We still keep separate "ID" and "D"
variants as we still have to flush the branch predictor when changing the
mappings of pages that contain instructions.
ok jsg@
|
|
|
|
ok patrick@
|
|
be held in the TLB. On top of that valid page table entries might be
speculatively loaded into the TLB. As a result we need to flush TLB entries
even when the page in question has not been referenced.
Fixes pmap_fault_fixup messages on Cortex-A53, and presumably also on
Cortex-A7.
ok patrick@, guenther@
|
|
From Robert Tate.
|
|
|
|
MMFR0 for an ARMv7 VMSA MMU that can handle short descriptors when
setting ARMv7 function pointers. ARMv8 in AArch32 mode is documented to
set the same bits.
ok patrick@
|
|
we will run into translation faults.
ok tom@
|
|
allowed you to pass a virtual address, which you received from an
early bootstrap mapping, as physical address to bus_space_map(9).
It breaks bus_space_map(9) for peripherals that are after 0xC0000000,
as it assumes that everything after that address cannot be a real
peripheral. But that's wrong. It does not make sense to pass a
virtual address to bus_space_map(9) anyway, so just get rid of this
whole "feature".
ok kettenis@
|
|
removed from pmaps it currently is in. To check if a virtual address
pointing to that physical page has been mapped, the code uses
the l2pte_valid() function. Unfortunately there is a difference
between being valid and the PTE being zero. If a page is mapped
but has never been accessed, it will be non-zero but invalid.
In that case the PTE for that virtual address will not be zeroed
and the virtual address will be removed from the vm page struct.
The next time someone tries to map a page to that virtual address,
other pmap code will consider the virtual address to be already
mapped, even though that assumption is completely wrong.
To make sure this does not happen, check the PTE for zero. This way
the PTE will be zeroed correctly. The check for zero is how other
ARM pmap code also handles this issue.
ok kettenis@ tom@
|
|
pass a pre-processed array of fdt_reg structs. This means
that the drivers don't have to understand the cell properties
themselves but can rely on the 64-bit addr/size pairs.
ok kettenis@
|
|
in pmap_free_l1().
from aalm@ - thanks
ok patrick@
|
|
just use the pv_flags. ('Twas a copy-paste from arm's pmap_clean_page(),
which did need it.)
Also remove even less used flags variable from pmap_page_remove().
First part from a diff from aalm@ - thanks
ok kettenis@ "looks good" patrick@
|
|
be used to translate one memory address to another. Currently we just
pass the child's memory address to bus space map. If one of the parent
busses implements a ranges property, the child's address property is
not the real address. This change hooks up a bus space map function
that is aware of the ranges property and translates the addresses if
needed.
ok kettenis@
looks fine jsg@
|
|
ok jsg@
|
|
of the memory address and length information. The root node passes
this information down to the children and it can be overwritten by
other nodes inbetween. Pass these properties as part of the fdt
attach args, so that we can grab that information quickly inside
the drivers.
ok kettenis@
|