2d81f1fe81
When disabling the MMU, it is necessary to take out a 1:1 identity map of the reset code so that it can safely be executed with and without the MMU active. To avoid the situation where the physical address of the reset code aliases with the virtual address of the active stack (which cannot be included in the 1:1 mapping), it is desirable to change to a new stack at a location which is less likely to alias. This code adds a new lib function, call_with_stack: void call_with_stack(void (*fn)(void *), void *arg, void *sp); which changes the stack to point at the sp parameter, before invoking fn(arg) with the new stack selected. Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> |
||
---|---|---|
.. | ||
ashldi3.S | ||
ashrdi3.S | ||
backtrace.S | ||
bitops.h | ||
call_with_stack.S | ||
changebit.S | ||
clear_user.S | ||
clearbit.S | ||
copy_from_user.S | ||
copy_page.S | ||
copy_template.S | ||
copy_to_user.S | ||
csumipv6.S | ||
csumpartial.S | ||
csumpartialcopy.S | ||
csumpartialcopygeneric.S | ||
csumpartialcopyuser.S | ||
delay.S | ||
div64.S | ||
ecard.S | ||
findbit.S | ||
floppydma.S | ||
getuser.S | ||
io-acorn.S | ||
io-readsb.S | ||
io-readsl.S | ||
io-readsw-armv3.S | ||
io-readsw-armv4.S | ||
io-shark.c | ||
io-writesb.S | ||
io-writesl.S | ||
io-writesw-armv3.S | ||
io-writesw-armv4.S | ||
lib1funcs.S | ||
lshrdi3.S | ||
Makefile | ||
memchr.S | ||
memcpy.S | ||
memmove.S | ||
memset.S | ||
memzero.S | ||
muldi3.S | ||
putuser.S | ||
setbit.S | ||
strchr.S | ||
strncpy_from_user.S | ||
strnlen_user.S | ||
strrchr.S | ||
testchangebit.S | ||
testclearbit.S | ||
testsetbit.S | ||
uaccess_with_memcpy.c | ||
uaccess.S | ||
ucmpdi2.S |