[Trac #57] Decide on toolchain for compiling LinuxBIOS
Zarro Boogs per Child
bugtracker at laptop.org
Wed Sep 20 19:20:31 EDT 2006
#57: Decide on toolchain for compiling LinuxBIOS
-------------------------------+--------------------------------------------
Reporter: wmb at firmworks.com | Owner: rminnich
Type: task | Status: new
Priority: low | Milestone: final
Component: infrastructure | Resolution:
Keywords: |
-------------------------------+--------------------------------------------
Comment (by rminnich):
Car Talk would call this a "puzzler"
Here are the differences in bios ints:
{{{
biosint: INT# 0x15
-biosint: eax 0xbea7 ebx 0x5034e53 ecx 0x10000026 edx 0x10000028
-biosint: ebp 0x15f0c esp 0xff0 edi 0x8bcc esi 0x38
+biosint: eax 0xbea7 ebx 0x4e53 ecx 0x10000026 edx 0x10000028
+biosint: ebp 0x15f08 esp 0xff0 edi 0x900000 esi 0x38
biosint: ip 0x5b3 cs 0x6000 flags 0x46
biosint: gs 0x0 fs 0x0 ds 0x6000 es 0x0
handleint21, eax 0xbea7
biosint: INT# 0x15
-biosint: eax 0xbea4 ebx 0x5034e53 ecx 0x10000026 edx 0x10000028
-biosint: ebp 0x15f0c esp 0xfee edi 0x8bcc esi 0x38
+biosint: eax 0xbea4 ebx 0x4e53 ecx 0x10000026 edx 0x10000028
+biosint: ebp 0x15f08 esp 0xfee edi 0x900000 esi 0x38
biosint: ip 0x5c1 cs 0x6000 flags 0x46
}}}
here's the C code that is printing it.
{{{
int biosint(unsigned long intnumber,
unsigned long gsfs, unsigned long dses,
unsigned long edi, unsigned long esi,
unsigned long ebp, unsigned long esp,
unsigned long ebx, unsigned long edx,
unsigned long ecx, unsigned long eax,
unsigned long cs_ip, unsigned short stackflags)
{
printk_debug("biosint: INT# 0x%lx\n", intnumber);
printk_debug("biosint: eax 0x%lx ebx 0x%lx ecx 0x%lx edx 0x%lx\n",
eax, ebx, ecx, edx);
printk_debug("biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n",
ebp, esp, edi, esi);
printk_debug("biosint: ip 0x%x cs 0x%x flags 0x%x\n",
ip, cs, flags);
printk_debug("biosint: gs 0x%x fs 0x%x ds 0x%x es 0x%x\n",
gsfs >> 16, gsfs & 0xffff, dses >> 16, dses &
0xffff);
}}}
here's the .s that calls that code:
{{{
"callbiosint16: \n"
" push %ds \n"
" push %es \n"
" push %fs \n"
" push %gs \n"
// clean up the int #. To save space we put it in the
lower
// byte. But the top 24 bits are junk.
" andl $0xff, %eax\n"
// this push does two things:
// - put the INT # on the stack as a parameter
// - provides us with a temp for the %cr0 mods.
" pushl %eax \n"
.
.
.
" call biosint \n"
}}}
my first reaction was stack alignment, or variable alignment might have
changed, but the CS:IP and the INT# nicely bracket that stack, and they
are the same.
So this may be a red herring .
The int is int21 (x15). What are these parameters?
{{{
ret=handleint21( &edi, &esi, &ebp, &esp,
&ebx, &edx, &ecx, &eax, &flags);
}}}
And they become:
{{{
case 0xBEA7:
*eax=33;
break;
case 0xBEA4:
*eax=333;
break;
}}}
They're grabbing clock rates (which are wrong, btw: it should be 366,
right?)
But the rest of the registers are unused.
I'm unsure that any of this means anything at present. I'll keep digging.
ron
--
Ticket URL: <http://dev.laptop.org/ticket/57#comment:12>
One Laptop Per Child <http://laptop.org/>
More information about the Devel
mailing list