From: "bibo,mao" <bibo.mao@intel.com>
To: grub-devel@gnu.org
Cc: bibo.mao@intel.com
Subject: patch grub EFI setjmp in IA32
Date: Thu, 03 Aug 2006 11:07:11 +0800 [thread overview]
Message-ID: <44D1685F.3020907@intel.com> (raw)
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
next reply other threads:[~2006-08-03 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 3:07 bibo,mao [this message]
2006-08-04 19:24 ` patch grub EFI setjmp in IA32 Yoshinori K. Okuji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44D1685F.3020907@intel.com \
--to=bibo.mao@intel.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.