summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2014-08-06 16:11:18 +0200
committerMichael Brown2014-08-06 16:11:18 +0200
commitf1b520dbad179bb812bd005812eb1c1077f7f4fa (patch)
treea949431d47ee0dd5c6b4b6b055ccdc9148a1de53
parent[bios] Support displaying and hiding cursor (diff)
downloadipxe-f1b520dbad179bb812bd005812eb1c1077f7f4fa.tar.gz
ipxe-f1b520dbad179bb812bd005812eb1c1077f7f4fa.tar.xz
ipxe-f1b520dbad179bb812bd005812eb1c1077f7f4fa.zip
[efi] Support displaying and hiding cursor
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/interface/efi/efi_console.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/interface/efi/efi_console.c b/src/interface/efi/efi_console.c
index 331c705bd..3b30f3097 100644
--- a/src/interface/efi/efi_console.c
+++ b/src/interface/efi/efi_console.c
@@ -152,11 +152,43 @@ static void efi_handle_sgr ( struct ansiesc_context *ctx __unused,
conout->SetAttribute ( conout, efi_attr );
}
+/**
+ * Handle ANSI DECTCEM set (show cursor)
+ *
+ * @v ctx ANSI escape sequence context
+ * @v count Parameter count
+ * @v params List of graphic rendition aspects
+ */
+static void efi_handle_dectcem_set ( struct ansiesc_context *ctx __unused,
+ unsigned int count __unused,
+ int params[] __unused ) {
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *conout = efi_systab->ConOut;
+
+ conout->EnableCursor ( conout, TRUE );
+}
+
+/**
+ * Handle ANSI DECTCEM reset (hide cursor)
+ *
+ * @v ctx ANSI escape sequence context
+ * @v count Parameter count
+ * @v params List of graphic rendition aspects
+ */
+static void efi_handle_dectcem_reset ( struct ansiesc_context *ctx __unused,
+ unsigned int count __unused,
+ int params[] __unused ) {
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *conout = efi_systab->ConOut;
+
+ conout->EnableCursor ( conout, FALSE );
+}
+
/** EFI console ANSI escape sequence handlers */
static struct ansiesc_handler efi_ansiesc_handlers[] = {
{ ANSIESC_CUP, efi_handle_cup },
{ ANSIESC_ED, efi_handle_ed },
{ ANSIESC_SGR, efi_handle_sgr },
+ { ANSIESC_DECTCEM_SET, efi_handle_dectcem_set },
+ { ANSIESC_DECTCEM_RESET, efi_handle_dectcem_reset },
{ 0, NULL }
};