summaryrefslogtreecommitdiff
path: root/sys/dev/cons
AgeCommit message (Collapse)Author
30 hourskernel: Ensure mutually exclusive console accessIan Moffett
If multiple processes try to write to the console, a race condition of sorts may occur. Similarly, if multiple processes try to read from the console and contend with the console input buffer. One process may steal keys from the other. Prevent this by implementing a mutex within the console descriptor. Each time a process reads or writes the console, it attaches itself. Any other processes attempting to read or write the console while another is attached will be yielded to the scheduler until the resource is free. Signed-off-by: Ian Moffett <ian@osmora.org>
2 dayskernel: console: Add 'show_curs' feat flagIan Moffett
Add 'show_curs' feat flag to enable/disable whether or not the cursor should be drawn Signed-off-by: Ian Moffett <ian@osmora.org>
2 dayskernel: console: Remove extra newlineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: console: Introduce /ctl/console/featIan Moffett
Introduce a ctlfs entry for configuring various console features such as the ability to parse ANSI escape codes. Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: console: Introduce cons_screen featuresIan Moffett
Introduce a 'feat' field in the cons_screen structure to allow certain console features to be turned on or off. Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: cons_ansi: Use `scr' var for console callsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: cons: Handle horizontal tabs ('\t')Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-13kernel: cons: Clear entire screen on demandIan Moffett
- Flush the entire output buffer - Wipe the whole screen with "bg" - The entire console will now be cleared when a "\033[H" sequence is encountered Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: cons: Add ANSI cursor pos reset sequenceIan Moffett
- Add support for the "\033[H" ANSI escape sequence to reset the cursor to the 'home' position Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: cons: Invert console cursor colorIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-05kernel: cons: Add initial ANSI escape seq implIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-05kernel: cons: Handle ASCII_NULIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-05kernel: cons: Add color attribute helpersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-26kernel: cons: Fix newline caused by excessive '\b'Ian Moffett
Before this commit, if you were to write out too many backspace characters, it would result in an integer underflow for the scr->curs_col and scr->ch_col state resulting in the console logic assuming the cursor has gone too far off the screen which would cause behavior similar to as if you wrote out a line-feed character. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-22kernel: Optimize console & loggingQuinn Stephens
* Modified draw loops to use `fbdev_get_index()` less often. * Created `cons_fast_putch()`, then used it to implement `cons_putch()` and `cons_putstr()`. This way, when printing an entire string, the lock acquire/release and cursor hide/show will only happen once, instead of once per character. * Modified `syslog_write()` to use `cons_putstr()`. Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: cons: Add lock to console bufferIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-04-22kernel: cons: Add backspace supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-04-18kernel: cons: Add console buffer frameworkIan Moffett
Major console improvements - Add console buffer framework for managing console input/output in a more smooth and elegant manner - Fix cursor bugs Signed-off-by: Ian Moffett <ian@osmora.org>
2025-04-17kernel: cons: Support flexible console attrIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-02-22kernel: cons: Add lock around root consoleIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-02-22kernel: dev: Add /dev/consoleIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-02-16project: Update copyright date to 2025Ian Moffett
Was supposed to happen on Jan 1, sorry! Happy late new year! Signed-off-by: Ian Moffett <ian@osmora.org>
2025-02-15kernel: cons: Optimize console drawingQuinn Stephens
Prevents the cursor from being cleared right before a character is drawn or right after the screen is cleared. Also optimized the cursor drawing routine to just draw a rectangle instead of rendering a space character. Additionally renamed `cons_render_char()` to `cons_draw_char()` and fixed all characters being drawn one pixel too far to the right. Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-09kernel: cons: Improve char handling and add cursorIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-07kernel: cons: Ensure fb_mem isn't NULLIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-04project: Initial commitIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>