Statistics
| Branch: | Revision:

root / linux-2.6.9-qemu-fast.patch @ 71be0fc3

History | View | Annotate | Download (2.1 kB)

1 a483b654 bellard
--- linux-2.6.9/arch/i386/Kconfig        2004-10-18 23:53:22.000000000 +0200
2 a483b654 bellard
+++ linux-2.6.9-qemu/arch/i386/Kconfig        2004-12-07 21:56:49.000000000 +0100
3 a483b654 bellard
@@ -337,6 +337,14 @@ config X86_GENERIC
4 a483b654 bellard
 
5 a483b654 bellard
 endif
6 a483b654 bellard
 
7 a483b654 bellard
+config QEMU
8 a483b654 bellard
+        bool "Kernel to run under QEMU"
9 a483b654 bellard
+        depends on EXPERIMENTAL
10 a483b654 bellard
+        help
11 a483b654 bellard
+          Select this if you want to boot the kernel inside qemu-fast,
12 a483b654 bellard
+          the non-mmu version of the x86 emulator.  See
13 a483b654 bellard
+          <http://fabrice.bellard.free.fr/qemu/>.  Say N.
14 a483b654 bellard
+
15 a483b654 bellard
 #
16 a483b654 bellard
 # Define implied options from the CPU selection here
17 a483b654 bellard
 #
18 a483b654 bellard
--- linux-2.6.9/include/asm-i386/fixmap.h        2004-10-18 23:53:08.000000000 +0200
19 a483b654 bellard
+++ linux-2.6.9-qemu/include/asm-i386/fixmap.h        2004-12-07 23:16:11.000000000 +0100
20 a483b654 bellard
@@ -20,7 +20,11 @@
21 a483b654 bellard
  * Leave one empty page between vmalloc'ed areas and
22 a483b654 bellard
  * the start of the fixmap.
23 a483b654 bellard
  */
24 a483b654 bellard
+#ifdef CONFIG_QEMU
25 a483b654 bellard
+#define __FIXADDR_TOP   0xa7fff000
26 a483b654 bellard
+#else
27 a483b654 bellard
 #define __FIXADDR_TOP        0xfffff000
28 a483b654 bellard
+#endif
29 a483b654 bellard
 
30 a483b654 bellard
 #ifndef __ASSEMBLY__
31 a483b654 bellard
 #include <linux/kernel.h>
32 a483b654 bellard
--- linux-2.6.9/include/asm-i386/page.h        2004-10-18 23:53:22.000000000 +0200
33 a483b654 bellard
+++ linux-2.6.9-qemu/include/asm-i386/page.h        2004-12-07 21:56:49.000000000 +0100
34 a483b654 bellard
@@ -121,12 +121,19 @@ extern int sysctl_legacy_va_layout;
35 a483b654 bellard
 #endif /* __ASSEMBLY__ */
36 a483b654 bellard
 
37 a483b654 bellard
 #ifdef __ASSEMBLY__
38 a483b654 bellard
+#ifdef CONFIG_QEMU
39 a483b654 bellard
+#define __PAGE_OFFSET                (0x90000000)
40 a483b654 bellard
+#else
41 a483b654 bellard
 #define __PAGE_OFFSET                (0xC0000000)
42 a483b654 bellard
+#endif /* QEMU */
43 a483b654 bellard
+#else
44 a483b654 bellard
+#ifdef CONFIG_QEMU
45 a483b654 bellard
+#define __PAGE_OFFSET                (0x90000000UL)
46 a483b654 bellard
 #else
47 a483b654 bellard
 #define __PAGE_OFFSET                (0xC0000000UL)
48 a483b654 bellard
+#endif /* QEMU */
49 a483b654 bellard
 #endif
50 a483b654 bellard
 
51 a483b654 bellard
-
52 a483b654 bellard
 #define PAGE_OFFSET                ((unsigned long)__PAGE_OFFSET)
53 a483b654 bellard
 #define VMALLOC_RESERVE                ((unsigned long)__VMALLOC_RESERVE)
54 a483b654 bellard
 #define MAXMEM                        (-__PAGE_OFFSET-__VMALLOC_RESERVE)
55 a483b654 bellard
--- linux-2.6.9/include/asm-i386/param.h        2004-10-18 23:53:24.000000000 +0200
56 a483b654 bellard
+++ linux-2.6.9-qemu/include/asm-i386/param.h        2004-12-07 21:56:49.000000000 +0100
57 a483b654 bellard
@@ -2,7 +2,12 @@
58 a483b654 bellard
 #define _ASMi386_PARAM_H
59 a483b654 bellard
 
60 a483b654 bellard
 #ifdef __KERNEL__
61 a483b654 bellard
-# define HZ                1000                /* Internal kernel timer frequency */
62 a483b654 bellard
+# include <linux/config.h>
63 a483b654 bellard
+# ifdef CONFIG_QEMU
64 a483b654 bellard
+#  define HZ                100
65 a483b654 bellard
+# else
66 a483b654 bellard
+#  define HZ                1000                /* Internal kernel timer frequency */
67 a483b654 bellard
+# endif
68 a483b654 bellard
 # define USER_HZ        100                /* .. some user interfaces are in "ticks" */
69 a483b654 bellard
 # define CLOCKS_PER_SEC                (USER_HZ)        /* like times() */
70 a483b654 bellard
 #endif