From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1730811925052196.67854610942288; Tue, 5 Nov 2024 05:05:25 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 096BF11F1; Tue, 5 Nov 2024 08:05:24 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 065D51122; Tue, 5 Nov 2024 08:05:05 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 197A7E96; Tue, 5 Nov 2024 08:05:00 -0500 (EST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 16DC511A7 for ; Tue, 5 Nov 2024 08:04:50 -0500 (EST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-37d50fad249so3971345f8f.1 for ; Tue, 05 Nov 2024 05:04:49 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c116ac7dsm16160227f8f.105.2024.11.05.05.04.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:04:48 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811889; x=1731416689; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eawrki87ewjyeRlcMvMb8c/enE33+lgoSeTt32ZNL40=; b=pJj5XaioaLeNibJZ1OGKqO9APRfttG9tAoJeJLWL3T/xTsJcagZokY8RV7xYoiN7m2 4SYK9eI9NuPZYk5L8GuXhe9BXXHWkx0kXvUOnmXrCA0Sty5cpctQ86+cGXdU80MmXKst VFMP/qXidh2qjOHJkjncUzbA5toA20o2iHmShsfkQPqFRaQX/kn7vjal7mz/n6Qs5T+6 FNrFWgGzwWCi2JHhF5rgcd8hyE+VbIqoTNK1GZzI/Fu609UA1UEv3t+/CAqPVaEoXb57 y58uipiIS5GWKI2i8V6wEBYV5yleadQtuAGj9Z6P3krs0aPr2fPgT3MDg4cyzDpCmGlB dAcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811889; x=1731416689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eawrki87ewjyeRlcMvMb8c/enE33+lgoSeTt32ZNL40=; b=CMlBoqLsLOuX7jpyABOnoGHAIuh+58+BLwBvojJBl7NBX6Qbl4TSrU/xo3TGxjM0t5 Nrcnn7YLkXjkQj7hT8A25p41WyNr6sgE/h2BMtz1EnGdfteFdq5nRs8sNUNDt7wQoWav +268va4TmnlTH7JdEm8Yqnh3uNZq1LCpyTfJwHfpKyZ/padEEVWMOGnGIAQ1JwRdwZEY oIkD3IxwZ2TJeBjmBGagjckn8nttuB8SbkVm9yR813QO9l7tFlBVWhtdL5Su1+kXApCP 8+MiLqNwQ6bdBQTIty2Ffwkqc3sQMiPJg/vbCPdh2TjoOBkIdJJ0IDwBCCktYfy3AdYe hzxw== X-Forwarded-Encrypted: i=1; AJvYcCU5V3cu95c5gVkTRmkKcSvNWKQmYSwjzY8dek34NkVZXcccODMzA3YcFfMNSp95TYeNMmxxmg==@lists.libvirt.org X-Gm-Message-State: AOJu0YzklELesVM7ni6QauLmNKUjpdHoSzeSFC5ZEZipgz6dSjKUKNKq KSJZIzW5Vy/TM1k42EWeV6dKUo2d2rXzjh7YP91CEe+UxXjrBFPpDAouHMOon1I= X-Google-Smtp-Source: AGHT+IFA89KjLx4zmk5aKeXaQtH/0tB7DdO7ewLtxTyKzDyQukZG30AEKFNGGTm3yWZIfO852UxOdw== X-Received: by 2002:a05:6000:1868:b0:381:d014:9be0 with SMTP id ffacd0b85a97d-381d0149ed0mr8845872f8f.17.1730811888759; Tue, 05 Nov 2024 05:04:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Subject: [PATCH 01/19] target/microblaze: Rename CPU endianness property as 'little-endian' Date: Tue, 5 Nov 2024 14:04:13 +0100 Message-ID: <20241105130431.22564-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QW44EO6SN6VQ2LQ2HUZWFZLZNTVNNDJD X-Message-ID-Hash: QW44EO6SN6VQ2LQ2HUZWFZLZNTVNNDJD X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1730811925570116600 Content-Type: text/plain; charset="utf-8" Rename the 'endian' property as 'little-endian' because the 'ENDI' bit is set when the endianness is in little order, and unset in big order. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- target/microblaze/cpu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index b4183c5267d..df808ac323e 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -90,7 +90,7 @@ petalogix_ml605_init(MachineState *machine) object_property_set_int(OBJECT(cpu), "use-fpu", 1, &error_abort); object_property_set_bool(OBJECT(cpu), "dcache-writeback", true, &error_abort); - object_property_set_bool(OBJECT(cpu), "endianness", true, &error_abort= ); + object_property_set_bool(OBJECT(cpu), "little-endian", true, &error_ab= ort); qdev_realize(DEVICE(cpu), NULL, &error_abort); =20 /* Attach emulated BRAM through the LMB. */ diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c index 1bfc9641d29..43608c2dca4 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -90,7 +90,7 @@ static void xlnx_zynqmp_pmu_soc_realize(DeviceState *dev,= Error **errp) object_property_set_bool(OBJECT(&s->cpu), "use-pcmp-instr", true, &error_abort); object_property_set_bool(OBJECT(&s->cpu), "use-mmu", false, &error_abo= rt); - object_property_set_bool(OBJECT(&s->cpu), "endianness", true, + object_property_set_bool(OBJECT(&s->cpu), "little-endian", true, &error_abort); object_property_set_str(OBJECT(&s->cpu), "version", "8.40.b", &error_abort); diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 135947ee800..e9f98806274 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -368,7 +368,7 @@ static Property mb_properties[] =3D { DEFINE_PROP_UINT8("use-non-secure", MicroBlazeCPU, cfg.use_non_secure,= 0), DEFINE_PROP_BOOL("dcache-writeback", MicroBlazeCPU, cfg.dcache_writeba= ck, false), - DEFINE_PROP_BOOL("endianness", MicroBlazeCPU, cfg.endi, false), + DEFINE_PROP_BOOL("little-endian", MicroBlazeCPU, cfg.endi, false), /* Enables bus exceptions on failed data accesses (load/stores). */ DEFINE_PROP_BOOL("dopb-bus-exception", MicroBlazeCPU, cfg.dopb_bus_exception, false), --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1730811950879684.2860519588352; Tue, 5 Nov 2024 05:05:50 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id BA6421172; Tue, 5 Nov 2024 08:05:49 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0BFE912E6; Tue, 5 Nov 2024 08:05:11 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 2192D1185; Tue, 5 Nov 2024 08:05:06 -0500 (EST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9818D11CB for ; Tue, 5 Nov 2024 08:04:58 -0500 (EST) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4315eac969aso33815725e9.1 for ; Tue, 05 Nov 2024 05:04:58 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c10e725dsm16182932f8f.56.2024.11.05.05.04.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:04:56 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811897; x=1731416697; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LoKTIjDa3J8vyZOU7wutUHSCN+Guhec+PI65dsartdI=; b=b6XLALDBC98dL9fKc0jodxjv3e9HmfRAZ/B4AIxSMd1QwWh+YxIYrgAvkaNsiZXuIh FacC3IueBtISb5jKKTKIlG3wo4nX9O0KWmTBhAijB3eeoOHgo0Lupvw5dWEsmrUoMHXS qyaS2d2zWlN62lbHsKP8ljGPWGjDoBaIpsLInyPRhfRcJ/3agisiWnAKOjmn/3HHWYhD b1xBUMtqZfGQ7vZtn7YdugAQUcDQpQkMlhR3KUavrHMUHshKV6trzN2Ho/U/JuYYYBI3 8ok7hVTf4b+prKcS4pulhbj15NUiWBgGN0JC2zfjS6C636lNybnRlXwncy/UXTg1LZH/ X9eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811897; x=1731416697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LoKTIjDa3J8vyZOU7wutUHSCN+Guhec+PI65dsartdI=; b=GLJJnOk7ibxZBSKF54Fk74YQdrweH53cWejXtXLvyebCSzjlKDvH7xOs1Hk5UKmerf DBX9Xp3b5rdMHq7WYA0M9t6/LQTrChzvSnmsZLZC++EfbKViOe6gNN+EZHWjsy4lFlo+ 5SXzid2+fPsR4Sod4ZuMhiX14TCh543wWBqhiLJ0ZkhvizqrF6goc89R9dLVBfUk9LA/ U7+bH8WXEjl9556mGdoVbBS/kqhRnXBFjuYKJGIDWTvNQ+QzG3N4kL3j6zaAWsoi9l6C j18qlRPeRzG4KoVkB/rFzENykISUaDOK0j1Ql0548VRQnAFEjr8DBSkA2dD9YDh91U9m WngQ== X-Forwarded-Encrypted: i=1; AJvYcCVa9w4sZY2Urd2izv502zcZMhZ7+zvcdHuCRvFyGkQ4e450BOAtP+aHsj07NuZBa7o9S9KjqQ==@lists.libvirt.org X-Gm-Message-State: AOJu0YxGuI6jAkqwHAx62pBGdvGQLa1MfKtjqhYYnsT9JXhCquyLs3SN iFSMzN5uX9vltV2OLvByTqxTSr4b9BSt9t+PD/dzykOkm8itg/w4vztf7VVe07c= X-Google-Smtp-Source: AGHT+IHMG75IgJ3W30Wrb+bRlTmmQ3nd9qq/2bzCUnlhNdzY1PB5IZLXC2a/K1d9WiUKPd3QEhHqcw== X-Received: by 2002:a05:600c:460f:b0:426:5e32:4857 with SMTP id 5b1f17b1804b1-4327d840fdemr148920265e9.0.1730811897231; Tue, 05 Nov 2024 05:04:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Subject: [PATCH 02/19] hw/microblaze: Deprecate big-endian petalogix-ml605 & xlnx-zynqmp-pmu Date: Tue, 5 Nov 2024 14:04:14 +0100 Message-ID: <20241105130431.22564-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3YRXZOSXCX4HWLDUPPIWRSYITWDFJF7R X-Message-ID-Hash: 3YRXZOSXCX4HWLDUPPIWRSYITWDFJF7R X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1730811951863116600 Content-Type: text/plain; charset="utf-8" The petalogix-ml605 machine was explicitly added as little-endian only machine in commit 00914b7d970 ("microblaze: Add PetaLogix ml605 MMU little-endian ref design"). Mark the big-endian version as deprecated. When the xlnx-zynqmp-pmu machine's CPU was added in commit 133d23b3ad1 ("xlnx-zynqmp-pmu: Add the CPU and memory"), its 'endianness' property was set to %true, thus wired in little endianness. Both machine are included in the big-endian system binary, while their CPU is working in little-endian. Unlikely to work as it. Deprecate now as broken config so we can remove soon. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- docs/about/deprecated.rst | 6 ++++++ configs/devices/microblaze-softmmu/default.mak | 2 -- configs/devices/microblazeel-softmmu/default.mak | 5 ++++- hw/microblaze/petalogix_ml605_mmu.c | 7 ++++++- hw/microblaze/xlnx-zynqmp-pmu.c | 8 ++++++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ff404d44f85..e1c8829e1a4 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -279,6 +279,12 @@ BMC and a witherspoon like OpenPOWER system. It was us= ed for bring up of the AST2600 SoC in labs. It can be easily replaced by the ``rainier-bmc`` machine which is a real product. =20 +Big-Endian variants of MicroBlaze ``petalogix-ml605`` and ``xlnx-zynqmp-pm= u`` machines (since 9.2) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '''''''''''''''''''''''' + +Both ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` were added for little end= ian +CPUs. Big endian support is not tested. + Backend options --------------- =20 diff --git a/configs/devices/microblaze-softmmu/default.mak b/configs/devic= es/microblaze-softmmu/default.mak index 583e3959bb7..78941064655 100644 --- a/configs/devices/microblaze-softmmu/default.mak +++ b/configs/devices/microblaze-softmmu/default.mak @@ -2,5 +2,3 @@ =20 # Boards are selected by default, uncomment to keep out of the build. # CONFIG_PETALOGIX_S3ADSP1800=3Dn -# CONFIG_PETALOGIX_ML605=3Dn -# CONFIG_XLNX_ZYNQMP_PMU=3Dn diff --git a/configs/devices/microblazeel-softmmu/default.mak b/configs/dev= ices/microblazeel-softmmu/default.mak index 29f7f13816c..4c1086435bf 100644 --- a/configs/devices/microblazeel-softmmu/default.mak +++ b/configs/devices/microblazeel-softmmu/default.mak @@ -1,3 +1,6 @@ # Default configuration for microblazeel-softmmu =20 -include ../microblaze-softmmu/default.mak +# Boards are selected by default, uncomment to keep out of the build. +# CONFIG_PETALOGIX_S3ADSP1800=3Dn +# CONFIG_PETALOGIX_ML605=3Dn +# CONFIG_XLNX_ZYNQMP_PMU=3Dn diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index df808ac323e..61e47d83988 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -213,7 +213,12 @@ petalogix_ml605_init(MachineState *machine) =20 static void petalogix_ml605_machine_init(MachineClass *mc) { - mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 little endian= "; +#if TARGET_BIG_ENDIAN + mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (big endian)"; + mc->deprecation_reason =3D "big endian support is not tested"; +#else + mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (little endia= n)"; +#endif mc->init =3D petalogix_ml605_init; } =20 diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c index 43608c2dca4..567aad47bfc 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -181,9 +181,13 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) =20 static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc) { - mc->desc =3D "Xilinx ZynqMP PMU machine"; +#if TARGET_BIG_ENDIAN + mc->desc =3D "Xilinx ZynqMP PMU machine (big endian)"; + mc->deprecation_reason =3D "big endian support is not tested"; +#else + mc->desc =3D "Xilinx ZynqMP PMU machine (little endian)"; +#endif mc->init =3D xlnx_zynqmp_pmu_init; } =20 DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init) - --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17308119790741002.5828357831507; Tue, 5 Nov 2024 05:06:19 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0F08711D1; Tue, 5 Nov 2024 08:06:18 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 4488311EE; Tue, 5 Nov 2024 08:05:34 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 96A3D11AA; Tue, 5 Nov 2024 08:05:29 -0500 (EST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3E4C311AA for ; Tue, 5 Nov 2024 08:05:08 -0500 (EST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-431616c23b5so33968105e9.0 for ; Tue, 05 Nov 2024 05:05:08 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e687sm16288378f8f.84.2024.11.05.05.05.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:06 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811907; x=1731416707; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iDSm43fdf8jLcDNMuepzzXNnXrf+Cwp4vQFZzGV7m7k=; b=bZaDyfYXpgFg29DRAgpb45+tcir5exOGuMTVBknuCDtqgsQc3xTKy1c9qVDGremIhH 24PpY+RE6iC99L3t9eS5LrPqI2fsF8cTtCz1mZ1IaDXvW7tEcwFBBJJeEXxLnLZCbgKH lExVRNNNiw0bYQC8RzAEqwWxIqv70FrwxegD2tiFXpIdBwF0tKbeOPOqG62X8wCZrbrE NCIGGE1ydQgrkEsEig37nVkJ5Bj4mk5iMsTWgDTr5XA/hLIr3+u6nvovjRUQk9nTilWL u1nHlVeEkoK2je+dmgSy/Dz9z0Iasb3rB/WdzuZGQT2cNRByieGNx8NbcuKt0FIFYksf HPQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811907; x=1731416707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iDSm43fdf8jLcDNMuepzzXNnXrf+Cwp4vQFZzGV7m7k=; b=UGTCRQO4dzkTo3G9B3G+MkxUjR7tZ1mm6RoUUY9Vgnkun7OlqgpsvrEUhW9CB8Tfzv cu1gA+i6WxNpQcPmouPEH8zRgxEnjmFIP+ouwv2Xb/zRNepfwVyyiYZLJR3+OdKRVGYc 3kf7nd+sYauQf87ajplf+zBtm3YueRf2ftVaAMXDUZQpGM0FLUoA9jP87H0rC3j16nEP jSALnkLyH5QvDVZBijQcs8g/MDWyMipbStX01AJedsfxMm6T2aqQpZZUoI3iRpEiChcN R49tVpEHjUjmsPN9djB1Q0mgu8QjE8KOGpPEUzwapmirLALComJRsc9i7r3Ou/EO6aQe +qhA== X-Forwarded-Encrypted: i=1; AJvYcCXpI4R+RSU13KzN7T6HmQfNztq6I6JbgVTbiu2l9XtMVn+EhBwdjnyBVGDGGLPLsKXbdSnppw==@lists.libvirt.org X-Gm-Message-State: AOJu0Ywq49wbSHo+Uk7rRDTuP6DGvpjkyfOvhaykNmmxtzMfIzbLvRLa WhOniXUMiXPcql0bSNp7Hsi6XcXJWAtgGOxEmmzovJBmxC0Zlusx0NBloZI+CYs= X-Google-Smtp-Source: AGHT+IEiZ+IDWk575+v438vJMAhRsdBUOU98Ww81Y2HZMPtHqqxfIeUMIqmHOKdx/eypJcQFCkf2Gg== X-Received: by 2002:a05:600c:4ed4:b0:428:b4a:7001 with SMTP id 5b1f17b1804b1-43288c32703mr112566525e9.15.1730811906941; Tue, 05 Nov 2024 05:05:06 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Subject: [PATCH 03/19] hw/microblaze/s3adsp1800: Explicit CPU endianness Date: Tue, 5 Nov 2024 14:04:15 +0100 Message-ID: <20241105130431.22564-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WN7OEXI6QUOI3EJF4AGM6NDTWRP6DCSK X-Message-ID-Hash: WN7OEXI6QUOI3EJF4AGM6NDTWRP6DCSK X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1730811979956116600 Content-Type: text/plain; charset="utf-8" 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" =3D "microblaze" ] && target_bigendian=3Dyes 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Richard Henderson --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_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) =20 cpu =3D 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); =20 /* Attach emulated BRAM through the LMB. */ --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730811947; cv=none; d=zohomail.com; s=zohoarc; b=bK+oMcTL1+XWrksZFgh1jJKDBUIN2n4BxC332qdM9Xbsscmk/5Bmt4+LyvQuylONtrUi5livAChCxqGGQ8Ov0fo2LN9kdPiRNTpH2V1DmaCez5N1UuhtZPlwLBFRpYUXcJOSqPGFRcZUEp85/titGM1RVzxnOD32kdFKIq1FCuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730811947; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FTPJzGm6ARvkieLOl7sA7FxSacHjsJ3U8wjcC2hw8sY=; b=COO9RiMMsOHDzwxeTIDAT+vs6DtQOH4VKLdhGLZLiVNjF2NXdP2hD+SFIk3AGD4HSGg2kMIoJ0/M6QXxLOm6WyCan+vxRRFgRyZmnXaHts2X9TEQUs4N8u6+rSMgQjmhsigHdIVwysrbK7VWoggDODZ0zhqTZ/wvdAWG24LCl0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730811947665157.52173107736508; Tue, 5 Nov 2024 05:05:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JFO-0001gI-5n; Tue, 05 Nov 2024 08:05:26 -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 1t8JFJ-0001Ty-OS for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:23 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JFG-0002Py-St for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:21 -0500 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-539e3f35268so6650307e87.3 for ; Tue, 05 Nov 2024 05:05:18 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd9a99d3sm219571055e9.38.2024.11.05.05.05.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811917; x=1731416717; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FTPJzGm6ARvkieLOl7sA7FxSacHjsJ3U8wjcC2hw8sY=; b=OI0zRu5WPJ+u6FeIyijnr+v/CDA4CFJwjh7vSvWlDuK0d/WRj8kko2onvYiigSBlNM o7CrbtRKbhg26TWr9G+6o8IMXk8bCpnDWeFiCrNUpDbVsd+vTwVRpdFOveVUmNZS35kY 5d5/Bddr+G9epkTjJaAimElTSLfL0NkBNOXhuYMMC43QcPk4xQsDPwW/4l7o6upBCQ8r uP87a+HvhWRAU3Cp/SPgwLAuem+QJJ5Vl5B/PUi0Nyg/HxG7tdoCNVKbcKGr4aFykP82 kzLBHtTMPzunjyHEIGdLSJOUWfIxx4/rXFrdLxzOo+WgV5u1rE9DLWucEfYunEnczBHb 349Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811917; x=1731416717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FTPJzGm6ARvkieLOl7sA7FxSacHjsJ3U8wjcC2hw8sY=; b=giP8hxGuRjbRaS/zBturzRvbup33IvQQzOJf4wONFFCfU7ebS4BOMMnzH8TurYez4G nz8A5Ao0hMk3lWLbu5OH0CotrFeqs/fZan87m8WTnJHIHmKqIX6NdHk9zrWRC6NAGiij zEAz8CM4Uw+ILGwAmvQGa8HmaD8Ik6aYPwwb27DgU5GSMtJaJFKtZs/+wvu5OHfa21vZ 0web53PW4EF1hva/A1cjZD4oPiRjaJfO5IS7kHFldpkVO/fk26OLXpP+F0+99F1HBble kGc2IPYcRvV1viqxTsF3hSJ4s+MqsPfH9TVf4fERizioI7DIWmgiC6ioD7l7o5E0L4tT tZ3g== X-Gm-Message-State: AOJu0YyucCHWLRhDdh2JZKMDyZXJGzLo4ARXzuApDHJx5QFM95OoHNVO kXiWmhrsWkoU/ITT3WlFbbs8kJgk6ZojEIU3thHbVsCD7IqTsK/6TwnuWvZOLMmz887e+xvakjG u1rA= X-Google-Smtp-Source: AGHT+IF7o39CgQKyGJLAo1oyV+Q6nf9i7OBUM39LTm0TqHPkAVkhIraSCMoY5C+TcT5eFyJcdM6IIQ== X-Received: by 2002:a05:6512:1288:b0:535:68ab:7fdd with SMTP id 2adb3069b0e04-53d65df270cmr7648972e87.19.1730811916609; Tue, 05 Nov 2024 05:05:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/19] hw/microblaze/s3adsp1800: Rename unimplemented MMIO region as xps_gpio Date: Tue, 5 Nov 2024 14:04:16 +0100 Message-ID: <20241105130431.22564-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=philmd@linaro.org; helo=mail-lf1-x136.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730811949741116600 The machine datasheet mentions the GPIO device as 'xps_gpio'. Rename it accordingly to easily find its documentation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 37e9a05a62a..581b0411e29 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -124,7 +124,7 @@ petalogix_s3adsp1800_init(MachineState *machine) sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, ETHLITE_BASEADDR); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[ETHLITE_IRQ]); =20 - create_unimplemented_device("gpio", GPIO_BASEADDR, 0x10000); + create_unimplemented_device("xps_gpio", GPIO_BASEADDR, 0x10000); =20 microblaze_load_kernel(cpu, ddr_base, ram_size, machine->initrd_filename, --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730811947; cv=none; d=zohomail.com; s=zohoarc; b=CPiw0aLKvtt5l2G62pAW25rBNnJZ0R/gwZscSS7LOjco1+20OpMFCSlDklAzeZd3zqv5FFZ4sEuY3/39krrV3HK6TphJxuBZJu8pqIT1OPNcMy2K1vgBymRr+GJIl6pwerHDXx2C76tfj16bgmS9xo5qSY7+zgtCo1hVl5+++7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730811947; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mc9pl0ol0oGGc5F+E40Idu3stjpto+GEuMxBJrUIFDk=; b=g0ViJHfOriskAsp3+giQCYgWuoT9bLDYLLdov4AdlrxvOKqP/5nrFJBqtvqcvL9dMjZsRf+/ixRnO4dQBHybIUNw+0mPyfyvnRgYM41H0TB3bUah5LSHnhslkUemUsT6k+BmphMmctXp5uZNgRc3vZqIGkrjdpbvwX0PtttaeV4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730811947660583.1344352884204; Tue, 5 Nov 2024 05:05:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JFT-0001rL-LJ; Tue, 05 Nov 2024 08:05:31 -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 1t8JFS-0001r3-Mj for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:30 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JFQ-0002So-P6 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:30 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4314c452180so39888015e9.0 for ; Tue, 05 Nov 2024 05:05:28 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c116abdasm16358789f8f.97.2024.11.05.05.05.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811927; x=1731416727; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mc9pl0ol0oGGc5F+E40Idu3stjpto+GEuMxBJrUIFDk=; b=ZXUPKuH2nZ3Ilyz61KkXvGPVau33Hs/yuV5kA85T4MUP/n6OpohbGtypeHVoFJl+O/ qCmEoqqd5s0Rr3nuXxP2EmlnFBN2QM9O/Pasjd5u4yVyyRfJEjoiXdy8LQPvNSttF58/ 9JKwHnVmmrpaztslo4n1wrm2IkimVc7h+Cr9y7fEIZ14vc3dEO25Kohlqs8y+Yub6MZR 7v1HzENrFq6PWfVU2M9mh54TXkIcMoO0M18HhgBhjInaw3F4Ctl2JfcWL4JuU/MNjGXH UK1bJZXFo+e641BOKtuyi2z1mtPw5uiNHBAriuwRvfnT3GMmydCfHAWb0YsL1AJ4yvNs ZUbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811927; x=1731416727; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mc9pl0ol0oGGc5F+E40Idu3stjpto+GEuMxBJrUIFDk=; b=XWnBGsjmncUDy33it+wP8crR+FAqeu9zoKTQq4/NRHpHdp6KfvvrVkv9DOm1hqn/EJ M+Hid4hJdNwpZJjfeIDhw1bDrhZ5gw/cSAUVB+qrnEC/8qXlldW/7+itCHufDNGFeKyI L7sN6d8c+fndsNnJ7bufaj2KJiB+3trWDgNOJcS+clHyiFAZemoOsCd8iYtRbzhZqGhX KKfLobRff+m8aj5v/bFr/wL6p1/hEo6N6Jfk6yfoCWFu4cXB6ptriqRJN/odg4c2e+08 kAtPDjGaJOVbpcSwRmTelXk8LbXQsp/WPA15ZWVXCWRk8vC0phqn/quW22ILrnY0BTHM owvw== X-Gm-Message-State: AOJu0Yw1SvaaNABwz7NqHcxTwOx1lcG/bI/BRdMYG0/ADmLFlW9mbSfQ LPz/cGfggNr3SfV9xLlmGl6oQ/7zBnUoKz/TDdy8PxZnzn1qPwAn00/f3PmuRyQUtD5YuuVB4Zr 107o= X-Google-Smtp-Source: AGHT+IHO8U7AnOVOfv2Mr4B7V88lWGyxQAwuSZEeQ/VLr26Z9hTPfi3lg9yrqIHVNioOnCAPkLPO6Q== X-Received: by 2002:a05:6000:1a8e:b0:37d:2d6f:3284 with SMTP id ffacd0b85a97d-381c145bd78mr14773058f8f.9.1730811926954; Tue, 05 Nov 2024 05:05:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/19] hw/microblaze/s3adsp1800: Declare machine type using DEFINE_TYPES macro Date: Tue, 5 Nov 2024 14:04:17 +0100 Message-ID: <20241105130431.22564-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730811949789116600 Replace DEFINE_MACHINE() by DEFINE_TYPES(), converting the class_init() handler. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 581b0411e29..6c0f5c6c651 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -55,6 +55,9 @@ #define ETHLITE_IRQ 1 #define UARTLITE_IRQ 3 =20 +#define TYPE_PETALOGIX_S3ADSP1800_MACHINE \ + MACHINE_TYPE_NAME("petalogix-s3adsp1800") + static void petalogix_s3adsp1800_init(MachineState *machine) { @@ -132,11 +135,21 @@ petalogix_s3adsp1800_init(MachineState *machine) NULL); } =20 -static void petalogix_s3adsp1800_machine_init(MachineClass *mc) +static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void = *data) { + MachineClass *mc =3D MACHINE_CLASS(oc); + mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800"; mc->init =3D petalogix_s3adsp1800_init; mc->is_default =3D true; } =20 -DEFINE_MACHINE("petalogix-s3adsp1800", petalogix_s3adsp1800_machine_init) +static const TypeInfo petalogix_s3adsp1800_machine_types[] =3D { + { + .name =3D TYPE_PETALOGIX_S3ADSP1800_MACHINE, + .parent =3D TYPE_MACHINE, + .class_init =3D petalogix_s3adsp1800_machine_class_init, + }, +}; + +DEFINE_TYPES(petalogix_s3adsp1800_machine_types) --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730811977; cv=none; d=zohomail.com; s=zohoarc; b=dfiTJOC5RdgBmXybGRDWNm860wbJzkMpsvzGv4PC9jG/A8vne83GZNrNJ3gTsqc6uYHJWoZnC3HaxHwXAl8yCrux33A1JGu/OTQc5qjG1jhD9HjEpnkUdbhVMYkQ5DxWp/0aUg/YYlUiwIG5xFQpuleBn42CIbYlSQAHtC3TL1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730811977; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qAZ8YzntwrQh/mqW41UtJKIzn7e3ZbFGPYghnfpczwc=; b=hfq30tTE5LlPvfVnsPgevNMVzmGvu0YYcKNTo6DjXA503cyNqWN5rQVdNkm2BWwZJK6inVOB7eFTVIrgklRGnWeYqOOYDV3mbdV3TQqLPnf3lnDo1DyWPQHYenTrNvuGbtHKRHmR7rygA9ukh/2riOy+Evjr4t7pI5Tgnna7wDY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730811977577210.3976198532588; Tue, 5 Nov 2024 05:06:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JFf-0002Kd-Bc; Tue, 05 Nov 2024 08:05:43 -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 1t8JFc-0002Go-AZ for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:40 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JFa-0002Vc-NR for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:40 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-539e5c15fd3so5282848e87.3 for ; Tue, 05 Nov 2024 05:05:38 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd8e848csm222180125e9.3.2024.11.05.05.05.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811937; x=1731416737; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qAZ8YzntwrQh/mqW41UtJKIzn7e3ZbFGPYghnfpczwc=; b=e3/WIxrZmVbUjv7muhynuJUt9uheb1R5hxiRw53dJTuxYDvNuM5yc/apqsTqJ8uLlw V1NfO9zkQY6J15j4X7Xhdjfn9ezJ7vz6sleW7dSAk4igWd085sD3fg7lCHgDyi8X1Dy4 H1pUMwNcGa9B88AR6vBZKLaEoQKaSuyBD1Xxn6DaQ+yGxHdAcSL2ywX++7adcpqKM/mK HVnQ2w6zKL64UKNknbYB65PBMR2v2IlEuOLkirM5X+fHHBY11p++wkswXaTa82d//E1b gI+ZWXZt3Y6GcmNA7vzQOPAlqsWQ46hVLjLQa2TPBYBl1iN5ugNoyTJsS9wuvTl40lf3 dYXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811937; x=1731416737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qAZ8YzntwrQh/mqW41UtJKIzn7e3ZbFGPYghnfpczwc=; b=G8ZAZCxP6y2akV5AgutY5nkXQ0blLVNVdHzLiNEytB+AIeh5J7AqOTQfeJb3yDpWvh B4sYWkUjzkflTMpWnTeZfULihcqa7TlHV7J/wjdF5UWfG29FRMVuFI9hhT+qoJ0FaFz1 4BEBBXU+aLLVzb6cAaIKOcIMTPUndh7Xy2bvcwdM+ZMb/GKYKs5UWuV/snXlqMEJQ6A3 EdnPLmSjxA0HMH1pAU7vIMdzOtcwYsQ+8KPZm1yr2ZKWbMBkdvR7mM0tx0Mqo2Tt0yG1 S2IKZnWNE3LpuEIH0vzdc7aFZllTDUBDce8e9ogJdjZosLK65LeAbjdfT2unymfBUFDK 1IoQ== X-Gm-Message-State: AOJu0YywvUwndLxL4axGH7irtdF1AiwuiBlvSz3c2IFbqspkywpnWbfj glrR+l+SZCGEbqJ1FMNV6oBKqjGoEI1e0JlboYWARJVnAHqCcU0ouqrpAyXi4LtKF5ESqiK6yFB SUQw= X-Google-Smtp-Source: AGHT+IFlV6iijvNoZg6eJKoOYnS/KaIw6uMQMysAPmvPv1rKCzVbG+2oPzYa5o4BiaDO5X+KwVqftg== X-Received: by 2002:a05:6512:33d3:b0:539:e7b9:df03 with SMTP id 2adb3069b0e04-53b348c3954mr18508026e87.1.1730811936350; Tue, 05 Nov 2024 05:05:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 06/19] hw/microblaze: Fix MemoryRegionOps coding style Date: Tue, 5 Nov 2024 14:04:18 +0100 Message-ID: <20241105130431.22564-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730811977960116600 Fix few MemoryRegionOps style before adding new fields in the following commits. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Richard Henderson --- hw/char/xilinx_uartlite.c | 4 ++-- hw/intc/xilinx_intc.c | 4 ++-- hw/net/xilinx_ethlite.c | 4 ++-- hw/timer/xilinx_timer.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index f325084f8b9..a69ad769cc4 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -172,8 +172,8 @@ static const MemoryRegionOps uart_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, .valid =3D { .min_access_size =3D 1, - .max_access_size =3D 4 - } + .max_access_size =3D 4, + }, }; =20 static Property xilinx_uartlite_properties[] =3D { diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 6e5012e66eb..2b8246f6206 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -146,8 +146,8 @@ static const MemoryRegionOps pic_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, .valid =3D { .min_access_size =3D 4, - .max_access_size =3D 4 - } + .max_access_size =3D 4, + }, }; =20 static void irq_handler(void *opaque, int irq, int level) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index bd812908085..11eb53c4d60 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -172,8 +172,8 @@ static const MemoryRegionOps eth_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, .valid =3D { .min_access_size =3D 4, - .max_access_size =3D 4 - } + .max_access_size =3D 4, + }, }; =20 static bool eth_can_rx(NetClientState *nc) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 32a9df69e0b..0822345779c 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -195,8 +195,8 @@ static const MemoryRegionOps timer_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, .valid =3D { .min_access_size =3D 4, - .max_access_size =3D 4 - } + .max_access_size =3D 4, + }, }; =20 static void timer_hit(void *opaque) --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730811974; cv=none; d=zohomail.com; s=zohoarc; b=cQNaNyXYjIWC97bySginekE9wtYzRwC6xbNsFeF59+V4ZRvy1vpZSnRcvI7sFqsKaFR421V3A7N1JBzEwA48TR6+FwjiBZqdlUGq2c7K7/j4ylW1GKQMQvB0sBhCGGEtEisNqzgu7tfM9DE4TBhs4VSLvkZW36AkCWX+XRC9h34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730811974; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UmQHqWTaQOMkWHXP0Jn/QpgcUfCH1B37UiHSpX6N2KA=; b=QEsviDoCFAlOh0PnXgZEdqt9Iok1ltQMFT7x/2W4tpuYD92iVfwqJGo61L/Hb3GDnFmKA5u0rFZv0No40B5sKerBAm4ScjrYwPYp6YIgCNiVzOJXQuLZTyjdjyC7DCvBnnh9a/6/g1WLty+Vt3QBwkrNm8DcL9aplv4S26bvOBI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730811974105368.2634809627584; Tue, 5 Nov 2024 05:06:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JFp-0002u1-TQ; Tue, 05 Nov 2024 08:05:53 -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 1t8JFo-0002mJ-0i for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:52 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JFm-0002X5-Ad for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:05:51 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-539ee1acb86so5437842e87.0 for ; Tue, 05 Nov 2024 05:05:49 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e528sm16313895f8f.78.2024.11.05.05.05.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811948; x=1731416748; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UmQHqWTaQOMkWHXP0Jn/QpgcUfCH1B37UiHSpX6N2KA=; b=s5HPSlAwC2nA+to5RFYRJHwjdxqCcpkRZTt+rMvMVhefAgAA6uPMsU/1ILGUOCMtUL Sk4japgXgFTaW4BRSox/gTdrBSrXrn0iM3pFSrkrYlUjMLqk6VBjfFr2cX3ChPGLCDNk Uu2mUHdtrZvQhmshMSqJLQO9GMDHXwHbIdTR/EI9kQiN8x6bL+xHF7w5GuyQvvaOjAMw 9Llwloovy8KhI7Fu8Ub71BH5Z/nmNllEZFjKvlliuLRePn0HwqrvKLLwup2Ck3FvlMhx 2W8/o6fVYisL6Olt0uz0GYBxPmvmi4hR8aTaJV0YhTp6FURjybGWvW//u9Vi20Advcyq A54Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811948; x=1731416748; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UmQHqWTaQOMkWHXP0Jn/QpgcUfCH1B37UiHSpX6N2KA=; b=W+CI1cfOBAyJXx5aw2ol/3jsyBlMcv6lh1RTKsT5IM9WG1OfMTQCfR5lT+szdQtHtY ykwKPhmxmUvQbNT++qRoqK5wacDaLGrTQWcmQKzb+cDKI90V0F6cydg52zijRHYnP9lN nKCfo24NanGSrz8iON8xmPGrlLXyUuXzr692RYL5MZPE59Z3D+9bQiHD4OMtZ+3NLq+b xR4NpfhaznWZRW63yHcA3nbQrybpzY7IvgcxdJLzlrnxGIOCqbkUiImXt3uH6gBEKpAF q2BnfU9MZhzjwi/4n2Cz4DQB1qpfb68/7tOdw/hLAHXrGs5GaCECQagpYDVdpiMMAas6 5izA== X-Gm-Message-State: AOJu0YyWsSJtuFrPyD7Qh5Nm22iPLNQmHpWgSBqUswmgQqT5PRR6PnSO XSgYSj5kbKSR+pObMMOoLSgMYw6olC14evhmoluKjsOXJM/3KJ0ExreD9AJoBsQBkLR4in7+EyS Lov4= X-Google-Smtp-Source: AGHT+IF9LFFphDUgWLEt7s3C/xmfz8xwqCoBamUp4pLN6Hxf/UouJKv/9GK36kiEoganAkopqGhI5g== X-Received: by 2002:a05:6512:10d1:b0:539:f10b:ff93 with SMTP id 2adb3069b0e04-53d65df7cb4mr6726958e87.27.1730811948119; Tue, 05 Nov 2024 05:05:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/19] hw/microblaze: Restrict MemoryRegionOps are implemented as 32-bit Date: Tue, 5 Nov 2024 14:04:19 +0100 Message-ID: <20241105130431.22564-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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, 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-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730811975926116600 All these MemoryRegionOps read() and write() handlers are implemented expecting 32-bit accesses. Clarify that setting .impl.min/max_access_size fields. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson --- hw/char/xilinx_uartlite.c | 4 ++++ hw/intc/xilinx_intc.c | 4 ++++ hw/net/xilinx_ethlite.c | 4 ++++ hw/timer/xilinx_timer.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index a69ad769cc4..892efe81fee 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -170,6 +170,10 @@ static const MemoryRegionOps uart_ops =3D { .read =3D uart_read, .write =3D uart_write, .endianness =3D DEVICE_NATIVE_ENDIAN, + .impl =3D { + .min_access_size =3D 4, + .max_access_size =3D 4, + }, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 4, diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 2b8246f6206..1762b34564e 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -144,6 +144,10 @@ static const MemoryRegionOps pic_ops =3D { .read =3D pic_read, .write =3D pic_write, .endianness =3D DEVICE_NATIVE_ENDIAN, + .impl =3D { + .min_access_size =3D 4, + .max_access_size =3D 4, + }, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 11eb53c4d60..ede7c172748 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -170,6 +170,10 @@ static const MemoryRegionOps eth_ops =3D { .read =3D eth_read, .write =3D eth_write, .endianness =3D DEVICE_NATIVE_ENDIAN, + .impl =3D { + .min_access_size =3D 4, + .max_access_size =3D 4, + }, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 0822345779c..28ac95edea1 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -193,6 +193,10 @@ static const MemoryRegionOps timer_ops =3D { .read =3D timer_read, .write =3D timer_write, .endianness =3D DEVICE_NATIVE_ENDIAN, + .impl =3D { + .min_access_size =3D 4, + .max_access_size =3D 4, + }, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812036; cv=none; d=zohomail.com; s=zohoarc; b=D4WtcZ92ZqzZNQQTjm1G5IfIj3UQ+OSUNoxZzM+i1/yStoxyaKs1/stia083WntGmUbNtx3jKxwWFxw2zRLiQ8lj7aCrGqfalXDqyqN3tF8qChinH0Q59P/ZrUJ4Tx5nNov45NUley1mPneLSrsOtCNbKL0Sq9PWkZZIGNNNmm8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812036; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=owZyMcyuMkQxG2xNbQN7m9vwX8uFO4GAfwfRH2jZDis=; b=Ykj621BgqM70JRwYyrBpcB+oE355mHRR05jHkvWUpvpXcQSulH94FqCS19PO8UIwQf/blHYK300xhIxwVKKWakpa0jFPV86ka7LUA4Zv+xgdCJz5HO/4ChchloI6uglwFixoLFYi22GUS84hixInC380ape+ypryyUGSs+qLS6M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812036015972.7800099381337; Tue, 5 Nov 2024 05:07:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JFz-0003Qs-Gp; Tue, 05 Nov 2024 08:06:03 -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 1t8JFx-0003Mc-LT for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:01 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JFv-0002YQ-Tb for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:01 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43155afca99so39755345e9.1 for ; Tue, 05 Nov 2024 05:05:59 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd8e853esm223671995e9.8.2024.11.05.05.05.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811958; x=1731416758; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=owZyMcyuMkQxG2xNbQN7m9vwX8uFO4GAfwfRH2jZDis=; b=tTxcnEmWdAewOUh5wvOKpkIMlfoSnSJv3+6oidwpJLIygkp9qeMQJ2zwtWOF2nrRRh gdNpSKUdM+EveBZHpaJlnSrlIMn0eE5p4Z1sgo44VGZuaQYL/K/NeX0gC8uBjAUOM+Uk thuaxsGGP0L/TkMAUsHrimZc6UBpLDc9WmYI8HX2C3Nk0FMMaxEDHjLfuJC5YpLTGvei hNFKtJ8x93QUs9puGcGSWl9g1BnRjcFzvX46LIVwyB3GXJ8UuDx0rYNIjlvtg17B9zbt Xa3cb2ei2gHzN6qk1fRkAliNINGvFhWtSTlGoo5+vBIGcledLcI7ArUIK03KceaecVK3 /rlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811958; x=1731416758; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=owZyMcyuMkQxG2xNbQN7m9vwX8uFO4GAfwfRH2jZDis=; b=cBA3tyzB2NIocZhIaiq6agohc+uMi6nCcVqXFGcNLrx+TRntH7iJC0P2ohduATBZyb oujnQCt6HLAqtASqdYiBRyeHJo7x5N/8a8FZnTlA7IqdmnMqnuN03Bd8f4yWdt5f2cl+ sjWtX55cS/ph5/BASrI/LPWTiSbE5E72vQ0iBPOvd+tJwsjOho+A8n6iDY8sU1Y+oQxX JG9uGC2pMCCNUQveLqp5NP3EnTblWBmagRqFERxLSMMsV5YOu+S5Q9uSysnkZxRrxBsf Kue0OWWQ+KoMjDEMMATVCYCpmUF6zFPl+9yJG34ve3KNcUmrTcAIpnuFPFec5BrDHqSW 4Gnw== X-Gm-Message-State: AOJu0YwqkZHcsFXzNCBViAPi5fGnLsheK/Aw69W7eDXvfVpto+yMNdWm XcRhlHO07lBBYUmzxo9/fnEii0zla7lCGzpfoWfny2SmzjzIopU673AwB1Uodw9mg6GwJ3zYZoZ Ujxc= X-Google-Smtp-Source: AGHT+IFDsyI/h2Z9thZvULAcUPo5quUd3qcyvFOAaWGsITkd9/JwC0tT1aea1ulv+PoZJu95BU7vrw== X-Received: by 2002:a05:600c:35c5:b0:431:9340:77e0 with SMTP id 5b1f17b1804b1-4327dab3f6cmr161052765e9.9.1730811957278; Tue, 05 Nov 2024 05:05:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 08/19] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel() Date: Tue, 5 Nov 2024 14:04:20 +0100 Message-ID: <20241105130431.22564-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812038161116600 Pass vCPU endianness as argument so we can load kernels with different endianness (different from the qemu-system-binary builtin one). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- hw/microblaze/boot.h | 4 ++-- hw/microblaze/boot.c | 8 ++++---- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/microblaze/boot.h b/hw/microblaze/boot.h index 5a8c2f79750..d179a551a69 100644 --- a/hw/microblaze/boot.h +++ b/hw/microblaze/boot.h @@ -2,8 +2,8 @@ #define MICROBLAZE_BOOT_H =20 =20 -void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, - uint32_t ramsize, +void microblaze_load_kernel(MicroBlazeCPU *cpu, bool is_little_endian, + hwaddr ddr_base, uint32_t ramsize, const char *initrd_filename, const char *dtb_filename, void (*machine_cpu_reset)(MicroBlazeCPU *)); diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index ed61e483ee8..3675489fa5b 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -114,8 +114,8 @@ static uint64_t translate_kernel_address(void *opaque, = uint64_t addr) return addr - 0x30000000LL; } =20 -void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, - uint32_t ramsize, +void microblaze_load_kernel(MicroBlazeCPU *cpu, bool is_little_endian, + hwaddr ddr_base, uint32_t ramsize, const char *initrd_filename, const char *dtb_filename, void (*machine_cpu_reset)(MicroBlazeCPU *)) @@ -144,13 +144,13 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwadd= r ddr_base, /* Boots a kernel elf binary. */ kernel_size =3D load_elf(kernel_filename, NULL, NULL, NULL, &entry, NULL, &high, NULL, - TARGET_BIG_ENDIAN, EM_MICROBLAZE, 0, 0); + !is_little_endian, EM_MICROBLAZE, 0, 0); base32 =3D entry; if (base32 =3D=3D 0xc0000000) { kernel_size =3D load_elf(kernel_filename, NULL, translate_kernel_address, NULL, &entry, NULL, NULL, NULL, - TARGET_BIG_ENDIAN, EM_MICROBLAZE, 0, 0); + !is_little_endian, EM_MICROBLAZE, 0, 0); } /* Always boot into physical ram. */ boot_info.bootstrap_pc =3D (uint32_t)entry; diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index 61e47d83988..d2b2109065d 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -204,7 +204,7 @@ petalogix_ml605_init(MachineState *machine) cpu->cfg.pvr_regs[5] =3D 0xc56be000; cpu->cfg.pvr_regs[10] =3D 0x0e000000; /* virtex 6 */ =20 - microblaze_load_kernel(cpu, MEMORY_BASEADDR, ram_size, + microblaze_load_kernel(cpu, true, MEMORY_BASEADDR, ram_size, machine->initrd_filename, BINARY_DEVICE_TREE_FILE, NULL); diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 6c0f5c6c651..8110be83715 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -129,7 +129,7 @@ petalogix_s3adsp1800_init(MachineState *machine) =20 create_unimplemented_device("xps_gpio", GPIO_BASEADDR, 0x10000); =20 - microblaze_load_kernel(cpu, ddr_base, ram_size, + microblaze_load_kernel(cpu, !TARGET_BIG_ENDIAN, ddr_base, ram_size, machine->initrd_filename, BINARY_DEVICE_TREE_FILE, NULL); diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c index 567aad47bfc..bdbf7328bf4 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -172,7 +172,7 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) qdev_realize(DEVICE(pmu), NULL, &error_fatal); =20 /* Load the kernel */ - microblaze_load_kernel(&pmu->cpu, XLNX_ZYNQMP_PMU_RAM_ADDR, + microblaze_load_kernel(&pmu->cpu, true, XLNX_ZYNQMP_PMU_RAM_ADDR, machine->ram_size, machine->initrd_filename, machine->dtb, --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1730812110849605.6859207643448; Tue, 5 Nov 2024 05:08:30 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id C5642139D; Tue, 5 Nov 2024 08:08:29 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A9D46139A; Tue, 5 Nov 2024 08:06:24 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 90C0C1248; Tue, 5 Nov 2024 08:06:20 -0500 (EST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 12F76EA1 for ; Tue, 5 Nov 2024 08:06:07 -0500 (EST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-37d3ecad390so4093084f8f.1 for ; Tue, 05 Nov 2024 05:06:07 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c10b7bb7sm16338383f8f.3.2024.11.05.05.06.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:05 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811966; x=1731416766; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kz42cmMFB8jc7GreGUWRF6XY9EJ0BnYu9J8zOkqLmVs=; b=edOgNyIe/x/6HZlHwU7zR114+bWDe+Ta+8bhqgIIKFJMuFah9jsdIVnFk1GNIOH2oy nHCfRYLfDa7+Jz8dftWNVYFHherBJksHL5FoajADFm+l7DqsU4UlE+hVzFbOm+tLFbX7 N4MLf/N3D2fMuJdLiEGbPl/zTGH8L6d5r4D6ftr0QxSR2K2HMurDC4GQv/PKgXXhOlIm lJs/MCeThzrIbxmd5yM0XC310rIBy9ximMcN0gYNJb7tVeXAsgCiXCVOCdV8y4tjJssT 2cou/XfNARgjPSb4p2J4P/6ix9OtMvaJ2XJsS3rM2gRx6oEkKii4MoCr2gAev/5ogHwU KG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811966; x=1731416766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kz42cmMFB8jc7GreGUWRF6XY9EJ0BnYu9J8zOkqLmVs=; b=Azc3v3PWzQVt3wEOud3jMoWNBgF8uVlJTvuD47nKygrFNHoibOe5oar+/XrlDNbMZG fYt+YZuTFBDipxwo8wQ/F+VFqZl6cIbo0rlngI9CjK145kAVEh6Pb3TmwV7jApnvbPjs ALxUpVuHFUHOtNUOL6j5cZzx3xGmqW5xRIygDWgsmAESkWVrQ1NmpIIdnePkID4Apz2f RLAuBM90vR6OM5FDG721CbjGX7JP+dLIBLb3mcHgssGwh1fPIwHwbxnQOhwtoTOLrhwz ZZd2h49CQSqFnhyiERZSlYrXKW4JBEn49MQefLw8YwM9f5MtgmFZG6y3ud4K7qEM/TJI cqog== X-Forwarded-Encrypted: i=1; AJvYcCXcj7PtUyGrPomSUUTvcDqa3xB7BI/XQPDV1Q6RhTvtRMtJYcHCBIf308k3Rt26XqvldpsZlQ==@lists.libvirt.org X-Gm-Message-State: AOJu0YxK8x5LLGPy04seW/QcSUn1QPXSPcOy6d+Oey+u3UVjkczqhMMl W4xZYRLQw5K7EGK/0KIr+Mo9AitPOJ5c2yOhAYnzFZru3aXGO+iU2nqj7TpliY4= X-Google-Smtp-Source: AGHT+IFjPpt59jc3PMzqGL8qlZqC8i1HTvCBB/T0746z2N49HMz0D8zAb0mnuCzU/XPxcbxuerh6kA== X-Received: by 2002:a05:6000:718:b0:37c:f561:1130 with SMTP id ffacd0b85a97d-381c149f129mr15229256f8f.18.1730811965862; Tue, 05 Nov 2024 05:06:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Subject: [PATCH 09/19] hw/intc/xilinx_intc: Only expect big-endian accesses Date: Tue, 5 Nov 2024 14:04:21 +0100 Message-ID: <20241105130431.22564-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: PIEWB2RCXZDFO27PIJBCEEE3OXSGSZIE X-Message-ID-Hash: PIEWB2RCXZDFO27PIJBCEEE3OXSGSZIE X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1730812111107116600 Content-Type: text/plain; charset="utf-8" Per the datasheet (reference added in file header, p.9) 'Programming Model' -> 'Register Data Types and Organization': "The XPS INTC registers are read as big-endian data" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alistair Francis Reviewed-by: Anton Johansson --- hw/intc/xilinx_intc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 1762b34564e..71f743a1f14 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -3,6 +3,9 @@ * * Copyright (c) 2009 Edgar E. Iglesias. * + * https://docs.amd.com/v/u/en-US/xps_intc + * DS572: LogiCORE IP XPS Interrupt Controller (v2.01a) + * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal * in the Software without restriction, including without limitation the r= ights @@ -143,12 +146,20 @@ static void pic_write(void *opaque, hwaddr addr, static const MemoryRegionOps pic_ops =3D { .read =3D pic_read, .write =3D pic_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + /* The XPS INTC registers are read as big-endian data. */ + .endianness =3D DEVICE_BIG_ENDIAN, .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, .valid =3D { + /* + * All XPS INTC registers are accessed through the PLB interface. + * The base address for these registers is provided by the + * configuration parameter, C_BASEADDR. Each register is 32 bits + * although some bits may be unused and is accessed on a 4-byte + * boundary offset from the base address. + */ .min_access_size =3D 4, .max_access_size =3D 4, }, --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730811993; cv=none; d=zohomail.com; s=zohoarc; b=eL1me+GikTxU1AgLMleQaoEITHg1qn5O67dyS4nv4RvR1hyIB4xzl5AF2phlz3U/6Wp6FaxRwUUy0OFT3ZtV2wQFYp5Eb82ez5Z0g8J+eZOiyq3vX0UdYcuQRkiO8bqDl/Mg2Y/6h81e2GVx2zdyE1rOwSNydOEwT2XJ+l6TEIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730811993; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ofAZFiczDEOu9xgPawLxt48aoodtpVY0sVqQebDNA74=; b=AX0qxtaMBNu6fc1/ANmvLl5diZIoADO/NLEONbTWiN/faEiiBztht9Pl6O0U9zPRES1OKfL6gyDReD0Thsv+P88FJCOU58/tx3gIj0THBWkZXmj1DoI7NVAHxYsqHobtDv2C9cppxtNNVL5CBXWaRYfQY9VTsvsYUVBjdZSQmqs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730811993722234.65946706558293; Tue, 5 Nov 2024 05:06:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JGL-0004kR-Dx; Tue, 05 Nov 2024 08:06:25 -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 1t8JGJ-0004cl-7M for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:23 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JGF-0002aX-5l for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:22 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43161c0068bso46044925e9.1 for ; Tue, 05 Nov 2024 05:06:18 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5e7c8bsm193062535e9.26.2024.11.05.05.06.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811977; x=1731416777; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ofAZFiczDEOu9xgPawLxt48aoodtpVY0sVqQebDNA74=; b=XeSG3ZtHsbO0F6EF9/mYVy/zZKIgeVbGJxqwyoPI5lmtzGuoVr3mAIg8c4LoiLyoHS +p8v4B9IXZJEGRxJq/YbjxFGpWQcE/wSHhc1iwvtFjLuGyg7h9lEMOrcSplz55+Zi6YR 5b6XpZUYsGoCGGArYTS5WWRGrR1VFQmDnlUnlB1Oc+0izmis8HiLmUElsmsConxNxa5j u7lbaeAPtdVHEcZCgH4IKYBxCEQMcGBT+FZlP1PhEDyc/YJFgCZ+KFzRnRhYGqe500zN vupHAQCNvokEnfHWo47KtrZSDcv+Del6bnJITDvQDlCuFUD0G/7r7y2PeDt4AaF6nXvT QjNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811977; x=1731416777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ofAZFiczDEOu9xgPawLxt48aoodtpVY0sVqQebDNA74=; b=pOVL6ezWUqRcEhNnBfpKj5QvCoivQ/GN0cDt7gO7JZukNhBiFs3wsYynxcx520xWeQ e3qGu1T3+10ELmVDW6tiCTu1oC3CXGzIqGxqNtSP01J84NWUS6Q77x7jHDY+WKDMSveM l4ttcYOf9JIhxtExdnEKTPaRchKzW/r7Eon8TkEfryU2q4kRjyaQZ8Rgj0oBShPVGiiV /PmzajqYEWnrTk0bUIaNPPHGhso7NMWKAd8XjHBN+yO36ThfpffCmFqyVWKlwz/dkq9x okM0/jg6wMiRN6IbNzQ0mDpVi8kEW/4Yk4LD6heqBKT58XgTi8JZp6coU4dUxP45w415 VUYw== X-Gm-Message-State: AOJu0Yx0DN98CAs9Ax5OO3HownTg6TGZ6Wth7lI4AEUjAJ3UcKyWqxy0 i4uD1dKzhp+jrKXeTYhyefFgAJTu47xvO288EPzgOEU5dZkhiUeBf6IRyJoYwlmrFLja4R5Nakf kHAQ= X-Google-Smtp-Source: AGHT+IF4uaP7NjPFamDGcyl+la1qxC3RIS3oU3RixeHv2G3YBtTX3BECiMTyJmfanvavmJ/rByZK8w== X-Received: by 2002:a05:600c:1c15:b0:42f:8fcd:486c with SMTP id 5b1f17b1804b1-43283297a37mr131910645e9.33.1730811977415; Tue, 05 Nov 2024 05:06:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/19] hw/timer/xilinx_timer: Only expect big-endian accesses Date: Tue, 5 Nov 2024 14:04:22 +0100 Message-ID: <20241105130431.22564-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730811994029116600 Per the datasheet (reference added in file header, p.10): 'Register Data Types and Organization': "The XPS Timer/Counter registers are organized as big-endian data." Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson --- hw/timer/xilinx_timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 28ac95edea1..3e272c8bb39 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -3,6 +3,9 @@ * * Copyright (c) 2009 Edgar E. Iglesias. * + * DS573: https://docs.amd.com/v/u/en-US/xps_timer + * LogiCORE IP XPS Timer/Counter (v1.02a) + * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal * in the Software without restriction, including without limitation the r= ights @@ -192,7 +195,7 @@ timer_write(void *opaque, hwaddr addr, static const MemoryRegionOps timer_ops =3D { .read =3D timer_read, .write =3D timer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812092; cv=none; d=zohomail.com; s=zohoarc; b=QAyB2aNtbU2877cxU4gJqGynJXqOAEp1UKKpFxKcpDYkc0jT6qs0vbzwyTPuve86yZ+D68RIWV1CPayyE5DAbj7Z/zel8JG21pP7xN0RiUm6Pt5h1eccJZgJP29jUwPdFaP0+hu4MU8F6yOicxR0L3OY+DYSZ6WmtLPLQsZW1vA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812092; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wFGgkm5n4LzlLdg21RwAQ7vz4q2WxQLn0Ned6IA69o0=; b=UHW6PaWRkWlmivEsTDmd6OJmyVLIjn7Cr3jEgDM9sHYQZo6/fTcwiDI/J/pxQUa6m2GBCs6UgHxHZZZZR58XZO5n4z9DaGgcOWHujXhZQUp09JxCbpXYew/rlUgns3tr8YbfqzL1hQ3iiEpBECcI3a0cHDsZisYuZ5T7Kx1MMiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812092518981.8256147224566; Tue, 5 Nov 2024 05:08:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JGW-0005SV-BM; Tue, 05 Nov 2024 08:06:36 -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 1t8JGR-0005Bm-6l for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:31 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JGP-0002c3-I1 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:30 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-539e8607c2aso5924211e87.3 for ; Tue, 05 Nov 2024 05:06:29 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e5e3sm16241441f8f.82.2024.11.05.05.06.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811986; x=1731416786; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wFGgkm5n4LzlLdg21RwAQ7vz4q2WxQLn0Ned6IA69o0=; b=qJ30FYtUzFL7E65u+UymvYD3rWqD31n/DVReb78dLiCq1KhYiD5mNN0KOcJKhUOard xqdpJVN0y5D3GViSXrdWvHPj5FXMb3sPEUZTdU2YBSAEzByseK8P2LZN7qaxCDwxBbUt 9FzkwGh1pE+yR+yvXEvEUgoRClf+rnieUl6dOsyg3ayh1fEmjsCfN3YXVRgZa/5AZ1Vo 83ek2w3Jl4tUu4Oe6onPAP7dSwrh3uwu9KexRViQfwCWc0K85EmOaijLM3ZrjlSnTbTy WTlUcXxOLtc8WjLq151n6OJK0wF1F2uUetO1RCiA9HfRgQJRg019lzmI2Qo5oKQrgspd glRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811986; x=1731416786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wFGgkm5n4LzlLdg21RwAQ7vz4q2WxQLn0Ned6IA69o0=; b=gz4c8/DhNxVigkXW0djFNqgXfDxkCJ75MViQEtQXY9MdvZVIceVwTLCIE+2mGnRUkl cDb0QpclnJSOWK/ggEvCjQXbyfJfi+ggV3Afsluv8JL1hCes/IFsNn6hO31Wd4DKQdOv j7Kyaf3g5TffvlXCug2QhWiqX+554eueyOJOPlM3p23cSfHBe6OP8xh2fX+td3Nl3sHh 2063IwwQHbhqHMJt23caobKvmS9WP0Fm25B18wUz56KNJ/WzjoXeUJLrAlX1v1A8tVox yrANqEGipVzge+MW+JbGdOyuusCiCYnMim8kC8LXbdlHiHnROMNHbayidkYoBtnbPxwA lNcQ== X-Gm-Message-State: AOJu0YxJ+FJKyrbd6rIhZqvoJQwfH/TDLSUsYYdMWCknMnFNT2GN8O9b ihGTwPlnD6xwhctK5tEs7zU9nC9/oDfnZR8HRTBHlb1HB7ekNsl2Hz8t7IQ3FYlf/3MpZYOPHvq k9c4= X-Google-Smtp-Source: AGHT+IFE9HUPx4C1HvI0xeVeqRG3FgfnVcqldGiQnuGamTFUmzYLVvKRdrwEBzmZXF3o00dHN/OMmA== X-Received: by 2002:a05:6512:1152:b0:539:ee0d:2bb4 with SMTP id 2adb3069b0e04-53b3491cb3cmr18858667e87.45.1730811986405; Tue, 05 Nov 2024 05:06:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 11/19] hw/timer/xilinx_timer: Allow down to 8-bit memory access Date: Tue, 5 Nov 2024 14:04:23 +0100 Message-ID: <20241105130431.22564-12-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812092951116600 Allow down to 8-bit access, per the datasheet (reference added in previous commit): "Timer Counter registers are accessed as one of the following types: =E2=80=A2 Byte (8 bits) =E2=80=A2 Half word (2 bytes) =E2=80=A2 Word (4 bytes)" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alistair Francis Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- hw/timer/xilinx_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 3e272c8bb39..e9498fc7eec 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -201,7 +201,7 @@ static const MemoryRegionOps timer_ops =3D { .max_access_size =3D 4, }, .valid =3D { - .min_access_size =3D 4, + .min_access_size =3D 1, .max_access_size =3D 4, }, }; --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812033; cv=none; d=zohomail.com; s=zohoarc; b=CJuvGADLT4avxAfZuPCXNHPoE2fO3AqhDr86iGHytUoHem1O/5hdpKgh1/RmApDH6QfXp/UmIfe5m6fu7u3RtQQsnyqzuFI8J+45+AhJikWw+82F0i0jF+iCQyUlnhLmtPR+50+YMSosU/hNkOut7LFHciE6cofhiC5BVy4cGNo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812033; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8o7w6mm+R/wQGpGGVYXrXktqPkxmlHPhQB9iwAgMFYc=; b=Gw7Cwvp/2cAccaoLWs5J4vrliJ3PQbclwF5siMgq2yZ2ogqNSdGsE2CKSHeWq6P0xV7u1jpr6+QGI+yrghKJFjgIkbFdBrj3yXzgyM44rdhgCCa2r4WtyRj64ZBxUkl1VTL5DZq204qw3I80tAue1i+lSj+SqrZC/dTEmPwAvRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812033327174.73038435421415; Tue, 5 Nov 2024 05:07:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JGl-00065y-M3; Tue, 05 Nov 2024 08:06:51 -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 1t8JGa-0005fE-A6 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:42 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JGY-0002d2-A9 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:40 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4316a44d1bbso46496155e9.3 for ; Tue, 05 Nov 2024 05:06:37 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5c65absm185489175e9.16.2024.11.05.05.06.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730811996; x=1731416796; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8o7w6mm+R/wQGpGGVYXrXktqPkxmlHPhQB9iwAgMFYc=; b=MxAp+1ehdfasvlGIbeGzzUdYsHvm29DUahviUlIv/AL3BUtqUlsUmQkGAAf/V9fbuV 2F/qKMIQ4qT692ob6zlwFdhBcc/9UwiBRbaThXMnmCQVZg9SFctb+ypUwdtpGKnn4/Bi CMajKhcPq8XV0PMZejRvmybMiyp0OH25G0449MeMaDzJPCiQzOBCBtGMTHwZ6D6j/2Nk wQiFMkS5JzFaLJDgQudsryJRV8iL/71BqLFAZtZlRVQLK+JV+CvKRiERpnDSrgNsl6JO HWKqUi3g1upvQj39rVv+Y4eB7NwsvjOD8zFREY1Mq9TdN4btNHQmWiO9Zv883IUJuV45 2J2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730811996; x=1731416796; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8o7w6mm+R/wQGpGGVYXrXktqPkxmlHPhQB9iwAgMFYc=; b=krzmkqeHqOz3f6l/eD6xYFVjwqDPervCoYHdePLkkBr5N77zrdoWpAiaKfy68nXH58 eiig2WtyzV8V/ZAn1GAw0dRzvYKTgkWHgm9TpT5otesNHCXM70CQZkIXNLT+a9Vu7f4k 77vzRsCE5NortigHrAkT1DmsFSA2dlzdDPkokHN812sX1OSqDMnd2Bsr76+QKavOzTIG VRgRChOpug2Pdj+xZ1+K/PWqUyRbskIlqSWR5LXl1eksxXGny4OmzO9Rs+ncenOiyb0h cKDPyUJDkEoxVCIZQLmAf4igkhxytvvkZuPncEyEYWz0mAllAIoVSwLX3lcV0mfi9V1J CQ9g== X-Gm-Message-State: AOJu0YyFFKVHPqAugrGm0HyMclj9tUeBoMz0F2jBoUEnkD66nltJcKVA pKqIyVYuVTh3Q4TiruPENO+6YZPyJqs20BgC/lRCmQJLumXHDcuOqkJT2E8jYPbn6oJuXnZNXJ5 mtDk= X-Google-Smtp-Source: AGHT+IGJfMAsKECXVoK0zYacWad+CWee04MBRfDuL0IXDekiXipIffi1uncuWI4/YK351Ggybd4Lqg== X-Received: by 2002:a05:600c:3507:b0:431:4e3f:9dee with SMTP id 5b1f17b1804b1-4327b6f46d3mr165594015e9.4.1730811995992; Tue, 05 Nov 2024 05:06:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 12/19] hw/net/xilinx_ethlite: Only expect big-endian accesses Date: Tue, 5 Nov 2024 14:04:24 +0100 Message-ID: <20241105130431.22564-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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, 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-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812034288116600 The Xilinx 'ethlite' device was added in commit b43848a100 ("xilinx: Add ethlite emulation"), being only built back then for a big-endian MicroBlaze target (see commit 72b675caac "microblaze: Hook into the build-system"). I/O endianness access was then clarified in commit d48751ed4f ("xilinx-ethlite: Simplify byteswapping to/from brams"). Here the 'fix' was to use tswap32(). Since the machine was built as big-endian target, tswap32() use means the fix was for a little endian host. While the datasheet (reference added in file header) is not precise about it, we interpret such change as the device expects accesses in big-endian order. Besides, this is what other Xilinx/MicroBlaze devices use (see the 3 previous commits). Correct the MemoryRegionOps endianness. Add a 'access-little-endian' property, so if the bus access expect little-endian order we swap the values. Replace the tswap32() calls accordingly. Set the property on the single machine using this device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 + hw/net/xilinx_ethlite.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 8110be83715..8407dbee12a 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -123,6 +123,7 @@ petalogix_s3adsp1800_init(MachineState *machine) qemu_configure_nic_device(dev, true, NULL); qdev_prop_set_uint32(dev, "tx-ping-pong", 0); qdev_prop_set_uint32(dev, "rx-ping-pong", 0); + qdev_prop_set_bit(dev, "access-little-endian", !TARGET_BIG_ENDIAN); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, ETHLITE_BASEADDR); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[ETHLITE_IRQ]); diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index ede7c172748..44ef11ebf89 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -3,6 +3,9 @@ * * Copyright (c) 2009 Edgar E. Iglesias. * + * DS580: https://docs.amd.com/v/u/en-US/xps_ethernetlite + * LogiCORE IP XPS Ethernet Lite Media Access Controller + * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal * in the Software without restriction, including without limitation the r= ights @@ -25,7 +28,6 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qom/object.h" -#include "exec/tswap.h" #include "hw/sysbus.h" #include "hw/irq.h" #include "hw/qdev-properties.h" @@ -65,6 +67,7 @@ struct xlx_ethlite NICState *nic; NICConf conf; =20 + bool access_little_endian; uint32_t c_tx_pingpong; uint32_t c_rx_pingpong; unsigned int txbuf; @@ -103,9 +106,12 @@ eth_read(void *opaque, hwaddr addr, unsigned int size) break; =20 default: - r =3D tswap32(s->regs[addr]); + r =3D s->regs[addr]; break; } + if (s->access_little_endian) { + bswap32s(&r); + } return r; } =20 @@ -117,6 +123,10 @@ eth_write(void *opaque, hwaddr addr, unsigned int base =3D 0; uint32_t value =3D val64; =20 + if (s->access_little_endian) { + bswap32s(&value); + } + addr >>=3D 2; switch (addr)=20 { @@ -161,7 +171,7 @@ eth_write(void *opaque, hwaddr addr, break; =20 default: - s->regs[addr] =3D tswap32(value); + s->regs[addr] =3D value; break; } } @@ -169,7 +179,7 @@ eth_write(void *opaque, hwaddr addr, static const MemoryRegionOps eth_ops =3D { .read =3D eth_read, .write =3D eth_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, @@ -256,6 +266,8 @@ static void xilinx_ethlite_init(Object *obj) } =20 static Property xilinx_ethlite_properties[] =3D { + DEFINE_PROP_BOOL("access-little-endian", struct xlx_ethlite, + access_little_endian, false), DEFINE_PROP_UINT32("tx-ping-pong", struct xlx_ethlite, c_tx_pingpong, = 1), DEFINE_PROP_UINT32("rx-ping-pong", struct xlx_ethlite, c_rx_pingpong, = 1), DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf), --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812099; cv=none; d=zohomail.com; s=zohoarc; b=O9g4hZdQhuAO0oJXdtEnwDdCK7UdHluCvRucaJNTZnwH6Cr+poOVpy8YYjgfFjXAKg0TXMWjihF0N8BB114JFwxFxrs0Ozc2thPiT9OQyyY9ZNh467ieUkV2mqB/xEVBQQtqYMHQ3nWCsMLgkeQQ+pN3qno4Ky3nNXw20lLeRys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812099; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2HA1iYoQhge6HN2CHRy7t3YqB3wWBO4DLLl9qjbY1CM=; b=g0zqbifTHFjdarXFsxtu9oJyF6gjdQDqBE01nfr3y52OGKpbVo1BOuyRcVSiHDR24zE93F1OgAiT5yFs+KkzSPUl6intaI8EE7Y1wjHgdo+ITmW7MPrD3QwITZDOHJbU0IBm7yq+clCGmx214Lt4gqqjflKGr1LoARhiE2BJp1s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812098939745.7244869045616; Tue, 5 Nov 2024 05:08:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JGy-0006Om-B4; Tue, 05 Nov 2024 08:07:06 -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 1t8JGk-00064L-LF for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:50 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JGh-0002ec-Mw for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:06:50 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-37d4ac91d97so4578004f8f.2 for ; Tue, 05 Nov 2024 05:06:47 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c10d4d1fsm16076930f8f.38.2024.11.05.05.06.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812006; x=1731416806; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2HA1iYoQhge6HN2CHRy7t3YqB3wWBO4DLLl9qjbY1CM=; b=Lpo9L8RkA4YYSK/qvcTHeX06Up0oGGU189jK6IG9s3BkMb+IThDvaeAjn5RfdLUGKN f2VXhFE3fVZDYu3IYU5QqAojUS70baIaahc/IwwM1lfS807lC84wBEDmLI33X9unujm/ Fg1oihOaT6YkHb2nIlvv+VTfB6xWvylHbwrJyFJZTGE4jZ4bNyIjcSdDy/qKIYllDOj4 yq8W/rkUeLt3mD49yXVnJl2g5Gs/L2H/LzKz0eyOLBdM7/yLgBW3KiF3yTfWlBWRzpNe qqaIFNWhwOMJ52/tHePpYvBPTllS6X4kB3xl8lCovgNFN0KGIwboagxCANvq/kZ9cRxc gpiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812006; x=1731416806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2HA1iYoQhge6HN2CHRy7t3YqB3wWBO4DLLl9qjbY1CM=; b=BB0v0nfLoJrpBTuzP9eH5aZQWckwK/inN/TgPjZSreUZiVA9kldvzMstODpdzcffac 7D7BiTrkOS+XOl0mBgMLRBH99+IrWgybzoEqDYnYxMDJnXNmbh8k02yCjIdXNWnC4Opz ZDQD/GwptjTQcrXMauotDSgIoZWlWA03lRz5IY+u2puJfzAfBfY83j8HMxTbEl6xcGfu jTzAX4tfuYiv0/7X30nXcNBs6lwbBAF1SPtvVVPbC46LXAAyVUmE3FoJLIz6VVriqDfI /ZI/vscVK+uRF3l5rA1om8nxLeu3z7pKIaDB+YK0WCW1F1qKPiWvLYaw0LSzoCLzGdO6 1LpQ== X-Gm-Message-State: AOJu0YxidGYEAKlYlTsPqRrw7t28VQe0kISJWhLFzF36QRrRpes+hjfY /vegvHVhH4HU6Yx43CkMxkq6/q3fA677DM2nPRxylD6BQCgxjXmiGyD6wl26HWawi4yGPTkQRkm vS0M= X-Google-Smtp-Source: AGHT+IHFlOyH7jLqLmVJWiSq5ZAd02Ui4PVZS15kFWcQDOeKoizvayG3iUaxo7TlK8hsaSPPS+Hcow== X-Received: by 2002:a05:6000:1a8c:b0:37d:5042:c8de with SMTP id ffacd0b85a97d-381c7a5d4eemr16315520f8f.22.1730812005816; Tue, 05 Nov 2024 05:06:45 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 13/19] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx Date: Tue, 5 Nov 2024 14:04:25 +0100 Message-ID: <20241105130431.22564-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812101672116600 Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/microblaze); \ done Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4beaf69e76a..4c25b1e4383 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -779,13 +779,13 @@ static bool trans_lbui(DisasContext *dc, arg_typeb *a= rg) static bool trans_lhu(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); } =20 static bool trans_lhur(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); } =20 static bool trans_lhuea(DisasContext *dc, arg_typea *arg) @@ -797,26 +797,26 @@ static bool trans_lhuea(DisasContext *dc, arg_typea *= arg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lhui(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); } =20 static bool trans_lw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); } =20 static bool trans_lwr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); } =20 static bool trans_lwea(DisasContext *dc, arg_typea *arg) @@ -828,14 +828,14 @@ static bool trans_lwea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lwi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); } =20 static bool trans_lwx(DisasContext *dc, arg_typea *arg) @@ -845,7 +845,7 @@ static bool trans_lwx(DisasContext *dc, arg_typea *arg) /* lwx does not throw unaligned access errors, so force alignment */ tcg_gen_andi_tl(addr, addr, ~3); =20 - tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TEUL); + tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TE | MO_UL); tcg_gen_mov_tl(cpu_res_addr, addr); =20 if (arg->rd) { @@ -929,13 +929,13 @@ static bool trans_sbi(DisasContext *dc, arg_typeb *ar= g) static bool trans_sh(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); } =20 static bool trans_shr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); } =20 static bool trans_shea(DisasContext *dc, arg_typea *arg) @@ -947,26 +947,26 @@ static bool trans_shea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, MMU_NOMMU_IDX, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false= ); #endif } =20 static bool trans_shi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); } =20 static bool trans_sw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); } =20 static bool trans_swr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); } =20 static bool trans_swea(DisasContext *dc, arg_typea *arg) @@ -978,14 +978,14 @@ static bool trans_swea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, MMU_NOMMU_IDX, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false= ); #endif } =20 static bool trans_swi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); } =20 static bool trans_swx(DisasContext *dc, arg_typea *arg) @@ -1014,7 +1014,7 @@ static bool trans_swx(DisasContext *dc, arg_typea *ar= g) =20 tcg_gen_atomic_cmpxchg_i32(tval, cpu_res_addr, cpu_res_val, reg_for_write(dc, arg->rd), - dc->mem_index, MO_TEUL); + dc->mem_index, MO_TE | MO_UL); =20 tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_fail); =20 --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812051; cv=none; d=zohomail.com; s=zohoarc; b=GM+fHj7jcMHDEJ49eGSRMlAuVfmrNUGQgZK8NVacSia8EYMBY9SNs+VRHwAMUeGQ9+dS5qKm3q7GXPcnARX/Hrl03rmkoB1kMe0lWfDn6x2xdSWk7wv3TLd8cYwOktVapaDg6Mf/6z7F4plML54LsumBSXJtYvEy4O6xCikJ408= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812051; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HyHIXr57KAvT5hBpjPnN9Ar0+PrPE9jeXHrn1Pe661M=; b=OI2L/o6/2yaHnmb047us6wxd7v+YHxclzYw3M8LOqDEIGDGGSb/M7G7ECAnmi5z9SxGf+EFu3aMu5MFrl7s1YhBGO4O5A2afdP5o5AbcVH6TrYP1FNzFqeRzZh7PKO4/puhRHPFvLmcbW5ri6V/uqXxcoIYZbc5gMZOBjdRGBYM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812051811202.30954963054546; Tue, 5 Nov 2024 05:07:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHD-0006t0-Af; Tue, 05 Nov 2024 08:07:19 -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 1t8JGw-0006Ux-Hw for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:05 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JGs-0002fU-HX for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:02 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-37d70df0b1aso3496430f8f.3 for ; Tue, 05 Nov 2024 05:06:56 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e51csm16313213f8f.79.2024.11.05.05.06.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812015; x=1731416815; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HyHIXr57KAvT5hBpjPnN9Ar0+PrPE9jeXHrn1Pe661M=; b=Sq3D5JRIQyVTZIYsnK5pKoTFj5Sv/LE5CCAuJ0AoNOfr8oze+0DcNs7LX0B8+QM+dy T1UyLXuSI9zICSfiRJzzFZklVz52gZnR4lX0OtaeRFuWQ3giJFa93v3PAtzhUlyHEJ8K HUizoKR/Euh2edSospuzeVPpD9wMMp0botVgdfw14FC9/c+RVNnmqkI+++lZ5WlHjH8O RW5GeWjbXoyYGzrzwDIrKbO5H6M0Ro0NipJMc3hEb2lvfdxW1JSB41OlyQfjPv728NGm 1QHd/LhXPEmCyJwz/NQX2WenI/0XIhzDDMv18SmKTc+/LJvCOu1pe25rCfkIAX4hDY/d M5Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812015; x=1731416815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HyHIXr57KAvT5hBpjPnN9Ar0+PrPE9jeXHrn1Pe661M=; b=nTnk33mI1dnXJ3DIvGPotzvnq5/4uk3jvdXLFe/f59uKaX9RqG4siHrpa72XyVKETy 9g9ep4begoTS8GH4oa/oDTWGEZYjEBuUPE08PoNg8XmZsN7vJOk3EfjNiDMp9KMoHAzB pxpxA5FGf7MnCvoTDi2t187SwbLNJDIoX1jWkkbkDqOqHHdZp2dYWF/k7tVmHDLPNKWO yUtIRBGNjzQrZKYT7A6shOnZK7UTV5gZJkE663JqBzvVWdU+5R1jNVvvEAEJJTYv2Jms /Nt9yZNCG5FgO8uGaYOb1PD4vwaqHFCJtuiwWyCtRQN5uDE0kN05hZczNC8mGUBFBVy4 eLOQ== X-Gm-Message-State: AOJu0Yw9+qMqFt0vMQsEeNzAPsvRmLM9+TfW7yIwX8SNAH0JqWb/V9f3 NXOD3dZtgDqTdHFUT/NpeN+I76GRkHcUX1UcT+ghQOwHLU3RvU0pSF9KhkMltpaceaY5NlN/GtC f2b0= X-Google-Smtp-Source: AGHT+IEi0THYTfgK6ACr69bEca5gCtZ/VPrJleGn8VybsMmCUvxYnoMfiFeXUDtXdlEu2NdRuNmFRA== X-Received: by 2002:adf:fc8b:0:b0:37d:5026:f787 with SMTP id ffacd0b85a97d-380611e10f1mr23213351f8f.38.1730812015049; Tue, 05 Nov 2024 05:06:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 14/19] target/microblaze: Set MO_TE once in do_load() / do_store() Date: Tue, 5 Nov 2024 14:04:26 +0100 Message-ID: <20241105130431.22564-15-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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, 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-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812052385116600 All callers of do_load() / do_store() set MO_TE flag. Set it once in the callees. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 36 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4c25b1e4383..86f3c196189 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -712,6 +712,8 @@ static bool do_load(DisasContext *dc, int rd, TCGv addr= , MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 + mop |=3D MO_TE; + /* * When doing reverse accesses we need to do two things. * @@ -779,13 +781,13 @@ static bool trans_lbui(DisasContext *dc, arg_typeb *a= rg) static bool trans_lhu(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_lhur(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, true); } =20 static bool trans_lhuea(DisasContext *dc, arg_typea *arg) @@ -797,26 +799,26 @@ static bool trans_lhuea(DisasContext *dc, arg_typea *= arg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lhui(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_lw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_lwr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, true); } =20 static bool trans_lwea(DisasContext *dc, arg_typea *arg) @@ -828,14 +830,14 @@ static bool trans_lwea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lwi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_lwx(DisasContext *dc, arg_typea *arg) @@ -862,6 +864,8 @@ static bool do_store(DisasContext *dc, int rd, TCGv add= r, MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 + mop |=3D MO_TE; + /* * When doing reverse accesses we need to do two things. * @@ -929,13 +933,13 @@ static bool trans_sbi(DisasContext *dc, arg_typeb *ar= g) static bool trans_sh(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_shr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, true); } =20 static bool trans_shea(DisasContext *dc, arg_typea *arg) @@ -947,26 +951,26 @@ static bool trans_shea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false= ); + return do_store(dc, arg->rd, addr, MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_shi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_sw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_swr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, true); } =20 static bool trans_swea(DisasContext *dc, arg_typea *arg) @@ -978,14 +982,14 @@ static bool trans_swea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false= ); + return do_store(dc, arg->rd, addr, MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_swi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_swx(DisasContext *dc, arg_typea *arg) --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812083; cv=none; d=zohomail.com; s=zohoarc; b=AhyRKalfesS76S5u6wsFqTnWeuOjrwNkp9wY3NXoWwRE59zYGH0GPmxxm6WbEViJC5FX16l5HQn+WqmIc80oN2A/V9+5MtnDizdlwSToWwysyd1Rry2CflXb0kibSWwK+cqvW1L/nRgDVmgGyTdqKr/52Gb+j+/hjYlgfyfUUlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812083; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Kbb2EbjAWyPRswDzNr8J6AfAT+vMH4Ts659xVE0GgBY=; b=LHxEQmILbUjaXNoX0k5AVPP/+HFOsJIG2dTyDWxpVGK5zewLJkJYEYNdM5aOhr+RD6j8wKv1JWN8U8moDOsS9zmPi2eqVqCIQhGU7Njl3NdAzRYjqO9PfltHutBS6Rb6wEe4SR4pG/lz0PtJ060+Lh5yeXISouNcb0gt9f51ZOM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812083778471.90405381747655; Tue, 5 Nov 2024 05:08:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHJ-0007TA-9k; Tue, 05 Nov 2024 08:07:25 -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 1t8JH4-0006c1-9Z for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:12 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JH0-0002gL-Ug for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:09 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-37d808ae924so3014871f8f.0 for ; Tue, 05 Nov 2024 05:07:05 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e073sm16114234f8f.66.2024.11.05.05.07.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812024; x=1731416824; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kbb2EbjAWyPRswDzNr8J6AfAT+vMH4Ts659xVE0GgBY=; b=NMS/MpdHv0mL+xXX4MDKMtHhCQD8tUoLFhAHOWTYVdzr25FdS5FjZuabDfzOLGrYTm a7bLb1/DQAfa6SN8YoSaJkhjlM2Hqd1XoF6qPaFjTbpVosaNYxnjYZo3b3tbk4ZR0Mrc u2sat5CPvv3ypxBGsvgr5PmeGHrHpY9jM/FBnWTC0et/Dp9kxqch+mmicDmAfXbLDa5d 783kZgl7DNu7FV5g411uE1MB9RK0hh08hjYF8Li1neIxLmroTy491X8bbqAKkpufpkn5 PhzyZ0UwBuPzNWxkQ9VXcGZJj8+xfA8HhQDzUuIHmsRedQ1PtFOfCuApSPWTGDikV7LV Vl/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812024; x=1731416824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kbb2EbjAWyPRswDzNr8J6AfAT+vMH4Ts659xVE0GgBY=; b=jfLD7xrBTW+U62hKJtmEDQbudrzl3feTrEVSqoRmGjbt+XZrGe8SrzS+vvOZcZDv7I dBc2m1+mzkRNr9fHVH1Nel3gx5Y+6vxLjrx+lcBySbnX0KWlSelhJep3PoGxyQTs8ckz bUz6lFFZ+hgJ5HKKXNZpDXzsbNsPJt+swslXBNWwi+StTNr3ofhvU7K4D2ZsXhSw0uIU /DimTTNYQ525fxj/5kE4fKid3/TP3RHUJTk2+AhV7MBZZKTmtsMbABjeqE1d97UgIHLK 00eVhxgPbQ+HPxwMbC51GjKk6tlDcj0dudiVu23zcFKyE4PXIWTWJ5lupZUK0d4cK/Eq ielw== X-Gm-Message-State: AOJu0YxD/sN6a9o5MCdmRqMfbdat0R6TPbLpiMk0hUMw/4JvxFqURjYn Ra6juGym4rYoEKf5DL1NveZs6gxTT3IQOSrdQbTBDhO1ALibwZOBHthTLuWX6a9lgeHXIkYQ9z/ T/mE= X-Google-Smtp-Source: AGHT+IEWaaWQl+axUGXNmT4+HOHsD3E48uIkfAyL014ycaATTIHJ/QexfC7+mG7HbldOF12G2Wq6zw== X-Received: by 2002:a5d:5d09:0:b0:381:dff2:cf08 with SMTP id ffacd0b85a97d-381dff2cff8mr3069929f8f.2.1730812024322; Tue, 05 Nov 2024 05:07:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 15/19] target/microblaze: Introduce mo_endian() helper Date: Tue, 5 Nov 2024 14:04:27 +0100 Message-ID: <20241105130431.22564-16-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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, 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-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812087012116600 mo_endian() returns the target endianness, currently static. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 86f3c196189..0b466db694c 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -707,12 +707,17 @@ static void record_unaligned_ess(DisasContext *dc, in= t rd, } #endif =20 +static inline MemOp mo_endian(DisasContext *dc) +{ + return MO_TE; +} + static bool do_load(DisasContext *dc, int rd, TCGv addr, MemOp mop, int mem_index, bool rev) { MemOp size =3D mop & MO_SIZE; =20 - mop |=3D MO_TE; + mop |=3D mo_endian(dc); =20 /* * When doing reverse accesses we need to do two things. @@ -847,7 +852,8 @@ static bool trans_lwx(DisasContext *dc, arg_typea *arg) /* lwx does not throw unaligned access errors, so force alignment */ tcg_gen_andi_tl(addr, addr, ~3); =20 - tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TE | MO_UL); + tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, + mo_endian(dc) | MO_UL); tcg_gen_mov_tl(cpu_res_addr, addr); =20 if (arg->rd) { @@ -864,7 +870,7 @@ static bool do_store(DisasContext *dc, int rd, TCGv add= r, MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 - mop |=3D MO_TE; + mop |=3D mo_endian(dc); =20 /* * When doing reverse accesses we need to do two things. @@ -1018,7 +1024,7 @@ static bool trans_swx(DisasContext *dc, arg_typea *ar= g) =20 tcg_gen_atomic_cmpxchg_i32(tval, cpu_res_addr, cpu_res_val, reg_for_write(dc, arg->rd), - dc->mem_index, MO_TE | MO_UL); + dc->mem_index, mo_endian(dc) | MO_UL); =20 tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_fail); =20 --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812049; cv=none; d=zohomail.com; s=zohoarc; b=FO50lCYxVZamfxbRr9lrTM0wJV6WsAwCjLVsb3SZby5uGUnH8DZ/ojcmTa48s2rpdsyXWpav9wLKicdzKZ7v6tLBYvvtDDsERcGYSOeOx4grUG37PBndJ/cbhVg8RjGr98Og75vnqFDNYqObRKzN2+6IbGRvaSmYrBc7W2whuYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812049; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x3QZDoqX/9aQeCd67Fxf+7IHrX4YKBlVMoYZ3cKr6J0=; b=GECxCO+JZ3IWx+szlZhERfNkTMmSA6Ok/y/uiL1IUdlYFPAt7XoIN5uw/o3HN4vn8FrT7NIjlXnlP1hrbAkyclUUKFr67k7wKhdGFF7w4PZEuCjGJ4F0NU+ldOC5AaS4FrdJ0zu9sjlDF3KjKG3FUTH3Xq2J8W6agvXsPCEFV5Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17308120492664.683833834427901; Tue, 5 Nov 2024 05:07:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHG-0007AR-F4; Tue, 05 Nov 2024 08:07:22 -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 1t8JHB-0006pf-8s for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:17 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JH8-0002hK-BS for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:17 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-37ed3bd6114so3136879f8f.2 for ; Tue, 05 Nov 2024 05:07:13 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c116b11esm16096019f8f.104.2024.11.05.05.07.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812032; x=1731416832; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x3QZDoqX/9aQeCd67Fxf+7IHrX4YKBlVMoYZ3cKr6J0=; b=Fx5T+/Nfvkrkjz42mbrGdXsM6lQSdqc0jzTPq0wGMUEIg9Y8Y/iznyv/zwGDS9n0WK Z07GZDuHebljE2j1DGrHJOSsUMb/rYeJrvC81OyksckFK4KkImv2E6nY/7K8uoV3bbg8 PIa4Cv6qOyCCUC6SvOqPfYGL5h3zLLPyIRISQ8pzbohcDCQTcuRcizqp29hMr/x6cXZL dJTsO9v3k7oUDI5miUoDynv5XgMVWKfjGSVlIW0E3s+S8ZZwgTlop7htROrJfvm1fRw5 bGMHJGDyfQUfy5nqcG/yTf8Rx+IUQLJPVzu0b95LbI/8yO5+6TFLM99cPaK9BHlwBnbY ozmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812032; x=1731416832; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x3QZDoqX/9aQeCd67Fxf+7IHrX4YKBlVMoYZ3cKr6J0=; b=lYyZMVVlQjK5ixK80JGi4lm36viQTR8ZqR+Lzk+B5eMhGQuRHYx9KT5z7i3sHGNsyC /RvuRzycXTE4d+1qj/6GHVknMgToSjnSvIfhChNyXpiB+TPUoxsD3lWzCFqvwJd2EAs2 /ykRb6x9TdYMAmOiY0JFpE2SPiTu0mlsKMU1eCXw4G7Q2EK5qrCRU8+2534ihlNA/q4/ IZuMBtk3BjsrRDAssPa8jngrZTIHovDemEzSU/elM9FcUxEE2RfUCfI3uvBfuyk7Pz2S EvG6ABWgU5doWqTZ8WDlBQinO/+0XWVPqOdZY+Rm3S5GXlTr69lIJqQOnboEb/O/stdn b+fg== X-Gm-Message-State: AOJu0YwUCrqpfveBO/ogRUz9ja4yrBUau8EvxbaaGvGOdKYA7WUmmEs+ vtIjKRgxlUHAoA9h/gKAc6doprKd5PtUXOAt40IaXuIqDuaBcAYWOXZ8K/3jMQgN72z5gwb0nzA hgho= X-Google-Smtp-Source: AGHT+IFByNjubgvH6X2xmHAKxbhu0fWvnp8dWXrB0BRcK++zMFf01e/6CpppP5sf/SFvCissFqrz+Q== X-Received: by 2002:a05:6000:410a:b0:381:cfea:2818 with SMTP id ffacd0b85a97d-381cfea2a53mr9258718f8f.30.1730812031787; Tue, 05 Nov 2024 05:07:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 16/19] target/microblaze: Consider endianness while translating code Date: Tue, 5 Nov 2024 14:04:28 +0100 Message-ID: <20241105130431.22564-17-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812050214116600 Consider the CPU ENDI bit, swap instructions when the CPU endianness doesn't match the binary one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/microblaze/cpu.h | 7 +++++++ target/microblaze/translate.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 3e5a3e5c605..6d540713eb5 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -412,6 +412,13 @@ void mb_tcg_init(void); /* Ensure there is no overlap between the two masks. */ QEMU_BUILD_BUG_ON(MSR_TB_MASK & IFLAGS_TB_MASK); =20 +static inline bool mb_cpu_is_big_endian(CPUState *cs) +{ + MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); + + return !cpu->cfg.endi; +} + static inline void cpu_get_tb_cpu_state(CPUMBState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 0b466db694c..5595ae4fadb 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -709,7 +709,7 @@ static void record_unaligned_ess(DisasContext *dc, int = rd, =20 static inline MemOp mo_endian(DisasContext *dc) { - return MO_TE; + return dc->cfg->endi ? MO_LE : MO_BE; } =20 static bool do_load(DisasContext *dc, int rd, TCGv addr, MemOp mop, @@ -1646,7 +1646,8 @@ static void mb_tr_translate_insn(DisasContextBase *dc= b, CPUState *cs) =20 dc->tb_flags_to_set =3D 0; =20 - ir =3D translator_ldl(cpu_env(cs), &dc->base, dc->base.pc_next); + ir =3D translator_ldl_swap(cpu_env(cs), &dc->base, dc->base.pc_next, + mb_cpu_is_big_endian(cs) !=3D TARGET_BIG_ENDI= AN); if (!decode(dc, ir)) { trap_illegal(dc, true); } --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812102; cv=none; d=zohomail.com; s=zohoarc; b=bagietImvui7ihFJ+i3cCVBFLEL7N6LSKjiGn0OpDPVhElDrpmA6UBz09tEEMVY/MwvwwHjD0dN4Q8YwWcwpBhFMO1LpKoIB5+I2pytuVSTP6Dv4IYG4yYGmwCYACpNCkihC2XSbrziCf8WW3C/6Uw3nwwprHf+36PleiEIH7qE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812102; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=haV4HgajOuBZyaKR8WLf7rNEDHwvap87jZ2MipEC/AA=; b=fUFSYM36u9bXVJzBAPKZ/tIt5rw8UBq+CO7/0K/l4McuF6XGLjfmhgSRBxebkf7i8CmatAIxIzSeJnoizST0aFbQZmTJUOGhvTwIh8OOapFyNcxU+BejJPAtJhYZ4h3M4fF9l2IDtP3QrDBdFiFXqIngxfw67RIVGmq6X28v2iE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812102701504.55560206605503; Tue, 5 Nov 2024 05:08:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHN-00085Q-QO; Tue, 05 Nov 2024 08:07:30 -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 1t8JHJ-0007XX-5u for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:25 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JHG-0002ik-Li for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:24 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4315e62afe0so46604425e9.1 for ; Tue, 05 Nov 2024 05:07:22 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd8e8471sm226896305e9.4.2024.11.05.05.07.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:07:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812041; x=1731416841; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=haV4HgajOuBZyaKR8WLf7rNEDHwvap87jZ2MipEC/AA=; b=s1Aiu+VY1z0Dm2oTkkBy6GKbQsiTcUGXL1TDRUg1ujpQLdQtoFGAFnbVFYCScpwBH4 9UyngPnCQre4b8mfU6IzxXwc/MwnBctuc/iYS/kTCzHsPCc8e86fpVhha57CTRLq3mgp d7gUBTscT7zlyzZuWu2f3n6EofCAq1qDYvCwvtll3e+2/iV8/LwLzylRHvO4rtFvg4TM zf9CoFOnFaTYkYJ0LyuufnvucqdCXZg0uhmwkueQ9N9kSwBVsFKv0Ox5dw7Gz9SJUL41 XxoiGmXzO2ah9VPUWUva42gyZYYTVhVCVB9ckwZP5r2v8ciV5co29hVlZF73reXFobEB CStg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812041; x=1731416841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=haV4HgajOuBZyaKR8WLf7rNEDHwvap87jZ2MipEC/AA=; b=GevW/asssy0w7/rFCpDZH3IjsNzxnhOYQecdYXWT+44AY357ximmYoeycFrKG5K8Aa Kf0bVmYSyfu/skXgai56mQtioLNXz6iXiVf+H46D5htLAGpTMhjUjbAU1yooUWNZPW/0 Oc15UKzbrYjSKLTEV816Fte4VB+LKOkplbhms1AIyx1yAnQk6Q/JyXm3Sz/das9yp+T3 Udf72BPGvrTE4sgH3doIDh9Aiba51A6a4sZIPu5bb+L8REUpkgJsRZqRWFyHdaBIQJt7 7Uy+AvWfiLf9DQZnmHWGff4rx7IwOBkUBhMstZhKyqDKPeNRP4QnVyqKSKySNSWs02mJ TSyA== X-Gm-Message-State: AOJu0Yx9q/vL9/6X0vonIyNu2ZqzqvD+rNQ6Q//C4PO5KkPSLxe9Z1PN aZZkdYelQ/UmgI5dCGrhYmMMRh14RFY9EAU+xxv0HvuBwZSSWbpfa9+OLZdiTQrov6s+zl9pkkO kPts= X-Google-Smtp-Source: AGHT+IGOxoQTQL0IN3l6/4lLVFzW5l8bscs5mxyfdsvU2fYef9lc8d5j10xjA9v1TTrFGkS6DR2PFA== X-Received: by 2002:a05:600c:4f83:b0:42c:c28c:e477 with SMTP id 5b1f17b1804b1-4319ad089b0mr277982415e9.23.1730812040858; Tue, 05 Nov 2024 05:07:20 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 17/19] hw/microblaze: Support various endianness for s3adsp1800 machines Date: Tue, 5 Nov 2024 14:04:29 +0100 Message-ID: <20241105130431.22564-18-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812103360116600 Introduce an abstract machine parent class which defines the 'little_endian' property. Duplicate the current machine, which endian is tied to the binary endianness, to one big endian and a little endian machine; updating the machine description. Keep the current default machine for each binary. 'petalogix-s3adsp1800' machine is aliased as: - 'petalogix-s3adsp1800-be' on big-endian binary, - 'petalogix-s3adsp1800-le' on little-endian one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 55 +++++++++++++++++++++--- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 8407dbee12a..f5195327b76 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -55,8 +55,17 @@ #define ETHLITE_IRQ 1 #define UARTLITE_IRQ 3 =20 +typedef struct PetalogixS3adsp1800MachineClass { + MachineClass parent_obj; + + bool little_endian; +} PetalogixS3adsp1800MachineClass; + #define TYPE_PETALOGIX_S3ADSP1800_MACHINE \ - MACHINE_TYPE_NAME("petalogix-s3adsp1800") + MACHINE_TYPE_NAME("petalogix-s3adsp1800-common") +DECLARE_CLASS_CHECKERS(PetalogixS3adsp1800MachineClass, + PETALOGIX_S3ADSP1800_MACHINE, + TYPE_PETALOGIX_S3ADSP1800_MACHINE) =20 static void petalogix_s3adsp1800_init(MachineState *machine) @@ -71,11 +80,13 @@ petalogix_s3adsp1800_init(MachineState *machine) MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; MemoryRegion *sysmem =3D get_system_memory(); + PetalogixS3adsp1800MachineClass *pmc; =20 + pmc =3D PETALOGIX_S3ADSP1800_MACHINE_GET_CLASS(machine); cpu =3D 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); + pmc->little_endian, &error_abort); qdev_realize(DEVICE(cpu), NULL, &error_abort); =20 /* Attach emulated BRAM through the LMB. */ @@ -123,33 +134,63 @@ petalogix_s3adsp1800_init(MachineState *machine) qemu_configure_nic_device(dev, true, NULL); qdev_prop_set_uint32(dev, "tx-ping-pong", 0); qdev_prop_set_uint32(dev, "rx-ping-pong", 0); - qdev_prop_set_bit(dev, "access-little-endian", !TARGET_BIG_ENDIAN); + qdev_prop_set_bit(dev, "access-little-endian", pmc->little_endian); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, ETHLITE_BASEADDR); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[ETHLITE_IRQ]); =20 create_unimplemented_device("xps_gpio", GPIO_BASEADDR, 0x10000); =20 - microblaze_load_kernel(cpu, !TARGET_BIG_ENDIAN, ddr_base, ram_size, + microblaze_load_kernel(cpu, pmc->little_endian, ddr_base, ram_size, machine->initrd_filename, BINARY_DEVICE_TREE_FILE, NULL); } =20 -static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void = *data) +static void petalogix_s3adsp1800_machine_class_init_be(ObjectClass *oc, vo= id *data) { MachineClass *mc =3D MACHINE_CLASS(oc); + PetalogixS3adsp1800MachineClass *pmc =3D PETALOGIX_S3ADSP1800_MACHINE_= CLASS(oc); =20 - mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800"; + pmc->little_endian =3D false; + mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800 (= big endian)"; mc->init =3D petalogix_s3adsp1800_init; +#if TARGET_BIG_ENDIAN mc->is_default =3D true; + mc->alias =3D "petalogix-s3adsp1800"; +#endif +} + +static void petalogix_s3adsp1800_machine_class_init_le(ObjectClass *oc, vo= id *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + PetalogixS3adsp1800MachineClass *pmc =3D PETALOGIX_S3ADSP1800_MACHINE_= CLASS(oc); + + pmc->little_endian =3D true; + mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800 (= little endian)"; + mc->init =3D petalogix_s3adsp1800_init; +#if !TARGET_BIG_ENDIAN + mc->is_default =3D true; + mc->alias =3D "petalogix-s3adsp1800"; +#endif } =20 static const TypeInfo petalogix_s3adsp1800_machine_types[] =3D { { .name =3D TYPE_PETALOGIX_S3ADSP1800_MACHINE, .parent =3D TYPE_MACHINE, - .class_init =3D petalogix_s3adsp1800_machine_class_init, + .abstract =3D true, + .class_size =3D sizeof(PetalogixS3adsp1800MachineClass), + }, + { + .name =3D MACHINE_TYPE_NAME("petalogix-s3adsp1800-be"), + .parent =3D TYPE_PETALOGIX_S3ADSP1800_MACHINE, + .class_init =3D petalogix_s3adsp1800_machine_class_init_be, + }, + { + .name =3D MACHINE_TYPE_NAME("petalogix-s3adsp1800-le"), + .parent =3D TYPE_PETALOGIX_S3ADSP1800_MACHINE, + .class_init =3D petalogix_s3adsp1800_machine_class_init_le, }, }; =20 --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812073; cv=none; d=zohomail.com; s=zohoarc; b=Kv8mk4MPK3czXZmcFjdIPKwlbkZQMY1m1au5GX/+cYAGnfpZkriMbAGCyEgVgACuAjtTP8KtqJkfcHpb9i8hp65Y6zIDJhu+AqqegJ6UAQgpwNZXwC+JGVx0sHrk1Czbfl+SQoG9VSuT8c/7NWYxr6OJAqDYxzcSyR2LuPdiOG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812073; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uvCwniH1d5vJ2TSLTLYsHQTeRtQ/cjS0HoIHKDsL7Ck=; b=h0euN9ANfMeprLjFi3hhD9UqZKh7M2hHKYlpJEcHYyvG+TWB6nqB5cjLhrjJEJV+asPrOGziVlQSqDnAWXaF9pvkSOtb3GfjNFnkw27Lc2xB/kcQv2qHEgdCI8jTeQ4PYNl51Hq70UDsGupl+h/kFlH64Gylik6NZaQuGHHTfkU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812073295889.5689932090704; Tue, 5 Nov 2024 05:07:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHV-0000T3-GA; Tue, 05 Nov 2024 08:07:37 -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 1t8JHS-0000BQ-75 for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:34 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JHQ-0002kA-0I for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:33 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4316f3d3c21so42045365e9.3 for ; Tue, 05 Nov 2024 05:07:31 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5ac387sm194360095e9.1.2024.11.05.05.07.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812050; x=1731416850; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uvCwniH1d5vJ2TSLTLYsHQTeRtQ/cjS0HoIHKDsL7Ck=; b=mh9Om4HcUnhQbbqBtfWrPlfkyUJYJUQwDjZdqCWZpyH4hzrzjTqAJygG+wrxtvfLD+ Qds/2PkhtIV02a8aa6bIuTJQIGzdVYqbOeWLaR5Zvn25nVD72iU+ykLZFPEW0r4WUHxL MWkjmpZjOxmfidfRQnca4RRhEDbjrIjl4hPK4EpxJt7S+9yqzYCFdHxfAvLvHxEpGdaL 6TVn6SSZmdow21aBNl0NHeuUK0EjqzDF73bkILE22Ej27ef3biVr0QEaKtGr/gnB47FE qRorleVlzIdmVcZ+cH32II9TG4O5DKcpvHKSLESjLHUzDOqoINLYP4p0BkuS7O701wYG drEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812050; x=1731416850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uvCwniH1d5vJ2TSLTLYsHQTeRtQ/cjS0HoIHKDsL7Ck=; b=rjECd7D30h6J/Dyfvgypw5p9L4Q49uPOd2vigH6mvyYrXi7GMcd41JmPPpR7wR5oD9 vQ5XdWISbUEWdTFiEMBnGB4JlK55WYXpxcHwsbTAksG3J97UhtGdj34u9GMxd8QiFEML qfWE/XPgI34gx+Iz9Fip8ENSczUqjPTWz0Lg+f1U5tSCXcgyuPA0i6LPYKQbnZ4N01/5 lUa5ADMRN/jBw4mXxdVqFI8w5ZGoxXThcd4Rj4IyOw5CkpFhGrE7MKiQsznOJ3chuBoE zCBF0QLVQzFgjb0xk5rppiTOrYof0Psi9Tlfhp6oyW9d8rn5vfpwON9Ij0P1LtagPw/e Vsaw== X-Gm-Message-State: AOJu0YwqvcJ7yZI6UkewWSf6kscdYGKRCsQqKnHDn8NQKf4SVwHs3fjn ALpQqYeoMvc3s+HW/NhtiJ/vJlGrhMD7KTPnxaFkn2PBsfFTIQfGw6uFiRtqRwffqgsg6WakQZY nado= X-Google-Smtp-Source: AGHT+IFiBXplWnZ1Fvahpkn2VJVAZ0FwQVQC1I0VUBiJwTFqVRKJrUyYFPY+CVCCdJcFRzBp6JFG3g== X-Received: by 2002:a05:600c:4fd3:b0:431:52b7:a485 with SMTP id 5b1f17b1804b1-431bb98fc9fmr209119645e9.19.1730812050247; Tue, 05 Nov 2024 05:07:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 18/19] tests/functional: Explicit endianness of microblaze assets Date: Tue, 5 Nov 2024 14:04:30 +0100 Message-ID: <20241105130431.22564-19-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812074499116600 The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-endian kernel. Rename using _LE suffix. These changes will help when adding cross-endian kernel tests. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- tests/functional/test_microblaze_s3adsp1800.py | 6 +++--- tests/functional/test_microblazeel_s3adsp1800.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functio= nal/test_microblaze_s3adsp1800.py index 4f692ffdb1a..2b2f7822707 100755 --- a/tests/functional/test_microblaze_s3adsp1800.py +++ b/tests/functional/test_microblaze_s3adsp1800.py @@ -17,14 +17,14 @@ class MicroblazeMachine(QemuSystemTest): =20 timeout =3D 90 =20 - ASSET_IMAGE =3D Asset( + ASSET_IMAGE_BE =3D Asset( ('https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/' 'day17.tar.xz'), '3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057') =20 - def test_microblaze_s3adsp1800(self): + def test_microblaze_s3adsp1800_be(self): self.set_machine('petalogix-s3adsp1800') - file_path =3D self.ASSET_IMAGE.fetch() + file_path =3D self.ASSET_IMAGE_BE.fetch() archive_extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/day17/ballerina.bin') diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/funct= ional/test_microblazeel_s3adsp1800.py index faa3927f2e9..1aee5149fb1 100755 --- a/tests/functional/test_microblazeel_s3adsp1800.py +++ b/tests/functional/test_microblazeel_s3adsp1800.py @@ -17,14 +17,14 @@ class MicroblazeelMachine(QemuSystemTest): =20 timeout =3D 90 =20 - ASSET_IMAGE =3D Asset( + ASSET_IMAGE_LE =3D Asset( ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') =20 - def test_microblazeel_s3adsp1800(self): + def test_microblazeel_s3adsp1800_le(self): self.require_netdev('user') self.set_machine('petalogix-s3adsp1800') - file_path =3D self.ASSET_IMAGE.fetch() + file_path =3D self.ASSET_IMAGE_LE.fetch() archive_extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/day13/xmaton.bin') --=20 2.45.2 From nobody Thu Nov 21 13:12:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730812108; cv=none; d=zohomail.com; s=zohoarc; b=NpnNNorEegmJEQbm9ujIBB1vEU/hHqeNHQcfbryTCSqZeGu7tZwIWekIXisltE2FelMujlE/dbvndDzu7zPcxf+e0Kgrc47mrKR43Y4w8JYv0ocS2756pzDh1wA3xjumTzM87BSTUs+gNaHlEqQUnwKpOuwjCYVCpShgpgN+oYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730812108; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iGrQLs85iCO+ooJQZbg2Q0E0dHdOyXnWOUnrVx9dt/s=; b=OdQKslKI7GXrkiYu0M4lbrU/wc+qb5PpBLGfviIcV8km1juwJOiSkVAY4JGygIv2ZTZe60TGBEzD/ydvReQaL5iiPYQhmennxGVDZwvZdmpLUwLL26+sniW3/9z7kZlMnfRZwNI6IVaMsMz925NYk98WAUzXA0bqRVY6DBwa/RA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730812108417612.4755592569334; Tue, 5 Nov 2024 05:08:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JHi-0001UM-Se; Tue, 05 Nov 2024 08:07:51 -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 1t8JHg-0001O7-Pl for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:48 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8JHe-0002mE-UY for qemu-devel@nongnu.org; Tue, 05 Nov 2024 08:07:48 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-37d49ffaba6so3682886f8f.0 for ; Tue, 05 Nov 2024 05:07:46 -0800 (PST) Received: from localhost.localdomain (86.red-88-29-160.dynamicip.rima-tde.net. [88.29.160.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c10d439esm16225993f8f.44.2024.11.05.05.07.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 05:07:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730812065; x=1731416865; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iGrQLs85iCO+ooJQZbg2Q0E0dHdOyXnWOUnrVx9dt/s=; b=p7UplYsopUDrR9bQxsQNNf+/ABPKai0G9SUQzGaxakVA0i3Hw1E3tMNfKLrDZss9gs WPahsSIx77KwVxoTR52QGinkc3yXybT+iemMPAtf+6noc2pizCKVXocVlacJk1VhU5rY 9YSapTsr6/I/APXYiofkKYeaNvSoidtdH+e5kARVviPu+t/QEj996gLQZr0PCz4kYgPV 3S06D9wbojiHpisMrXE/JFZ2dGnMGkWH1bkdjQFDWd3CPwAdKbcDYF9RoS0R6NDrNH+l 2G08yqBg8j07H/Qt1KlT5G1c8MePkBmqAyyO5AwYwdtr3xSbSIGrd4a3AgF3BiLHVXJF tl0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730812065; x=1731416865; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iGrQLs85iCO+ooJQZbg2Q0E0dHdOyXnWOUnrVx9dt/s=; b=eaiaVrhJinvJbma4FehrQxXWeiQDIxnzukoIOeQeyen7VTNrsCXiZGBHtAAJ9iPySf 96awT/Ye94XemdXKDoYlWiaP7XOYeEE4THvqVi0vQpHHHiG7kibqc4nhteWr+bO2UWTg nukvfyoVbY2q2/tmvoMET+t+A2lZDKc35gmjLqPbDG2gasoYB7xuZfIjmrbp/5H1xxvy LItH19NthJeH0nLHBkSOPDTkTEBr8aVjMgN6+njx3ucnVF4FYulRM2w6xQK3VIjWusaY H/EYl0kN6f6fkmOaXQs1+0qztOMkhwxXG84UsylsxFT+2shz2ZZstTPyPfYrhx8ui473 ZgDA== X-Gm-Message-State: AOJu0Ywb/gpQeL1ebEFwjqyh3w5v1Yq9hvC9kWgDsEf1569uetlF/huH TpNJlW211TUSzvtqkQUriHep358Al4/oVGcq2VWpzhX14y0WoTf3cvftrpwkaOHCy30FseCsjOR 3uFw= X-Google-Smtp-Source: AGHT+IFBVQj24hPaYJq+c06qyzVA+HQtRRHQ9ExIDQjWpx2JTxCgRcyMOYt+iiZiAtz/GgVm7Ul8Gw== X-Received: by 2002:adf:f802:0:b0:37c:d2f3:b3af with SMTP id ffacd0b85a97d-381b705688bmr15321823f8f.5.1730812065186; Tue, 05 Nov 2024 05:07:45 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Cc: "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Thomas Huth , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 19/19] tests/functional: Add microblaze cross-endianness tests Date: Tue, 5 Nov 2024 14:04:31 +0100 Message-ID: <20241105130431.22564-20-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105130431.22564-1-philmd@linaro.org> References: <20241105130431.22564-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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, 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-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730812109176116600 Copy/paste the current tests, but call the opposite endianness machines, testing: - petalogix-s3adsp1800-le machine (little-endian CPU) on the qemu-system-microblaze binary (big-endian) - petalogix-s3adsp1800-be machine (big-endian CPU) on the qemu-system-microblazeel binary (little-endian). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- Clever refactor left for later --- .../functional/test_microblaze_s3adsp1800.py | 21 +++++++++++++++++++ .../test_microblazeel_s3adsp1800.py | 19 +++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functio= nal/test_microblaze_s3adsp1800.py index 2b2f7822707..7f5e8b6024f 100755 --- a/tests/functional/test_microblaze_s3adsp1800.py +++ b/tests/functional/test_microblaze_s3adsp1800.py @@ -36,5 +36,26 @@ def test_microblaze_s3adsp1800_be(self): # message, that's why we don't test for a later string here. This # needs some investigation by a microblaze wizard one day... =20 + ASSET_IMAGE_LE =3D Asset( + ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), + 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') + + def test_microblaze_s3adsp1800_le(self): + self.require_netdev('user') + self.set_machine('petalogix-s3adsp1800-le') + file_path =3D self.ASSET_IMAGE_LE.fetch() + archive_extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-kernel', self.workdir + '/day13/xmaton.bin') + self.vm.add_args('-nic', 'user,tftp=3D' + self.workdir + '/day13/') + self.vm.launch() + wait_for_console_pattern(self, 'QEMU Advent Calendar 2023') + time.sleep(0.1) + exec_command(self, 'root') + time.sleep(0.1) + exec_command_and_wait_for_pattern(self, + 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png', + '821cd3cab8efd16ad6ee5acc3642a8ea') + if __name__ =3D=3D '__main__': QemuSystemTest.main() diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/funct= ional/test_microblazeel_s3adsp1800.py index 1aee5149fb1..60543009bab 100755 --- a/tests/functional/test_microblazeel_s3adsp1800.py +++ b/tests/functional/test_microblazeel_s3adsp1800.py @@ -38,5 +38,24 @@ def test_microblazeel_s3adsp1800_le(self): 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png', '821cd3cab8efd16ad6ee5acc3642a8ea') =20 + ASSET_IMAGE_BE =3D Asset( + ('https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/' + 'day17.tar.xz'), + '3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057') + + def test_microblazeel_s3adsp1800_be(self): + self.set_machine('petalogix-s3adsp1800-be') + file_path =3D self.ASSET_IMAGE_BE.fetch() + archive_extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-kernel', self.workdir + '/day17/ballerina.bin') + self.vm.launch() + wait_for_console_pattern(self, 'This architecture does not have ' + 'kernel memory protection') + # Note: + # The kernel sometimes gets stuck after the "This architecture ..." + # message, that's why we don't test for a later string here. This + # needs some investigation by a microblaze wizard one day... + if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.45.2