aboutsummaryrefslogtreecommitdiff
path: root/linux-user/qemu.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-15 20:05:50 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-15 20:05:50 +0000
commitb346ff468efed71e42e9f306c6bf975809cd2c0f (patch)
tree335f7701c2883582cf9c0d18302bb681531538aa /linux-user/qemu.h
parent5a9fdfec7eff4f053705cf160be87ebf01a57833 (diff)
downloadqemu-b346ff468efed71e42e9f306c6bf975809cd2c0f.zip
qemu-b346ff468efed71e42e9f306c6bf975809cd2c0f.tar.gz
qemu-b346ff468efed71e42e9f306c6bf975809cd2c0f.tar.bz2
ARM emulation support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@244 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r--linux-user/qemu.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index d6e615e..d0a96e6 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -6,10 +6,8 @@
#include <signal.h>
#include "syscall_defs.h"
-#ifdef TARGET_I386
-#include "cpu-i386.h"
-#include "syscall-i386.h"
-#endif
+#include "cpu-" TARGET_ARCH ".h"
+#include "syscall-" TARGET_ARCH ".h"
/* This struct is used to hold certain information about the image.
* Basically, it replicates in user space what would be certain
@@ -33,6 +31,7 @@ struct image_info {
int personality;
};
+#ifdef TARGET_I386
/* Information about the current linux thread */
struct vm86_saved_state {
uint32_t eax; /* return code */
@@ -47,16 +46,19 @@ struct vm86_saved_state {
uint32_t eip;
uint16_t cs, ss, ds, es, fs, gs;
};
+#endif
/* NOTE: we force a big alignment so that the stack stored after is
aligned too */
typedef struct TaskState {
struct TaskState *next;
+#ifdef TARGET_I386
struct target_vm86plus_struct *target_v86;
struct vm86_saved_state vm86_saved_regs;
struct target_vm86plus_struct vm86plus;
uint32_t v86flags;
uint32_t v86mask;
+#endif
int used; /* non zero if used */
uint8_t stack[0];
} __attribute__((aligned(16))) TaskState;
@@ -71,23 +73,31 @@ void syscall_init(void);
long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6);
void gemu_log(const char *fmt, ...) __attribute__((format(printf,1,2)));
-extern CPUX86State *global_env;
-void cpu_loop(CPUX86State *env);
-void process_pending_signals(void *cpu_env);
-void signal_init(void);
-int queue_signal(int sig, target_siginfo_t *info);
+extern CPUState *global_env;
+void cpu_loop(CPUState *env);
void init_paths(const char *prefix);
const char *path(const char *pathname);
extern int loglevel;
extern FILE *logfile;
+/* signal.c */
+void process_pending_signals(void *cpu_env);
+void signal_init(void);
+int queue_signal(int sig, target_siginfo_t *info);
+void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
+void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo);
+long do_sigreturn(CPUState *env);
+long do_rt_sigreturn(CPUState *env);
+
+#ifdef TARGET_I386
/* vm86.c */
void save_v86_state(CPUX86State *env);
void handle_vm86_trap(CPUX86State *env, int trapno);
void handle_vm86_fault(CPUX86State *env);
int do_vm86(CPUX86State *env, long subfunction,
struct target_vm86plus_struct * target_v86);
+#endif
/* mmap.c */
int target_mprotect(unsigned long start, unsigned long len, int prot);