static int vesa_probe(void)
{
#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
- u16 ax;
+ u16 ax, cx, di;
u16 mode;
addr_t mode_ptr;
struct mode_info *mi;
vginfo.signature = VBE2_MAGIC;
- /* Optimistically assume a VESA BIOS is register-clean... */
ax = 0x4f00;
- asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo));
+ di = (size_t)&vginfo;
+ asm(INT10
+ : "+a" (ax), "+D" (di), "=m" (vginfo)
+ : : "ebx", "ecx", "edx", "esi");
if (ax != 0x004f ||
vginfo.signature != VESA_MAGIC ||
memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
ax = 0x4f01;
- asm("int $0x10"
- : "+a" (ax), "=m" (vminfo)
- : "c" (mode), "D" (&vminfo));
+ cx = mode;
+ di = (size_t)&vminfo;
+ asm(INT10
+ : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
+ : : "ebx", "edx", "esi");
if (ax != 0x004f)
continue;
static int vesa_set_mode(struct mode_info *mode)
{
- u16 ax;
+ u16 ax, bx, cx, di;
int is_graphic;
u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
ax = 0x4f01;
- asm("int $0x10"
- : "+a" (ax), "=m" (vminfo)
- : "c" (vesa_mode), "D" (&vminfo));
+ cx = vesa_mode;
+ di = (size_t)&vminfo;
+ asm(INT10
+ : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo)
+ : : "ebx", "edx", "esi");
if (ax != 0x004f)
return -1;
ax = 0x4f02;
- asm volatile("int $0x10"
- : "+a" (ax)
- : "b" (vesa_mode), "D" (0));
+ bx = vesa_mode;
+ di = 0;
+ asm volatile(INT10
+ : "+a" (ax), "+b" (bx), "+D" (di)
+ : : "ecx", "edx", "esi");
if (ax != 0x004f)
return -1;