[syslinux] com32 -> localboot problem

Miguel mth at mth.com
Thu Sep 20 13:15:58 PDT 2007


Summary
=======
I am having trouble with com32 API call

  AX=0014h [3.10] Local boot [PXELINUX, ISOLINUX]
        Input:  AX      0014h
                DX      Local boot parameter
        Output: Does not return

My observation is that is returning from the call and is not localbooting
the system.


Detail
======

I am using a com32 program to configure some hardware before I boot from
the local hard disk.

If I have multiple labels in my pxelinux.cfg/default file then I can
successfully localboot after my com32 program returns ... as in:

DEFAULT foo
LABEL foo
 KERNEL foo.c32
 APPEND some arguments
LABEL localboot
 localboot 0

Restated, if foo.c32 returns then I can type in 'localboot' at the boot:
prompt and the sytem will boot properly.

I would like foo.c32 to localboot.

I am using the following code to try to localboot:

void syslinux_localboot(int localboottype) {
  static com32sys_t regs;
  memset(&regs, 0, sizeof regs);
  regs.eax.w[0] = 0x0014;
  regs.edx.w[0] = (unsigned short) localboottype;
  __intcall(0x22, &regs, NULL);
  printf("Why did I come back?\n");
  syslinux_sleep(5);
  exit(0);
}

I am observing that it returns from the __intcall and prints out my "Why
did I come back?" message. I have played with this a couple of times over
the last few weeks but have not figured out why it isn't working.


Q: Do you see anything that I am doing incorrectly with this function?

.OR.

Q: What can I do to help identify the problem with this API call?



As a workaround I am using AX=0003h Run Command and having it jump to my
'localboot' label.


Miguel




More information about the Syslinux mailing list