Author: tsoome
Date: Wed Jun 17 08:08:57 2020
New Revision: 362259
URL: https://svnweb.freebsd.org/changeset/base/362259

Log:
  loader: vidc_init should also erase the screen
  
  Inject \e[J to erase the initial loader screen. We have two options,
  find where out cursor is and use BIOS scroll for data from boot2 or erase the
  display and start from origin. Erasing the screen is easier and we also
  get the screen buffer initialized.
  
  Sponsored by: Netflix, Klara Inc.

Modified:
  head/stand/i386/libi386/vidconsole.c

Modified: head/stand/i386/libi386/vidconsole.c
==============================================================================
--- head/stand/i386/libi386/vidconsole.c        Wed Jun 17 07:41:28 2020        
(r362258)
+++ head/stand/i386/libi386/vidconsole.c        Wed Jun 17 08:08:57 2020        
(r362259)
@@ -709,11 +709,8 @@ vidc_init(int arg)
        env_setenv("teken.bg_color", EV_VOLATILE, env, vidc_set_colors,
            env_nounset);
 
-       for (int row = 0; row < tp.tp_row; row++)
-               for (int col = 0; col < tp.tp_col; col++) {
-                       buffer[col + row * tp.tp_col].c = ' ';
-                       buffer[col + row * tp.tp_col].a = *a;
-               }
+       /* Erase display, this will also fill our screen buffer. */
+       teken_input(&teken, "\e[J", 3);
 
        for (int i = 0; i < 10 && vidc_ischar(); i++)
                (void) vidc_getchar();
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to