From 6a4ffe2abb885b7d39346d0ec3aa8346f3b5bfd3 Mon Sep 17 00:00:00 2001 From: hpa Date: Wed, 28 Mar 2001 05:11:21 +0000 Subject: [PATCH] Add hack that hopefully will make -s mode less necessary --- NEWS | 3 +++ ldlinux.asm | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index a0ad693..d57e63d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ Changes in 1.54: * PXELINUX: Fix code for finding !PXE from PXENV+. This was due to a spec bug; match the most recent spec since that seems to be what implementations actually do. + * SYSLINUX: Add some smarts to the boot sector, which + hopefully should reduce the number of systems which require + stupid mode ("syslinux -s"). Changes in 1.53: * PXELINUX: Rename pxelinux.bin to pxelinux.0, to match what diff --git a/ldlinux.asm b/ldlinux.asm index 9617e25..39301e7 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -588,10 +588,11 @@ wstr_1: lodsb ; disk_error: dec si ; SI holds the disk retry counter jz kaboom - xchg ax,bx ; Shorter than MOV pop bx ; pop cx ; pop dx ; + pop ax ; (AH = 0) + mov al,1 ; Once we fail, only transfer 1 sector jmp short disk_try_again return: ret @@ -670,20 +671,19 @@ gls_lastchunk: mov dl,[bsDriveNumber] xchg ax,bp ; Sector to transfer count ; (xchg shorter than mov) - push ax ; Number of sectors we're transferring - mov ah,02h ; Read it! + mov si,retry_count ; # of times to retry a disk access ; ; Do the disk transfer... save the registers in case we fail :( ; - mov si,retry_count ; # of times to retry a disk access -disk_try_again: push dx ; +disk_try_again: + push ax ; Number of sectors we're transferring + mov ah,02h ; READ DISK + push dx ; push cx ; push bx ; - push ax ; - push si ; + push si ; int 13h - pop si ; - pop bx ; + pop si ; jc disk_error ; ; Disk access successful -- 2.7.4