Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2049543imm; Thu, 27 Sep 2018 06:42:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61BHvdp8pnk4GOdVPhLwzlVs5xfRn9PX7zPD3J89HbRVIPisd8Pb4jyy/97ktNlVRqwq/PV X-Received: by 2002:a63:dd0a:: with SMTP id t10-v6mr1172506pgg.379.1538055738569; Thu, 27 Sep 2018 06:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538055738; cv=none; d=google.com; s=arc-20160816; b=OxcFbXOA0LYP10iGUDZul4SbJSGB5ymkJrN8IAylEtzHTAK0fT/CxaG+CPQ0wP59F9 5m9MB7IcTuDCfipwY8gaEvYA0GK0GacSME876SnB45L4aPgLsaZqGN7hHscowgIyhi0I zVLnTPNOfDT9mU8AYuhyZUTVi6cLyNE8t2eIXxbmeyiGzo3UKwBcSUTRMvI4UikeHjPr Ej+T+8hvtA7hygXFy1M4klQvGUROicL2HM+DjKVmuTa1OD523HvBpK1uCANYEwPrppmM LvgWJK6UA1S1K0fZ+jhVI222Hw9ATdo431bXYv7q3hFchp0TZppg9YHgp8e11yQZsu20 0yhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ntkNKkKJwIDMWVsmG3RqQ/G/MNKrYxExVLVwnPO9oNY=; b=tWZUBeLbJUSdFlEHVU95sr+GEf5fyCFOIiM41WmFvpai6dNg7aTbiRA6EkopKachWb vLsKxxRfeygfLj2uebwtvWbxfsKZwo8x7np6UWNC/Fo/Mb4qoZX2D6NCcJ4D+rJ80vIc o/3CWdTPsCO22zCbQQc3dq39iVjQDqQtsvbrQgQWKntP25IVVuP4yniedAm/FWHQYxtl yAFKCH/YL9eoJ24eWM3FQf74bR2D0pSNJ9DbfyOT5uKqrElAT0CPQyKu76Xa1wYvJjk4 Dzs4HMTNn09UfWEJ3iP1spcmZL0isckmvDV+MmKWwPAkoq2hPivDC6cdwoO9fq274MG8 gLLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=archlinux.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si1980084pgb.18.2018.09.27.06.41.44; Thu, 27 Sep 2018 06:42:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=archlinux.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727335AbeI0T7p (ORCPT + 99 others); Thu, 27 Sep 2018 15:59:45 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45577 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbeI0T7p (ORCPT ); Thu, 27 Sep 2018 15:59:45 -0400 Received: by mail-lj1-f193.google.com with SMTP id x16-v6so2413051ljd.12 for ; Thu, 27 Sep 2018 06:41:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ntkNKkKJwIDMWVsmG3RqQ/G/MNKrYxExVLVwnPO9oNY=; b=OfJr6xS/5Htnv8BKmEPXCIZ/MMF/hv+e8TzvrMzHOfD6AxygEjzGlD3GLHXCie4vr3 inzzNXXRSj/pgh2zje/mXdHoBcggohuKOSOm+MXh1jonnKbmKyF2P7ak6c+/zHk/UZmY ddRvL+1El3TXl6nMpSJmy2MDGvvmDctdNV/CQhmk54uHg3p77hHZ+YNjz+0FzDwG/5TH FCLzSRUN/k+1ArKwoNWY2cDuiofx+nr4qilVFk4ppBHNRl4tN1UwXmFXDO/BlxesimjR Y5sKT+jzB1tf1tw/B+TBbLtDKfb/gjCtGUPIvGSAFJ7pXE8pRwPRuUZ3sDDsmj0gLWU7 Zu9A== X-Gm-Message-State: ABuFfohDtRgnFXxEo6BiWC9A53KQ9bZhJ4wJJO7ri19ncvvT/ELQnfOO VpaMK9I8payVbQmNuv1fxO77g8RV X-Received: by 2002:a2e:5b17:: with SMTP id p23-v6mr7804162ljb.91.1538055684448; Thu, 27 Sep 2018 06:41:24 -0700 (PDT) Received: from afr_pc.appeartv.lan ([195.159.183.42]) by smtp.gmail.com with ESMTPSA id x139-v6sm451878lfd.53.2018.09.27.06.41.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 06:41:23 -0700 (PDT) From: xyproto@archlinux.org To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Subject: [PATCH] Reduce boot header size with 1 byte Date: Thu, 27 Sep 2018 15:41:17 +0200 Message-Id: <20180927134117.15371-1-xyproto@archlinux.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander F. Rødseth 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 --- arch/x86/boot/header.S | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --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