You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've been trying to do the microkit tutorial with rust-sel4 but I've run into a problem with the interrupts of the UART in part1.
The problem is that while the writing to the UART works perfectly fine, the notification function is never called when typing in characters into QEMU. When I replace the elf file of the RUST serial_server with the tutorial native C serial_server it receives the interrupts.
C-program for verification that the irq can be set
#include<stdint.h>#include<microkit.h>#include"printf.h"// This variable will have the address of the UART deviceuintptr_tuart_base_vaddr;
#defineRHR_MASK 0b111111111
#defineUARTDR 0x000
#defineUARTFR 0x018
#defineUARTIMSC 0x038
#defineUARTICR 0x044
#definePL011_UARTFR_TXFF (1 << 5)
#definePL011_UARTFR_RXFE (1 << 4)
#defineREG_PTR(base, offset) ((volatile uint32_t *)((base) + (offset)))
voiduart_init() {
*REG_PTR(uart_base_vaddr, UARTIMSC) =0x50;
}
intuart_get_char() {
intch=0;
if ((*REG_PTR(uart_base_vaddr, UARTFR) &PL011_UARTFR_RXFE) ==0) {
ch=*REG_PTR(uart_base_vaddr, UARTDR) &RHR_MASK;
}
returnch;
}
voiduart_put_char(intch) {
while ((*REG_PTR(uart_base_vaddr, UARTFR) &PL011_UARTFR_TXFF) !=0);
*REG_PTR(uart_base_vaddr, UARTDR) =ch;
if (ch=='\r') {
uart_put_char('\n');
}
}
voiduart_handle_irq() {
*REG_PTR(uart_base_vaddr, UARTICR) =0x7f0;
}
voiduart_put_str(char*str) {
while (*str) {
uart_put_char(*str);
str++;
}
}
voidinit(void) {
// First we initialise the UART device, which will write to the// device's hardware registers. Which means we need access to// the UART device.uart_init();
// After initialising the UART, print a message to the terminal// saying that the serial server has started.uart_put_str("SERIAL SERVER: starting\n");
}
voidnotified(microkit_channelchannel) {
uart_put_str("Notification");
}
Rust program which does not receive the irq and never enters the notified function
Hello, I've been trying to do the microkit tutorial with rust-sel4 but I've run into a problem with the interrupts of the UART in part1.
The problem is that while the writing to the UART works perfectly fine, the
notification
function is never called when typing in characters into QEMU. When I replace the elf file of the RUST serial_server with the tutorial native C serial_server it receives the interrupts.C-program for verification that the irq can be set
Rust program which does not receive the irq and never enters the
notified
functionThe text was updated successfully, but these errors were encountered: