From: xyproto@archlinux.org
To: linux-kernel@vger.kernel.org
Cc: "Alexander F. Rødseth" <xyproto@archlinux.org>
Subject: [PATCH] Reduce boot header size with 1 byte
Date: Thu, 27 Sep 2018 15:41:17 +0200 [thread overview]
Message-ID: <20180927134117.15371-1-xyproto@archlinux.org> (raw)
From: Alexander F. Rødseth <xyproto@archlinux.org>
Only ah needs to be set to 0 before calling interrupt 0x16 for waiting
for a keypress.
This patch changes the line that uses xor so that it only zeroes "ah" instead of "ax".
This saves a byte.
Signed-off-by: Alexander F. Rødseth <xyproto@archlinux.org>
---
| 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 850b8762e889..905cb96f43d4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -71,14 +71,15 @@ msg_loop:
jmp msg_loop
bs_die:
- # Allow the user to press a key, then reboot
- xorw %ax, %ax
+ # Allow the user to press a key
+ xorb %ah, %ah
int $0x16
+
+ # Boostrap by reading sector 1, head 0, track 0 from drive
int $0x19
- # int 0x19 should never return. In case it does anyway,
- # invoke the BIOS reset code...
- ljmp $0xf000,$0xfff0
+ # If boostrap somehow did not work, invoke the BIOS reset code
+ ljmp $0xf000, $0xfff0
#ifdef CONFIG_EFI_STUB
.org 0x3c
--
2.19.0
next reply other threads:[~2018-09-27 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 13:41 xyproto [this message]
2018-09-27 16:07 ` Randy Dunlap
2018-09-27 18:22 ` Brian Gerst
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=20180927134117.15371-1-xyproto@archlinux.org \
--to=xyproto@archlinux.org \
--cc=linux-kernel@vger.kernel.org \
/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