Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Thursday, May 15, 2008 - 7:25 pm

"Huang, Ying" <ying.huang@intel.com> writes:


What I was thinking was:

In kernel A()

relocate_new_kernel:

        ...

        call	*%eax

kexec_jump_back_entry:
        /* This code should be PIC so figure out where we are */
        call	1f
1:
        popl	%edi
        subl	$(1b - relocate_kernel), %edi

        /* Setup a safe stack */
        leal    PAGE_SIZE(%edi), %esp
        ...


Then in purgatory we can read the address of kexec_jump_back_entry
by examining 0(%esp) and export it in whatever fashion is sane.

However we reach kexec_jump_back_entry we should be fine.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Wed May 14, 2:43 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 11:39 am)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 7:25 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 7:55 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 8:33 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Sat May 17, 6:59 pm)