mirror of https://gitee.com/openkylin/linux.git
3623d13821
Historically SH-2 Linux (and originally uClinux) used a syscall calling convention incompatible with the established SH-3/4 Linux ABI. This choice was made because the trap range used by the existing ABI, 0x10-0x17, overlaps with the hardware exception/interrupt trap range reserved by SH-2, and in particular, with the SH-2A divide-by-zero and division-overflow exceptions. Despite the documented syscall convention using the low bits of the trap number to signal the number of arguments the kernel should expect, no version of the kernel has ever used this information, nor is it useful; all of the registers need to be saved anyway. Therefore, it is possible to pick a new trap number, 0x1f, that is both supported by all existing SH-3/4 kernels and unassigned as a hardware trap in the SH-2 range. This makes it possible to produce SH-2 application binaries that are forwards-compatible with running on SH-3/4 kernels and to treat SH as a unified platform with varying ISA support levels rather than multiple gratuitously-incompatible platforms. This patch adjusts the range checking SH-2 and SH-2A kernels make for the syscall trap to accept the range 0x1f-0x2f rather than just 0x20-0x2f. As a result, trap 0x1f now acts as a syscall for all SH models. Signed-off-by: Rich Felker <dalias@libc.org> |
||
---|---|---|
.. | ||
Makefile | ||
clock-sh7201.c | ||
clock-sh7203.c | ||
clock-sh7206.c | ||
clock-sh7264.c | ||
clock-sh7269.c | ||
entry.S | ||
ex.S | ||
fpu.c | ||
opcode_helper.c | ||
pinmux-sh7203.c | ||
pinmux-sh7264.c | ||
pinmux-sh7269.c | ||
probe.c | ||
setup-mxg.c | ||
setup-sh7201.c | ||
setup-sh7203.c | ||
setup-sh7206.c | ||
setup-sh7264.c | ||
setup-sh7269.c |