[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Problem booting 2.5 kernel with HZ != 1000
From: |
Rusty Russell |
Subject: |
[Qemu-devel] Problem booting 2.5 kernel with HZ != 1000 |
Date: |
Tue, 01 Jul 2003 15:16:22 +1000 |
Hi Fabrice,
Setting HZ to any value other than 1000 causes vl to hang for
me (no response to C-x a). The RT timer is still going off inside vl,
but it doesn't seem to be getting through as a timer interrupt.
BTW, vl compiled with gcc 3.3 gives a Floating Exception, so I
compiled it with 2.95 and it works.
Tried 0.4.1 and CVS.
Here's the output, kernel patch I'm using below.
address@hidden:~/devel/cvs/qemu$ ./vl -initrd
~/devel/qemu/vl-test/initrd-2.4.20.img
~/devel/kernel/working-2.5.73-bk7-qemu-page-offset/arch/i386/boot/bzImage
Connected to host network interface: tun0
/etc/vl-ifup: could not launch network script for 'tun0'
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.5.73-bk7 (address@hidden) (gcc version 3.2.3 (Debian)) #13 Tue
Jul 1 15:03:18 EST 2003
Video mode to be used for restore is 0
BIOS-provided physical RAM map:
BIOS-88: 0000000000000000 - 000000000009f000 (usable)
BIOS-88: 0000000000100000 - 0000000002000000 (usable)
32MB LOWMEM available.
On node 0 totalpages: 8192
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 4096 pages, LIFO batch:1
HighMem zone: 0 pages, LIFO batch:1
Building zonelist for node : 0
Kernel command line:
Initializing CPU#0
PID hash table entries: 256 (order 8: 2048 bytes)
Detected 697.116 MHz processor.
[ hang ]
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Name: QEMU CONFIG Patch
Author: Rusty Russell
Status: Trivial
D: Convenient patch based on Fabrice Bellard's documentation on how to
D: boot an x86 kernel under qemu 0.4. Adjusts PAGE_OFFSET and HZ value.
diff -urpN --exclude TAGS -X
/home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.5.73-bk7/arch/i386/Kconfig
working-2.5.73-bk7-qemu-page-offset/arch/i386/Kconfig
--- linux-2.5.73-bk7/arch/i386/Kconfig 2003-06-30 11:46:42.000000000 +1000
+++ working-2.5.73-bk7-qemu-page-offset/arch/i386/Kconfig 2003-06-30
15:54:49.000000000 +1000
@@ -307,6 +307,14 @@ config X86_GENERIC
when it has moderate overhead. This is intended for generic
distributions kernels.
+config QEMU
+ bool "Kernel to run under QEMU"
+ depends on EXPERIMENTAL
+ help
+ Select this if you want to boot the kernel inside qemu, the
+ x86 emulator. See http://fabrice.bellard.free.fr/qemu/.
+ Say N.
+
#
# Define implied options from the CPU selection here
#
diff -urpN --exclude TAGS -X
/home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.5.73-bk7/arch/i386/vmlinux.lds.S
working-2.5.73-bk7-qemu-page-offset/arch/i386/vmlinux.lds.S
--- linux-2.5.73-bk7/arch/i386/vmlinux.lds.S 2003-06-15 11:29:47.000000000
+1000
+++ working-2.5.73-bk7-qemu-page-offset/arch/i386/vmlinux.lds.S 2003-06-30
15:54:49.000000000 +1000
@@ -3,14 +3,15 @@
*/
#include <asm-generic/vmlinux.lds.h>
-
+#include <asm/page.h>
+
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(startup_32)
jiffies = jiffies_64;
SECTIONS
{
- . = 0xC0000000 + 0x100000;
+ . = __PAGE_OFFSET + 0x100000;
/* read-only */
_text = .; /* Text and read-only data */
.text : {
diff -urpN --exclude TAGS -X
/home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.5.73-bk7/include/asm-i386/page.h
working-2.5.73-bk7-qemu-page-offset/include/asm-i386/page.h
--- linux-2.5.73-bk7/include/asm-i386/page.h 2003-04-08 11:14:55.000000000
+1000
+++ working-2.5.73-bk7-qemu-page-offset/include/asm-i386/page.h 2003-06-30
15:54:49.000000000 +1000
@@ -10,10 +10,10 @@
#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
#include <linux/config.h>
+#ifndef __ASSEMBLY__
+
#ifdef CONFIG_X86_USE_3DNOW
#include <asm/mmx.h>
@@ -115,12 +115,19 @@ static __inline__ int get_order(unsigned
#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
-
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
diff -urpN --exclude TAGS -X
/home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.5.73-bk7/include/asm-i386/param.h
working-2.5.73-bk7-qemu-page-offset/include/asm-i386/param.h
--- linux-2.5.73-bk7/include/asm-i386/param.h 2003-01-02 12:07:44.000000000
+1100
+++ working-2.5.73-bk7-qemu-page-offset/include/asm-i386/param.h
2003-07-01 14:59:57.000000000 +1000
@@ -2,7 +2,11 @@
#define _ASMi386_PARAM_H
#ifdef __KERNEL__
-# define HZ 1000 /* Internal kernel timer frequency */
+# 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Problem booting 2.5 kernel with HZ != 1000,
Rusty Russell <=