From: Ian Jackson Date: Fri, 7 Mar 2008 16:31:16 +0000 (+0000) Subject: WIP make xen compile X-Git-Tag: xen-3.3.0-rc1~233 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d5898586b65cec265c885723cd3bcc670a8d90e8;p=qemu-xen-4.1-testing.git WIP make xen compile --- diff --git a/i386-dm/config.h b/i386-dm/config.h index 1b423bfe4..5073ada73 100644 --- a/i386-dm/config.h +++ b/i386-dm/config.h @@ -3,5 +3,6 @@ #define TARGET_ARCH "i386" #define TARGET_I386 1 #define CONFIG_SOFTMMU 1 +#define CONFIG_SOFTFLOAT 1 #define CONFIG_DM 1 #define CONFIG_SDL 1 diff --git a/i386-dm/cpu.h b/i386-dm/cpu.h index 6071a8529..cfc693f33 100644 --- a/i386-dm/cpu.h +++ b/i386-dm/cpu.h @@ -53,6 +53,8 @@ typedef float64 CPU86_LDouble; #endif #endif +#define NB_MMU_MODES 2 + /* Empty for now */ typedef struct CPUX86State { uint32_t a20_mask; @@ -71,6 +73,10 @@ void cpu_set_ferr(CPUX86State *s); void cpu_x86_set_a20(CPUX86State *env, int a20_state); +/* used to debug */ +#define X86_DUMP_FPU 0x0001 /* dump FPU state too */ +#define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */ + #ifndef IN_OP_I386 void cpu_x86_outb(CPUX86State *env, int addr, int val); void cpu_x86_outw(CPUX86State *env, int addr, int val); @@ -88,6 +94,23 @@ int main_loop(void); #elif defined(__ia64__) #define TARGET_PAGE_BITS 14 #endif + +#define CPUState CPUX86State +#define cpu_init cpu_x86_init +#define cpu_exec cpu_x86_exec +#define cpu_gen_code cpu_x86_gen_code +#define cpu_signal_handler cpu_x86_signal_handler +#define cpu_list x86_cpu_list + +/* MMU modes definitions */ +#define MMU_MODE0_SUFFIX _kernel +#define MMU_MODE1_SUFFIX _user +#define MMU_USER_IDX 1 +static inline int cpu_mmu_index (CPUState *env) +{ + return (env->hflags & HF_CPL_MASK) == 3 ? 1 : 0; +} + #include "cpu-all.h" #endif /* CPU_I386_H */