genode/repos/base-sel4/patches/serial.patch

25 lines
799 B
Diff

--- src/kernel/sel4/src/plat/pc99/machine/io.c
+++ src/kernel/sel4/src/plat/pc99/machine/io.c
@@ -18,7 +18,7 @@
void serial_init(uint16_t port)
{
- while (!(in8(port + 5) & 0x60)); /* wait until not busy */
+ while (!(in8(port + 5) & 0x20)); /* wait until not busy */
out8(port + 1, 0x00); /* disable generating interrupts */
out8(port + 3, 0x80); /* line control register: command: set divisor */
@@ -43,10 +43,10 @@ void console_putchar(char c)
lock_acquire(&lock_debug);
if (port > 0) {
- while (!(in8(port + 5) & 0x60));
+ while (!(in8(port + 5) & 0x20));
out8(port, c);
if (c == '\n') {
- while (!(in8(port + 5) & 0x60));
+ while (!(in8(port + 5) & 0x20));
out8(port, '\r');
}
}