Browse Source

[x86 setup] video setup: Fix VBE DDC reading

Add memory operand constraint and write-only modifier to the inline
assembly to effect the writing of the EDID block to boot_params.edid_info.

Without this, gcc would think the EDID query was dead code and would
eliminate it.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Antonino A. Daplas 18 years ago
parent
commit
59acc08fd9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/i386/boot/video-vesa.c

+ 1 - 1
arch/i386/boot/video-vesa.c

@@ -268,7 +268,7 @@ void vesa_store_edid(void)
 	dx = 0;			/* EDID block number */
 	di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
 	asm(INT10
-	    : "+a" (ax), "+b" (bx), "+d" (dx)
+	    : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info)
 	    : "c" (cx), "D" (di)
 	    : "esi");
 #endif /* CONFIG_FIRMWARE_EDID */