summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2019-10-17 18:27:44 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2019-10-17 18:27:44 +0100
commita7ca34d42580b354d1bb477472e10fe2ca234fd4 (patch)
treedaa081ba44fbce9ae46c2a5ff12baf76949e503b
parentf28e16f9aab36f723df525e8a2a1a798b18e19bd (diff)
downloadqemu-openbios-a7ca34d42580b354d1bb477472e10fe2ca234fd4.tar.gz
escc: explicitly mark variable containing incoming keyboard character as volatile
Otherwise the compiler may not understand that a read from the assigned buffer is comming from memory-mapped IO space and fail to update accordingly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--drivers/escc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/escc.c b/drivers/escc.c
index 392625e4..d9e19909 100644
--- a/drivers/escc.c
+++ b/drivers/escc.c
@@ -284,7 +284,7 @@ keyboard_dataready(void)
unsigned char
keyboard_readdata(void)
{
- unsigned char ch;
+ volatile unsigned char ch;
while (!keyboard_dataready()) { }