qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v13 21/26] linux-user: Add LoongArch syscall support


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v13 21/26] linux-user: Add LoongArch syscall support
Date: Sat, 4 Dec 2021 18:31:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 12/4/21 10:29, Song Gao wrote:
> We should disable '__BITS_PER_LONG' at [1] before run gensyscalls.sh
> 
>  [1] arch/loongarch/include/uapi/asm/bitsperlong.h
> 
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/loongarch64/syscall_nr.h     | 313 
> ++++++++++++++++++++++++++++++++
>  linux-user/loongarch64/target_syscall.h |  44 +++++
>  linux-user/syscall_defs.h               |  10 +-
>  scripts/gensyscalls.sh                  |   1 +
>  4 files changed, 364 insertions(+), 4 deletions(-)
>  create mode 100644 linux-user/loongarch64/syscall_nr.h
>  create mode 100644 linux-user/loongarch64/target_syscall.h

> +struct target_pt_regs {
> +    /* Saved main processor registers. */
> +    target_ulong regs[32];
> +
> +    /* Saved special registers. */

Eventually:

  struct {

> +    target_ulong csr_crmd;
> +    target_ulong csr_prmd;
> +    target_ulong csr_euen;
> +    target_ulong csr_ecfg;
> +    target_ulong csr_estat;
> +    target_ulong csr_era;
> +    target_ulong csr_badvaddr;

  } csr;

And rename registers accordingly.

> +    target_ulong orig_a0;
> +    target_ulong __last[0];
> +};
> +
> +#define UNAME_MACHINE "loongarch64"
> +#define UNAME_MINIMUM_RELEASE "5.16.0"
> +
> +#define TARGET_MCL_CURRENT 1
> +#define TARGET_MCL_FUTURE  2
> +#define TARGET_MCL_ONFAULT 4
> +
> +#define TARGET_FORCE_SHMLBA
> +
> +static inline abi_ulong target_shmlba(CPULoongArchState *env)
> +{
> +    return 0x10000;

Eventually 64 * KiB.

> +}

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]