|
@@ -352,9 +352,13 @@ pmm_scan:
|
352
|
352
|
call print_message
|
353
|
353
|
/* We have PMM and so a 1kB stack: preserve whole registers */
|
354
|
354
|
pushal
|
355
|
|
- /* Allocate image source PMM block */
|
|
355
|
+ /* Allocate image source PMM block. Round up the size to the
|
|
356
|
+ * nearest 4kB (8 512-byte sectors) to work around AMI BIOS bugs.
|
|
357
|
+ */
|
356
|
358
|
movzbl romheader_size, %ecx
|
357
|
359
|
addw extra_size, %cx
|
|
360
|
+ addw $0x0007, %cx /* Round up to multiple of 8 512-byte sectors */
|
|
361
|
+ andw $0xfff8, %cx
|
358
|
362
|
shll $5, %ecx
|
359
|
363
|
movl $PMM_HANDLE_BASE_IMAGE_SOURCE, %ebx
|
360
|
364
|
movw $get_pmm_image_source, %bp
|