diff options
author | Toomas Soome <tsoome@me.com> | 2019-09-06 23:08:37 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-09-18 18:49:22 +0300 |
commit | 1b61d0d21a627a098f0a136da21c1f40ded57f91 (patch) | |
tree | cde73aee4e6e6de43e44fd433eb8d6165f2d8aa4 | |
parent | c97b1070adbc3ae2291128243229991dd705d2d6 (diff) | |
download | illumos-joyent-1b61d0d21a627a098f0a136da21c1f40ded57f91.tar.gz |
11663 loader.efi: text mode background color is limited to 3 bits
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/efi_console.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index bda3f08ec7..aa8ad08c91 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2019.09.10.1 +BOOT_VERSION = $(LOADER_VERSION)-2019.09.12.1 diff --git a/usr/src/boot/sys/boot/efi/libefi/efi_console.c b/usr/src/boot/sys/boot/efi/libefi/efi_console.c index cc64bd5b0c..147be6ea88 100644 --- a/usr/src/boot/sys/boot/efi/libefi/efi_console.c +++ b/usr/src/boot/sys/boot/efi/libefi/efi_console.c @@ -295,9 +295,11 @@ efi_text_cons_clear(struct vis_consclear *ca) { EFI_STATUS st; UINTN attr = conout->Mode->Attribute & 0x0F; + uint8_t bg; - attr = EFI_TEXT_ATTR(attr, - solaris_color_to_efi_color[ca->bg_color & 0xF]); + bg = solaris_color_to_efi_color[ca->bg_color & 0xF] & 0x7; + + attr = EFI_TEXT_ATTR(attr, bg); st = conout->SetAttribute(conout, attr); if (EFI_ERROR(st)) return (1); @@ -326,6 +328,7 @@ efi_text_cons_display(struct vis_consdisplay *da) UINTN attr; UINTN row, col; tem_char_t *data; + uint8_t fg, bg; int i; (void) conout->QueryMode(conout, conout->Mode->Mode, &col, &row); @@ -335,8 +338,10 @@ efi_text_cons_display(struct vis_consdisplay *da) da->width--; data = (tem_char_t *)da->data; - attr = EFI_TEXT_ATTR(solaris_color_to_efi_color[da->fg_color & 0xf], - solaris_color_to_efi_color[da->bg_color & 0xf]); + fg = solaris_color_to_efi_color[da->fg_color & 0xf]; + bg = solaris_color_to_efi_color[da->bg_color & 0xf] & 0x7; + attr = EFI_TEXT_ATTR(fg, bg); + st = conout->SetAttribute(conout, attr); if (EFI_ERROR(st)) return; |