stivale2: Implement max_length field of terminal structure tag

This commit is contained in:
mintsuki 2021-07-11 08:51:22 +02:00
parent f4a47cff02
commit 63a45e2b31
2 changed files with 6 additions and 1 deletions

View File

@ -357,10 +357,15 @@ void stivale2_load(char *config, char *cmdline, bool pxe, void *efi_system_table
struct stivale2_struct_tag_terminal *tag = ext_mem_alloc(sizeof(struct stivale2_struct_tag_terminal));
tag->tag.identifier = STIVALE2_STRUCT_TAG_TERMINAL_ID;
// We provide max allowed string length
tag->flags |= (1 << 1);
#if defined (bios)
tag->term_write = (uintptr_t)(void *)stivale2_term_write_entry;
tag->max_length = 4096;
#elif defined (uefi)
tag->term_write = (uintptr_t)term_write;
tag->max_length = 0;
#endif
// We provide rows and cols

View File

@ -8,7 +8,7 @@ user_ds: resq 1
user_es: resq 1
user_ss: resq 1
%define MAX_TERM_BUF 1024
%define MAX_TERM_BUF 4096
term_buf:
resb MAX_TERM_BUF