#include "qemu.h"
-#include "cpu-i386.h"
-
#define DEBUG_LOGFILE "/tmp/qemu.log"
FILE *logfile = NULL;
return 0;
}
+int cpu_x86_get_pic_interrupt(CPUX86State *env)
+{
+ return -1;
+}
+
static void write_dt(void *ptr, unsigned long addr, unsigned long limit,
int flags)
{
#ifdef TARGET_ARM
-#define ARM_SYSCALL_BASE 0x900000
-
void cpu_loop(CPUARMState *env)
{
int trapnr;
}
}
break;
+ case EXCP_INTERRUPT:
+ /* just indicate that signals should be handled asap */
+ break;
default:
error:
fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
/* XXX: currently only used for async signals (see signal.c) */
CPUState *global_env;
+/* used only if single thread */
+CPUState *cpu_single_env = NULL;
+
/* used to free thread contexts */
TaskState *first_task_state;
/* NOTE: we need to init the CPU at this stage to get the
host_page_size */
env = cpu_init();
-
+
if (elf_exec(filename, argv+optind, environ, regs, info) != 0) {
printf("Error loading %s\n", filename);
_exit(1);
memset(ts, 0, sizeof(TaskState));
env->opaque = ts;
ts->used = 1;
+ env->user_mode_only = 1;
#if defined(TARGET_I386)
+ env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;
+
/* linux register setup */
env->regs[R_EAX] = regs->eax;
env->regs[R_EBX] = regs->ebx;
cpu_x86_load_seg(env, R_SS, __USER_DS);
cpu_x86_load_seg(env, R_FS, __USER_DS);
cpu_x86_load_seg(env, R_GS, __USER_DS);
+
#elif defined(TARGET_ARM)
{
int i;