Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_e82545.c
Show First 20 Lines • Show All 636 Lines • ▼ Show 20 Lines | e82545_icr_deassert(struct e82545_softc *sc, uint32_t bits) | ||||
DPRINTF("icr deassert: 0x%x", bits); | DPRINTF("icr deassert: 0x%x", bits); | ||||
sc->esc_ICR &= ~bits; | sc->esc_ICR &= ~bits; | ||||
/* | /* | ||||
* If there are no longer any interrupt sources and there | * If there are no longer any interrupt sources and there | ||||
* was an asserted interrupt, clear it | * was an asserted interrupt, clear it | ||||
*/ | */ | ||||
if (sc->esc_irq_asserted && !(sc->esc_ICR & sc->esc_IMS)) { | if (sc->esc_irq_asserted && !(sc->esc_ICR & sc->esc_IMS)) { | ||||
DPRINTF("icr deassert: lintr deassert %x", bits); | DPRINTF("icr deassert: lintr deassert %x\r\n", bits); | ||||
pci_lintr_deassert(sc->esc_pi); | pci_lintr_deassert(sc->esc_pi); | ||||
sc->esc_irq_asserted = 0; | sc->esc_irq_asserted = 0; | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
e82545_intr_write(struct e82545_softc *sc, uint32_t offset, uint32_t value) | e82545_intr_write(struct e82545_softc *sc, uint32_t offset, uint32_t value) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,480 Lines • ▼ Show 20 Lines | |||||
static uint64_t | static uint64_t | ||||
e82545_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, | e82545_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, | ||||
uint64_t offset, int size) | uint64_t offset, int size) | ||||
{ | { | ||||
struct e82545_softc *sc; | struct e82545_softc *sc; | ||||
uint64_t retval; | uint64_t retval; | ||||
//DPRINTF("Read bar:%d offset:0x%lx size:%d", baridx, offset, size); | //DPRINTF("Read bar:%d offset:0x%lx size:%d\r\n", baridx, offset, size); | ||||
sc = pi->pi_arg; | sc = pi->pi_arg; | ||||
retval = 0; | retval = 0; | ||||
pthread_mutex_lock(&sc->esc_mtx); | pthread_mutex_lock(&sc->esc_mtx); | ||||
switch (baridx) { | switch (baridx) { | ||||
case E82545_BAR_IO: | case E82545_BAR_IO: | ||||
switch (offset) { | switch (offset) { | ||||
▲ Show 20 Lines • Show All 400 Lines • Show Last 20 Lines |