From: hpa Date: Tue, 18 Jan 2005 13:13:50 +0000 (+0000) Subject: Fix calculation of I/O block size in SYSLINUX X-Git-Tag: syslinux-3.11~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15088eec8155b23f6768a6412229300b56f8bffb;p=platform%2Fupstream%2Fsyslinux.git Fix calculation of I/O block size in SYSLINUX --- diff --git a/NEWS b/NEWS index 6d59b67..6b0bc18 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ Starting with 1.47, changes marked with SYSLINUX/PXELINUX/ISOLINUX apply to that specific program only; other changes apply to all of them. +Changes in 3.08: + * SYSLINUX: Fix performance regression (-s mode always enabled.) + Changes in 3.07: * Fix chainloading (chain.c32). * Fix zlib build problem. diff --git a/cache.inc b/cache.inc index 9a0825e..1da7c8f 100644 --- a/cache.inc +++ b/cache.inc @@ -43,6 +43,7 @@ getcachesector: loop .search .miss: + TRACER 'M' ; Need to load it. Highly inefficient cache replacement ; algorithm: Least Recently Written (LRW) push bx @@ -66,6 +67,7 @@ getcachesector: ret .hit: ; We have it; get the pointer + TRACER 'H' sub si,CachePtrs shl si,SECTOR_SHIFT-2 pop cx diff --git a/ldlinux.asm b/ldlinux.asm index 77e3e98..baa7cca 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -1208,6 +1208,7 @@ getfssec_edx: push eax .getfragment: xor ebp,ebp ; Fragment sector count + push edx ; Starting sector pointer .getseccnt: inc bp dec cx @@ -1215,19 +1216,20 @@ getfssec_edx: xor eax,eax mov ax,es shl ax,4 - add ax,bx ; Now DI = how far into 64K block we are + add ax,bx ; Now AX = how far into 64K block we are not ax ; Bytes left in 64K block inc eax shr eax,SECTOR_SHIFT ; Sectors left in 64K block cmp bp,ax jnb .do_read ; Unless there is at least 1 more sector room... - lea eax,[edx+1] ; Linearly next sector + mov eax,edx ; Current sector + inc edx ; Predict it's the linearly next sector call nextsector jc .do_read - cmp edx,eax + cmp edx,eax ; Did it match? jz .getseccnt .do_read: - mov eax,edx + pop eax ; Starting sector pointer call getlinsecsr lea eax,[eax+ebp-1] ; This is the last sector actually read shl bp,9 diff --git a/version b/version index e449dd2..6fe94f3 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.07 +3.08 diff --git a/writehex.inc b/writehex.inc index bcb7868..f99f830 100644 --- a/writehex.inc +++ b/writehex.inc @@ -17,6 +17,7 @@ ;; Write hexadecimal numbers to the console ;; + section .text ; ; writehex[248]: Write a hex number in (AL, AX, EAX) to the console ; diff --git a/writestr.inc b/writestr.inc index 4bfbe24..46d2aa1 100644 --- a/writestr.inc +++ b/writestr.inc @@ -21,8 +21,13 @@ ; ; crlf: Print a newline ; -crlf: mov si,crlf_msg - ; Fall through +crlf: push ax + mov al,CR + call writechr + mov al,LF + call writechr + pop ax + ret ; ; cwritestr: write a null-terminated string to the console, saving