From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCFFFC31E44 for ; Mon, 17 Jun 2019 08:26:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B74AA218A0 for ; Mon, 17 Jun 2019 08:26:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B74AA218A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcmyY-0002OW-R8 for qemu-devel@archiver.kernel.org; Mon, 17 Jun 2019 04:26:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42556) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcmxB-0001qh-Gt for qemu-devel@nongnu.org; Mon, 17 Jun 2019 04:25:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcmx7-0003MP-Pf for qemu-devel@nongnu.org; Mon, 17 Jun 2019 04:25:23 -0400 Received: from 2.mo173.mail-out.ovh.net ([178.33.251.49]:59196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hcmx7-0003IK-6J for qemu-devel@nongnu.org; Mon, 17 Jun 2019 04:25:21 -0400 Received: from player762.ha.ovh.net (unknown [10.109.160.153]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id C0AB1100C53 for ; Mon, 17 Jun 2019 10:25:15 +0200 (CEST) Received: from kaod.org (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player762.ha.ovh.net (Postfix) with ESMTPSA id 40AF26E99357; Mon, 17 Jun 2019 08:25:11 +0000 (UTC) Date: Mon, 17 Jun 2019 10:25:10 +0200 From: Greg Kurz To: Alexey Kardashevskiy Message-ID: <20190617102510.341d71a5@bahia.lan> In-Reply-To: <20190612020723.96802-1-aik@ozlabs.ru> References: <20190612020723.96802-1-aik@ozlabs.ru> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 5650610159675742709 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeijedgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.33.251.49 Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu REPOST] spapr/rtas: Force big endian compile for rtas X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 12 Jun 2019 12:07:23 +1000 Alexey Kardashevskiy wrote: > At the moment the rtas's Makefile uses generic QEMU rules which means > that when QEMU is compiled on a little endian system, the spapr-rtas.bin > is compiled as little endian too which is incorrect as it is always > executed in big endian mode. > I'm naively thinking that executing code compiled as little endian in big endian mode would result in an exception... Can you explain how/why this ever worked ? > This enforces -mbig by defining %.o:%.S rule as spapr-rtas.bin is > a standalone guest binary which should not depend on QEMU flags anyway. > > Signed-off-by: Alexey Kardashevskiy > --- > pc-bios/spapr-rtas/Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/pc-bios/spapr-rtas/Makefile b/pc-bios/spapr-rtas/Makefile > index f26dd428b79e..4b9bb1230658 100644 > --- a/pc-bios/spapr-rtas/Makefile > +++ b/pc-bios/spapr-rtas/Makefile > @@ -14,8 +14,11 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/spapr-rtas) > > build-all: spapr-rtas.bin > > +%.o: %.S > + $(call quiet-command,$(CCAS) -mbig -c -o $@ $<,"CCAS","$(TARGET_DIR)$@") > + > %.img: %.o > - $(call quiet-command,$(CC) -nostdlib -o $@ $<,"Building","$(TARGET_DIR)$@") > + $(call quiet-command,$(CC) -nostdlib -mbig -o $@ $<,"Building","$(TARGET_DIR)$@") > > %.bin: %.img > $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"Building","$(TARGET_DIR)$@")