vatpic.h (263211) | vatpic.h (264648) |
---|---|
1/*- 2 * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/amd64/vmm/io/vatpic.h 263211 2014-03-15 23:09:34Z tychon $ | 26 * $FreeBSD: head/sys/amd64/vmm/io/vatpic.h 264648 2014-04-18 15:22:56Z tychon $ |
27 */ 28 29#ifndef _VATPIC_H_ 30#define _VATPIC_H_ 31 32#include <isa/isareg.h> 33 34#define ICU_IMR_OFFSET 1 35 36#define IO_ELCR1 0x4d0 37#define IO_ELCR2 0x4d1 38 39struct vatpic *vatpic_init(struct vm *vm); 40void vatpic_cleanup(struct vatpic *vatpic); 41 | 27 */ 28 29#ifndef _VATPIC_H_ 30#define _VATPIC_H_ 31 32#include <isa/isareg.h> 33 34#define ICU_IMR_OFFSET 1 35 36#define IO_ELCR1 0x4d0 37#define IO_ELCR2 0x4d1 38 39struct vatpic *vatpic_init(struct vm *vm); 40void vatpic_cleanup(struct vatpic *vatpic); 41 |
42int vatpic_master_handler(void *vm, int vcpuid, struct vm_exit *vmexit); 43int vatpic_slave_handler(void *vm, int vcpuid, struct vm_exit *vmexit); 44int vatpic_elc_handler(void *vm, int vcpuid, struct vm_exit *vmexit); | 42int vatpic_master_handler(void *vm, int vcpuid, bool in, int port, int bytes, 43 uint32_t *eax); 44int vatpic_slave_handler(void *vm, int vcpuid, bool in, int port, int bytes, 45 uint32_t *eax); 46int vatpic_elc_handler(void *vm, int vcpuid, bool in, int port, int bytes, 47 uint32_t *eax); |
45 46int vatpic_assert_irq(struct vm *vm, int irq); 47int vatpic_deassert_irq(struct vm *vm, int irq); 48int vatpic_pulse_irq(struct vm *vm, int irq); 49 50void vatpic_pending_intr(struct vm *vm, int *vecptr); 51void vatpic_intr_accepted(struct vm *vm, int vector); 52 53#endif /* _VATPIC_H_ */ | 48 49int vatpic_assert_irq(struct vm *vm, int irq); 50int vatpic_deassert_irq(struct vm *vm, int irq); 51int vatpic_pulse_irq(struct vm *vm, int irq); 52 53void vatpic_pending_intr(struct vm *vm, int *vecptr); 54void vatpic_intr_accepted(struct vm *vm, int vector); 55 56#endif /* _VATPIC_H_ */ |