From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:505:610b:b0:1be9:327d:8ee3 with SMTP id tt11csp3161472njc; Tue, 5 Nov 2024 14:59:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXPGehZ2zAyCKQ1pxyWHnBG8l/Vi5CdbMwvSjszKkdljaxF+/YWB841FaFBqXNwFMCLvRDfVnBD5wCerw==@linaro.org X-Google-Smtp-Source: AGHT+IHmWD94EKIiLy88/0FXVkyMqVk1s77+Ld63Q03ksSqi3eqfkIeSlMWhSiAWiA6drguzniMH X-Received: by 2002:a05:6214:5993:b0:6cc:2de2:8bac with SMTP id 6a1803df08f44-6d35c088340mr223600376d6.2.1730847585922; Tue, 05 Nov 2024 14:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730847585; cv=none; d=google.com; s=arc-20240605; b=fYdoeM980Fjdgbu/YwxJCnwHgzPn4rHHvr0L9irJ1WgzHfuIH+4EN2YMit/28YvLr1 5VnysTqke2PAUJp0rMLcFXWA0VFYvKZCWlFCeF2fIk1apyrPDa3kiKhQsjuqWCTQEzBN KPanZfxZep4DKmVNFIgb14KSI/jdCcRQV8seTNoOXnLVDOYKTmnYVOBi4fgrpM77psh8 LeKV7algJ41T9weoNpzZNK7HchQQhmtIVbS1zGIyVpjkV1JQn2YCRbxE04CTErW1HKFT Vjs1Hh9229VvCuxHir7y1H814beH6WwOI416OExW7GsSM+OaJ1Y6BK8vYVBQK3J2fpvq 0xvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aHQu9ZcSXTqfvIlyDPTW67TGxyaJxXaW81oHUVLwj64=; fh=aPu96XOjwiAChLYHCUVyyApu0RFcBqXhk2v7gV3ZLbg=; b=gpIezs9s+wtDHjex5viSeYYtxOYwyYk+P7jce8P2OPi9lOCPtdV3kuH92CIze5h5d5 2evwSMmf76htUBelNRMA5WYu1A+QjXrK/A1gNrm+cR5S112GTeEeUYGKSXT5tsnUd1dH E5vyYzqcz7Kr27C43LyUIv0ZXfFjk3JulXdvgPEdHN7nkVrZ3+7MhLXjolfzbDzafnWv NCAS5ODuCxRX69HB9BHqFuFw8GwTcpRsKnh/2MRvsCgRZf6WmSrBbDkUGkj/VT3iOKHK G9sXcIqkZJ9K3MNqAC6rio4MS1UxznuUtIOlM5Nqu0hIkiySVsasw3HfLHxQfjPuHHXY JRlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lQ1g6nUk; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d3541b2bc2si144279736d6.529.2024.11.05.14.59.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Nov 2024 14:59:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lQ1g6nUk; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8SW6-0002pB-FC; Tue, 05 Nov 2024 17:59:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8SW1-0002oq-Rp; Tue, 05 Nov 2024 17:59:13 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8SW0-0006jd-AB; Tue, 05 Nov 2024 17:59:13 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43169902057so46849925e9.0; Tue, 05 Nov 2024 14:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730847549; x=1731452349; darn=nongnu.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aHQu9ZcSXTqfvIlyDPTW67TGxyaJxXaW81oHUVLwj64=; b=lQ1g6nUk82WhSTYgrHJfTMJXa7VYc7vYwoRUo/ITqKaRueK9t/2pdLg10eOtiDgqNP G7shQSuQebXVgEPEWEkaXJBMEPD6jCZ8m7v3oqCiHLX9y5/uhjmSUjGenLBtg3Ghmtq3 x10Iz8zOnBnl5CN5GqzCyEnCMZuEADR4tdTQTMna2Vj7hrJhO3SP9i4ytCSlFYiSjLzb RUG/oPsqw9kRxF9gLdMefcQcMLX5C6ZmdBjDOIVydDXNco9pEE0DTEud85J5bLA/Z0L3 pKNxN/SNg0inuByG2yW2wKg/ulIXllKtILq19e3k1CkKcAy5wIIC7s4RakK5xNJ1KQJ6 WyMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730847549; x=1731452349; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aHQu9ZcSXTqfvIlyDPTW67TGxyaJxXaW81oHUVLwj64=; b=gQW3UM7RuKlWS71Rr+2e3dXj9LolcYyF4UG/60eUOeaMrM9bBpV/9M5Uz2mRuyMe4Q YKctwl/mRMKc/j8voCUKWd+yvy4pycgR//RdxFy8rR1nfl3JR2rtWHIsPXXQy2lEQLkp uEN0R5ACX55UozsgT59qH207EtYTaAQq+HSNpz5SK4v2BK5zE3pn9rvH6e/u/tdmUBGC uGkRL8LPPV3PlDEdfZNWasDHuxOEhMNmsMKa1+R18RCdLYrftzKcf5iEb0Hu7Z4cvhGM Q4BkS40gLPpJFKOeobqVAnHvIB/bpMzYV4eg/9s9gom+UsaXM/cD3urVQv8kdulCytXf DknQ== X-Forwarded-Encrypted: i=1; AJvYcCUU1ivy5mhgpqP8lQkhxNGnD/pvHKxnlLY06c4pLM6aKn9V3CQqTXXB/KoMq8eL7Ht+WmRC84Rvbg==@nongnu.org X-Gm-Message-State: AOJu0YyV48Dex8MaXIavlTmptknXnxbYfQZZHuGdI4nJn7X0dKbZdl6k TGafcevPTA54sfeRbUibZotB8tYOvM7kz9/bmn++Pj3E/ajWQXgB X-Received: by 2002:a05:600c:3b88:b0:431:5e53:2dc4 with SMTP id 5b1f17b1804b1-431bb976d14mr208072825e9.6.1730847549271; Tue, 05 Nov 2024 14:59:09 -0800 (PST) Received: from gmail.com ([89.101.60.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa6eb332sm1201865e9.40.2024.11.05.14.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 14:59:08 -0800 (PST) Date: Tue, 5 Nov 2024 23:59:08 +0100 From: "Edgar E. Iglesias" To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Cc: qemu-devel@nongnu.org, Anton Johansson , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , Paolo Bonzini , Jason Wang , Richard Henderson Subject: Re: [PATCH 03/19] hw/microblaze/s3adsp1800: Explicit CPU endianness Message-ID: References: <20241105130431.22564-1-philmd@linaro.org> <20241105130431.22564-4-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241105130431.22564-4-philmd@linaro.org> User-Agent: Mutt/2.2.12 (2023-09-09) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=edgar.iglesias@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: YqmvLhSadgQ/ On Tue, Nov 05, 2024 at 02:04:15PM +0100, Philippe Mathieu-Daudé wrote: > By default the machine's CPU endianness is 'big' order > ('little-endian' property set to %false). > > This corresponds to the default when this machine was added; > see commits 6a8b1ae2020 "microblaze: Add petalogix s3a1800dsp > MMU linux ref-design." and 72b675caacf "microblaze: Hook into > the build-system." which added: > > [ "$target_cpu" = "microblaze" ] && target_bigendian=yes > > Later commit 877fdc12b1a ("microblaze: Allow targeting > little-endian mb") added little-endian support, forgetting > to set the CPU endianness to little-endian. Not an issue > since this property was never used, but we will use it soon, > so explicit the endianness to get the expected behavior. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c > index dad46bd7f98..37e9a05a62a 100644 > --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c > +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c > @@ -71,6 +71,8 @@ petalogix_s3adsp1800_init(MachineState *machine) > > cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); > object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort); > + object_property_set_bool(OBJECT(cpu), "little-endian", > + !TARGET_BIG_ENDIAN, &error_abort); > qdev_realize(DEVICE(cpu), NULL, &error_abort); > > /* Attach emulated BRAM through the LMB. */ > -- > 2.45.2 >