<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/relocate_kernel_32.S, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-08-15T15:35:42Z</updated>
<entry>
<title>kexec jump: check code size in control page</title>
<updated>2008-08-15T15:35:42Z</updated>
<author>
<name>Huang Ying</name>
</author>
<published>2008-08-15T07:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb45daa69d287b394eca1619b3fadff7c0215c71'/>
<id>urn:sha1:fb45daa69d287b394eca1619b3fadff7c0215c71</id>
<content type='text'>
Kexec/Kexec-jump require code size in control page is less than
PAGE_SIZE/2.  This patch add link-time checking for this.

ASSERT() of ld link script is used as the link-time checking mechanism.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kexec jump</title>
<updated>2008-07-26T19:00:04Z</updated>
<author>
<name>Huang Ying</name>
</author>
<published>2008-07-26T02:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ab83521378268044a448113c6aa9a9e245f4d2f'/>
<id>urn:sha1:3ab83521378268044a448113c6aa9a9e245f4d2f</id>
<content type='text'>
This patch provides an enhancement to kexec/kdump.  It implements the
following features:

- Backup/restore memory used by the original kernel before/after
  kexec.

- Save/restore CPU state before/after kexec.

The features of this patch can be used as a general method to call program in
physical mode (paging turning off).  This can be used to call BIOS code under
Linux.

kexec-tools needs to be patched to support kexec jump. The patches and
the precompiled kexec can be download from the following URL:

       source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2
       patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2
       binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10

Usage example of calling some physical mode code and return:

1. Compile and install patched kernel with following options selected:

CONFIG_X86_32=y
CONFIG_KEXEC=y
CONFIG_PM=y
CONFIG_KEXEC_JUMP=y

2. Build patched kexec-tool or download the pre-built one.

3. Build some physical mode executable named such as "phy_mode"

4. Boot kernel compiled in step 1.

5. Load physical mode executable with /sbin/kexec. The shell command
   line can be as follow:

   /sbin/kexec --load-preserve-context --args-none phy_mode

6. Call physical mode executable with following shell command line:

   /sbin/kexec -e

Implementation point:

To support jumping without reserving memory.  One shadow backup page (source
page) is allocated for each page used by kexeced code image (destination
page).  When do kexec_load, the image of kexeced code is loaded into source
pages, and before executing, the destination pages and the source pages are
swapped, so the contents of destination pages are backupped.  Before jumping
to the kexeced code image and after jumping back to the original kernel, the
destination pages and the source pages are swapped too.

C ABI (calling convention) is used as communication protocol between
kernel and called code.

A flag named KEXEC_PRESERVE_CONTEXT for sys_kexec_load is added to
indicate that the loaded kernel image is used for jumping back.

Now, only the i386 architecture is supported.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86: relocate_kernel - use predefined macroses for page attributes</title>
<updated>2008-04-17T15:41:29Z</updated>
<author>
<name>gorcunov@gmail.com</name>
</author>
<published>2008-03-22T21:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=366932deb335f0b84a08463c5c912bd42ac3397a'/>
<id>urn:sha1:366932deb335f0b84a08463c5c912bd42ac3397a</id>
<content type='text'>
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: relocate_kernel - use predefined macroses for processor state</title>
<updated>2008-04-17T15:41:29Z</updated>
<author>
<name>gorcunov@gmail.com</name>
</author>
<published>2008-03-22T21:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd3af53122e616c0ddba44a3da6d1c1877f72d29'/>
<id>urn:sha1:fd3af53122e616c0ddba44a3da6d1c1877f72d29</id>
<content type='text'>
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: relocate_kernel - use PAGE_SIZE instead of numeric constant</title>
<updated>2008-04-17T15:41:29Z</updated>
<author>
<name>gorcunov@gmail.com</name>
</author>
<published>2008-03-22T21:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7bba17bf09e1c5bdbdd6c0ab0c7833baedf4653'/>
<id>urn:sha1:a7bba17bf09e1c5bdbdd6c0ab0c7833baedf4653</id>
<content type='text'>
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: relocate_kernel_32.S - clear register in more elegant way</title>
<updated>2008-04-17T15:41:29Z</updated>
<author>
<name>gorcunov@gmail.com</name>
</author>
<published>2008-03-22T21:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4039ae538030d1c5fc70a9c4e168a758d35b8159'/>
<id>urn:sha1:4039ae538030d1c5fc70a9c4e168a758d35b8159</id>
<content type='text'>
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: relocate_kernel - use predefined PAGE_SIZE instead of own alias</title>
<updated>2008-04-17T15:41:21Z</updated>
<author>
<name>Cyrill Gorcunov</name>
</author>
<published>2008-03-21T20:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=288621e32a7ae3a29c37b45297136c0264e2ff7b'/>
<id>urn:sha1:288621e32a7ae3a29c37b45297136c0264e2ff7b</id>
<content type='text'>
This patch does clean up relocate_kernel_(32|64).S a bit by getting rid
of local PAGE_ALIGNED macro. We should use well-known PAGE_SIZE instead

Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>i386: move kernel</title>
<updated>2007-10-11T09:17:01Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2007-10-11T09:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a163ed8e0552fdcffe405d2ea7134819a81456e'/>
<id>urn:sha1:9a163ed8e0552fdcffe405d2ea7134819a81456e</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
