[syslinux] modifying initrd before high mem load
Amos Waterland
apw at us.ibm.com
Sun Feb 9 20:53:42 PST 2003
Hi, I have an interesting question for you. Given the output of
scramble(initrd) = S, I am interested in having [iso|sys|pxe]linux
perform unscramble(S) = initrd before they load it into high memory.
As a simple example, suppose scramble() were simply a XOR with a
constant value of the gzip magic number at the front of the initrd
image. I would like to insert the following, but I can't seem to figure
out how to correctly address the data pointed to by SI. Any help would
be greatly appreciated.
;
; Load RAM disk into high memory
;
; Need to be set:
; su_ramdiskat - Where in memory to load
; su_ramdisklen - Size of file
; SI - initrd filehandle/cluster pointer
;
loadinitrd:
push es ; Save ES on entry
mov ax,real_mode_seg
mov es,ax
mov edi,[es:su_ramdiskat] ; initrd load address
+ unscrambleinitrd:
+ xor [si:0],constant_xor_value
push si
mov si,crlfloading_msg ; Write "Loading "
call cwritestr
mov si,InitRDCName ; Write ramdisk name
call cwritestr
mov si,dotdot_msg ; Write dots
call cwritestr
pop si
mov eax,[es:su_ramdisklen]
call load_high ; Load the file
call crlf
pop es ; Restore original ES
ret
More information about the Syslinux
mailing list