32bit compat mode for arm64
jan.kiszka at siemens.com
Mon Mar 2 13:39:22 CET 2020
On 02.03.20 13:34, Richard Weinberger wrote:
> On Mon, Mar 2, 2020 at 1:21 PM Jan Kiszka <jan.kiszka at siemens.com> wrote:
>> On 29.02.20 12:46, Richard Weinberger via Xenomai wrote:
>>> On Fri, Feb 28, 2020 at 10:01 PM Richard Weinberger
>>> <richard.weinberger at gmail.com> wrote:
>>>> I noticed that running 32bit arm EABI xenomai userspace is currently
>>>> not possible
>>>> on arm64 kernels.
>>>> From a quick look I see the following tasks to make it happen:
>>>> - syscall gate adaptations for cobalt arm32 syscalls (they are
>>>> different from regular arm EABI)
>>>> - teach ipipe_root_nr_syscalls() on arm64 about __NR_compat_syscalls
>>>> - Don't use XENOMAI_ABI_REV for compat userspace on arm64
>>>> - Implement a syscall32-table.h (for COBALT_SYSCALL32emu_DECL() and friends)
>>> One more thing: TSC emulation is missing on arm64.
>> What exactly are you referring to?
> I think CONFIG_IPIPE_ARM_KUSER_TSC.
> In lib/cobalt/arch/arm/features.c cobalt_check_features() sets a
> function pointer:
> __xn_tscinfo.kuser_tsc_get =
> (__xn_rdtsc_t *)(0xffff1004 -
> ((*(unsigned *)(0xffff0ffc) + 3) << 5));
> On arm64 this pointer is invalid.
To my understanding, there is not need for those workarounds on ARM64
because that arch provides a userspace-accessible TSC architecturally.
> Anyway, I did already some prototyping and managed to run 32bit
> Xenomai applications on
> As soon I have something to show I'll send patches. :-)
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
More information about the Xenomai