master
h 37 lines 1.12 KB
Raw
1 /*
2 * arm VM parameters definitions
3 *
4 * Copyright (c) 2013 Stacey D. Son
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 #ifndef TARGET_ARCH_VMPARAM_H
9 #define TARGET_ARCH_VMPARAM_H
10
11 #include "cpu.h"
12
13 /* compare to sys/arm/include/vmparam.h */
14 #define TARGET_MAXTSIZ (64 * MiB) /* max text size */
15 #define TARGET_DFLDSIZ (128 * MiB) /* initial data size limit */
16 #define TARGET_MAXDSIZ (512 * MiB) /* max data size */
17 #define TARGET_DFLSSIZ (4 * MiB) /* initial stack size limit */
18 #define TARGET_MAXSSIZ (64 * MiB) /* max stack size */
19 #define TARGET_SGROWSIZ (128 * KiB) /* amount to grow stack */
20
21 #define TARGET_RESERVED_VA 0xf7000000
22
23 /* KERNBASE - 512 MB */
24 #define TARGET_VM_MAXUSER_ADDRESS (0xc0000000 - (512 * MiB))
25 #define TARGET_USRSTACK TARGET_VM_MAXUSER_ADDRESS
26
27 static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
28 {
29 return state->regs[13]; /* sp */
30 }
31
32 static inline void set_second_rval(CPUARMState *state, abi_ulong retval2)
33 {
34 state->regs[1] = retval2;
35 }
36
37 #endif /* TARGET_ARCH_VMPARAM_H */