master
h 35 lines 1.05 KB
Raw
1 /*
2 * Intel x86_64 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 amd64/include/vmparam.h */
14 #define TARGET_MAXTSIZ (128 * MiB) /* max text size */
15 #define TARGET_DFLDSIZ (32 * GiB) /* initial data size limit */
16 #define TARGET_MAXDSIZ (32 * GiB) /* max data size */
17 #define TARGET_DFLSSIZ (8 * MiB) /* initial stack size limit */
18 #define TARGET_MAXSSIZ (512 * MiB) /* max stack size */
19 #define TARGET_SGROWSIZ (128 * KiB) /* amount to grow stack */
20
21 #define TARGET_VM_MAXUSER_ADDRESS (0x00007fffff000000UL)
22
23 #define TARGET_USRSTACK (TARGET_VM_MAXUSER_ADDRESS - TARGET_PAGE_SIZE)
24
25 static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
26 {
27 return state->regs[R_ESP];
28 }
29
30 static inline void set_second_rval(CPUX86State *state, abi_ulong retval2)
31 {
32 state->regs[R_EDX] = retval2;
33 }
34
35 #endif /* TARGET_ARCH_VMPARAM_H */