Page 1 of 1
how does bochs emulate all those interrupts?
Posted: Thu Aug 13, 2020 8:50 pm
by ITchimp
My understanding of basic architecture of bochs is to set aside a large block of memory
and interpret the instruction one after another .... what I want to know is how to emulate interrupts, like clock signal, keyboard etc?
Re: how does bochs emulate all those interrupts?
Posted: Thu Aug 13, 2020 9:11 pm
by Octocontrabass
Every so often, take a break from interpreting instructions to see if an interrupt should happen.
Re: how does bochs emulate all those interrupts?
Posted: Fri Aug 14, 2020 7:16 am
by bzt
ITchimp wrote:My understanding of basic architecture of bochs is to set aside a large block of memory
and interpret the instruction one after another .... what I want to know is how to emulate interrupts, like clock signal, keyboard etc?
Like Octocontrabass said, but it is checked after each and every instruction. The main cpu loop is
here, and the "interrupt pending" internal flags are checked in
event.cc (where each interrupt source is hardwired in the code, like "is_pending(BX_EVENT_PENDING_LAPIC_INTR)" or "is_unmasked_event_pending(BX_EVENT_SMI)").
Use the source, Luke
Cheers,
bzt