From 5270589032f450ae7c3448730855aa18ff68ccff Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 10 Mar 2010 14:33:23 -0800 Subject: Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h. Removes a set of ifdefs from exec.c. Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other than Alpha. This will be used for page_find_alloc, which is supposed to be using virtual addresses in the first place. Signed-off-by: Richard Henderson --- target-i386/cpu.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'target-i386/cpu.h') diff --git a/target-i386/cpu.h b/target-i386/cpu.h index ef7d951..198ea7d 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -874,6 +874,17 @@ uint64_t cpu_get_tsc(CPUX86State *env); #define TARGET_PAGE_BITS 12 +#ifdef TARGET_X86_64 +#define TARGET_PHYS_ADDR_SPACE_BITS 52 +/* ??? This is really 48 bits, sign-extended, but the only thing + accessible to userland with bit 48 set is the VSYSCALL, and that + is handled via other mechanisms. */ +#define TARGET_VIRT_ADDR_SPACE_BITS 47 +#else +#define TARGET_PHYS_ADDR_SPACE_BITS 36 +#define TARGET_VIRT_ADDR_SPACE_BITS 32 +#endif + #define cpu_init cpu_x86_init #define cpu_exec cpu_x86_exec #define cpu_gen_code cpu_x86_gen_code -- cgit v1.1