diff options
author | Toomas Soome <tsoome@me.com> | 2019-02-02 21:21:38 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-02-15 19:14:29 +0200 |
commit | a4e6b9b671bd0b8581ffd85bbc50cdd0bfe18b13 (patch) | |
tree | d49533f0f327e9d24518fd87950bcfb7c744222f | |
parent | 811964cd9f1fbae0fc3b93d116269e9b1fca090a (diff) | |
download | illumos-joyent-a4e6b9b671bd0b8581ffd85bbc50cdd0bfe18b13.tar.gz |
10358 our console should support 256 colors
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/boot/sys/boot/common/gfx_fb.c | 51 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/common/tem.c | 85 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/i386/libi386/vidconsole.c | 2 | ||||
-rw-r--r-- | usr/src/common/font/font.c | 63 | ||||
-rw-r--r-- | usr/src/uts/common/io/tem_safe.c | 76 | ||||
-rw-r--r-- | usr/src/uts/common/sys/rgb.h | 2 | ||||
-rw-r--r-- | usr/src/uts/i86pc/boot/boot_console.c | 8 | ||||
-rw-r--r-- | usr/src/uts/i86pc/boot/boot_fb.c | 62 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c | 32 | ||||
-rw-r--r-- | usr/src/uts/i86pc/sys/framebuffer.h | 1 |
10 files changed, 274 insertions, 108 deletions
diff --git a/usr/src/boot/sys/boot/common/gfx_fb.c b/usr/src/boot/sys/boot/common/gfx_fb.c index 668e5604ed..11c9c4d2e4 100644 --- a/usr/src/boot/sys/boot/common/gfx_fb.c +++ b/usr/src/boot/sys/boot/common/gfx_fb.c @@ -32,6 +32,7 @@ #include <sys/visual_io.h> #include <sys/multiboot2.h> #include <sys/font.h> +#include <sys/rgb.h> #include <sys/endian.h> #include <gfx_fb.h> #include <pnglite.h> @@ -156,9 +157,7 @@ gfx_parse_mode_str(char *str, int *x, int *y, int *depth) uint32_t gfx_fb_color_map(uint8_t index) { - uint8_t c; - int pos, size; - uint32_t color; + rgb_t rgb; if (gfx_fb.framebuffer_common.framebuffer_type != MULTIBOOT_FRAMEBUFFER_TYPE_RGB) { @@ -168,22 +167,16 @@ gfx_fb_color_map(uint8_t index) return (index); } - c = cmap4_to_24.red[index]; - pos = gfx_fb.u.fb2.framebuffer_red_field_position; - size = gfx_fb.u.fb2.framebuffer_red_mask_size; - color = ((c >> (8 - size)) & ((1 << size) - 1)) << pos; + rgb.red.pos = gfx_fb.u.fb2.framebuffer_red_field_position; + rgb.red.size = gfx_fb.u.fb2.framebuffer_red_mask_size; - c = cmap4_to_24.green[index]; - pos = gfx_fb.u.fb2.framebuffer_green_field_position; - size = gfx_fb.u.fb2.framebuffer_green_mask_size; - color |= ((c >> (8 - size)) & ((1 << size) - 1)) << pos; + rgb.green.pos = gfx_fb.u.fb2.framebuffer_green_field_position; + rgb.green.size = gfx_fb.u.fb2.framebuffer_green_mask_size; - c = cmap4_to_24.blue[index]; - pos = gfx_fb.u.fb2.framebuffer_blue_field_position; - size = gfx_fb.u.fb2.framebuffer_blue_mask_size; - color |= ((c >> (8 - size)) & ((1 << size) - 1)) << pos; + rgb.blue.pos = gfx_fb.u.fb2.framebuffer_blue_field_position; + rgb.blue.size = gfx_fb.u.fb2.framebuffer_blue_mask_size; - return (color); + return (rgb_color_map(&rgb, index)); } static bool @@ -228,13 +221,18 @@ color_name_to_ansi(const char *name, int *val) static int gfx_set_colors(struct env_var *ev, int flags, const void *value) { - int val = 0; + int val = 0, limit; char buf[2]; const void *evalue; if (value == NULL) return (CMD_OK); + if (gfx_fb.framebuffer_common.framebuffer_bpp < 24) + limit = 7; + else + limit = 255; + if (color_name_to_ansi(value, &val)) { snprintf(buf, sizeof (buf), "%d", val); evalue = buf; @@ -245,16 +243,18 @@ gfx_set_colors(struct env_var *ev, int flags, const void *value) val = (int)strtol(value, &end, 0); if (errno != 0 || *end != '\0') { printf("Allowed values are either ansi color name or " - "number from range [0-7].\n"); + "number from range [0-7]%s.\n", + limit == 7 ? "" : " or [16-255]"); return (CMD_OK); } evalue = value; } /* invalid value? */ - if (val < 0 || val > 7) { + if ((val < 0 || val > limit) || (val > 7 && val < 16)) { printf("Allowed values are either ansi color name or " - "number from range [0-7].\n"); + "number from range [0-7]%s.\n", + limit == 7 ? "" : " or [16-255]"); return (CMD_OK); } @@ -314,7 +314,7 @@ gfx_set_inverses(struct env_var *ev, int flags, const void *value) void gfx_framework_init(struct visual_ops *fb_ops) { - int rc; + int rc, limit; char *env, buf[2]; #if defined(EFI) extern EFI_GRAPHICS_OUTPUT *gop; @@ -326,6 +326,11 @@ gfx_framework_init(struct visual_ops *fb_ops) } #endif + if (gfx_fb.framebuffer_common.framebuffer_bpp < 24) + limit = 7; + else + limit = 255; + /* Add visual io callbacks */ fb_ops->cons_clear = gfx_fb_cons_clear; fb_ops->cons_copy = gfx_fb_cons_copy; @@ -366,7 +371,7 @@ gfx_framework_init(struct visual_ops *fb_ops) env = getenv("tem.fg_color"); if (env != NULL) { rc = (int)strtol(env, NULL, 0); - if (rc >= 0 && rc <= 7) + if ((rc >= 0 && rc <= limit) && (rc <= 7 || rc >= 16)) gfx_fg = rc; unsetenv("tem.fg_color"); } @@ -374,7 +379,7 @@ gfx_framework_init(struct visual_ops *fb_ops) env = getenv("tem.bg_color"); if (env != NULL) { rc = (int)strtol(env, NULL, 0); - if (rc >= 0 && rc <= 7) + if ((rc >= 0 && rc <= limit) && (rc <= 7 || rc >= 16)) gfx_bg = rc; unsetenv("tem.bg_color"); } diff --git a/usr/src/boot/sys/boot/common/tem.c b/usr/src/boot/sys/boot/common/tem.c index 8399f835ef..1bff41718e 100644 --- a/usr/src/boot/sys/boot/common/tem.c +++ b/usr/src/boot/sys/boot/common/tem.c @@ -1183,7 +1183,6 @@ tem_setparam(struct tem_vt_state *tem, int count, int newparam) } } - /* * select graphics mode based on the param vals stored in a_params */ @@ -1265,6 +1264,32 @@ tem_selgraph(struct tem_vt_state *tem) tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; break; + case 38: + /* We should have at least 3 parameters */ + if (curparam < 3) + break; + + /* + * 256 and truecolor needs depth at least 24, but + * we still need to process the sequence. + */ + count++; + curparam--; + param = tem->tvs_params[count]; + switch (param) { + case 5: /* 256 colors */ + count++; + curparam--; + if (tems.ts_pdepth < 24) + break; + tem->tvs_fg_color = tem->tvs_params[count]; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + break; + default: + break; + } + break; + case 39: /* * Reset the foreground colour and brightness. @@ -1288,6 +1313,32 @@ tem_selgraph(struct tem_vt_state *tem) tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; break; + case 48: + /* We should have at least 3 parameters */ + if (curparam < 3) + break; + + /* + * 256 and truecolor needs depth at least 24, but + * we still need to process the sequence. + */ + count++; + curparam--; + param = tem->tvs_params[count]; + switch (param) { + case 5: /* 256 colors */ + count++; + curparam--; + if (tems.ts_pdepth < 24) + break; + tem->tvs_bg_color = tem->tvs_params[count]; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + break; + default: + break; + } + break; + case 49: /* * Reset the background colour and brightness. @@ -2233,6 +2284,9 @@ tem_pix_bit2pix(struct tem_vt_state *tem, term_char_t c) void (*fp)(struct tem_vt_state *, tem_char_t, unsigned char, unsigned char); + fg = DEFAULT_ANSI_FOREGROUND; + bg = DEFAULT_ANSI_BACKGROUND; + tem_get_color(&fg, &bg, c); switch (tems.ts_pdepth) { case 4: @@ -2334,6 +2388,8 @@ tem_cls(struct tem_vt_state *tem) TEM_ATTR_SCREEN_REVERSE); c.tc_char = TEM_ATTR(attr); + fg_color = DEFAULT_ANSI_FOREGROUND; + bg_color = DEFAULT_ANSI_BACKGROUND; tem_get_color(&fg_color, &bg_color, c); cl.bg_color = bg_color; (void)tems_cls(&cl); @@ -2587,6 +2643,8 @@ tem_pix_cursor(struct tem_vt_state *tem, short action) TEM_ATTR_REVERSE); c.tc_char = TEM_ATTR(attr); + fg = DEFAULT_ANSI_FOREGROUND; + bg = DEFAULT_ANSI_BACKGROUND; tem_get_color(&fg, &bg, c); switch (tems.ts_pdepth) { @@ -2733,15 +2791,24 @@ tem_get_attr(struct tem_vt_state *tem, text_color_t *fg, static void tem_get_color(text_color_t *fg, text_color_t *bg, term_char_t c) { - if (TEM_CHAR_ATTR(c.tc_char) & (TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) - *fg = brt_xlate[c.tc_fg_color]; - else - *fg = dim_xlate[c.tc_fg_color]; + if (c.tc_fg_color < 16) { + if (TEM_CHAR_ATTR(c.tc_char) & + (TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) + *fg = brt_xlate[c.tc_fg_color]; + else + *fg = dim_xlate[c.tc_fg_color]; + } else { + *fg = c.tc_fg_color; + } - if (TEM_CHAR_ATTR(c.tc_char) & TEM_ATTR_BRIGHT_BG) - *bg = brt_xlate[c.tc_bg_color]; - else - *bg = dim_xlate[c.tc_bg_color]; + if (c.tc_bg_color < 16) { + if (TEM_CHAR_ATTR(c.tc_char) & TEM_ATTR_BRIGHT_BG) + *bg = brt_xlate[c.tc_bg_color]; + else + *bg = dim_xlate[c.tc_bg_color]; + } else { + *bg = c.tc_bg_color; + } } void diff --git a/usr/src/boot/sys/boot/i386/libi386/vidconsole.c b/usr/src/boot/sys/boot/i386/libi386/vidconsole.c index 0bfb39649e..91f0716c90 100644 --- a/usr/src/boot/sys/boot/i386/libi386/vidconsole.c +++ b/usr/src/boot/sys/boot/i386/libi386/vidconsole.c @@ -640,7 +640,6 @@ vidc_init(struct console *cp, int arg) return (0); vidc_started = 1; - gfx_framework_init(&fb_ops); /* * Check Miscellaneous Output Register (Read at 3CCh, Write at 3C2h) @@ -676,6 +675,7 @@ vidc_init(struct console *cp, int arg) } } + gfx_framework_init(&fb_ops); rc = tem_info_init(cp); if (rc != 0) { diff --git a/usr/src/common/font/font.c b/usr/src/common/font/font.c index 8333428e2f..638acdd527 100644 --- a/usr/src/common/font/font.c +++ b/usr/src/common/font/font.c @@ -87,6 +87,69 @@ const text_cmap_t cmap4_to_24 = { }; /* END CSTYLED */ +static uint32_t +rgb_to_color(const rgb_t *rgb, uint8_t r, uint8_t g, uint8_t b) +{ + uint32_t color; + int pos, size; + + pos = rgb->red.pos; + size = rgb->red.size; + color = ((r >> (8 - size)) & ((1 << size) - 1)) << pos; + + pos = rgb->green.pos; + size = rgb->green.size; + color |= ((g >> (8 - size)) & ((1 << size) - 1)) << pos; + + pos = rgb->blue.pos; + size = rgb->blue.size; + color |= ((b >> (8 - size)) & ((1 << size) - 1)) << pos; + + return (color); +} + +uint32_t +rgb_color_map(const rgb_t *rgb, uint8_t index) +{ + uint32_t color, code, gray, level; + + if (index < 16) { + color = rgb_to_color(rgb, cmap4_to_24.red[index], + cmap4_to_24.green[index], cmap4_to_24.blue[index]); + return (color); + } + + /* 6x6x6 color cube */ + if (index > 15 && index < 232) { + uint32_t red, green, blue; + + for (red = 0; red < 6; red++) { + for (green = 0; green < 6; green++) { + for (blue = 0; blue < 6; blue++) { + code = 16 + (red * 36) + + (green * 6) + blue; + if (code != index) + continue; + red = red ? (red * 40 + 55) : 0; + green = green ? (green * 40 + 55) : 0; + blue = blue ? (blue * 40 + 55) : 0; + color = rgb_to_color(rgb, red, green, + blue); + return (color); + } + } + } + } + + /* colors 232-255 are a grayscale ramp */ + for (gray = 0; gray < 24; gray++) { + level = (gray * 10) + 8; + code = 232 + gray; + if (code == index) + break; + } + return (rgb_to_color(rgb, level, level, level)); +} /* * Fonts are statically linked with this module. At some point an * RFE might be desireable to allow dynamic font loading. The diff --git a/usr/src/uts/common/io/tem_safe.c b/usr/src/uts/common/io/tem_safe.c index 1742716e95..e07e02f633 100644 --- a/usr/src/uts/common/io/tem_safe.c +++ b/usr/src/uts/common/io/tem_safe.c @@ -596,6 +596,32 @@ tem_safe_selgraph(struct tem_vt_state *tem) tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; break; + case 38: + /* We should have at least 3 parameters */ + if (curparam < 3) + break; + + /* + * 256 and truecolor needs depth at least 24, but + * we still need to process the sequence. + */ + count++; + curparam--; + param = tem->tvs_params[count]; + switch (param) { + case 5: /* 256 colors */ + count++; + curparam--; + if (tems.ts_pdepth < 24) + break; + tem->tvs_fg_color = tem->tvs_params[count]; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + break; + default: + break; + } + break; + case 39: /* * Reset the foreground colour and brightness. @@ -619,6 +645,32 @@ tem_safe_selgraph(struct tem_vt_state *tem) tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; break; + case 48: + /* We should have at least 3 parameters */ + if (curparam < 3) + break; + + /* + * 256 and truecolor needs depth at least 24, but + * we still need to process the sequence. + */ + count++; + curparam--; + param = tem->tvs_params[count]; + switch (param) { + case 5: /* 256 colors */ + count++; + curparam--; + if (tems.ts_pdepth < 24) + break; + tem->tvs_bg_color = tem->tvs_params[count]; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; + break; + default: + break; + } + break; + case 49: /* * Reset the background colour and brightness. @@ -2299,15 +2351,23 @@ tem_safe_get_attr(struct tem_vt_state *tem, text_color_t *fg, static void tem_safe_get_color(text_color_t *fg, text_color_t *bg, term_char_t c) { - if (TEM_ATTR_ISSET(c.tc_char, TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) - *fg = brt_xlate[c.tc_fg_color]; - else - *fg = dim_xlate[c.tc_fg_color]; + *fg = c.tc_fg_color; + *bg = c.tc_bg_color; + + if (c.tc_fg_color < 16) { + if (TEM_ATTR_ISSET(c.tc_char, + TEM_ATTR_BRIGHT_FG | TEM_ATTR_BOLD)) + *fg = brt_xlate[c.tc_fg_color]; + else + *fg = dim_xlate[c.tc_fg_color]; + } - if (TEM_ATTR_ISSET(c.tc_char, TEM_ATTR_BRIGHT_BG)) - *bg = brt_xlate[c.tc_bg_color]; - else - *bg = dim_xlate[c.tc_bg_color]; + if (c.tc_bg_color < 16) { + if (TEM_ATTR_ISSET(c.tc_char, TEM_ATTR_BRIGHT_BG)) + *bg = brt_xlate[c.tc_bg_color]; + else + *bg = dim_xlate[c.tc_bg_color]; + } } /* diff --git a/usr/src/uts/common/sys/rgb.h b/usr/src/uts/common/sys/rgb.h index d39c374fd9..d9b6aa161a 100644 --- a/usr/src/uts/common/sys/rgb.h +++ b/usr/src/uts/common/sys/rgb.h @@ -71,6 +71,8 @@ extern const uint8_t dim_xlate[]; extern const uint8_t brt_xlate[]; extern const uint8_t solaris_color_to_pc_color[16]; +extern uint32_t rgb_color_map(const rgb_t *, uint8_t); + #ifdef __cplusplus } #endif diff --git a/usr/src/uts/i86pc/boot/boot_console.c b/usr/src/uts/i86pc/boot/boot_console.c index 5e3c58b90a..be4fe7f5dc 100644 --- a/usr/src/uts/i86pc/boot/boot_console.c +++ b/usr/src/uts/i86pc/boot/boot_console.c @@ -629,19 +629,19 @@ bcons_init_fb(void) fb_info.inverse = B_FALSE; fb_info.inverse_screen = B_FALSE; - /* color values are 0 - 7 */ + /* color values are 0 - 255 */ propval = find_boot_prop("tem.fg_color"); if (propval != NULL) { intval = atoi(propval); - if (intval >= 0 && intval <= 7) + if (intval >= 0 && intval <= 255) fb_info.fg_color = intval; } - /* color values are 0 - 7 */ + /* color values are 0 - 255 */ propval = find_boot_prop("tem.bg_color"); if (propval != NULL && ISDIGIT(*propval)) { intval = atoi(propval); - if (intval >= 0 && intval <= 7) + if (intval >= 0 && intval <= 255) fb_info.bg_color = intval; } diff --git a/usr/src/uts/i86pc/boot/boot_fb.c b/usr/src/uts/i86pc/boot/boot_fb.c index 24095791a0..72198f5845 100644 --- a/usr/src/uts/i86pc/boot/boot_fb.c +++ b/usr/src/uts/i86pc/boot/boot_fb.c @@ -36,6 +36,7 @@ #define P2ROUNDUP(x, align) (-(-(x) & -(align))) #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define nitems(x) (sizeof ((x)) / sizeof ((x)[0])) /* * Simplified visual_io data structures from visual_io.h @@ -354,50 +355,45 @@ boot_get_color(uint32_t *fg, uint32_t *bg) /* ansi to solaris colors, see also boot_console.c */ if (fb_info.inverse == B_TRUE || fb_info.inverse_screen == B_TRUE) { - *bg = dim_xlate[fb_info.fg_color]; - *fg = brt_xlate[fb_info.bg_color]; + if (fb_info.fg_color < 16) + *bg = dim_xlate[fb_info.fg_color]; + else + *bg = fb_info.fg_color; + + if (fb_info.bg_color < 16) + *fg = brt_xlate[fb_info.bg_color]; + else + *fg = fb_info.bg_color; } else { - if (fb_info.bg_color == 7) - *bg = brt_xlate[fb_info.bg_color]; + if (fb_info.bg_color < 16) { + if (fb_info.bg_color == 7) + *bg = brt_xlate[fb_info.bg_color]; + else + *bg = dim_xlate[fb_info.bg_color]; + } else { + *bg = fb_info.bg_color; + } + if (fb_info.fg_color < 16) + *fg = dim_xlate[fb_info.fg_color]; else - *bg = dim_xlate[fb_info.bg_color]; - *fg = dim_xlate[fb_info.fg_color]; + *fg = fb_info.fg_color; } } /* * Map indexed color to RGB value. */ -static uint32_t +uint32_t boot_color_map(uint8_t index) { - uint8_t c; - int pos, size; - uint32_t color; - - /* 8bit depth is for indexed colors */ - if (fb_info.depth == 8) - return (index); - - if (index >= sizeof (cmap4_to_24.red)) - index = 0; - - c = cmap4_to_24.red[index]; - pos = fb_info.rgb.red.pos; - size = fb_info.rgb.red.size; - color = ((c >> 8 - size) & ((1 << size) - 1)) << pos; - - c = cmap4_to_24.green[index]; - pos = fb_info.rgb.green.pos; - size = fb_info.rgb.green.size; - color |= ((c >> 8 - size) & ((1 << size) - 1)) << pos; - - c = cmap4_to_24.blue[index]; - pos = fb_info.rgb.blue.pos; - size = fb_info.rgb.blue.size; - color |= ((c >> 8 - size) & ((1 << size) - 1)) << pos; + if (fb_info.fb_type != FB_TYPE_RGB) { + if (index < nitems(solaris_color_to_pc_color)) + return (solaris_color_to_pc_color[index]); + else + return (index); + } - return (color); + return (rgb_color_map(&fb_info.rgb, index)); } /* set up out simple console. */ diff --git a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c index ea75ba9c47..62f39c679f 100644 --- a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c +++ b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c @@ -64,7 +64,6 @@ static int bitmap_cons_clear(struct gfxp_fb_softc *, struct vis_consclear *); static void bitmap_cons_cursor(struct gfxp_fb_softc *, struct vis_conscursor *); -static uint32_t bitmap_color_map(uint8_t); static void bitmap_polled_copy(struct vis_polledio_arg *, struct vis_conscopy *); static void bitmap_polled_display(struct vis_polledio_arg *, @@ -262,33 +261,6 @@ bitmap_setup_fb(struct gfxp_fb_softc *softc) return (DDI_SUCCESS); } -static uint32_t -bitmap_color_map(uint8_t index) -{ - uint8_t c, mask; - uint32_t color = 0; - - c = cmap4_to_24.red[index]; - mask = (1 << fb_info.rgb.red.size) - 1; - c >>= 8 - fb_info.rgb.red.size; - c &= mask; - color |= c << fb_info.rgb.red.pos; - - c = cmap4_to_24.green[index]; - mask = (1 << fb_info.rgb.green.size) - 1; - c >>= 8 - fb_info.rgb.green.size; - c &= mask; - color |= c << fb_info.rgb.green.pos; - - c = cmap4_to_24.blue[index]; - mask = (1 << fb_info.rgb.blue.size) - 1; - c >>= 8 - fb_info.rgb.blue.size; - c &= mask; - color |= c << fb_info.rgb.blue.pos; - - return (color); -} - static int bitmap_devinit(struct gfxp_fb_softc *softc, struct vis_devinit *data) { @@ -307,7 +279,7 @@ bitmap_devinit(struct gfxp_fb_softc *softc, struct vis_devinit *data) data->width = console->fb.screen.x; data->height = console->fb.screen.y; data->linebytes = console->fb.pitch; - data->color_map = bitmap_color_map; + data->color_map = boot_color_map; data->depth = console->fb.depth; data->mode = VIS_PIXEL; data->polledio = &softc->polledio; @@ -467,7 +439,7 @@ bitmap_cons_clear(struct gfxp_fb_softc *softc, struct vis_consclear *ca) console = softc->console; pitch = console->fb.pitch; - data = bitmap_color_map(ca->bg_color); + data = boot_color_map(ca->bg_color); switch (console->fb.depth) { case 8: for (i = 0; i < console->fb.screen.y; i++) { diff --git a/usr/src/uts/i86pc/sys/framebuffer.h b/usr/src/uts/i86pc/sys/framebuffer.h index 7df7920873..3736fb2dc8 100644 --- a/usr/src/uts/i86pc/sys/framebuffer.h +++ b/usr/src/uts/i86pc/sys/framebuffer.h @@ -83,6 +83,7 @@ typedef struct fb_info { extern fb_info_t fb_info; void boot_fb_cursor(boolean_t); +extern uint32_t boot_color_map(uint8_t); #ifdef __cplusplus } |