diff -NurpP --minimal linux-2.6.9-rc1-bk11/arch/i386/Kconfig linux-2.6.9-rc1-bk11-qemu/arch/i386/Kconfig --- linux-2.6.9-rc1-bk11/arch/i386/Kconfig 2004-09-04 17:44:04.000000000 +0200 +++ linux-2.6.9-rc1-bk11-qemu/arch/i386/Kconfig 2004-09-04 22:16:02.000000000 +0200 @@ -333,6 +333,15 @@ config X86_GENERIC endif +config QEMU + bool "Kernel to run under QEMU" + depends on EXPERIMENTAL + help + Select this if you want to boot the kernel inside qemu-fast, + the non-mmu version of the x86 emulator. + See http://fabrice.bellard.free.fr/qemu/. + If not sure, say N. + # # Define implied options from the CPU selection here # diff -NurpP --minimal linux-2.6.9-rc1-bk11/arch/i386/kernel/Makefile linux-2.6.9-rc1-bk11-qemu/arch/i386/kernel/Makefile --- linux-2.6.9-rc1-bk11/arch/i386/kernel/Makefile 2004-09-04 17:44:57.000000000 +0200 +++ linux-2.6.9-rc1-bk11-qemu/arch/i386/kernel/Makefile 2004-09-04 22:17:52.000000000 +0200 @@ -51,12 +51,14 @@ quiet_cmd_syscall = SYSCALL $@ export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH) +export AFLAGS_vsyscall.lds.o += -P -C -U$(ARCH) + vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags) SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags) $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \ -$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE +$(obj)/vsyscall-%.so: $(src)/vsyscall.lds.s $(obj)/vsyscall-%.o FORCE $(call if_changed,syscall) # We also create a special relocatable object that should mirror the symbol @@ -67,5 +69,5 @@ $(obj)/built-in.o: $(obj)/vsyscall-syms. $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o SYSCFLAGS_vsyscall-syms.o = -r -$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE +$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds.s $(obj)/vsyscall-sysenter.o FORCE $(call if_changed,syscall) diff -NurpP --minimal linux-2.6.9-rc1-bk11/include/asm-i386/fixmap.h linux-2.6.9-rc1-bk11-qemu/include/asm-i386/fixmap.h --- linux-2.6.9-rc1-bk11/include/asm-i386/fixmap.h 2004-09-04 17:45:12.000000000 +0200 +++ linux-2.6.9-rc1-bk11-qemu/include/asm-i386/fixmap.h 2004-09-04 22:20:43.000000000 +0200 @@ -20,7 +20,11 @@ * Leave one empty page between vmalloc'ed areas and * the start of the fixmap. */ +#ifdef CONFIG_QEMU +#define __FIXADDR_TOP 0xa7fff000 +#else #define __FIXADDR_TOP 0xfffff000 +#endif #ifndef __ASSEMBLY__ #include diff -NurpP --minimal linux-2.6.9-rc1-bk11/include/asm-i386/page.h linux-2.6.9-rc1-bk11-qemu/include/asm-i386/page.h --- linux-2.6.9-rc1-bk11/include/asm-i386/page.h 2004-09-04 17:45:12.000000000 +0200 +++ linux-2.6.9-rc1-bk11-qemu/include/asm-i386/page.h 2004-09-04 22:24:27.000000000 +0200 @@ -121,9 +121,17 @@ extern int sysctl_legacy_va_layout; #endif /* __ASSEMBLY__ */ #ifdef __ASSEMBLY__ +#ifdef CONFIG_QEMU +#define __PAGE_OFFSET (0x90000000) +#else #define __PAGE_OFFSET (0xC0000000) +#endif /* QEMU */ +#else +#ifdef CONFIG_QEMU +#define __PAGE_OFFSET (0x90000000UL) #else #define __PAGE_OFFSET (0xC0000000UL) +#endif /* QEMU */ #endif diff -NurpP --minimal linux-2.6.9-rc1-bk11/include/asm-i386/param.h linux-2.6.9-rc1-bk11-qemu/include/asm-i386/param.h --- linux-2.6.9-rc1-bk11/include/asm-i386/param.h 2004-08-14 12:54:51.000000000 +0200 +++ linux-2.6.9-rc1-bk11-qemu/include/asm-i386/param.h 2004-09-04 22:25:00.000000000 +0200 @@ -2,7 +2,12 @@ #define _ASMi386_PARAM_H #ifdef __KERNEL__ -# define HZ 1000 /* Internal kernel timer frequency */ +# include +# ifdef CONFIG_QEMU +# define HZ 100 +# else +# define HZ 1000 /* Internal kernel timer frequency */ +# endif # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ #endif