OSDN Git Service

Merge tag 'pull-ppc-20231121' of https://github.com/legoater/qemu into staging
[qmiga/qemu.git] / linux-user / loongarch64 / target_syscall.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2021 Loongson Technology Corporation Limited
4  */
5
6 #ifndef LOONGARCH_TARGET_SYSCALL_H
7 #define LOONGARCH_TARGET_SYSCALL_H
8
9 #include "qemu/units.h"
10
11 /*
12  * this struct defines the way the registers are stored on the
13  * stack during a system call.
14  */
15
16 struct target_pt_regs {
17     /* Saved main processor registers. */
18     target_ulong regs[32];
19
20     /* Saved special registers. */
21     struct {
22         target_ulong era;
23         target_ulong badv;
24         target_ulong crmd;
25         target_ulong prmd;
26         target_ulong euen;
27         target_ulong ecfg;
28         target_ulong estat;
29     } csr;
30     target_ulong orig_a0;
31     target_ulong __last[0];
32 };
33
34 #define UNAME_MACHINE "loongarch64"
35 #define UNAME_MINIMUM_RELEASE "5.19.0"
36
37 #define TARGET_MCL_CURRENT 1
38 #define TARGET_MCL_FUTURE  2
39 #define TARGET_MCL_ONFAULT 4
40
41 #define TARGET_FORCE_SHMLBA
42
43 static inline abi_ulong target_shmlba(CPULoongArchState *env)
44 {
45     return 64 * KiB;
46 }
47
48 #endif