Console Drivers

A console provides a means of presenting output to the user, allowing the system to display information in a text-based format. A higher-level system component uses the console operations offered by the respective console to, e.g., write output to the screen.

General Considerations

In order to separate higher-level console tasks, such as tracking the current write position, from the lower-level hardware interface, the console implementation should be split into a frontend and a backend (Fig. 1). Higher-level system components interact with the frontend via console operations, while the backend immediately handles the hardware. The frontend relies on console backend operations provided by the backend to, e.g., write individual characters to specific screen positions and move the cursor.

This separation allows, ideally, for sharing the same backend, e.g., the VGA text buffer, across multiple virtual terminals, acting as frontends.

// SPDX-License-Identifier: GPL-2.0 // SPDX-FileCopyrightText: 2025 by Tom Vierjahn <tom.vierjahn@acm.org> digraph foo { node [width=2 shape=box]; "Higher-Level" [style=dashed]; "Frontend" []; "Backend" []; "Hardware" [style=dashed]; "Higher-Level" -> "Frontend"[ label=" Console Operations " URL="console.html#console-operations" target="_parent" arrowhead=vee arrowtail=vee]; subgraph cluster_console { "Frontend" -> "Backend"[ label=" Console Backend Operations" URL="console.html#console-backend-operations" target="_parent" arrowhead=vee arrowtail=vee]; invis [shape=none Xstyle=invis label="" fixedsize=true width=1.25 height=0.2]; label = Console; labeljust = r; }; "Backend" -> "Hardware" [arrowhead=vee]; }

Fig. 1 A higher level component uses console operations to interact with a console. The console itself is split into a frontend and a backend in order to separate the hardware driver from the console interface.

Console Components Provided by tomOSii