[syslinux] comboot+PXE stack

H. Peter Anvin hpa at zytor.com
Mon Nov 29 12:20:29 PST 2004

Pawel Oleksik wrote:
> On Tue, Nov 23, 2004 at 06:24:26PM -0800, H. Peter Anvin wrote:
>>3. INT 22h, AX=0009h does this; this is in many ways simpler than calling 
>>the PXE stack directly, because you don't have to worry about the fact that 
>>different PXE versions have different calling conventions.
> OK, I give up. I have no real experiences with asm. So, I want to
> GET_CACHED_INFO. I have proper buffer 
> and structure
> struct {
>     PXENV_STATUS Status;
>     UINT16 PacketType; /*1-discover, 2-ack, 3-cached reply*/
>     UINT16 BufferSize;
>     char * Buffer;      /* SEGOFF16 Buffer; ??? */
>     UINT16 BufferLimit;
>   } PXE_INFO = {3,sizeof(lbuf),&lbuf,0};
> So now, I should call INT 22:
> asm volatile("int $0x22" : "=a" (eax) 
>                : "a" (0x0009), "b" (0x0071), .... );
> Firstly: how to put in ES:DI the address of PXE_INFO?
> Secondly: is PXE_INFO properly filled up?

No, that's not how you do it from com32.  You have to fill out a 
structure of type com32sys_t (defined in <com32.h>) and then invoke 
__intcall(0x22, &ireg, &oreg) where ireg is input registers and oreg is 
output registers (can be NULL).

For the IP address you probably care more about the ACK (2) than cached 
reply (3), since the latter might come from the standalone PXE server as 
opposed to the DHCP server.


More information about the Syslinux mailing list