stivale2: Ensure serial off before starting runtime term
This commit is contained in:
parent
44d3ba3ba6
commit
7db81efbb0
@ -592,13 +592,16 @@ void gterm_putchar(uint8_t c) {
|
||||
}
|
||||
}
|
||||
|
||||
static bool last_serial = false;
|
||||
|
||||
bool gterm_init(size_t *_rows, size_t *_cols, size_t width, size_t height) {
|
||||
if (current_video_mode >= 0
|
||||
&& fbinfo.default_res == true
|
||||
&& width == 0
|
||||
&& height == 0
|
||||
&& fbinfo.framebuffer_bpp == 32
|
||||
&& !early_term) {
|
||||
&& !early_term
|
||||
&& serial == last_serial) {
|
||||
*_rows = rows;
|
||||
*_cols = cols;
|
||||
gterm_clear(true);
|
||||
@ -609,7 +612,8 @@ bool gterm_init(size_t *_rows, size_t *_cols, size_t width, size_t height) {
|
||||
&& fbinfo.framebuffer_width == width
|
||||
&& fbinfo.framebuffer_height == height
|
||||
&& fbinfo.framebuffer_bpp == 32
|
||||
&& !early_term) {
|
||||
&& !early_term
|
||||
&& serial == last_serial) {
|
||||
*_rows = rows;
|
||||
*_cols = cols;
|
||||
gterm_clear(true);
|
||||
@ -622,6 +626,8 @@ bool gterm_init(size_t *_rows, size_t *_cols, size_t width, size_t height) {
|
||||
if (!fb_init(&fbinfo, width, height, 32))
|
||||
return false;
|
||||
|
||||
last_serial = serial;
|
||||
|
||||
cursor_status = true;
|
||||
scroll_enabled = true;
|
||||
|
||||
|
@ -213,7 +213,7 @@ out:
|
||||
if (E9_OUTPUT) {
|
||||
outb(0xe9, print_buf[i]);
|
||||
}
|
||||
if (serial || COM_OUTPUT) {
|
||||
if ((term_backend != NOT_READY && serial) || COM_OUTPUT) {
|
||||
switch (print_buf[i]) {
|
||||
case '\n':
|
||||
serial_out('\r');
|
||||
|
@ -527,6 +527,7 @@ failed_to_load_header_section:
|
||||
|
||||
if (bits == 64 && terminal_hdr_tag != NULL) {
|
||||
quiet = false;
|
||||
serial = false;
|
||||
|
||||
if (bios &&
|
||||
((avtag == NULL && hdrtag == NULL) || (avtag != NULL && preference == 1))) {
|
||||
|
Loading…
Reference in New Issue
Block a user