mirror of
https://github.com/linux-sunxi/sunxi-tools.git
synced 2024-11-26 19:33:58 +08:00
c1f947e085
To workaround a hardware erratum on the H3 SoC, we use an MMIO register based assembly routine to dump the SID registers, if needed. This is hard-coded to read the first four 32-bit words of the SID fuses. For the sid-dump command we need to access any arbitrary regions of the fuses, so extend the routine to take a start and an end address to dump. This changes the assembly source in the thunks/ directory: - We load the start address into r1, instead of zeroing it. The start address is put right after the SIO MMIO base address, at the end of the code. - When storing the read value into the result buffer, we automatically increase the pointer register (r3), instead of adding the offset address, since this is now no longer zero based. - To check for the end, we read the end pointer (stored at the end of the code, right after the offset), and compare against that instead of the hardcoded value of 16. This assembly file was put through the thunks Makefile, and the resulting content was copied from thunks/sid_read_root.h into fel_lib.c. For now we are still putting the constant values of 0 and 16 in, but this time from the C code. Signed-off-by: Andre Przywara <osp@andrep.de> |
||
---|---|---|
.. | ||
clrsetbits.h | ||
clrsetbits.S | ||
fel-to-spl-thunk.h | ||
fel-to-spl-thunk.S | ||
Makefile | ||
memcpy.h | ||
memcpy.S | ||
objdump_to_h.awk | ||
readl_writel.h | ||
readl_writel.S | ||
README.md | ||
rmr-thunk.h | ||
rmr-thunk.S | ||
sid_read_root.h | ||
sid_read_root.S |
thunks/README.md
This directory contains assembly sources for ARM thunk code, and
a corresponding Makefile. The idea is that the resulting binary routines
can be transferred to a suitable target device and then executed 'remotely',
usually via sunxi-fel
.
Normally you don't need to change or (re)build anything within this folder.
Currently our main build process (via the parent directory's Makefile)
only includes fel-to-spl-thunk.h
directly. Other .h files are provided
just for reference. The main purpose of this folder is simply keeping
track of .S sources, to help with possible future maintenance of the
various code snippets.
Please note that any files lacking explicit license information are intended to be covered by the project's overall license (GPLv2).