|
Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
|
PL011 UART hardware abstraction layer. More...
#include <stdbool.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | uart_device |
| Hardware abstraction for a UART device. More... | |
Typedefs | |
| typedef struct uart_device | uart_device_t |
| Hardware abstraction for a UART device. | |
Functions | |
| void | pl011_init (uart_device_t *dev, uintptr_t base) |
| Initialize a UART device struct. | |
| bool | pl011_register_handler (uart_device_t *dev) |
| Register the PL011 UART receive interrupt handler with the ICU. | |
PL011 UART hardware abstraction layer.
Declares the device struct and initialisation function for the ARM PL011 UART used as the kernel's early serial console.
| void pl011_init | ( | uart_device_t * | dev, |
| uintptr_t | base | ||
| ) |
Initialize a UART device struct.
| dev | Pointer to the device struct to initialize. |
| base | MMIO base address. |
| bool pl011_register_handler | ( | uart_device_t * | dev | ) |
Register the PL011 UART receive interrupt handler with the ICU.
Installs pl011_rx_handler into the ICU dispatch table for INTID 33 (the UART SPI on QEMU virt) and enables the interrupt in the GIC. After this call, any character received on the UART will trigger pl011_rx_handler which echoes it back.
| dev | Pointer to the PL011 UART device struct to register. Passed as private_data to the handler on each invocation. |