diff options
author | grehan <grehan@FreeBSD.org> | 2013-06-28 06:25:04 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2013-06-28 06:25:04 +0000 |
commit | be00d9ee47370d08f51a67ae725a037473072133 (patch) | |
tree | c9ba545b6d8807e087b831e0f7ee98d4756b9ed0 | |
parent | abdbf599d1bf14b162e755b456165a45811eaf4f (diff) | |
download | FreeBSD-src-be00d9ee47370d08f51a67ae725a037473072133.zip FreeBSD-src-be00d9ee47370d08f51a67ae725a037473072133.tar.gz |
Allow 8259 registers to be read. This is a transient condition
during Linux boot.
Submitted by: tycho nightingale at pluribusnetworks com
Reviewed by: neel
-rw-r--r-- | usr.sbin/bhyve/atpic.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/bhyve/atpic.c b/usr.sbin/bhyve/atpic.c index a9fb084..5b4dd79 100644 --- a/usr.sbin/bhyve/atpic.c +++ b/usr.sbin/bhyve/atpic.c @@ -37,13 +37,6 @@ __FBSDID("$FreeBSD$"); #include "inout.h" -/* - * FreeBSD only writes to the 8259 interrupt controllers to put them in a - * shutdown state. - * - * So, we just ignore the writes. - */ - #define IO_ICU1 0x20 #define IO_ICU2 0xA0 #define ICU_IMR_OFFSET 1 @@ -55,8 +48,14 @@ atpic_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, if (bytes != 1) return (-1); - if (in) - return (-1); + if (in) { + if (port & ICU_IMR_OFFSET) { + /* all interrupts masked */ + *eax = 0xff; + } else { + *eax = 0x00; + } + } /* Pretend all writes to the 8259 are alright */ return (0); |