diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h index cbfc6f09396f..e15fc6aa4f27 100644 --- a/sys/boot/common/bootstrap.h +++ b/sys/boot/common/bootstrap.h @@ -102,6 +102,7 @@ struct console #define C_PRESENTOUT (1<<1) /* console can provide output */ #define C_ACTIVEIN (1<<2) /* user wants input from console */ #define C_ACTIVEOUT (1<<3) /* user wants output to console */ +#define C_WIDEOUT (1<<4) /* c_out routine groks wide chars */ void (* c_probe)(struct console *cp); /* set c_flags to match hardware */ int (* c_init)(int arg); /* reinit XXX may need more args */ void (* c_out)(int c); /* emit c */ diff --git a/sys/boot/common/util.c b/sys/boot/common/util.c index 21834bef08cd..5869f97bd5b0 100644 --- a/sys/boot/common/util.c +++ b/sys/boot/common/util.c @@ -120,6 +120,7 @@ printf(const char *fmt, ...) va_list ap; const char *hex = "0123456789abcdef"; char buf[32], *s; + uint16_t *S; unsigned long long u; int c, l; @@ -143,6 +144,10 @@ nextfmt: for (s = va_arg(ap, char *); *s != '\0'; s++) putchar(*s); break; + case 'S': /* Assume console can cope with wide chars */ + for (S = va_arg(ap, uint16_t *); *S != 0; S++) + putchar(*S); + break; case 'd': /* A lie, always prints unsigned */ case 'u': case 'x': diff --git a/sys/boot/efi/libefi/efi_console.c b/sys/boot/efi/libefi/efi_console.c index 08ea652f4e1f..68c9a6bf136b 100644 --- a/sys/boot/efi/libefi/efi_console.c +++ b/sys/boot/efi/libefi/efi_console.c @@ -61,7 +61,7 @@ int efi_cons_poll(void); struct console efi_console = { "efi", "EFI console", - 0, + C_WIDEOUT, efi_cons_probe, efi_cons_init, efi_cons_putchar,