Author: grehan Date: Fri Jun 28 06:25:04 2013 New Revision: 252336 URL: http://svnweb.freebsd.org/changeset/base/252336
Log: Allow 8259 registers to be read. This is a transient condition during Linux boot. Submitted by: tycho nightingale at pluribusnetworks com Reviewed by: neel Modified: head/usr.sbin/bhyve/atpic.c Modified: head/usr.sbin/bhyve/atpic.c ============================================================================== --- head/usr.sbin/bhyve/atpic.c Fri Jun 28 06:05:33 2013 (r252335) +++ head/usr.sbin/bhyve/atpic.c Fri Jun 28 06:25:04 2013 (r252336) @@ -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 vcp 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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"