IRQ problem
- xenos
- Member
- Posts: 1121
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: IRQ problem
I don't have a crystal ball at hand, but I bet bochs' log knows it. Look at the lines regarding the PIT and PIC chips, or post them here.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: IRQ problem
Or rather, read the FAQ before asking a question. Your exact problem is in there.
Re: IRQ problem
Dear all,
Greetings
Wrozowski
Below is the log from the Bochs 2.6.6 running my os on windows 8.1 pro:XenOS wrote:I don't have a crystal ball at hand, but I bet bochs' log knows it. Look at the lines regarding the PIT and PIC chips, or post them here.
Code: Select all
00000000000i[ ] Bochs x86 Emulator 2.6.6
00000000000i[ ] Built from SVN snapshot on June 15, 2014
00000000000i[ ] Compiled on Jun 15 2014 at 08:54:27
00000000000i[ ] System configuration
00000000000i[ ] processors: 1 (cores=1, HT threads=1)
00000000000i[ ] A20 line support: yes
00000000000i[ ] IPS is set to 4000000
00000000000i[ ] CPU configuration
00000000000i[ ] SMP support: no
00000000000i[ ] level: 6
00000000000i[ ] APIC support: xapic
00000000000i[ ] FPU support: yes
00000000000i[ ] MMX support: yes
00000000000i[ ] 3dnow! support: no
00000000000i[ ] SEP support: yes
00000000000i[ ] SIMD support: sse2
00000000000i[ ] XSAVE support: no
00000000000i[ ] AES support: no
00000000000i[ ] SHA support: no
00000000000i[ ] MOVBE support: no
00000000000i[ ] ADX support: no
00000000000i[ ] x86-64 support: yes
00000000000i[ ] 1G paging support: no
00000000000i[ ] MWAIT support: yes
00000000000i[ ] VMX support: 1
00000000000i[ ] Optimization configuration
00000000000i[ ] RepeatSpeedups support: yes
00000000000i[ ] Fast function calls: yes
00000000000i[ ] Handlers Chaining speedups: yes
00000000000i[ ] Devices configuration
00000000000i[ ] NE2000 support: yes
00000000000i[ ] PCI support: yes, enabled=yes
00000000000i[ ] SB16 support: yes
00000000000i[ ] USB support: yes
00000000000i[ ] VGA extension support: vbe cirrus voodoo
00000000000i[MEM0 ] allocated memory at 0C561020. after alignment, vector=0C562000
00000000000i[MEM0 ] 32,00MB
00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('C:\Program Files (x86)\Bochs-2.6.6/BIOS-bochs-latest')
00000000000i[SNDLOW] Sound lowlevel module 'win' initialized
00000000000i[PLUGIN] init_dev of 'pci' plugin device by virtual method
00000000000i[DEV ] i440FX PMC present at device 0, function 0
00000000000i[PLUGIN] init_dev of 'pci2isa' plugin device by virtual method
00000000000i[DEV ] PIIX3 PCI-to-ISA bridge present at device 1, function 0
00000000000i[PLUGIN] init_dev of 'cmos' plugin device by virtual method
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Fri Aug 29 09:10:51 2014 (time0=1409296251)
00000000000i[PLUGIN] init_dev of 'dma' plugin device by virtual method
00000000000i[DMA ] channel 4 used by cascade
00000000000i[PLUGIN] init_dev of 'pic' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'pit' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'vga' plugin device by virtual method
00000000000i[MEM0 ] Register memory access handlers: 0x0000000a0000 - 0x0000000bffff
00000000000i[VGA ] interval=200000
00000000000i[MEM0 ] Register memory access handlers: 0x0000e0000000 - 0x0000e0ffffff
00000000000i[BXVGA ] VBE Bochs Display Extension Enabled
00000000000i[WINGUI] Desktop Window dimensions: 1366 x 768
00000000000i[WINGUI] Number of Mouse Buttons = 2
00000000000i[WINGUI] IME disabled
00000000000i[MEM0 ] rom at 0xc0000/41472 ('C:\Program Files (x86)\Bochs-2.6.6/VGABIOS-lgpl-latest')
00000000000i[PLUGIN] init_dev of 'floppy' plugin device by virtual method
00000000000i[DMA ] channel 2 used by Floppy Drive
00000000000i[PLUGIN] init_dev of 'acpi' plugin device by virtual method
00000000000i[DEV ] ACPI Controller present at device 1, function 3
00000000000i[PLUGIN] init_dev of 'ioapic' plugin device by virtual method
00000000000i[IOAPIC] initializing I/O APIC
00000000000i[MEM0 ] Register memory access handlers: 0x0000fec00000 - 0x0000fec00fff
00000000000i[IOAPIC] IOAPIC enabled (base address = 0xfec00000)
00000000000i[PLUGIN] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD ] will paste characters every 400 keyboard ticks
00000000000i[PLUGIN] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD ] CD on ata1-1: 'C:\Users\Wojtek\valhalla\bootable.iso'
00000000000i[CD1 ] load cdrom with path='C:\Users\Wojtek\valhalla\bootable.iso'
00000000000i[CD1 ] Opening image file as a cd
00000000000i[HD ] Media present in CD-ROM drive
00000000000i[HD ] Capacity is 244 sectors (0,48 MB)
00000000000i[HD ] Using boot sequence cdrom, none, none
00000000000i[HD ] Floppy boot signature check is enabled
00000000000i[PLUGIN] init_dev of 'pci_ide' plugin device by virtual method
00000000000i[DEV ] PIIX3 PCI IDE controller present at device 1, function 1
00000000000i[PLUGIN] init_dev of 'unmapped' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'biosdev' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'speaker' plugin device by virtual method
00000000000i[PCSPK ] Using lowlevel sound support for output
00000000000i[PLUGIN] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR ] parallel port 1 at 0x0378 irq 7
00000000000i[PLUGIN] init_dev of 'serial' plugin device by virtual method
00000000000i[SER ] com1 at 0x03f8 irq 4 (mode: null)
00000000000i[PLUGIN] init_dev of 'gameport' plugin device by virtual method
00000000000i[PLUGIN] init_dev of 'usb_uhci' plugin device by virtual method
00000000000i[DEV ] Experimental USB UHCI present at device 1, function 2
00000000000i[UHCI ] USB UHCI initialized
00000000000i[PLUGIN] register state of 'pci' plugin device by virtual method
00000000000i[PLUGIN] register state of 'pci2isa' plugin device by virtual method
00000000000i[PLUGIN] register state of 'cmos' plugin device by virtual method
00000000000i[PLUGIN] register state of 'dma' plugin device by virtual method
00000000000i[PLUGIN] register state of 'pic' plugin device by virtual method
00000000000i[PLUGIN] register state of 'pit' plugin device by virtual method
00000000000i[PLUGIN] register state of 'vga' plugin device by virtual method
00000000000i[PLUGIN] register state of 'floppy' plugin device by virtual method
00000000000i[PLUGIN] register state of 'unmapped' plugin device by virtual method
00000000000i[PLUGIN] register state of 'biosdev' plugin device by virtual method
00000000000i[PLUGIN] register state of 'speaker' plugin device by virtual method
00000000000i[PLUGIN] register state of 'extfpuirq' plugin device by virtual method
00000000000i[PLUGIN] register state of 'parallel' plugin device by virtual method
00000000000i[PLUGIN] register state of 'serial' plugin device by virtual method
00000000000i[PLUGIN] register state of 'gameport' plugin device by virtual method
00000000000i[PLUGIN] register state of 'usb_uhci' plugin device by virtual method
00000000000i[PLUGIN] register state of 'acpi' plugin device by virtual method
00000000000i[PLUGIN] register state of 'ioapic' plugin device by virtual method
00000000000i[PLUGIN] register state of 'keyboard' plugin device by virtual method
00000000000i[PLUGIN] register state of 'harddrv' plugin device by virtual method
00000000000i[PLUGIN] register state of 'pci_ide' plugin device by virtual method
00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00000000000i[CPU0 ] cpu hardware reset
00000000000i[APIC0 ] allocate APIC id=0 (MMIO enabled) to 0x0000fee00000
00000000000i[CPU0 ] CPUID[0x00000000]: 00000005 756e6547 6c65746e 49656e69
00000000000i[CPU0 ] CPUID[0x00000001]: 00000633 00010800 00002028 1fcbfbff
00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000005]: 00000040 00000040 00000003 00000020
00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000101 2a100000
00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020
00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75
00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020
00000000000i[CPU0 ] CPUID[0x80000005]: 01ff01ff 01ff01ff 40020140 40020140
00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000
00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000
00000000000i[PLUGIN] reset of 'pci' plugin device by virtual method
00000000000i[PLUGIN] reset of 'pci2isa' plugin device by virtual method
00000000000i[PLUGIN] reset of 'cmos' plugin device by virtual method
00000000000i[PLUGIN] reset of 'dma' plugin device by virtual method
00000000000i[PLUGIN] reset of 'pic' plugin device by virtual method
00000000000i[PLUGIN] reset of 'pit' plugin device by virtual method
00000000000i[PLUGIN] reset of 'vga' plugin device by virtual method
00000000000i[PLUGIN] reset of 'floppy' plugin device by virtual method
00000000000i[PLUGIN] reset of 'acpi' plugin device by virtual method
00000000000i[PLUGIN] reset of 'ioapic' plugin device by virtual method
00000000000i[PLUGIN] reset of 'keyboard' plugin device by virtual method
00000000000i[PLUGIN] reset of 'harddrv' plugin device by virtual method
00000000000i[PLUGIN] reset of 'pci_ide' plugin device by virtual method
00000000000i[PLUGIN] reset of 'unmapped' plugin device by virtual method
00000000000i[PLUGIN] reset of 'biosdev' plugin device by virtual method
00000000000i[PLUGIN] reset of 'speaker' plugin device by virtual method
00000000000i[PLUGIN] reset of 'extfpuirq' plugin device by virtual method
00000000000i[PLUGIN] reset of 'parallel' plugin device by virtual method
00000000000i[PLUGIN] reset of 'serial' plugin device by virtual method
00000000000i[PLUGIN] reset of 'gameport' plugin device by virtual method
00000000000i[PLUGIN] reset of 'usb_uhci' plugin device by virtual method
00000004634i[BIOS ] $Revision: 11761 $ $Date: 2013-08-02 17:59:49 +0200 (Fr, 02. Aug 2013) $
00000318038i[KBD ] reset-disable command received
00000320717i[BIOS ] Starting rombios32
00000321158i[BIOS ] Shutdown flag 0
00000321729i[BIOS ] ram_size=0x02000000
00000322192i[BIOS ] ram_end=32MB
00000800002i[WINGUI] dimension update x=720 y=400 fontheight=16 fontwidth=9 bpp=8
00001235337i[BIOS ] Found 1 cpu(s)
00001249366i[BIOS ] bios_table_addr: 0x000fa468 end=0x000fcc00
00001577001i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush)
00001905328i[P2ISA ] PCI IRQ routing: PIRQA# set to 0x0b
00001905353i[P2ISA ] PCI IRQ routing: PIRQB# set to 0x09
00001905353i[P2ISA ] PCI IRQ routing: PIRQC# set to 0x0b
00001905353i[P2ISA ] PCI IRQ routing: PIRQD# set to 0x09
00001905353i[P2ISA ] write: ELCR2 = 0x0a
00001906007i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a
00001913477i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600
00001916004i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601
00001918005i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101
00001918475i[PIDE ] new BM-DMA address: 0xc000
00001919007i[BIOS ] region 4: 0x0000c000
00001921003i[BIOS ] PCI: bus=0 devfn=0x0a: vendor_id=0x8086 device_id=0x7020 class=0x0c03
00001921297i[UHCI ] new base address: 0xc020
00001921819i[BIOS ] region 4: 0x0000c020
00001922007i[UHCI ] new irq line = 9
00001923536i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680
00001924002i[ACPI ] new irq line = 11
00001924193i[ACPI ] new irq line = 9
00001924214i[ACPI ] new PM base address: 0xb000
00001924214i[ACPI ] new SM base address: 0xb100
00001924246i[PCI ] setting SMRAM control register to 0x4a
00002088364i[CPU0 ] Enter to System Management Mode
00002088364i[CPU0 ] enter_system_management_mode: temporary disable VMX while in SMM mode
00002088368i[CPU0 ] RSM: Resuming from System Management Mode
00002252387i[PCI ] setting SMRAM control register to 0x0a
00002267000i[BIOS ] MP table addr=0x000fa540 MPC table addr=0x000fa470 size=0xc8
00002269002i[BIOS ] SMBIOS table addr=0x000fa550
00002271005i[BIOS ] ACPI tables: RSDP addr=0x000fa670 ACPI DATA addr=0x01ff0000 size=0xf72
00002274275i[BIOS ] Firmware waking vector 0x1ff00cc
00002276253i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush)
00002276807i[BIOS ] bios_table_cur_addr: 0x000fa694
00002404596i[VBIOS ] VGABios $Id: vgabios.c,v 1.76 2013/02/10 08:07:03 vruppert Exp $
00002404681i[BXVGA ] VBE known Display Interface b0c0
00002404700i[BXVGA ] VBE known Display Interface b0c5
00002407624i[VBIOS ] VBE Bios $Id: vbe.c,v 1.64 2011/07/19 18:25:05 vruppert Exp $
00006575271i[BIOS ] IDE time out
00008000002i[WINGUI] &&&missing mouse state change
00010015153i[WINGUI] &&&missing mouse state change
00019033496i[BIOS ] Booting from 07c0:0000
00019137763i[BIOS ] int13_harddisk: function 41, unmapped device for ELDL=80
00019141443i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=80
00019145118i[BIOS ] *** int 15h function AX=00c0, BX=0000 not yet supported!
00035135876i[SER ] com1: FIFO enabled
00036570492i[CPU0 ] WARNING: HLT instruction with IF=0!
00172004000p[WINGUI] >>PANIC<< POWER button turned off.
00172004000i[CPU0 ] CPU is in protected mode (halted)
00172004000i[CPU0 ] CS.mode = 32 bit
00172004000i[CPU0 ] SS.mode = 32 bit
00172004000i[CPU0 ] EFER = 0x00000000
00172004000i[CPU0 ] | EAX=00000007 EBX=0002cd80 ECX=00000000 EDX=00000007
00172004000i[CPU0 ] | ESP=0010e284 EBP=00067ee0 ESI=0002cf08 EDI=0002cf09
00172004000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf zf af pf cf
00172004000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00172004000i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00172004000i[CPU0 ] | EIP=001005ad (001005ad)
00172004000i[CPU0 ] | CR0=0xe0000011 CR2=0x00000000
00172004000i[CPU0 ] | CR3=0x00112000 CR4=0x00000000
00172004000i[CPU0 ] 0x00000000001005ad>> jmp .-2 (0x001005ad) : EBFE
00172004000i[CMOS ] Last time is 1409296294 (Fri Aug 29 09:11:34 2014)
00172004000i[ ] restoring default signal behavior
00172004000i[SIM ] quit_sim called with exit code 1
Wrozowski
Re: IRQ problem
Let me grep this for you.
To avoid this topic further swelling up from meaningless question-answer ping-pong: the sequence in question is in your _start function. Once kernel_main returns, you force the CPU to a halt. Replace CLI/HLT with:
and enjoy your timer interrupts.
Code: Select all
00036570492i[CPU0 ] WARNING: HLT instruction with IF=0!
Code: Select all
1: hlt
jmp 1b
[solved] IRQ problem
Dear all,
I would like to thank everybody for getting involved in this topic.
I changed it to your code and now PIT works fine. I think that this few lines in the Bare Bones tutorial should be changed to avoid people having the same problem as me.
Thanks
Greetings
wrozowski
I would like to thank everybody for getting involved in this topic.
Dear Icee, you're right. I was using code from the Bare Bones tutorial:Icee wrote:To avoid this topic further swelling up from meaningless question-answer ping-pong: the sequence in question is in your _start function. Once kernel_main returns, you force the CPU to a halt. Replace CLI/HLT with:
and enjoy your timer interrupts.Code: Select all
1: hlt jmp 1b
Code: Select all
cli
hlt
.Lhang:
jmp .Lhang
Thanks
Greetings
wrozowski