Skip to content

Commit

Permalink
docs: add description of TTY and VirtIO
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjian85 committed Nov 24, 2024
1 parent 067e289 commit 0110ca1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ Karg is an educational monolithic kernel designed to be the main component of [C
The general device driver interface provides six functions: `open`, `close`, `read`, `write`, `seek`, and `ioctl`. Each driver manages its own devices, which are represented by `dev_t` in the file descriptors and identified by a minor device number. Additionally, drivers that do not directly correspond to physical hardware, but instead serve as abstraction layers, such as the TTY and line discipline subsystems, are also implemented.

* **TTY subsystem and line discipline** \
The TTY subsystem is responsible for managing various text-based hardware devices in the system. It provides a read-write abstraction that can be bound to an input source and multiple output sinks. The line discipline subsystem, on the other hand, processes and converts special characters (such as CRLF) and ANSI escape sequences before passing the requests to the underlying driver, with buffering applied.

* **VirtIO and VirtIO-GPU** \
The system automatically detects VirtIO-MMIO devices in the address space and invokes their corresponding drivers. It then allocates and creates a linked list of descriptors, which are passed to the VirtIO device's queue when a command needs to be sent. Additionally, VirtIO-GPU is supported for displaying content in the framebuffer, using tricks such as dynamically changing the framebuffer address. This enables functions like page scrolling to be performed without frequent memory copying.

## Usage
Karg is the kernel of the CargOS operating system, but it is not a complete OS on its own. To help you build and run the full CargOS system, we provide a separate repository that automatically clones and assembles all necessary components, including the kernel, the init process, the C standard library implementation and a Lua port. For more details, please visit [CargOS](https://github.com/carg-os/carg-os).
Expand Down

0 comments on commit 0110ca1

Please sign in to comment.