diff options
author | Eran Mitrani <mitrani@google.com> | 2023-09-14 14:57:10 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-18 13:15:44 +0000 |
commit | a63a56d57210cd129ea2305019a9f766e2c84429 (patch) | |
tree | 8926d63de556045b91a3d0c6b33b8646199abbda /payloads/libpayload/drivers/video/video.c | |
parent | 31a0fdd039ed75b584a4990523b723156447994f (diff) |
libpayload/drivers/video: Add cursor movement support in console
Add support for moving the console cursor horizontally and vertically.
BUG=b:300405745
TEST=Tested using firmware shell on Rex.
Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I585add120b559396bc0e28aa972b0ae2a33f1fa8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77900
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'payloads/libpayload/drivers/video/video.c')
-rw-r--r-- | payloads/libpayload/drivers/video/video.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c index 4cd630751a..87d7d7424c 100644 --- a/payloads/libpayload/drivers/video/video.c +++ b/payloads/libpayload/drivers/video/video.c @@ -122,6 +122,13 @@ void video_console_putc(u8 row, u8 col, unsigned int ch) console->putc(row, col, ch); } +void video_console_move_cursor(int x, int y) +{ + cursorx += x; + cursory += y; + video_console_fixup_cursor(); +} + void video_console_putchar(unsigned int ch) { if (!console) |