lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/5] efi/x86: Make efi32_pe_entry more readable
On Mon, Mar 02, 2020 at 08:49:17AM +0100, Ard Biesheuvel wrote:
> On Mon, 2 Mar 2020 at 00:04, Arvind Sankar <nivedita@alum.mit.edu> wrote:
...
> > call 1f
> > -1: pop %ebp
> > - subl $1b, %ebp
> > +1: pop %ebx
> > + subl $1b, %ebx
...
> >
> > + movl %ebx, %ebp // startup_32 for efi32_pe_stub_entry
>
> The code that follows efi32_pe_stub_entry still expects the runtime
> displacement in %ebp, so we'll need to pass that in another way here.
>
> > jmp efi32_pe_stub_entry

Didn't follow -- what do you mean by runtime displacement?

efi32_pe_stub_entry expects the runtime address of startup_32 to be in
%ebp, but with the changes for keeping the frame pointer in %ebp, I
changed the runtime address to be in %ebx instead. Hence I added that
movl %ebx, %ebp to put it in %ebp just before calling efi32_pe_stub_entry.
That should be fine, no?

\
 
 \ /
  Last update: 2020-03-02 17:54    [W:0.065 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site