aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorNeel Natu <neel@FreeBSD.org>2014-05-23 05:04:50 +0000
committerNeel Natu <neel@FreeBSD.org>2014-05-23 05:04:50 +0000
commitc5e423dd2e97e7672b5f8b84ab15ccfa3ca1e70d (patch)
tree2da4d6ec0364e3d23d57eaca949fbf0974b395a3 /sys/amd64
parent7a5b897dfea3766e46958feaafd4036a7a13c92e (diff)
downloadsrc-c5e423dd2e97e7672b5f8b84ab15ccfa3ca1e70d.tar.gz
src-c5e423dd2e97e7672b5f8b84ab15ccfa3ca1e70d.zip
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.
Notes
Notes: svn path=/head/; revision=266572
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/vmm/io/vatpic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/vmm/io/vatpic.c b/sys/amd64/vmm/io/vatpic.c
index 298560c98e29..ee6fc84f90c3 100644
--- a/sys/amd64/vmm/io/vatpic.c
+++ b/sys/amd64/vmm/io/vatpic.c
@@ -591,6 +591,7 @@ vatpic_write(struct vatpic *vatpic, struct atpic *atpic, bool in, int port,
int error;
uint8_t val;
+ error = 0;
val = *eax;
VATPIC_LOCK(vatpic);