summaryrefslogtreecommitdiff
path: root/linux-user/nios2/target_signal.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2017-01-18 23:01:42 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-24 13:10:35 -0800
commita0a839b65b61a51934b9c2c197fa058c319cc94a (patch)
tree925ce4031c19b9e10cc8927c934a4e90a6f7dff6 /linux-user/nios2/target_signal.h
parent3f0c3423093fe7a07af3806cc773bf7d71adf8c9 (diff)
nios2: Add usermode binaries emulation
Add missing bits for qemu-user required for emulating Altera Nios2 userspace binaries. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chris Wulff <crwulff@gmail.com> Cc: Jeff Da Silva <jdasilva@altera.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Sandra Loosemore <sandra@codesourcery.com> Cc: Yves Vandervennet <yvanderv@altera.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-Id: <20170118220146.489-4-marex@denx.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'linux-user/nios2/target_signal.h')
-rw-r--r--linux-user/nios2/target_signal.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/linux-user/nios2/target_signal.h b/linux-user/nios2/target_signal.h
new file mode 100644
index 0000000000..23a8267696
--- /dev/null
+++ b/linux-user/nios2/target_signal.h
@@ -0,0 +1,26 @@
+#ifndef TARGET_SIGNAL_H
+#define TARGET_SIGNAL_H
+
+#include "cpu.h"
+
+/* this struct defines a stack used during syscall handling */
+
+typedef struct target_sigaltstack {
+ abi_long ss_sp;
+ abi_ulong ss_size;
+ abi_long ss_flags;
+} target_stack_t;
+
+/* sigaltstack controls */
+#define TARGET_SS_ONSTACK 1
+#define TARGET_SS_DISABLE 2
+
+#define TARGET_MINSIGSTKSZ 2048
+#define TARGET_SIGSTKSZ 8192
+
+static inline abi_ulong get_sp_from_cpustate(CPUNios2State *state)
+{
+ return state->regs[R_SP];
+}
+
+#endif /* TARGET_SIGNAL_H */