]> git.proxmox.com Git - mirror_qemu.git/blame - bsd-user/arm/target_arch_vmparam.h
bsd-user/arm/signal.c: arm get_ucontext_sigreturn
[mirror_qemu.git] / bsd-user / arm / target_arch_vmparam.h
CommitLineData
dacfdf3b
WL
1/*
2 * arm VM parameters definitions
3 *
4 * Copyright (c) 2013 Stacey D. Son
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19#ifndef _TARGET_ARCH_VMPARAM_H_
20#define _TARGET_ARCH_VMPARAM_H_
21
22#include "cpu.h"
23
24/* compare to sys/arm/include/vmparam.h */
25#define TARGET_MAXTSIZ (64 * MiB) /* max text size */
26#define TARGET_DFLDSIZ (128 * MiB) /* initial data size limit */
27#define TARGET_MAXDSIZ (512 * MiB) /* max data size */
28#define TARGET_DFLSSIZ (4 * MiB) /* initial stack size limit */
29#define TARGET_MAXSSIZ (64 * MiB) /* max stack size */
30#define TARGET_SGROWSIZ (128 * KiB) /* amount to grow stack */
31
32#define TARGET_RESERVED_VA 0xf7000000
33
34 /* KERNBASE - 512 MB */
35#define TARGET_VM_MAXUSER_ADDRESS (0xc0000000 - (512 * MiB))
36#define TARGET_USRSTACK TARGET_VM_MAXUSER_ADDRESS
37
38static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
39{
40 return state->regs[13]; /* sp */
41}
42
43static inline void set_second_rval(CPUARMState *state, abi_ulong retval2)
44{
45 state->regs[1] = retval2;
46}
47
48#endif /* ! _TARGET_ARCH_VMPARAM_H_ */