From: Vivek Goyal <vgoyal@in.ibm.com>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: Reloc Kernel List <fastboot@lists.osdl.org>,
ebiederm@xmission.com, akpm@osdl.org, ak@suse.de, hpa@zytor.com,
magnus.damm@gmail.com, lwang@redhat.com, dzickus@redhat.com,
maneesh@in.ibm.com
Subject: [PATCH 11/11] i386: Extend bzImage protocol for relocatable protected mode kernel
Date: Mon, 23 Oct 2006 15:44:03 -0400 [thread overview]
Message-ID: <20061023194403.GL13263@in.ibm.com> (raw)
In-Reply-To: <20061023192456.GA13263@in.ibm.com>
o Extend bzImage protocol to enable bootloaders to load a completely
relocatable bzImage. Now protected mode component of kernel is also
relocatable and a boot-loader can load the protected mode component
at a differnt physical address than 1MB. (If kernel was built with
CONFIG_RELOCATABLE)
o Kexec can make use of it to load this kernel at a different physical
address to capture kernel crash dumps.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
Documentation/i386/boot.txt | 4 ++++
arch/i386/boot/setup.S | 13 ++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff -puN arch/i386/boot/setup.S~extend-bzImage-protocol-for-relocatable-protected-mode-kernel arch/i386/boot/setup.S
--- linux-2.6.19-rc2-git7-reloc/arch/i386/boot/setup.S~extend-bzImage-protocol-for-relocatable-protected-mode-kernel 2006-10-23 15:09:28.000000000 -0400
+++ linux-2.6.19-rc2-git7-reloc-root/arch/i386/boot/setup.S 2006-10-23 15:09:28.000000000 -0400
@@ -81,7 +81,7 @@ start:
# This is the setup header, and it must start at %cs:2 (old 0x9020:2)
.ascii "HdrS" # header signature
- .word 0x0204 # header version number (>= 0x0105)
+ .word 0x0205 # header version number (>= 0x0105)
# or else old loadlin-1.5 will fail)
realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
start_sys_seg: .word SYSSEG
@@ -160,6 +160,17 @@ ramdisk_max: .long (-__PAGE_OFFSET-(512
# The highest safe address for
# the contents of an initrd
+kernel_alignment: .long CONFIG_PHYSICAL_ALIGN #physical addr alignment
+ #required for protected mode
+ #kernel
+#ifdef CONFIG_RELOCATABLE
+relocatable_kernel: .byte 1
+#else
+relocatable_kernel: .byte 0
+#endif
+pad2: .byte 0
+pad3: .word 0
+
trampoline: call start_of_setup
.align 16
# The offset at this point is 0x240
diff -puN Documentation/i386/boot.txt~extend-bzImage-protocol-for-relocatable-protected-mode-kernel Documentation/i386/boot.txt
--- linux-2.6.19-rc2-git7-reloc/Documentation/i386/boot.txt~extend-bzImage-protocol-for-relocatable-protected-mode-kernel 2006-10-23 15:09:28.000000000 -0400
+++ linux-2.6.19-rc2-git7-reloc-root/Documentation/i386/boot.txt 2006-10-23 15:09:28.000000000 -0400
@@ -35,6 +35,8 @@ Protocol 2.03: (Kernel 2.4.18-pre1) Expl
initrd address available to the bootloader.
Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes.
+Protocol 2.05: (Kernel 2.6.20) Make protected mode kernel relocatable.
+ Introduce relocatable_kernel and kernel_alignment fields.
**** MEMORY LAYOUT
@@ -129,6 +131,8 @@ Offset Proto Name Meaning
0226/2 N/A pad1 Unused
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
022C/4 2.03+ initrd_addr_max Highest legal initrd address
+0230/4 2.04+ kernel_alignment Physical addr alignment required for kernel
+0234/1 2.04+ relocatable_kernel Whether kernel is relocatable or not
(1) For backwards compatibility, if the setup_sects field contains 0, the
real value is 4.
_
next prev parent reply other threads:[~2006-10-23 19:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 19:24 [RFC][PATCH 0/11] i386: Relocatable BzImage (V3) Vivek Goyal
2006-10-23 19:26 ` [PATCH 1/11] i386: Distinguish absolute symbols Vivek Goyal
2006-10-23 19:29 ` [PATCH 2/11] i386: Remove unnecessary ALIGN() in vmlinux.lds.S Vivek Goyal
2006-10-23 19:30 ` [PATCH 3/11] i386: Force data segment to be 4K aligned Vivek Goyal
2006-10-23 19:32 ` [PATCH 4/11] i386: define __pa_symbol() Vivek Goyal
2006-10-23 19:33 ` [PATCH 5/11] i386: Reserve kernel memory starting from _text Vivek Goyal
2006-10-23 19:36 ` [PATCH 6/11] i386: CONFIG_PHYSICAL_START cleanup Vivek Goyal
2006-10-23 19:37 ` [PATCH 7/11] i386: Kallsyms generate relocatable symbols Vivek Goyal
2006-11-06 14:48 ` Haavard Skinnemoen
2006-11-06 16:03 ` Vivek Goyal
2006-11-06 16:13 ` Haavard Skinnemoen
2006-11-06 16:34 ` H. Peter Anvin
2006-10-23 19:39 ` [PATCH 8/11] i386: Relocatable kernel support Vivek Goyal
2006-10-23 19:40 ` [PATCH 9/11] i386: Warn upon absolute relocations being present Vivek Goyal
2006-10-23 19:42 ` [PATCH 10/11] i386: Implement CONFIG_PHYSICAL_ALIGN Vivek Goyal
2006-10-23 19:44 ` Vivek Goyal [this message]
2006-10-24 13:44 ` [RFC][PATCH 0/11] i386: Relocatable BzImage (V3) Andi Kleen
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=20061023194403.GL13263@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=dzickus@redhat.com \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lwang@redhat.com \
--cc=magnus.damm@gmail.com \
--cc=maneesh@in.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome