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
This commit is contained in:
Ryan Libby 2017-07-28 21:47:10 +00:00
parent 558e4950b3
commit 07451638fa

View File

@ -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);