|
@@ -345,20 +345,22 @@ got_pmm: /* PMM allocation succeeded */
|
345
|
345
|
shll $9, %ecx
|
346
|
346
|
addr32 rep movsb /* PMM presence implies flat real mode */
|
347
|
347
|
movl %edi, decompress_to
|
348
|
|
- /* Shrink ROM and update checksum */
|
|
348
|
+ /* Shrink ROM */
|
|
349
|
+ movb $_prefix_memsz_sect, romheader_size
|
|
350
|
+pmm_fail:
|
|
351
|
+ /* Restore upper register halves */
|
|
352
|
+ popal
|
|
353
|
+no_pmm:
|
|
354
|
+
|
|
355
|
+ /* Update checksum */
|
349
|
356
|
xorw %bx, %bx
|
350
|
357
|
xorw %si, %si
|
351
|
|
- movw $_prefix_memsz_sect, %cx
|
352
|
|
- movb %cl, romheader_size
|
|
358
|
+ movzbw romheader_size, %cx
|
353
|
359
|
shlw $9, %cx
|
354
|
360
|
1: lodsb
|
355
|
361
|
addb %al, %bl
|
356
|
362
|
loop 1b
|
357
|
363
|
subb %bl, checksum
|
358
|
|
-pmm_fail:
|
359
|
|
- /* Restore upper register halves */
|
360
|
|
- popal
|
361
|
|
-no_pmm:
|
362
|
364
|
|
363
|
365
|
/* Copy self to option ROM space. Required for PCI3.0, which
|
364
|
366
|
* loads us to a temporary location in low memory. Will be a
|