From patchwork Tue Dec 3 05:28:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1203691 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="VP5anmJq"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47S2Hz6fg5z9sP3 for ; Wed, 4 Dec 2019 00:04:28 +1100 (AEDT) Received: by phobos.denx.de (Postfix, from userid 109) id 418FB817B9; Tue, 3 Dec 2019 14:03:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19513817D4; Tue, 3 Dec 2019 13:16:15 +0100 (CET) Authentication-Results: mail.denx.de; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: mail.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="VP5anmJq"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id C7BE9C21C3F; Tue, 3 Dec 2019 05:29:33 +0000 (UTC) Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by lists.denx.de (Postfix) with ESMTPS id C9C02C21C27 for ; Tue, 3 Dec 2019 05:29:32 +0000 (UTC) Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id xB35T0pB010311; Tue, 3 Dec 2019 14:29:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com xB35T0pB010311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1575350942; bh=+tc0phYVIJdf//t2sRm42yVn4sAE+OwGaOkplkQx4JA=; h=From:To:Cc:Subject:Date:From; b=VP5anmJqlZxoO+Y6Q8GYYZKuQtFcQ9IkzaU/xJlZ1cmKS6MwYpxZ3oJEbYFAoyZ0N FOyf7rLbF0d0b1fo3UvI5t3C3ocmg4eRqYCYZCIPWR/cUMmoBNtcJqMUT+d4BYD6LL yGYAnB7CcokXUSBtJ+tdfyqlZpY/BpOP+GCS+xwHyTR7xYnagwAG/7IOaaOOZ6fx3A Al/uAf7Ey6Rc6YeDxYXrPdwlK7mctWkPyrtMsa25OYQVvVuI3xhhuoLKqTDCou8jZp qXM9cc4nJkBWtX5iCW24zMxIxxFRTxYREYJrHg4r0imHWIRAmVDUymktd53MmuU/Ep oEbX7cNwTQ16Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 3 Dec 2019 14:28:58 +0900 Message-Id: <20191203052858.23798-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Tue, 03 Dec 2019 13:09:06 +0100 Subject: [U-Boot] [PATCH] x86: simplify ljmp to 32-bit code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Roese Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at mail.denx.de X-Virus-Status: Clean You can directly specify the label as the operand for ljmp. This commit saves 4-byte code. Signed-off-by: Masahiro Yamada Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/x86/cpu/start16.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S index bcabd76741ef..7bad9f3e4d87 100644 --- a/arch/x86/cpu/start16.S +++ b/arch/x86/cpu/start16.S @@ -44,10 +44,8 @@ data32 cs lgdt gdt_ptr ff: /* Finally restore BIST and jump to the 32-bit initialization code */ - movw $code32start, %ax - movw %ax, %bp movl %ecx, %eax -data32 cs ljmp *(%bp) +data32 cs ljmp code32start /* 48-bit far pointer */ code32start: