32bit compat mode for arm64

Richard Weinberger richard.weinberger at gmail.com
Mon Mar 2 13:34:56 CET 2020


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:
> >>
> >> Hi!
> >>
> >> 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.

Anyway, I did already some prototyping and managed to run 32bit
Xenomai applications on
arm64.
As soon I have something to show I'll send patches. :-)

-- 
Thanks,
//richard



More information about the Xenomai mailing list