From 183c9f12567de944f20ae58b4f7651d448ab6014 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 14 May 2009 18:07:30 -0700 Subject: [PATCH] core/diskstart.inc: break transactions on 64K boundaries getlinsec doesn't watch for 64K boundaries, so we need to do it ourselves. Break a loading run if we reach a 64K boundary. Signed-off-by: H. Peter Anvin --- core/diskstart.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/diskstart.inc b/core/diskstart.inc index 81b284f..b713a1e 100644 --- a/core/diskstart.inc +++ b/core/diskstart.inc @@ -538,6 +538,7 @@ load_rest: .get_chunk: jcxz .done xor ebp,ebp + mov di,bx ; Low 64K of target address lodsd ; First sector of this chunk mov edx,eax @@ -552,7 +553,8 @@ load_rest: cmp [si],edx ; Does it match jnz .chunk_ready ; If not, this is it add si,4 ; If so, add sector to chunk - jmp short .make_chunk + add di,SECTOR_SIZE ; Check for 64K segment wrap + jnz .make_chunk .chunk_ready: push ebx -- 2.7.4