mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
sel4: fix UART access (patch)
See https://github.com/seL4/seL4/issues/36.
This commit is contained in:
parent
ff06361c71
commit
d3fcb38545
24
repos/base-sel4/patches/serial.patch
Normal file
24
repos/base-sel4/patches/serial.patch
Normal 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');
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
2b60b5d96865ba4f4d362a80729af31305d13a31
|
||||
e8d740ed612452a8d81b992169f459191b3a3f0c
|
||||
|
Loading…
x
Reference in New Issue
Block a user