xref: /openbmc/qemu/bsd-user/riscv/target_syscall.h (revision 35ba77d2fcd10efd6db8318bbd4d21fa9402143b)
1*9cc1a9cdSMark Corbin /*
2*9cc1a9cdSMark Corbin  *  RISC-V system call definitions
3*9cc1a9cdSMark Corbin  *
4*9cc1a9cdSMark Corbin  *  Copyright (c) Mark Corbin
5*9cc1a9cdSMark Corbin  *
6*9cc1a9cdSMark Corbin  *  This program is free software; you can redistribute it and/or modify
7*9cc1a9cdSMark Corbin  *  it under the terms of the GNU General Public License as published by
8*9cc1a9cdSMark Corbin  *  the Free Software Foundation; either version 2 of the License, or
9*9cc1a9cdSMark Corbin  *  (at your option) any later version.
10*9cc1a9cdSMark Corbin  *
11*9cc1a9cdSMark Corbin  *  This program is distributed in the hope that it will be useful,
12*9cc1a9cdSMark Corbin  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13*9cc1a9cdSMark Corbin  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*9cc1a9cdSMark Corbin  *  GNU General Public License for more details.
15*9cc1a9cdSMark Corbin  *
16*9cc1a9cdSMark Corbin  *  You should have received a copy of the GNU General Public License
17*9cc1a9cdSMark Corbin  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
18*9cc1a9cdSMark Corbin  */
19*9cc1a9cdSMark Corbin 
20*9cc1a9cdSMark Corbin #ifndef BSD_USER_RISCV_TARGET_SYSCALL_H
21*9cc1a9cdSMark Corbin #define BSD_USER_RISCV_TARGET_SYSCALL_H
22*9cc1a9cdSMark Corbin 
23*9cc1a9cdSMark Corbin /*
24*9cc1a9cdSMark Corbin  * struct target_pt_regs defines the way the registers are stored on the stack
25*9cc1a9cdSMark Corbin  * during a system call.
26*9cc1a9cdSMark Corbin  */
27*9cc1a9cdSMark Corbin 
28*9cc1a9cdSMark Corbin struct target_pt_regs {
29*9cc1a9cdSMark Corbin     abi_ulong regs[32];
30*9cc1a9cdSMark Corbin     abi_ulong sepc;
31*9cc1a9cdSMark Corbin };
32*9cc1a9cdSMark Corbin 
33*9cc1a9cdSMark Corbin #define UNAME_MACHINE "riscv64"
34*9cc1a9cdSMark Corbin 
35*9cc1a9cdSMark Corbin #define TARGET_HW_MACHINE       "riscv"
36*9cc1a9cdSMark Corbin #define TARGET_HW_MACHINE_ARCH  UNAME_MACHINE
37*9cc1a9cdSMark Corbin 
38*9cc1a9cdSMark Corbin #endif /* BSD_USER_RISCV_TARGET_SYSCALL_H */
39