From 07451638fadaa5c9237e958b5da90169e992fbb2 Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Fri, 28 Jul 2017 21:47:10 +0000 Subject: [PATCH] bhyve/vga.c: fix atc_color_select_67 bit shift Gcc noticed that the result of the bit shift is always zero. Shift so that the ATC_CS_C67 bits end up in bits 6 & 7. Reviewed by: grehan, tychon Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11775 --- usr.sbin/bhyve/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/vga.c index 57dc26eae412..1d5adb784f08 100644 --- a/usr.sbin/bhyve/vga.c +++ b/usr.sbin/bhyve/vga.c @@ -1069,7 +1069,7 @@ vga_port_out_handler(struct vmctx *ctx, int in, int port, int bytes, sc->vga_atc.atc_color_select_45 = (val & ATC_CS_C45) << 4; sc->vga_atc.atc_color_select_67 = - (val & ATC_CS_C67) << 6; + ((val & ATC_CS_C67) >> 2) << 6; break; default: //printf("XXX VGA ATC: outb 0x%04x, 0x%02x at index %d\n", port, val, sc->vga_atc.atc_index);