[syslinux] inconsistent Int 22h local boot
Miguel
mth at mth.com
Thu Jan 3 06:05:01 PST 2008
>> Upgrade to 3.54 did not solve the problem ...
>> same behavior ... Dell 1435
>> still returns from Int 22h AX=0014.
>> I'll try to collect more data.
>
> That is very odd indeed.
Agreed
> The code to do it shouldn't even have a way to
> return... I traced through the execution and there
> doesn't seem any possibility. It would be useful to
> know what values are returned by INT 22h, AX=000Ah.
In addition to AX=000Ah, I also did AX=0015h.
I have attached a screen shot ... don't know if it will make it to the
mailing list.
Int22h AX=000Ah -> AL=32h DX=0201h
Int22h AX=0015h -> CX=0000h :
Note that the flag byte count is 0 ... based upon comboot.doc I expected a
value of 1.
To make things more confuzing/puzzling, if I put 'localboot 0' in the
pxelinux.cfg/MACADDR file then it successfully exits and boots from the
local hard drive.
I took a look at the code in com32/modules/menumain.c ... which looks like
the code that processes pxelinux.cfg/MACADDR files. I observe that it
calls Int22h AX=0014h, exactly as I am doing. It works from the boot:
prompt but does not work from my code ... very strange.
Screen shot is attached.
Source code is below.
Miguel
----
void syslinux_localboot(int localboottype) {
static com32sys_t regs;
int i;
for (i = 0; i < 25; ++i) // clear screen
printf("\n");
printf("initiating localboot\n");
localboottype = localboottype; // stop complaining about unused variable
memset(®s, 0, sizeof regs);
regs.eax.w[0] = 0x000A;
__intcall(0x22, ®s, ®s);
printf("Int22h AX=000Ah -> AL=%02Xh DX=%04Xh\n\n",
regs.eax.b[0], regs.edx.w[0]);
memset(®s, 0, sizeof regs);
regs.eax.w[0] = 0x0015;
__intcall(0x22, ®s, ®s);
printf("Int22h AX=0015h -> CX=%04Xh :", regs.ecx.w[0]);
{
unsigned count = regs.ecx.w[0];
unsigned char * flags_ptr = MK_PTR(regs.es, regs.ebx.w[0]);
unsigned i;
for (i = 0; i < count; ++i)
printf(" %02Xh", flags_ptr[i]);
printf("\n\n");
}
memset(®s, 0, sizeof regs);
regs.eax.w[0] = 0x0014;
regs.edx.w[0] = (unsigned short) localboottype;
printf("calling Int22h AX=%04Xh DX=%04Xh\n\n",
regs.eax.w[0], regs.edx.w[0]);
__intcall(0x22, ®s, NULL);
// alternate method ... but requires the label 'localboot' in the
// pxelinux.cfg file
//
// char * bounce = __com32.cs_bounce;
// strcpy(bounce, "localboot");
//
// regs.eax.w[0] = 0x0003;
// regs.es = SEG(bounce);
// regs.ebx.w[0] = OFFS(bounce);
// __intcall(0x22, ®s, NULL);
printf("Why am I here?\n");
syslinux_sleep(5);
exit(0);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: int22ax14.png
Type: image/png
Size: 144844 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20080103/9e64adad/attachment.png>
More information about the Syslinux
mailing list