Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
[x86 setup] Don't rely on the VESA BIOS being register-clean

+21 -13
+21 -13
arch/i386/boot/video-vesa.c
··· 29 29 static int vesa_probe(void) 30 30 { 31 31 #if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID) 32 - u16 ax; 32 + u16 ax, cx, di; 33 33 u16 mode; 34 34 addr_t mode_ptr; 35 35 struct mode_info *mi; ··· 39 39 40 40 vginfo.signature = VBE2_MAGIC; 41 41 42 - /* Optimistically assume a VESA BIOS is register-clean... */ 43 42 ax = 0x4f00; 44 - asm("int $0x10" : "+a" (ax), "=m" (vginfo) : "D" (&vginfo)); 43 + di = (size_t)&vginfo; 44 + asm(INT10 45 + : "+a" (ax), "+D" (di), "=m" (vginfo) 46 + : : "ebx", "ecx", "edx", "esi"); 45 47 46 48 if (ax != 0x004f || 47 49 vginfo.signature != VESA_MAGIC || ··· 66 64 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */ 67 65 68 66 ax = 0x4f01; 69 - asm("int $0x10" 70 - : "+a" (ax), "=m" (vminfo) 71 - : "c" (mode), "D" (&vminfo)); 67 + cx = mode; 68 + di = (size_t)&vminfo; 69 + asm(INT10 70 + : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo) 71 + : : "ebx", "edx", "esi"); 72 72 73 73 if (ax != 0x004f) 74 74 continue; ··· 106 102 107 103 static int vesa_set_mode(struct mode_info *mode) 108 104 { 109 - u16 ax; 105 + u16 ax, bx, cx, di; 110 106 int is_graphic; 111 107 u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA; 112 108 113 109 memset(&vminfo, 0, sizeof vminfo); /* Just in case... */ 114 110 115 111 ax = 0x4f01; 116 - asm("int $0x10" 117 - : "+a" (ax), "=m" (vminfo) 118 - : "c" (vesa_mode), "D" (&vminfo)); 112 + cx = vesa_mode; 113 + di = (size_t)&vminfo; 114 + asm(INT10 115 + : "+a" (ax), "+c" (cx), "+D" (di), "=m" (vminfo) 116 + : : "ebx", "edx", "esi"); 119 117 120 118 if (ax != 0x004f) 121 119 return -1; ··· 135 129 136 130 137 131 ax = 0x4f02; 138 - asm volatile("int $0x10" 139 - : "+a" (ax) 140 - : "b" (vesa_mode), "D" (0)); 132 + bx = vesa_mode; 133 + di = 0; 134 + asm volatile(INT10 135 + : "+a" (ax), "+b" (bx), "+D" (di) 136 + : : "ecx", "edx", "esi"); 141 137 142 138 if (ax != 0x004f) 143 139 return -1;