Date: Fri, 28 Jun 2013 06:25:04 +0000 (UTC) From: Peter Grehan <grehan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252336 - head/usr.sbin/bhyve Message-ID: <201306280625.r5S6P4aM044248@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306280625.r5S6P4aM044248>