Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 05:04:50 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266572 - head/sys/amd64/vmm/io
Message-ID:  <201405230504.s4N54omh014930@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Fri May 23 05:04:50 2014
New Revision: 266572
URL: http://svnweb.freebsd.org/changeset/base/266572

Log:
  A Centos 6.4 guest will write 0xff to the 8259 mask register before beginning
  the proper ICWx initialization sequence. It assumes, probably correctly, that
  the boot firmware has done the 8259 initialization.
  
  Since grub-bhyve does not initialize the 8259 this write to the mask register
  takes a code path in which 'error' remains uninitialized (ready=0,icw_num=0).
  
  Fix this by initializing 'error' at the start of the function.

Modified:
  head/sys/amd64/vmm/io/vatpic.c

Modified: head/sys/amd64/vmm/io/vatpic.c
==============================================================================
--- head/sys/amd64/vmm/io/vatpic.c	Fri May 23 01:45:44 2014	(r266571)
+++ head/sys/amd64/vmm/io/vatpic.c	Fri May 23 05:04:50 2014	(r266572)
@@ -591,6 +591,7 @@ vatpic_write(struct vatpic *vatpic, stru
 	int error;
 	uint8_t val;
 
+	error = 0;
 	val = *eax;
 
 	VATPIC_LOCK(vatpic);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405230504.s4N54omh014930>