Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/vmm_ioport.c
Show All 36 Lines | |||||
#include <machine/vmm.h> | #include <machine/vmm.h> | ||||
#include <machine/vmm_instruction_emul.h> | #include <machine/vmm_instruction_emul.h> | ||||
#include <x86/psl.h> | #include <x86/psl.h> | ||||
#include "vatpic.h" | #include "vatpic.h" | ||||
#include "vatpit.h" | #include "vatpit.h" | ||||
#include "vpmtmr.h" | #include "vpmtmr.h" | ||||
#include "vrtc.h" | |||||
#include "vmm_ioport.h" | #include "vmm_ioport.h" | ||||
#include "vmm_ktr.h" | #include "vmm_ktr.h" | ||||
#define MAX_IOPORTS 1280 | #define MAX_IOPORTS 1280 | ||||
ioport_handler_func_t ioport_handler[MAX_IOPORTS] = { | ioport_handler_func_t ioport_handler[MAX_IOPORTS] = { | ||||
[TIMER_MODE] = vatpit_handler, | [TIMER_MODE] = vatpit_handler, | ||||
[TIMER_CNTR0] = vatpit_handler, | [TIMER_CNTR0] = vatpit_handler, | ||||
[TIMER_CNTR1] = vatpit_handler, | [TIMER_CNTR1] = vatpit_handler, | ||||
[TIMER_CNTR2] = vatpit_handler, | [TIMER_CNTR2] = vatpit_handler, | ||||
[NMISC_PORT] = vatpit_nmisc_handler, | [NMISC_PORT] = vatpit_nmisc_handler, | ||||
[IO_ICU1] = vatpic_master_handler, | [IO_ICU1] = vatpic_master_handler, | ||||
[IO_ICU1 + ICU_IMR_OFFSET] = vatpic_master_handler, | [IO_ICU1 + ICU_IMR_OFFSET] = vatpic_master_handler, | ||||
[IO_ICU2] = vatpic_slave_handler, | [IO_ICU2] = vatpic_slave_handler, | ||||
[IO_ICU2 + ICU_IMR_OFFSET] = vatpic_slave_handler, | [IO_ICU2 + ICU_IMR_OFFSET] = vatpic_slave_handler, | ||||
[IO_ELCR1] = vatpic_elc_handler, | [IO_ELCR1] = vatpic_elc_handler, | ||||
[IO_ELCR2] = vatpic_elc_handler, | [IO_ELCR2] = vatpic_elc_handler, | ||||
[IO_PMTMR] = vpmtmr_handler, | [IO_PMTMR] = vpmtmr_handler, | ||||
[IO_RTC] = vrtc_addr_handler, | |||||
[IO_RTC + 1] = vrtc_data_handler, | |||||
}; | }; | ||||
#ifdef KTR | #ifdef KTR | ||||
static const char * | static const char * | ||||
inout_instruction(struct vm_exit *vmexit) | inout_instruction(struct vm_exit *vmexit) | ||||
{ | { | ||||
int index; | int index; | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |