Re: KVM's PIT and PIC programming question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/20/2009 12:26 AM, Saksena, Abhishek wrote:
Hi Guys,
I am writing very simple bios for KVM (not using Qemu but creating a simple io device models around KVM). I am having trouble in receiving regular Timer interrupts after programming PIT.

I think I have enabled PIC and PIT correctly using following code:-

PIC Programming
;; PIC
   mov  al, #0x00
   out  0x21, AL ;master pic: all IRQs unmasked
   out  0xA1, AL ;slave  pic: all IRQs unmasked


PIT Programming

and also enable PIT to genrate regular timer interruput

SET_INT_VECTOR(0x08, #0xF000, #int08_handler)
   mov al, #0x34 ; timer0: binary count, 16bit count, mode 2
   out 0x43, al
   mov al, #0x00 ; maximum count of 0000H = 18.2Hz
   out 0x40, al
   out 0x40, al


PIT Timer ISR code

Timer ISR code

;---------
;- INT08 -
;---------
.org 0xfea5 ; INT 08h System Timer ISR Entry Point
int08_handler:
   sti
   push ax
   push ds
   mov ax, #0x0040
   mov ds, ax
   mov ax, 0x006c ; increment lower word
   inc ax
   mov 0x006c, ax
   jnz inc_done
   mov ax, 0x006e ; increment upper word
   inc ax
   mov 0x006e, ax



For some reason I never see int08_handler ever been called. Any clues what may be wrong? I am creating only one VCPU



Things to check:

- have you initialized the kernel PIC and PIT?
- are interrupts enabled?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux