From patchwork Tue Dec 3 05:31:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1203672 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="RXblHAo7"; 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 47S1fH4dj5z9sRG for ; Tue, 3 Dec 2019 23:35:19 +1100 (AEDT) Received: by phobos.denx.de (Postfix, from userid 109) id 3247281842; Tue, 3 Dec 2019 13:34:03 +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 EECFC817DA; Tue, 3 Dec 2019 13:16:35 +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="RXblHAo7"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 51D22C21C3F; Tue, 3 Dec 2019 05:32:32 +0000 (UTC) Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by lists.denx.de (Postfix) with ESMTPS id 8FE0AC21C27 for ; Tue, 3 Dec 2019 05:32:31 +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 xB35Vn5p012838; Tue, 3 Dec 2019 14:31:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com xB35Vn5p012838 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1575351110; bh=RY1N9DUjTuvXV6QzJYK6FZ0+qJpZh7yEdWXVLd5YDZ0=; h=From:To:Cc:Subject:Date:From; b=RXblHAo7tATyT2gVpNznmSb109F9WOqmxuDnIfAZ5r897kgSvPX7Se1kb0mBh0HlG 3wV75K0wy7cZcRlfn3nREWPfgWlf+YnC+9kVVwNrYOInULvy0nh8UuxewcB0EjWlO9 13gysQ5N7OT3F/ZJLkRkXHmlg7XTeWduTVsvFkNII78wKsCPnnIDYzLhvyWeNLGiSd Qqx2e67n6no48qyUCdXcHUQ0cicON53na0EIeM4BC1nujuM6l2XE9jmjO3ZEEBBdDj 0IIup+M49/qPiLObvsLiPyUTyg/a3k/fT8/eHaMHjZi5N9Gy/p2u5RJjzKxun1G3f/ B+vE62V4UtDyA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 3 Dec 2019 14:31:44 +0900 Message-Id: <20191203053144.24216-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 Reviewed-by: Bin Meng Tested-by: Bin Meng --- 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: