Skip to contentSkip to conversation

x86/s3.c: exit with status 0, not *0

PATCH In review Peter Feiner 1 participant 2 messages Feb 1, 2016 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/s3.c: exit with status 0, not *0

Typo lead to confusing code. The s3 test was writing the contents of address 0 to the output port, not explicitly the number zero!

---
 x86/s3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/s3.c +1 -1
index 8bf71da..c7d78c1 100644
@@ -73,7 +73,7 @@ asm (
 	".global resume_end\n"
 	".code16\n"
 	"resume_start:\n"
-	"mov 0x0, %eax\n"
+	"mov $0x0, %eax\n"
 	"mov $0xf4, %dx\n"
 	"out %eax, %dx\n"
 	"1: hlt\n"
Signature · 1 line
2.7.0.rc3.207.g0ac5344
#1 lore raw
Quoted 22 lines · Peter Feiner

Typo lead to confusing code. The s3 test was writing the contents of address 0 to the output port, not explicitly the number zero!

---
 x86/s3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/s3.c +1 -2
index 8bf71da..c7d78c1 100644
@@ -73,7 +73,7 @@ asm (
        ".global resume_end\n"
        ".code16\n"
        "resume_start:\n"
-       "mov 0x0, %eax\n"
+       "mov $0x0, %eax\n"
        "mov $0xf4, %dx\n"
        "out %eax, %dx\n"
        "1: hlt\n"
--
Quoted 2 lines

2.7.0.rc3.207.g0ac5344

Nevermind. It's suppose to read *0, hence the *0 = 1 in the while loop. Please ignore :-)