From patchwork Tue Dec 3 05:20:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1203700 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="qB49rNqd"; 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 47S31L1j8Pz9sR7 for ; Wed, 4 Dec 2019 00:36:50 +1100 (AEDT) Received: by phobos.denx.de (Postfix, from userid 109) id E61A081784; Tue, 3 Dec 2019 14:33:26 +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 33A7681794; Tue, 3 Dec 2019 13:15:05 +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="qB49rNqd"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 2AA02C21C3F; Tue, 3 Dec 2019 05:21:32 +0000 (UTC) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by lists.denx.de (Postfix) with ESMTPS id 19652C21C27 for ; Tue, 3 Dec 2019 05:21:30 +0000 (UTC) Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id xB35KpMr022346; Tue, 3 Dec 2019 14:20:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com xB35KpMr022346 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1575350452; bh=RY1N9DUjTuvXV6QzJYK6FZ0+qJpZh7yEdWXVLd5YDZ0=; h=From:To:Cc:Subject:Date:From; b=qB49rNqdAl9yPJmUJkq4Ta82rmMsT3NnqbCnLu3elwUaPzxkV2z9FBw+jxJoFrtCO dwRPDbfPxSE1/nk4vMaL556LsJQUucrtoVWVbATFFCKM5pJApvCmhZ7Lrn6+mrq+Hm 0sFZpMjPuUJd/NKFm49C8IFt4CKXbyXD7DoS59SdBmIqkETxD7Nf5PRDyaYwjU2/iS tBa5JY9/Wf8Z+79p4tLNOiX/4sbTpveg0C4W2++fiovncZBeFAJxv9Ew0Ekt1KfEXu kvPxQ3i+NNLw4suJK4K4oj2vtwi0LsYOS2zu7RBOYoAZa0CTke/oSpKNOmop8CBpiV 6ZagFdIyYxzrg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 3 Dec 2019 14:20:49 +0900 Message-Id: <20191203052049.22959-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: use data32 directive instead of macro for operand-size prefix 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 This file defines 'a32' and 'o32' macros to avoid magic numbers of operand/address-size prefixing. GAS supports 'data32' and 'addr32' for that purpose. Signed-off-by: Masahiro Yamada --- arch/x86/cpu/start16.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S index 474efe4df5f4..bcabd76741ef 100644 --- a/arch/x86/cpu/start16.S +++ b/arch/x86/cpu/start16.S @@ -13,8 +13,6 @@ #include #define BOOT_SEG 0xffff0000 /* linear segment of boot code */ -#define a32 .byte 0x67; -#define o32 .byte 0x66; .section .start16, "ax" .code16 @@ -33,8 +31,8 @@ start16: wbinvd /* load the temporary Global Descriptor Table */ -o32 cs lidt idt_ptr -o32 cs lgdt gdt_ptr +data32 cs lidt idt_ptr +data32 cs lgdt gdt_ptr /* Now, we enter protected mode */ movl %cr0, %eax @@ -49,7 +47,7 @@ ff: movw $code32start, %ax movw %ax, %bp movl %ecx, %eax -o32 cs ljmp *(%bp) +data32 cs ljmp *(%bp) /* 48-bit far pointer */ code32start: