[syslinux] Weird PXE calling convention question

Alexander Sack aps at holmeister.net
Wed Jul 16 16:12:39 PDT 2003


I am mucking around with the pxelinux code for S&G's and I have a
generic question about the pxe calling convention:

Does the parameter structure and opcode HAVE to be passed onto the stack
the PXE BIOS passed in when the pxelinux binary is executed at 0:7C00?

The PXE spec says:

"SS:SP is to contain the address of the beginning of the unused portion
of the PXE services stack."

(not sure exactly what that means yet)

I ask this because I'm getting a General Failure Error (ax = 0x1) and I
think its because I am using a different stack.  I also notice that when I do
get this error status nothing is copied into the buffer I supply (like a PXENV
error code) which kinda sucks.  This leads me to believe an issue with
me setting up a different stack before the far call.

>From the code:

; That is all pushed onto the PXE stack.  Save the pointer to it 
; and switch to an internal stack.
mov [InitStack],sp
mov [InitStack+2],ss

Comment by me: I believe USE_PXE_PROVIDED_STACK is always set???

; Apparently some platforms go bonkers if we
; set up our own stack...
mov [BaseStack],sp
mov [BaseStack+4],ss

Basically, what do you mean by bonkers?! :-)!  Do calls start to fail
like I described or the box just hangs (general fault or something)?



"We've duplicated this [horror] in the Sega Labs before - it's where the Sega CD came from."

More information about the Syslinux mailing list