Archived
14
0
Fork 0

[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>
This commit is contained in:
Antonino A. Daplas 2007-08-02 18:16:46 +08:00 committed by H. Peter Anvin
parent 1ed4395035
commit 59acc08fd9

View file

@ -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 */