Load Kernel Error
Posted: Tue Mar 24, 2009 3:11 pm
hi guys,
I am a newbie in OS Dev, I am following Mike's tutorial and I really like it. I ran into a problem yesterday while trying to print some messages in PMode.
What I basically have is that a 2nd stage bootloader that load GDT, enable A20 and enter PMode. Everything is fine until this point, but once I put code for displaying a message in 32 bit pMode, it become unstable somehow. I mean sometimes it works and then it stops .... working
The goal is to clean up the screen with a blue background and display something like "Welcome to 32 bit, My friend". Sometimes the code does just that, and I am happy.
But after a while, bochs just standing there doing nothing after booting from floppy drive. I think it failed to load stage 2 bootloader. But as I said I am a newbie so not very sure. This is abit of bochs log, hope you could help out.
Thanks in advance
I am a newbie in OS Dev, I am following Mike's tutorial and I really like it. I ran into a problem yesterday while trying to print some messages in PMode.
What I basically have is that a 2nd stage bootloader that load GDT, enable A20 and enter PMode. Everything is fine until this point, but once I put code for displaying a message in 32 bit pMode, it become unstable somehow. I mean sometimes it works and then it stops .... working
The goal is to clean up the screen with a blue background and display something like "Welcome to 32 bit, My friend". Sometimes the code does just that, and I am happy.
But after a while, bochs just standing there doing nothing after booting from floppy drive. I think it failed to load stage 2 bootloader. But as I said I am a newbie so not very sure. This is abit of bochs log, hope you could help out.
Thanks in advance
Code: Select all
00000000000i[ ] Bochs x86 Emulator 2.3.7
00000000000i[ ] Build from CVS snapshot, on June 3, 2008
00000000000i[ ] System configuration
00000000000i[ ] processors: 1 (cores=1, HT threads=1)
00000000000i[ ] A20 line support: yes
00000000000i[ ] APIC support: yes
00000000000i[ ] CPU configuration
00000000000i[ ] level: 6
00000000000i[ ] SMP support: no
00000000000i[ ] FPU support: yes
00000000000i[ ] MMX support: yes
00000000000i[ ] SSE support: 2
00000000000i[ ] CLFLUSH support: yes
00000000000i[ ] VME support: yes
00000000000i[ ] 3dnow! support: no
00000000000i[ ] PAE support: yes
00000000000i[ ] PGE support: yes
00000000000i[ ] PSE support: yes
00000000000i[ ] x86-64 support: yes
00000000000i[ ] SEP support: yes
00000000000i[ ] MWAIT support: no
00000000000i[ ] XSAVE support: no
00000000000i[ ] AES support: no
00000000000i[ ] Optimization configuration
00000000000i[ ] Guest2HostTLB support: yes
00000000000i[ ] RepeatSpeedups support: yes
00000000000i[ ] Icache support: yes
00000000000i[ ] Trace cache support: yes
00000000000i[ ] Fast function calls: yes
00000000000i[ ] Devices configuration
00000000000i[ ] ACPI support: yes
00000000000i[ ] NE2000 support: yes
00000000000i[ ] PCI support: yes
00000000000i[ ] SB16 support: yes
00000000000i[ ] USB support: yes
00000000000i[ ] VGA extension support: vbe cirrus
00000000000i[MEM0 ] allocated memory at 02640020. after alignment, vector=02641000
00000000000i[MEM0 ] 32.00MB
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/38400 ('VGABIOS-lgpl-latest')
00000000000i[APIC?] set APIC ID to 0
00000000000i[APIC0] 80686
00000000000i[APIC0] local apic in CPU apicid=00 initializing
00000000000i[IOAP ] initializing I/O APIC
00000000000i[IOAP ] set APIC ID to 1
00000000000i[MEM0 ] Register memory access handlers: 0xfec00000 - 0xfec00fff
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Tue Mar 24 23:12:05 2009 (time0=1237889525)
00000000000i[DMA ] channel 4 used by cascade
00000000000i[DMA ] channel 2 used by Floppy Drive
00000000000i[FDD ] fd0: 'a:' ro=0, h=2,t=80,spt=18
00000000000i[PCI ] 440FX Host bridge present at device 0, function 0
00000000000i[PCI ] PIIX3 PCI-to-ISA bridge present at device 1, function 0
00000000000i[MEM0 ] Register memory access handlers: 0x000a0000 - 0x000bffff
00000000000i[WGUI ] Desktop Window dimensions: 1680 x 1050
00000000000i[WGUI ] Number of Mouse Buttons = 4
00000000000i[WGUI ] IME disabled
00000000000i[MEM0 ] Register memory access handlers: 0xe0000000 - 0xe07fffff
00000000000i[CLVGA] VBE Bochs Display Extension Enabled
00000000000i[CLVGA] interval=40000
00000000000i[ ] init_mem of 'harddrv' plugin device by virtual method
00000000000i[ ] init_mem of 'keyboard' plugin device by virtual method
00000000000i[ ] init_mem of 'serial' plugin device by virtual method
00000000000i[ ] init_mem of 'parallel' plugin device by virtual method
00000000000i[ ] init_mem of 'extfpuirq' plugin device by virtual method
00000000000i[ ] init_mem of 'gameport' plugin device by virtual method
00000000000i[ ] init_mem of 'speaker' plugin device by virtual method
00000000000i[ ] init_mem of 'pci_ide' plugin device by virtual method
00000000000i[ ] init_mem of 'acpi' plugin device by virtual method
00000000000i[ ] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD ] Using boot sequence floppy, none, none
00000000000i[HD ] Floppy boot signature check is enabled
00000000000i[ ] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD ] will paste characters every 1000 keyboard ticks
00000000000i[ ] init_dev of 'serial' plugin device by virtual method
00000000000i[SER ] com1 at 0x03f8 irq 4
00000000000i[ ] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR ] parallel port 1 at 0x0378 irq 7
00000000000i[ ] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[ ] init_dev of 'gameport' plugin device by virtual method
00000000000i[ ] init_dev of 'speaker' plugin device by virtual method
00000000000i[ ] init_dev of 'pci_ide' plugin device by virtual method
00000000000i[PCI ] PIIX3 PCI IDE controller present at device 1, function 1
00000000000i[ ] init_dev of 'acpi' plugin device by virtual method
00000000000i[PCI ] ACPI Controller present at device 1, function 3
00000000000i[ ] register state of 'harddrv' plugin device by virtual method
00000000000i[ ] register state of 'keyboard' plugin device by virtual method
00000000000i[ ] register state of 'serial' plugin device by virtual method
00000000000i[ ] register state of 'parallel' plugin device by virtual method
00000000000i[ ] register state of 'extfpuirq' plugin device by virtual method
00000000000i[ ] register state of 'gameport' plugin device by virtual method
00000000000i[ ] register state of 'speaker' plugin device by virtual method
00000000000i[ ] register state of 'pci_ide' plugin device by virtual method
00000000000i[ ] register state of 'acpi' plugin device by virtual method
00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00000000000i[CPU0 ] cpu hardware reset
00000000000i[APIC0] local apic in CPU 0 initializing
00000000000i[ ] reset of 'harddrv' plugin device by virtual method
00000000000i[ ] reset of 'keyboard' plugin device by virtual method
00000000000i[ ] reset of 'serial' plugin device by virtual method
00000000000i[ ] reset of 'parallel' plugin device by virtual method
00000000000i[ ] reset of 'extfpuirq' plugin device by virtual method
00000000000i[ ] reset of 'gameport' plugin device by virtual method
00000000000i[ ] reset of 'speaker' plugin device by virtual method
00000000000i[ ] reset of 'pci_ide' plugin device by virtual method
00000000000i[ ] reset of 'acpi' plugin device by virtual method
00000003302i[BIOS ] $Revision: 1.209 $ $Date: 2008/06/02 20:08:10 $
00000080000e[CLVGA] character height = 1, skipping text update
00000317069i[KBD ] reset-disable command received
00000436653i[VBIOS] VGABios $Id: vgabios.c,v 1.67 2008/01/27 09:44:12 vruppert Exp $
00000436724i[CLVGA] VBE known Display Interface b0c0
00000436756i[CLVGA] VBE known Display Interface b0c4
00000439681i[VBIOS] VBE Bios $Id: vbe.c,v 1.60 2008/03/02 07:47:21 vruppert Exp $
00000480000i[WGUI ] dimension update x=720 y=400 fontheight=16 fontwidth=9 bpp=8
00000762682i[BIOS ] Starting rombios32
00000763509i[BIOS ] ram_size=0x02000000
00000784058i[BIOS ] Found 1 cpu(s)
00000800359i[BIOS ] bios_table_addr: 0x000fb778 end=0x000fcc00
00000800426i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001259233i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001718720i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b
00001718767i[P2I ] PCI IRQ routing: PIRQB# set to 0x09
00001718814i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b
00001718861i[P2I ] PCI IRQ routing: PIRQD# set to 0x09
00001718877i[P2I ] write: ELCR2 = 0x0a
00001719814i[BIOS ] PIIX3 init: elcr=00 0a
00001740069i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237
00001743306i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000
00001746039i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010
00001746500i[PIDE ] new BM-DMA address: 0xc000
00001747383i[BIOS ] region 4: 0x0000c000
00001749959i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113
00001750459i[ACPI ] new irq line = 11
00001750496i[ACPI ] new PM base address: 0xb000
00001750558i[ACPI ] new SM base address: 0xb100
00001751026i[CPU0 ] Enter to System Management Mode
00001751036i[CPU0 ] RSM: Resuming from System Management Mode
00001751070i[PCI ] setting SMRAM control register to 0x4a
00001751352i[PCI ] setting SMRAM control register to 0x0a
00001774633i[BIOS ] MP table addr=0x000fb850 MPC table addr=0x000fb780 size=0xd0
00001776836i[BIOS ] SMBIOS table addr=0x000fb860
00001779880i[BIOS ] ACPI tables: RSDP addr=0x000fb970 ACPI DATA addr=0x01ff0000 size=0x9d8
00001799413i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001800425i[BIOS ] bios_table_cur_addr: 0x000fb994
00008023335i[BIOS ] Booting from 0000:7c00
00010313295e[CPU0 ] read_virtual_checks(): read beyond limit
00010313297e[CPU0 ] read_virtual_checks(): read beyond limit
00010313299e[CPU0 ] read_virtual_checks(): read beyond limit
00010313301e[CPU0 ] read_virtual_checks(): read beyond limit
;
[color=#BF0000];********************************************************************
; and It keeps saying "READ BEYOND LIMIT" almost forever. The log if is over 40mb
; of this message.
;********************************************************************[/color]
;
00011673999e[CPU0 ] read_virtual_checks(): read beyond limit
00011674000p[WGUI ] >>PANIC<< Window closed, exiting!
00011674000i[CPU0 ] CPU is in real mode (active)
00011674000i[CPU0 ] CS.d_b = 16 bit
00011674000i[CPU0 ] SS.d_b = 16 bit
00011674000i[CPU0 ] EFER = 0x00000000
00011674000i[CPU0 ] | RAX=0000000000000022 RBX=000000000000daff
00011674000i[CPU0 ] | RCX=0000000000000000 RDX=0000000000000100
00011674000i[CPU0 ] | RSP=000000000000fff7 RBP=0000000000000000
00011674000i[CPU0 ] | RSI=00000000ffff01c0 RDI=0000000000080005
00011674000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00011674000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00011674000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00011674000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00011674000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf zf af PF cf
00011674000i[CPU0 ] | SEG selector base limit G D
00011674000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00011674000i[CPU0 ] | CS:f000( 0004| 0| 0) 000f0000 0000ffff 0 0
00011674000i[CPU0 ] | DS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00011674000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0
00011674000i[CPU0 ] | ES:0050( 0005| 0| 0) 00000500 0000ffff 0 0
00011674000i[CPU0 ] | FS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00011674000i[CPU0 ] | GS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00011674000i[CPU0 ] | MSR_FS_BASE:0000000000007c00
00011674000i[CPU0 ] | MSR_GS_BASE:0000000000007c00
00011674000i[CPU0 ] | RIP=000000000000ff53 (0000000000007ba9)
00011674000i[CPU0 ] | CR0=0x60000010 CR1=0x0 CR2=0x0000000000000000
00011674000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00011674000i[CPU0 ] >> cld : FC
00011674000i[CMOS ] Last time is 1237889530 (Tue Mar 24 23:12:10 2009)
00011674000i[ ] restoring default signal behavior
00011674000i[CTRL ] quit_sim called with exit code 1