From: mlarkin Date: Sat, 8 Apr 2017 19:06:29 +0000 (+0000) Subject: implement nonspecific EOI mode for the legacy PIC X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b8eb757d9121fa344db37333ba6abd3405ae913b;p=openbsd implement nonspecific EOI mode for the legacy PIC ok deraadt --- diff --git a/usr.sbin/vmd/i8259.c b/usr.sbin/vmd/i8259.c index a38f0660e10..f666864a089 100644 --- a/usr.sbin/vmd/i8259.c +++ b/usr.sbin/vmd/i8259.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i8259.c,v 1.12 2017/03/25 22:36:53 mlarkin Exp $ */ +/* $OpenBSD: i8259.c,v 1.13 2017/04/08 19:06:29 mlarkin Exp $ */ /* * Copyright (c) 2016 Mike Larkin * @@ -346,8 +346,15 @@ i8259_specific_eoi(uint8_t n, uint8_t data) static void i8259_nonspecific_eoi(uint8_t n, uint8_t data) { - log_warnx("%s: %s pic nonspecific eoi not supported", __func__, - i8259_pic_name(n)); + int i = 0; + + while (i < 8) { + if ((pics[n].isr & (1 << (i & 0x7)))) { + i8259_specific_eoi(n, i); + return; + } + i++; + } } /*