Skip to content

Commit

Permalink
[x86 setup] video setup: Fix VBE DDC reading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and H. Peter Anvin committed Aug 2, 2007
1 parent 1ed4395 commit 59acc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/boot/video-vesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 59acc08

Please sign in to comment.