2018-03-29 |
ARM: aarch64: Setup exception vectors in initcall
...
The vectors are currently configured in arm_cpu_lowlevel_init(). This
shall be callable from PBL, but here the vectors are not available so
calling it from PBL will result in a linker error.
Move the vector setup to an initcall.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
ARM: aarch64: fix exception level mixup
...
When entering an exception the we currently jump to the code handling
EL1 when we are actually at EL3 and the other way round. Fix this by
introducing and using the switch_el macro from U-Boot.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
ARM: aarch64: move aarch64 exception support to separate file
...
The exception support for arm32 and aarch64 does not have much in
common. Move aarch64 exception support to a separate file to avoid
more ifdeffery.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
ARM: aarch64: compile with strict alignment
...
barebox runs with MMU disabled at least during startup. We need
-mstrict-alignment for these parts to avoid alignment aborts.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
ARM: aarch64: implement dma operations
...
For proper DMA support dma_alloc_coherent and DMA sync operations are
needed. Implement them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
ARM: implement dma mapping functions
...
Implement basic dma mapping functions. For now just assume every address
is valid for dma mapping.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
dma: Use dma_addr_t as type for DMA addresses
...
DMA addresses are not necessarily the same as unsigned long. Fix
the type for the dma_sync_single_* operations.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Mar 2018
|
2018-03-26 |
i.MX53/TX53: add new samsung based xx30 variant
...
Karo is deploying their latest tx53 modules with samsung instead of
nanya ram. Unfortunatly the still keep the old revision for that
modules. We add this modules as an extra xx30 samsung variant.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Michael Grzeschik
authored
on 23 Mar 2018
Sascha Hauer
committed
on 26 Mar 2018
|
i.MX/DCD compiler and interpreter: logic is different
...
Reading the manual more carefully discovers a different logic for the
DCD 'check' command. They use the term "until". In order to get the
manual and the software in sync, this change switches to the term
"until" as well. Changing must happen at compiler and interpreter level
to make it work.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Juergen Borleis
authored
on 23 Mar 2018
Sascha Hauer
committed
on 26 Mar 2018
|
i.MX53/TX53: rework to dts based boot
...
Since nobody likes to use platformcode based machines any more, we also
switch this one to use dts based booting.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Michael Grzeschik
authored
on 23 Mar 2018
Sascha Hauer
committed
on 26 Mar 2018
|
i.MX53/TX53: cfg revxx30: don't disable usb clks, so imx-usb-loader works
...
In the current configuration the usb related clocks get disabled
immediately which breaks the imx-usb-loader boot. We fix that by leaving
them enabled.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Michael Grzeschik
authored
on 23 Mar 2018
Sascha Hauer
committed
on 26 Mar 2018
|
2018-03-23 |
ARM: Make some variables 64bit aware
...
Use unsigned long as type for variables that are used as addresses.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Fix disabling the MMU
...
Do it as U-Boot: Disable MMU first, then flush caches and finally
invalidate tlbs. I wish I could reference some document instead of
U-Boot code, but I haven't found anything.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: drop ttb check when disabling the MMU
...
If the MMU is enabled then we should be able to disable it, no
matter if we initialized it in barebox or not. This change is not
really needed but helps when we are starting second stage from U-Boot
with the 'go' command which leaves the MMU enabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: No need to disable icache
...
When the MMU is disabled there is no need to disable the icache. Leave
it enabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Fix TCR setting
...
A BITS_PER_VA value of 33 is a little small. Increase it to 39 which is
the maximum size we can do with 3 level page tables. The TCR value
depends on the current exception level, so we have to calculate the
value during runtime. To do this use a function derived from U-Boots
get_tcr function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Fix PTE_TYPE_* flags
...
When we reach level 3 page tables we set the PTE_TYPE_PAGE bit in attr.
This is wrong since in the outer loop we can fall back to a lower level
in which case the PTE_TYPE_PAGE may not be set.
Fix this by not modifying attr and instead compose the *pte value when
needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Fix adding additional page table levels
...
When we create a higher level page table we have to initialize it
with the settings from the previous lower level page table so that
we do not modify unrelated mappings. split_block() is taken from
U-Boot code and does this job.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: use PTE_* definitions from U-Boot
...
'PMD' (Page Middle Directory) is a Linuxism that is not really
helpful in the barebox MMU code. Use the U-Boot definitions
which only use PTE_* and seem to be more consistent for our
usecase.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: enable mmu in generic code
...
Using board code to enable the MMU is not nice. Do it in generic
code. Since mmu_enable() is now done in mmu_64.c we no longer have
to export it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: qemu board: remove unnecessary mapping
...
Now that we do the initial flat mapping as device memory all addresses
that are not SDRAM are already mapped as device memory, so we can drop
the mapping from the board file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Fix mair register setting
...
The memory attributes register contains the memory attribute settings
for the corresponding to the possible AttrIndx values in the page
table entries. Passing UNCACHED_MEM makes no sense here, pass the
desired attributes instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: by default map as device memory
...
By default map the whole address space as unshared device memory
as this is what barebox drivers normally expect.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: remove unused map_io_sections()
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: fix creation of flat mapping
...
During initialization of the page tables we want to create a flat
uncached mapping for the whole address space. create_sections() takes
the size in bytes, not in MiB as assumed by the callees. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: create_sections() takes size in bytes
...
create_sections() takes size in bytes, not in megabytes, so
drop the _m prefix from the size argument.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: mmu: Allocate page tables dynamically
...
Current code allocates 16KiB for page tables. Whenever a new
table is needed an index is increased, but the bounds of this
index are never checked. Allocate the page tables dynamically
to solve this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: fix pbl linker script for aarch64
...
Fix output format for aarch64. Also, relocation fixup symbols are in
rela section rather than rel section.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
ARM: aarch64: Add relocation support
...
This adds aarch64 support for relocating binaries linked with -pie.
Support is integrated into the already exisiting
relocate_to_current_adr() function which is now used for both arm32
and aarch64.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2018
|
2018-03-21 |
ARM: move linker variable declarations to sections.h
...
We collected most linker variable declarations in asm/sections.h, so
move __exceptions_start/__exceptions_stop there aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Mar 2018
|