From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@transmeta.com>, Dave Jones <davej@suse.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.5.12] x86 Boot enhancements, bzImage/zImage code differentiation 3/11
Date: 02 May 2002 08:48:27 -0600 [thread overview]
Message-ID: <m1sn5ay5ac.fsf_-_@frodo.biederman.org> (raw)
In-Reply-To: <m11ycuzk4q.fsf@frodo.biederman.org> <m1wuumy5eo.fsf@frodo.biederman.org>
Please apply
Differentiate the code that is needed in setup.S for zImage and bzImages.
Eric
diff -uNr linux-2.5.12.boot.vmlinuxlds/arch/i386/boot/setup.S linux-2.5.12.boot.spring-cleaning/arch/i386/boot/setup.S
--- linux-2.5.12.boot.vmlinuxlds/arch/i386/boot/setup.S Mon Apr 29 00:17:11 2002
+++ linux-2.5.12.boot.spring-cleaning/arch/i386/boot/setup.S Wed May 1 09:38:54 2002
@@ -166,7 +166,12 @@
# End of setup header #####################################################
start_of_setup:
+#ifndef __BIG_KERNEL__
# Bootlin depends on this being done early
+#NOTE: Bootlin was written before the kernel had hooks for anything
+# used the BIOS calls setup.S made as hooks (ouch!)
+# Bootlin only loaded zImages, so we can drop support for it
+# when we are loading a bzImage.
movw $0x01500, %ax
movb $0x81, %dl
int $0x13
@@ -177,6 +182,7 @@
movb $0x80, %dl
int $0x13
#endif
+#endif /* __BIG_KERNEL__ */
# Set %ds = %cs, we know that SETUPSEG = %cs at this point
movw %cs, %ax # aka SETUPSEG
@@ -226,6 +232,7 @@
# We now have to find the rest of the setup code/data
bad_sig:
+#ifndef __BIG_KERNEL__
movw %cs, %ax # SETUPSEG
subw $DELTA_INITSEG, %ax # INITSEG
movw %ax, %ds
@@ -255,7 +262,7 @@
jne no_sig
jmp good_sig
-
+#endif /* __BIG_KERNEL__ */
no_sig:
lea no_sig_mess, %si
call prtstr
@@ -268,10 +275,8 @@
movw %cs, %ax # aka SETUPSEG
subw $DELTA_INITSEG, %ax # aka INITSEG
movw %ax, %ds
+#ifdef __BIG_KERNEL__
# Check if an old loader tries to load a big-kernel
- testb $LOADED_HIGH, %cs:loadflags # Do we have a big kernel?
- jz loader_ok # No, no danger for old loaders.
-
cmpb $0, %cs:type_of_loader # Do we have a loader that
# can deal with us?
jnz loader_ok # Yes, continue.
@@ -284,6 +289,7 @@
jmp no_sig_loop
loader_panic_mess: .string "Wrong loader, giving up..."
+#endif /* __BIG_KERNEL__ */
loader_ok:
# Get memory size (extended mem, kB)
@@ -561,15 +567,8 @@
movl %cs:code32_start, %eax
movl %eax, %cs:code32
-# Now we move the system to its rightful place ... but we check if we have a
-# big-kernel. In that case we *must* not move it ...
- testb $LOADED_HIGH, %cs:loadflags
- jz do_move0 # .. then we have a normal low
- # loaded zImage
- # .. or else we have a high
- # loaded bzImage
- jmp end_move # ... and we skip moving
-
+#ifndef __BIG_KERNEL__
+# Move the kernel image where it expects to be loaded.
do_move0:
movw $0x100, %ax # start of destination segment
movw %cs, %bp # aka SETUPSEG
@@ -595,6 +594,8 @@
jb do_move
end_move:
+#endif /* !__BIG_KERNEL__ */
+
# then we load the segment descriptors
movw %cs, %ax # aka SETUPSEG
movw %ax, %ds
next prev parent reply other threads:[~2002-05-02 14:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-02 14:42 [PATCH 2.5.12] x86 Boot enhancements, boot params 1/11 Eric W. Biederman
2002-04-27 2:56 ` Pavel Machek
2002-05-06 10:13 ` Eric W. Biederman
2002-05-06 15:19 ` Pavel Machek
2002-05-06 17:55 ` Eric W. Biederman
2002-05-06 20:20 ` Pavel Machek
2002-05-02 14:45 ` [PATCH 2.5.12] x86 Boot enhancements, linker fixes 2/11 Eric W. Biederman
2002-05-02 14:48 ` Eric W. Biederman [this message]
2002-05-02 14:51 ` [PATCH 2.5.12] x86 Boot enhancements, constants 4/11 Eric W. Biederman
2002-05-02 14:55 ` [PATCH 2.5.12] x86 Boot enhancements, heap 5/11 Eric W. Biederman
2002-05-02 15:00 ` [PATCH 2.5.12] x86 Boot enhancements, 32bit entries 6/11 Eric W. Biederman
2002-04-27 4:53 ` Pavel Machek
2002-05-02 15:05 ` [PATCH 2.5.12] x86 Boot enhancements, footprint reduction 7/11 Eric W. Biederman
2002-05-02 15:07 ` [PATCH 2.5.12] x86 Boot enhancements, build beancounting 8/11 Eric W. Biederman
2002-05-02 15:11 ` [PATCH 2.5.12] x86 Boot enhancements, boot protocol 2.04 9/11 Eric W. Biederman
2002-05-02 15:13 ` [PATCH 2.5.12] x86 Boot enhancements, LinuxBIOS support 10/11 Eric W. Biederman
2002-05-02 15:15 ` [PATCH 2.5.12] x86 Boot enhancements, bzElf support 11/11 Eric W. Biederman
2002-05-02 20:45 ` H. Peter Anvin
2002-05-02 20:39 ` [PATCH 2.5.12] x86 Boot enhancements, boot protocol 2.04 9/11 H. Peter Anvin
2002-05-02 20:45 ` H. Peter Anvin
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=m1sn5ay5ac.fsf_-_@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 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.