[syslinux] Question about vk_check and rllunpack

Sebastian Herbszt herbszt at gmx.de
Mon Apr 27 15:25:07 PDT 2009


I am hitting a problem on syslinux-3.80-pre1-2-g6c0fb9e (only last label in config file is found),
but don't want to "cry wolf" (again), so let's start with a question:

ui.inc:

;
; Now check if it is a "virtual kernel"
;
vk_check:
                mov esi,[HighMemSize]           ; Start from top of memory
.scan:
                cmp esi,[VKernelEnd]
                jbe .not_vk

                mov di,VKernelBuf
                call rllunpack
                ; ESI updated on return


Since "shuffler: make the new shuffler actually work" (0d8c3d040d9f733f95384f2d5e46609f73bd9c78)
rllunpack in rllpack.inc looks like:

;
; rllunpack:
;       Unpack bytes from SI into EDI
;       On return (E)SI, EDI are updated and
;       (E)CX contains number of bytes output.
;
rllunpack:
                push word .pmentry
                call simple_pm_call
                ret

                bits 32
.pmentry:
                push edi
                movzx esi,si
                xor ecx,ecx

It looks to me like rllunpack does trash esi value (upper part), the check at vk_check.scan succeeds
and we jump to vk_check.not_vk.
In my test i got esi before rllunpack (0x3fece980) and after it's 0x0000e97f.

Am i missing something?

- Sebastian




More information about the Syslinux mailing list