Lines Matching refs:port
430 x86bios_emu_inb(struct x86emu *emu, uint16_t port)
434 if (port == 0xb2) /* APM scratch register */
436 if (port >= 0x80 && port < 0x88) /* POST status register */
440 return (iodev_read_1(port));
444 x86bios_emu_inw(struct x86emu *emu, uint16_t port)
449 if (port >= 0x80 && port < 0x88) /* POST status register */
452 if ((port & 1) != 0) {
453 val = iodev_read_1(port);
454 val |= iodev_read_1(port + 1) << 8;
457 val = iodev_read_2(port);
463 x86bios_emu_inl(struct x86emu *emu, uint16_t port)
468 if (port >= 0x80 && port < 0x88) /* POST status register */
471 if ((port & 1) != 0) {
472 val = iodev_read_1(port);
473 val |= iodev_read_2(port + 1) << 8;
474 val |= iodev_read_1(port + 3) << 24;
475 } else if ((port & 2) != 0) {
476 val = iodev_read_2(port);
477 val |= iodev_read_2(port + 2) << 16;
480 val = iodev_read_4(port);
486 x86bios_emu_outb(struct x86emu *emu, uint16_t port, uint8_t val)
490 if (port == 0xb2) /* APM scratch register */
492 if (port >= 0x80 && port < 0x88) /* POST status register */
496 iodev_write_1(port, val);
500 x86bios_emu_outw(struct x86emu *emu, uint16_t port, uint16_t val)
504 if (port >= 0x80 && port < 0x88) /* POST status register */
507 if ((port & 1) != 0) {
508 iodev_write_1(port, val);
509 iodev_write_1(port + 1, val >> 8);
512 iodev_write_2(port, val);
516 x86bios_emu_outl(struct x86emu *emu, uint16_t port, uint32_t val)
520 if (port >= 0x80 && port < 0x88) /* POST status register */
523 if ((port & 1) != 0) {
524 iodev_write_1(port, val);
525 iodev_write_2(port + 1, val >> 8);
526 iodev_write_1(port + 3, val >> 24);
527 } else if ((port & 2) != 0) {
528 iodev_write_2(port, val);
529 iodev_write_2(port + 2, val >> 16);
532 iodev_write_4(port, val);