Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2215198imm; Thu, 27 Sep 2018 09:10:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV634bF854T38YvTz0slFupPZBrtIxqWAx62tptbLKWAW4RNSbdciR7trBYlxQOEGmGGaXrBc X-Received: by 2002:a63:5c5d:: with SMTP id n29-v6mr11119769pgm.253.1538064610692; Thu, 27 Sep 2018 09:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538064610; cv=none; d=google.com; s=arc-20160816; b=FzKqIgTCjQSPofjvBZG/VNEzA3KwdDuCRZrOIsOXrsXDclHx+GPP2hHeXmEyUANuED xXDISmseHR6Bc5Ar0ddM0T0c3TYbeZpB5pmefmeglqm5VNRxCbMR2eExe7Ee/GO5ncQg ZZCBYZsNn67EOQwm7zUmM9nhx6tvUmxwyHI5TiGAHjhGmE0PoSIsyafs5WqqrY0NkZNs MZlIEqWq+VeW9Snmtki9Evcey0GdgGKJMaq9vCM/9PWm6SHWClQSmBMIFIIqh2T3zqKP UheCLYKYYt/2SXFu3OC67/BxiUMEibc6R5rF9A6YvTaMFcLelujpBtdpkqWDBZI/1ywV +Xeg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=E96MNFcFy+7043YMSx0fhWNFynk52K/oUh5k2l6uvEw=; b=OZZDdxuM/I4LK46mQlYKdniDVXnjKRG3qu8myGTJatTYD5N+rgHUR1BLXuvKmwbxza NoWXjWmdID77+A2Yi9mTZpFZ66RAYPgUYL8EAxoV6RQ/jh4kT5Y1ZF6GJFOp0e+oW/mq R0MJyJ92vMAmpq2dVycnFmbnG40EWZ2zmARSoXjrWlBilUDnR4i1FQn2ysZOPMjcX93H QbJ6tGQwWne+vt3WF84plNoppV4u8Fv2VYBIbNSCcVr/4uFFO3J7msJW8uH+YQo8WspK 3O+nCVopKjk3nH/uzUFRtadAcbryYFU/DvL/eJPLFINnDZB6OCm0XI9VYfRZNt8CTVtE AfiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3O3JdOU0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si2309813pgk.371.2018.09.27.09.09.54; Thu, 27 Sep 2018 09:10:10 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3O3JdOU0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728139AbeI0W03 (ORCPT + 99 others); Thu, 27 Sep 2018 18:26:29 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38804 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727334AbeI0W02 (ORCPT ); Thu, 27 Sep 2018 18:26:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E96MNFcFy+7043YMSx0fhWNFynk52K/oUh5k2l6uvEw=; b=3O3JdOU0TAjOSlS4Ko4jyoYiMh As7PSH2RGuB4mzEExi3AFuHiWgbZidOoBpaiKy1WNu1eSQBqjd00hKqrW2eb9zKkPpLn+qug1Oren 7zZ5LKVjX0nuFvUeOoh9zlHawBVw3Ec9BKLJ7O3uYSMrDPOk7BAegy/Ndq2ywTu06jUv1LwhJBiBg PssWOUWBwxLnW7+AbERon8mKjPaIgjBM2anYLiOHxTNaJ744RBOU7paJZe/mSlNKzLzwCgPTGw9Rl wBLHaNy1Elu/TqM/8YxJa26yTGUd2H+s8GfzHUbGOrbEdqM1+A8Apic44pVd2fQZVAUWCRphL6f/y RQd4o5rA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=vortex.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Yon-00086n-CF; Thu, 27 Sep 2018 16:07:29 +0000 Subject: Re: [PATCH] Reduce boot header size with 1 byte To: xyproto@archlinux.org, linux-kernel@vger.kernel.org References: <20180927134117.15371-1-xyproto@archlinux.org> From: Randy Dunlap Message-ID: <52c315b1-e151-d728-9743-47e3189df8c9@infradead.org> Date: Thu, 27 Sep 2018 09:07:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180927134117.15371-1-xyproto@archlinux.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/27/18 6:41 AM, xyproto@archlinux.org wrote: > 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 Hi, You should Cc: the X86 maintainers on this patch. Otherwise it will just be lost in the ether. thanks. > --- > 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 > -- ~Randy