diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 22fe9812a33a..2adfbacc3a62 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd December 31, 2020 +.Dd Januar 6, 2020 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -237,10 +237,33 @@ selects the video console which prevents any input and hides all output replacing it with .Dq spinning character (useful for embedded products and such). +.It Va screen.font +Set font size for framebuffer mode. +Default font size is selected based on screen resolution, to achieve +terminal dimensions 80x24. +.It Va screen.textmode +Value "0" will trigger BIOS loader to switch to use VESA BIOS Extension (VBE) +frame buffer mode for console. +The same effect can be achieved by setting +.Va vbe_max_resolution . +.Pp +Value "1" will force BIOS loader to use VGA text mode. +.Pp +If +.Va vbe_max_resolution +is not set, the loader will try to set screen resolution based on EDID +information. +If EDID is not available, the default resolution is 800x600 (if available). +.It Va screen.height +.It Va screen.width +.It Va screen.depth +.Va screen.height , +.Va screen.width , +.Va screen.depth +are set by loader when loader is using framebuffer mode to draw the screen. .It Va efi_max_resolution .It Va vbe_max_resolution -Specify the maximum desired resolution for the EFI or VESA BIOS Extension (VBE) -framebuffer console. +Specify the maximum desired resolution for the EFI or VBE framebuffer console. The following values are accepted: .Bl -column "WidthxHeight" .It Sy Value Ta Sy Resolution diff --git a/stand/i386/libi386/vbe.c b/stand/i386/libi386/vbe.c index 232f13dab077..6a70cfe6f3e9 100644 --- a/stand/i386/libi386/vbe.c +++ b/stand/i386/libi386/vbe.c @@ -274,7 +274,7 @@ bios_set_text_mode(int mode) gfx_state.tg_fb.fb_mask_green = (1 << palette_format) - 1 << 8; gfx_state.tg_fb.fb_mask_blue = (1 << palette_format) - 1 << 0; gfx_state.tg_ctype = CT_INDEXED; - env_setenv("hw.vga.textmode", EV_VOLATILE | EV_NOHOOK, "1", NULL, NULL); + env_setenv("screen.textmode", EV_VOLATILE | EV_NOHOOK, "1", NULL, NULL); } /* Function 00h - Return VBE Controller Information */ @@ -378,7 +378,7 @@ biosvbe_set_mode(int mode, struct crtciinfoblock *ci) if (biosvbe_palette_format(&m) == VBE_SUCCESS) palette_format = m; } - env_setenv("hw.vga.textmode", EV_VOLATILE | EV_NOHOOK, "0", NULL, NULL); + env_setenv("screen.textmode", EV_VOLATILE | EV_NOHOOK, "0", NULL, NULL); return (rv); } @@ -508,19 +508,18 @@ mode_set(struct env_var *ev, int flags __unused, const void *value) { int mode; - if (strcmp(ev->ev_name, "hw.vga.textmode") == 0) { + if (strcmp(ev->ev_name, "screen.textmode") == 0) { unsigned long v; char *end; if (value == NULL) return (0); - /* VT(4) describes hw.vga.textmode values 0 or 1. */ errno = 0; v = strtoul(value, &end, 0); if (errno != 0 || *(char *)value == '\0' || *end != '\0' || (v != 0 && v != 1)) return (EINVAL); - env_setenv("hw.vga.textmode", EV_VOLATILE | EV_NOHOOK, + env_setenv("screen.textmode", EV_VOLATILE | EV_NOHOOK, value, NULL, NULL); if (v == 1) { reset_font_flags(); @@ -574,7 +573,7 @@ vbe_init(void) vbe_mode = NULL; } - env_setenv("hw.vga.textmode", EV_VOLATILE, "1", mode_set, + env_setenv("screen.textmode", EV_VOLATILE, "1", mode_set, env_nounset); env_setenv("vbe_max_resolution", EV_VOLATILE, NULL, mode_set, env_nounset);