* patch grub EFI setjmp in IA32
@ 2006-08-03 3:07 bibo,mao
2006-08-04 19:24 ` Yoshinori K. Okuji
0 siblings, 1 reply; 2+ messages in thread
From: bibo,mao @ 2006-08-03 3:07 UTC (permalink / raw)
To: grub-devel; +Cc: bibo.mao
hi,
In IA32 application function parameter is passed on stack but not register,
on grub_setjmp funciton, env is pushed on stack, but not eax register.Caller is
responsible to push parameter on the stack and after function call pop the stack.
Here is the patch for setjmp.S in IA32 EFI, any suggestion is welcome.
Thanks
bibo,mao
--- grub-1.94.org/normal/i386/setjmp.S 2004-04-04 21:46:03.000000000 +0800
+++ grub-1.94/normal/i386/setjmp.S 2006-08-03 11:00:02.000000000 +0800
@@ -27,11 +27,13 @@
* int grub_setjmp (grub_jmp_buf env)
*/
FUNCTION(grub_setjmp)
+ popl %ecx
+ popl %eax
+ pushl %eax
movl %ebx, 0(%eax) /* EBX */
movl %esi, 4(%eax) /* ESI */
movl %edi, 8(%eax) /* EDI */
movl %ebp, 12(%eax) /* EBP */
- popl %ecx
movl %esp, 16(%eax) /* ESP */
movl %ecx, 20(%eax) /* EIP */
xorl %eax, %eax
@@ -42,6 +44,11 @@ FUNCTION(grub_setjmp)
* int grub_longjmp (grub_jmp_buf env, int val)
*/
FUNCTION(grub_longjmp)
+ popl %eax /* skip return address */
+ popl %edx
+ popl %eax
+ pushl %eax
+ pushl %edx
movl 0(%eax), %ebx
movl 4(%eax), %esi
movl 8(%eax), %edi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-04 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 3:07 patch grub EFI setjmp in IA32 bibo,mao
2006-08-04 19:24 ` Yoshinori K. Okuji
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.