efi_loader: Some console improvements for vidconsole

1) use fputs() to reduce cache flushes from once-per-char to
   once-per-string
2) handle \r, \t, and \b in addition to just \n for tracking
   cursor position
3) cursor row/col are zero based, not one based

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Rob Clark
2017-09-13 18:05:44 -04:00
committed by Alexander Graf
parent a18c5a8382
commit 3a45bc7faa
2 changed files with 39 additions and 25 deletions

View File

@ -29,6 +29,8 @@ enum efi_timer_delay {
};
#define UINTN size_t
typedef long INTN;
typedef uint16_t *efi_string_t;
#define EVT_TIMER 0x80000000
#define EVT_RUNTIME 0x40000000
@ -427,10 +429,10 @@ struct efi_simple_text_output_protocol {
void *reset;
efi_status_t (EFIAPI *output_string)(
struct efi_simple_text_output_protocol *this,
const unsigned short *str);
const efi_string_t str);
efi_status_t (EFIAPI *test_string)(
struct efi_simple_text_output_protocol *this,
const unsigned short *str);
const efi_string_t str);
efi_status_t(EFIAPI *query_mode)(
struct efi_simple_text_output_protocol *this,
unsigned long mode_number, unsigned long *columns,