[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>
- [PATCH v13 24/26] target/loongarch: Add target build suport, (continued)
- [PATCH v13 24/26] target/loongarch: Add target build suport, Song Gao, 2021/12/04
- [PATCH v13 26/26] scripts: add loongarch64 binfmt config, Song Gao, 2021/12/04
- [PATCH v13 17/26] linux-user: Add LoongArch generic header files, Song Gao, 2021/12/04
- [PATCH v13 19/26] linux-user: Add LoongArch signal support, Song Gao, 2021/12/04
- [PATCH v13 11/26] target/loongarch: Add floating point comparison instruction translation, Song Gao, 2021/12/04
- [PATCH v13 25/26] target/loongarch: 'make check-tcg' support, Song Gao, 2021/12/04
- [PATCH v13 21/26] linux-user: Add LoongArch syscall support, Song Gao, 2021/12/04
- Re: [PATCH v13 21/26] linux-user: Add LoongArch syscall support,
Philippe Mathieu-Daudé <=
- [PATCH v13 12/26] target/loongarch: Add floating point conversion instruction translation, Song Gao, 2021/12/04
- [PATCH v13 10/26] target/loongarch: Add floating point arithmetic instruction translation, Song Gao, 2021/12/04
- [PATCH v13 13/26] target/loongarch: Add floating point move instruction translation, Song Gao, 2021/12/04
- [PATCH v13 06/26] target/loongarch: Add fixed point bit instruction translation, Song Gao, 2021/12/04
- [PATCH v13 18/26] linux-user: Add LoongArch specific structures, Song Gao, 2021/12/04
- [PATCH v13 20/26] linux-user: Add LoongArch elf support, Song Gao, 2021/12/04
- [PATCH v13 02/26] target/loongarch: Add core definition, Song Gao, 2021/12/04