The seL4 kernel defines available kernel devices in the platform dependent hardware.h
The kernel_devices structure contains all the hardware devices that the kernel needs
access to. For most platforms, this is just the GIC, but if CONFIG_PRINTING is enabled,
the uart is added as well.
The code below is from the zynqmp hardware.h file:
/* UART */
true /* armExecuteNever */
#endif /* CONFIG_PRINTING */
So that device defines the UART physical address, virtual address, and whether the device
is allowed to execute. The kernel_devices structure gets used with the map_kernel_devices
function so that the UART gets mapped from UART_PADDR -> UART_PPTR. Software can then
use the virtual address to send and receive characters from the UART.
#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x)))
while (!(*UART_REG(XUARTPS_SR) & XUARTPS_SR_TXEMPTY));
*UART_REG(XUARTPS_FIFO) = c;
Let me know if you have any other questions.
Embedded Systems Engineer
From: Devel [mailto:email@example.com] On Behalf Of Sathya Narayanan N
Sent: Thursday, July 19, 2018 4:27 AM
Subject: Re: [seL4] Understanding how SEL4 recognises UART on board
I am curious to know how SEL4 recognises the existence of UART on the board and mapped to
a particular memory address.
I see there is no DTB/ DTS files read from memory.
could someone help me understand the concept here ?
Or is it something hardcoded in the kernel ?