Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 139277 | Differences between
and this patch

Collapse All | Expand All

(-)grub-0.97.orig/netboot/pci.c (-18 / +41 lines)
Lines 105-117 Link Here
105
105
106
	save_flags(flags);
106
	save_flags(flags);
107
	__asm__(
107
	__asm__(
108
		"pushl %%ebx\n\t" /* save %ebx */
108
#ifdef ABSOLUTE_WITHOUT_ASTERISK
109
#ifdef ABSOLUTE_WITHOUT_ASTERISK
109
		"lcall (%%edi)"
110
		"lcall (%%edi)\n\t"
110
#else
111
#else
111
		"lcall *(%%edi)"
112
		"lcall *(%%edi)\n\t"
112
#endif
113
#endif
114
		"movl %%ebx, %1\n\t" /* capture what was in %ebx */
115
		"popl %%ebx\n\t" /* restore %ebx */
113
		: "=a" (return_code),
116
		: "=a" (return_code),
114
		  "=b" (address),
117
		  "=r" (address),
115
		  "=c" (length),
118
		  "=c" (length),
116
		  "=d" (entry)
119
		  "=d" (entry)
117
		: "0" (service),
120
		: "0" (service),
Lines 141-158 Link Here
141
144
142
        save_flags(flags);
145
        save_flags(flags);
143
        __asm__(
146
        __asm__(
147
		"pushl %%ebx\n\t" /* save %ebx */
148
		"movl %3, %%ebx\n\t" /* put the value into ebx */
144
#ifdef ABSOLUTE_WITHOUT_ASTERISK
149
#ifdef ABSOLUTE_WITHOUT_ASTERISK
145
		"lcall (%%esi)\n\t"
150
		"lcall (%%esi)\n\t"
146
#else
151
#else
147
		"lcall *(%%esi)\n\t"
152
		"lcall *(%%esi)\n\t"
148
#endif
153
#endif
149
                "jc 1f\n\t"
154
                "jc 1f\n\t"
150
                "xor %%ah, %%ah\n"
155
		"popl %%ebx\n\t" /* restore %ebx */
156
		"xor %%ah, %%ah\n\t"
151
                "1:"
157
                "1:"
152
                : "=c" (*value),
158
                : "=c" (*value),
153
                  "=a" (ret)
159
                  "=a" (ret)
154
                : "1" (PCIBIOS_READ_CONFIG_BYTE),
160
                : "1" (PCIBIOS_READ_CONFIG_BYTE),
155
                  "b" (bx),
161
                  "r" (bx),
156
                  "D" ((long) where),
162
                  "D" ((long) where),
157
                  "S" (&pci_indirect));
163
                  "S" (&pci_indirect));
158
        restore_flags(flags);
164
        restore_flags(flags);
Lines 168-185 Link Here
168
174
169
        save_flags(flags);
175
        save_flags(flags);
170
        __asm__(
176
        __asm__(
177
		"pushl %%ebx\n\t" /* save %ebx */
178
		"movl %3, %%ebx\n\t" /* put the value into ebx */
171
#ifdef ABSOLUTE_WITHOUT_ASTERISK
179
#ifdef ABSOLUTE_WITHOUT_ASTERISK
172
		"lcall (%%esi)\n\t"
180
		"lcall (%%esi)\n\t"
173
#else
181
#else
174
		"lcall *(%%esi)\n\t"
182
		"lcall *(%%esi)\n\t"
175
#endif
183
#endif
176
                "jc 1f\n\t"
184
                "jc 1f\n\t"
177
                "xor %%ah, %%ah\n"
185
		"popl %%ebx\n\t" /* restore %ebx */
186
		"xor %%ah, %%ah\n\t"
178
                "1:"
187
                "1:"
179
                : "=c" (*value),
188
                : "=c" (*value),
180
                  "=a" (ret)
189
                  "=a" (ret)
181
                : "1" (PCIBIOS_READ_CONFIG_WORD),
190
                : "1" (PCIBIOS_READ_CONFIG_WORD),
182
                  "b" (bx),
191
		"r" (bx),
183
                  "D" ((long) where),
192
                  "D" ((long) where),
184
                  "S" (&pci_indirect));
193
                  "S" (&pci_indirect));
185
        restore_flags(flags);
194
        restore_flags(flags);
Lines 195-212 Link Here
195
204
196
        save_flags(flags);
205
        save_flags(flags);
197
        __asm__(
206
        __asm__(
207
	    "pushl %%ebx\n\t" /* save %ebx */
208
	    "movl %3, %%ebx\n\t" /* put the value into ebx */
198
#ifdef ABSOLUTE_WITHOUT_ASTERISK
209
#ifdef ABSOLUTE_WITHOUT_ASTERISK
199
		"lcall (%%esi)\n\t"
210
		"lcall (%%esi)\n\t"
200
#else
211
#else
201
		"lcall *(%%esi)\n\t"
212
		"lcall *(%%esi)\n\t"
202
#endif
213
#endif
203
                "jc 1f\n\t"
214
                "jc 1f\n\t"
204
                "xor %%ah, %%ah\n"
215
	    "popl %%ebx\n\t" /* restore %ebx */
216
	    "xor %%ah, %%ah\n\t"
205
                "1:"
217
                "1:"
206
                : "=c" (*value),
218
                : "=c" (*value),
207
                  "=a" (ret)
219
                  "=a" (ret)
208
                : "1" (PCIBIOS_READ_CONFIG_DWORD),
220
                : "1" (PCIBIOS_READ_CONFIG_DWORD),
209
                  "b" (bx),
221
	    "r" (bx),
210
                  "D" ((long) where),
222
                  "D" ((long) where),
211
                  "S" (&pci_indirect));
223
                  "S" (&pci_indirect));
212
        restore_flags(flags);
224
        restore_flags(flags);
Lines 222-239 Link Here
222
234
223
	save_flags(flags); cli();
235
	save_flags(flags); cli();
224
	__asm__(
236
	__asm__(
237
	    "pushl %%ebx\n\t" /* save %ebx */
238
	    "movl %3, %%ebx\n\t" /* put the value into ebx */
225
#ifdef ABSOLUTE_WITHOUT_ASTERISK
239
#ifdef ABSOLUTE_WITHOUT_ASTERISK
226
		"lcall (%%esi)\n\t"
240
		"lcall (%%esi)\n\t"
227
#else
241
#else
228
		"lcall *(%%esi)\n\t"
242
		"lcall *(%%esi)\n\t"
229
#endif
243
#endif
230
		"jc 1f\n\t"
244
		"jc 1f\n\t"
231
		"xor %%ah, %%ah\n"
245
	    "popl %%ebx\n\t" /* restore %ebx */
246
	    "xor %%ah, %%ah\n\t"
232
		"1:"
247
		"1:"
233
		: "=a" (ret)
248
		: "=a" (ret)
234
		: "0" (PCIBIOS_WRITE_CONFIG_BYTE),
249
		: "0" (PCIBIOS_WRITE_CONFIG_BYTE),
235
		  "c" (value),
250
		  "c" (value),
236
		  "b" (bx),
251
	    "r" (bx),
237
		  "D" ((long) where),
252
		  "D" ((long) where),
238
		  "S" (&pci_indirect));
253
		  "S" (&pci_indirect));
239
	restore_flags(flags);
254
	restore_flags(flags);
Lines 249-266 Link Here
249
264
250
	save_flags(flags); cli();
265
	save_flags(flags); cli();
251
	__asm__(
266
	__asm__(
267
	    "pushl %%ebx\n\t" /* save %ebx */
268
	    "movl %3, %%ebx\n\t" /* put the value into ebx */
252
#ifdef ABSOLUTE_WITHOUT_ASTERISK
269
#ifdef ABSOLUTE_WITHOUT_ASTERISK
253
		"lcall (%%esi)\n\t"
270
		"lcall (%%esi)\n\t"
254
#else
271
#else
255
		"lcall *(%%esi)\n\t"
272
		"lcall *(%%esi)\n\t"
256
#endif
273
#endif
257
		"jc 1f\n\t"
274
		"jc 1f\n\t"
258
		"xor %%ah, %%ah\n"
275
	    "popl %%ebx\n\t" /* restore %ebx */
276
	    "xor %%ah, %%ah\n\t"
259
		"1:"
277
		"1:"
260
		: "=a" (ret)
278
		: "=a" (ret)
261
		: "0" (PCIBIOS_WRITE_CONFIG_WORD),
279
		: "0" (PCIBIOS_WRITE_CONFIG_WORD),
262
		  "c" (value),
280
		  "c" (value),
263
		  "b" (bx),
281
	    "r" (bx),
264
		  "D" ((long) where),
282
		  "D" ((long) where),
265
		  "S" (&pci_indirect));
283
		  "S" (&pci_indirect));
266
	restore_flags(flags);
284
	restore_flags(flags);
Lines 276-293 Link Here
276
294
277
	save_flags(flags); cli();
295
	save_flags(flags); cli();
278
	__asm__(
296
	__asm__(
297
	    "pushl %%ebx\n\t" /* save %ebx */
298
	    "movl %3, %%ebx\n\t" /* put the value into ebx */
279
#ifdef ABSOLUTE_WITHOUT_ASTERISK
299
#ifdef ABSOLUTE_WITHOUT_ASTERISK
280
		"lcall (%%esi)\n\t"
300
		"lcall (%%esi)\n\t"
281
#else
301
#else
282
		"lcall *(%%esi)\n\t"
302
		"lcall *(%%esi)\n\t"
283
#endif
303
#endif
284
		"jc 1f\n\t"
304
		"jc 1f\n\t"
285
		"xor %%ah, %%ah\n"
305
	    "popl %%ebx\n\t" /* restore %ebx */
306
	    "xor %%ah, %%ah\n\t"
286
		"1:"
307
		"1:"
287
		: "=a" (ret)
308
		: "=a" (ret)
288
		: "0" (PCIBIOS_WRITE_CONFIG_DWORD),
309
		: "0" (PCIBIOS_WRITE_CONFIG_DWORD),
289
		  "c" (value),
310
		  "c" (value),
290
		  "b" (bx),
311
	    "r" (bx),
291
		  "D" ((long) where),
312
		  "D" ((long) where),
292
		  "S" (&pci_indirect));
313
		  "S" (&pci_indirect));
293
	restore_flags(flags);
314
	restore_flags(flags);
Lines 308-327 Link Here
308
329
309
		save_flags(flags);
330
		save_flags(flags);
310
		__asm__(
331
		__asm__(
332
		"pushl %%ebx\n\t" /* save %ebx */
311
#ifdef ABSOLUTE_WITHOUT_ASTERISK
333
#ifdef ABSOLUTE_WITHOUT_ASTERISK
312
			"lcall (%%edi)\n\t"
334
			"lcall (%%edi)\n\t"
313
#else
335
#else
314
			"lcall *(%%edi)\n\t"
336
			"lcall *(%%edi)\n\t"
315
#endif
337
#endif
316
			"jc 1f\n\t"
338
			"jc 1f\n\t"
317
			"xor %%ah, %%ah\n"
339
		"xor %%ah, %%ah\n\t"
318
			"1:\tshl $8, %%eax\n\t"
340
			"1:\tshl $8, %%eax\n\t"
319
			"movw %%bx, %%ax"
341
		"movw %%bx, %%ax\n\t"
342
		"popl %%ebx\n\t" /* restore %ebx */
320
			: "=d" (signature),
343
			: "=d" (signature),
321
			  "=a" (pack)
344
			  "=a" (pack)
322
			: "1" (PCIBIOS_PCI_BIOS_PRESENT),
345
			: "1" (PCIBIOS_PCI_BIOS_PRESENT),
323
			  "D" (&pci_indirect)
346
			  "D" (&pci_indirect)
324
			: "bx", "cx");
347
		: "cx");
325
		restore_flags(flags);
348
		restore_flags(flags);
326
349
327
		present_status = (pack >> 16) & 0xff;
350
		present_status = (pack >> 16) & 0xff;

Return to bug 139277