sel4: fix UART access (patch)

See https://github.com/seL4/seL4/issues/36.
This commit is contained in:
Christian Helmuth 2016-09-12 09:52:52 +02:00
parent ff06361c71
commit d3fcb38545
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,24 @@
--- 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');
}
}

View File

@ -1 +1 @@
2b60b5d96865ba4f4d362a80729af31305d13a31
e8d740ed612452a8d81b992169f459191b3a3f0c