From b746d87d69f6e06d9cf785fb8922aa5df3b2c692 Mon Sep 17 00:00:00 2001 From: Gerald Britton Date: Mon, 29 Oct 2007 17:03:17 -0400 Subject: [PATCH] syslinux $PnP search fix I finally fixed the "chain.c32 hangs when run on modern qemu" problem. Apparently it was hanging hitting the "Invalid $PnP header (too short)" branch of the code which loops without ever incrementing bx, so it never terminates. The patch below (taken against your current git) seems to fix the problem for me, but having not explored the code much, it probably isn't the most elegant of fixes. -- Gerald --- bootsect.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootsect.inc b/bootsect.inc index 715100a..5775c5a 100644 --- a/bootsect.inc +++ b/bootsect.inc @@ -149,6 +149,7 @@ replace_bootstrap: .findpnp: cmp dword [fs:bx], "$PnP" jz .foundpnp +.againpnp: inc bx cmp bx,-21h ; Don't get a segment overflow error! jbe .findpnp @@ -156,7 +157,7 @@ replace_bootstrap: .foundpnp: movzx cx,byte [fs:bx+5] ; Size of $PnP header cmp cl,21h - jb .findpnp ; Invalid $PnP header (too short) + jb .againpnp ; Invalid $PnP header (too short) push bx xor ax,ax .checkpnp: -- 2.7.4