From patchwork Tue Nov 5 23:35:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 840849 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp255235wru; Tue, 5 Nov 2024 15:35:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXqaASYnG8Za3atESYMsrOdVDDw1lpTe5+n9cXGucWsvEbZs99yyaFE+UgewSmoQ4DNcQjsjg==@linaro.org X-Google-Smtp-Source: AGHT+IFPiRUkohqo5cgi8+938VcbhAFwWQpYwlherMmJkxRmvDSbU1bdk9+cY+gAIVjohidAFJFP X-Received: by 2002:a05:6102:dce:b0:4a7:4900:4b83 with SMTP id ada2fe7eead31-4a9542f1580mr22351423137.15.1730849740806; Tue, 05 Nov 2024 15:35:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730849740; cv=none; d=google.com; s=arc-20240605; b=jwm60f8pizxLSerBs+WWy/9xcTACPRKq4f0hbNAmAPXBpo3mAqWtmfZY6QWifgOnpl NHpdQ/ra4yyt3mN439f5ZZVB8ifPUHILPeB59E5Bt7NnaVrYgjBPv86eZ0/Vy7jGDkGn LkF2HEJaqUa6m1t0p2PSDBJ9dshgXGYQu/zzxsaYd/6e3dm9gcnVtpxOu9zlJ50NgfzG WyB8Slz/n9HsUTPOcwtdPtD7XeSeWNlWxSXb3ULT/4OzqgXssb/WYEIsmmTCkJUc6OfH p7ejoJ14kBOTnebNFyEF7PNFXNHWz0hWsf0k3sC+C0agDFtzqI+6WwHKnZmuB7lTuYUy EcAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qVMUnilpWTyAARMlNo8b1UDqRd7LQq70xLBCXbdhdhU=; fh=3drKK3DwKfkzqj2ZwL1Wo4wELFSUo67a4RVHKvNVXMA=; b=SeXTFPkER+VXW9ZhAC5o0ieOJQXLgMB4NUhaAINsYV62pNVnDuvUcHXBUUEyfKheEO ophYeVyJrseysC5x/Cw2x1A1RG5u3wxZOIeHXovED0TJ8fYzgP39HNL+qKKo8RrMrFRJ Lsj25wmFobPr4gx6qRjgpm8FbrYblViSxqttfdJqKWDgDDfBTa2Xcr5+KQLQo5C6FGJa 4ns/7wGHZw0MDCIKMq8hmLcTkaOr0EqC5h0IO7+u4QOntdPRUH2Be3XOlINUDzeJm6zZ xMCxoVwj7XQgn8PsaZNMK7mutw4DDd0VB5htC/3Z7QCyjPoTdOrE6upVYd8S6bP7i13+ xqiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ev4Td0lb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3a032ecsi1494349285a.169.2024.11.05.15.35.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Nov 2024 15:35:40 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ev4Td0lb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8T4v-0000JD-TP; Tue, 05 Nov 2024 18:35:17 -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 1t8T4u-0000Ij-9d for qemu-devel@nongnu.org; Tue, 05 Nov 2024 18:35:16 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8T4s-0005vf-Gt for qemu-devel@nongnu.org; Tue, 05 Nov 2024 18:35:16 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a9a0c7abaa6so712600366b.2 for ; Tue, 05 Nov 2024 15:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730849712; x=1731454512; 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=qVMUnilpWTyAARMlNo8b1UDqRd7LQq70xLBCXbdhdhU=; b=ev4Td0lb81jqXoJ+C+JbCZ7j17r62ksleYXDUs0vtP2x61xIVMG/sj3ccN+4grZCkR 1vHAg91KDVEhYh8awX2NrayVqzpgU/8ED6W43nQW47NX1lRdD9SLK6GAGm+Qnj4CR0nj zBKZdPWcv1mGB9MBOARSrZpnJPFhxLc2AALidmtaJv2GP3xSqGpBIxKRxt9w4xtVE8Hz OuEEEv40lLp2Iap6i3MgUYzwBuKwiJBVsao/9Gw4WTf8JPazOY5UEXyvGwfU2m94lrtl 5IvRcqPkPi7Tist6swDThsZJb5t5qe2v7o1wRD2EtNM2FhR1rikIPmF8xwNbJZsumKBv S+rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730849712; x=1731454512; 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=qVMUnilpWTyAARMlNo8b1UDqRd7LQq70xLBCXbdhdhU=; b=kDrREiDo+X3u0Im62/nfAMJjL5U2RlwBwN4Hov9IxMZw4RdQoCzFfh+wnfdJMqnywc HkyhtpsI6ntPxtytkfe5VNyO/m29pEKGdoPCJmk30F02pqIs4G9JuFrI6cuP4134ITUx MLTFFue35fUE6T8Y6ZVIK91oShMKjc9ExBkQGwHNb+9k9TXsVPNestaQZ9DaZMfMIOdJ PxttlVd1PyP4ls/dyLFaimAvd0Mrsm0HZv89NJt3NPAly5PJQai0kr/ffKdpmFvnoiaW aBEUIW3kxh5T0VdaPf3EaOpHZTuQnaQQwLTe5GWzKpQR8tL8yCPI7P0l+n7IixRblxhC V6cw== X-Gm-Message-State: AOJu0Yw2y6hUU6aCW6QHTmXnog0iKUDSzizM5LUDGytAQPegxDk32bMO mXmIyqJzaxX5QRZW1wW4U05C89CnA2Pw3BFWYSSirYyVRvEw50oQRZSvhD37zh+pWC6EuKpp6gT AtoHHYg== X-Received: by 2002:a17:907:d23:b0:a99:f833:ca32 with SMTP id a640c23a62f3a-a9e6556fcd0mr1869938666b.18.1730849711773; Tue, 05 Nov 2024 15:35:11 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16a10c4sm193453866b.33.2024.11.05.15.35.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 15:35:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Alistair Francis , "Edgar E . Iglesias" Subject: [PULL v2 01/29] target/microblaze: Alias CPU endianness property as 'little-endian' Date: Tue, 5 Nov 2024 23:35:03 +0000 Message-ID: <20241105233503.56812-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105233503.56812-1-philmd@linaro.org> References: <20241105233503.56812-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Alias the 'endian' property as 'little-endian' because the 'ENDI' bit is set when the endianness is in little order, and unset in big order. Reviewed-by: Anton Johansson Reviewed-by: Alistair Francis Message-Id: <20241105130431.22564-2-philmd@linaro.org> Reviewed-by: Edgar E. Iglesias Message-Id: <3f61b85c-9382-4520-a1ce-5476eb16fb56@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- target/microblaze/cpu.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 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_abort); qdev_realize(DEVICE(cpu), NULL, &error_abort); /* Attach emulated BRAM through the LMB. */ diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.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_abort); - 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..b322f060777 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -328,9 +328,16 @@ static void mb_cpu_initfn(Object *obj) qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_dc, "ns_axi_dc", 1); qdev_init_gpio_in_named(DEVICE(cpu), mb_cpu_ns_axi_ic, "ns_axi_ic", 1); #endif + + /* Restricted 'endianness' property is equivalent of 'little-endian' */ + object_property_add_alias(obj, "little-endian", obj, "endianness"); } static Property mb_properties[] = { + /* + * Following properties are used by Xilinx DTS conversion tool + * do not rename them. + */ DEFINE_PROP_UINT32("base-vectors", MicroBlazeCPU, cfg.base_vectors, 0), DEFINE_PROP_BOOL("use-stack-protection", MicroBlazeCPU, cfg.stackprot, false), @@ -387,6 +394,9 @@ static Property mb_properties[] = { DEFINE_PROP_UINT8("pvr", MicroBlazeCPU, cfg.pvr, C_PVR_FULL), DEFINE_PROP_UINT8("pvr-user1", MicroBlazeCPU, cfg.pvr_user1, 0), DEFINE_PROP_UINT32("pvr-user2", MicroBlazeCPU, cfg.pvr_user2, 0), + /* + * End of properties reserved by Xilinx DTS conversion tool. + */ DEFINE_PROP_END_OF_LIST(), };