From patchwork Tue Nov 5 22:47:01 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: 840829 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp240168wru; Tue, 5 Nov 2024 14:50:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVPUSjlGp5pUVHtXxsgfGzbO6pVXW69/VQMeRG/eDdvtERyB4jGfPu2ITafu95Qn/+CdjcDzw==@linaro.org X-Google-Smtp-Source: AGHT+IGcOhsH+o4Z9KQJWOu1j8Ok3ZrifdQyr3msOHJusXZgvc73li7KsL76XrCpwWzNSLof5Bnu X-Received: by 2002:a05:620a:1729:b0:7b1:41b8:9ed7 with SMTP id af79cd13be357-7b2fb966d28mr2441715085a.16.1730847038765; Tue, 05 Nov 2024 14:50:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730847038; cv=none; d=google.com; s=arc-20240605; b=gnNQe0DNV2CWiiDLKFpUVUil3f34XTxYJLkBR3kkGMQktE0bSxaKd/7Hhs5cayjy7j wGAGumJ5wiasPoBI8CdiWHLMNNHj+JPHkCaPnLnfp5Rkm5tt0w/t+9ir0PGwWk1GHcqG ch1Gx2bf8f0C3HPTx26EjuK5UULZzPwA1r8vrQwIesGStFNawT8hv5GtziFJaZxaOyUB uLXoOtIKUTpzoWjmQuJYrDSWuF2NCvogUWue0fW/R0Rjnu1Eym2VDPqS7NzEtEnbp1Bv +HMjyI8szITk56zS2eMrb/GH48iXiAOQhW7nSpSwHmtPmO3Jr5oLzek+1F2pNpyjG6rF F+OQ== 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=XJjfe10RbbrTnprCzmUrG8sh9BThAlZuJ9ZOYJUBh1Y=; fh=zm9GEwd9Zm8pGstmzedGfamov8flIGVi52cG9DQ5Sz0=; b=Ip4Mtz1ZKQok2F7BX/lz4L0wDFtYLXPdmDNeUc8xl7lOf0YpgsvXbOH7e7DJPkwth8 n0m9zX+43iWg+BDQqDc3huFuVpcISqVv/t1DL7XEfDydSu8/ZGP/91MpOdswa1ywz7ez pS+6/SeeZn5tr4Oj25Piam7ERQVwC7mx9bDhkkEnZ2teJG56EEDJnu/POZffMNs3DzI4 vesxZfNeHewUiq9rukF6y5dIewdiVMJnIrQHg8/XQXZsie9y4wS0SdwmTWOugIlaZaup QhX53CodVkl0RpLzJjBQWhuifKSTFsho5XU19PHz4XyfN23pFiLaH2V6Pu3ggOdhpmV8 gksQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EPk5RF3H; 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-7b2f3a9d8c9si1639774785a.509.2024.11.05.14.50.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Nov 2024 14:50:38 -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=EPk5RF3H; 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 1t8SLE-0004y4-LV; Tue, 05 Nov 2024 17:48:05 -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 1t8SL0-0004xU-DY for qemu-devel@nongnu.org; Tue, 05 Nov 2024 17:47:52 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8SKy-00048S-Ps for qemu-devel@nongnu.org; Tue, 05 Nov 2024 17:47:50 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43155afca99so1430765e9.1 for ; Tue, 05 Nov 2024 14:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730846867; x=1731451667; 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=XJjfe10RbbrTnprCzmUrG8sh9BThAlZuJ9ZOYJUBh1Y=; b=EPk5RF3H3XagipFCtIj2cs3zn4kQwhmSHpwc2UqVGZ68VEtqb0EqZP+5hAU/WIbXeS Zm/VVYANp2tAk0MCKW9RVmB82Xe0h2dydCqfbzsmhzypi5lp6Sl87mdGbPh0I12jR8pj 9Of9p14eEBpMqeHJpr6LxSZ4LJixFk3sVQFezULkJIHsm+EZpOvz0VCKOLw03+NCS6yl AtZebjA4A56tIkBUJjozmdP6knDYZ2dZ9ZeFFtuVywjsgK4mp8FVHcr7TZOdruBIl1/0 zinxprZpJeJ0N1q6js7xqaYhh+zPNOCJbWr8Z1X0B3Za8+msmzL/mxqWwZ9G0Iq6t0GL IuBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730846867; x=1731451667; 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=XJjfe10RbbrTnprCzmUrG8sh9BThAlZuJ9ZOYJUBh1Y=; b=epIMuJLyCJ7dXLHYYi0Laq8lZfuzClx0M+gA/8SekxZD4B6kyfwhezQDn5EGexyXm/ KenPQ+0dCO9tIMPXzg6LKgydfTYI6+B+VpUvQxFIqM7j8C2lUk8GlvB+S+yM/zywmBIx CvRg86aYHWPYeWUu5u76877mqCWdLldpvdEC3M7zSKxRRZSsF5i/MvYia30Z2Qc+5yEx j/MLQQi3J9uboyngXF8eJkg2TwoK/JQNqUJQtK0liNFn7HYe8NmTyfkh1yirY0RQ7pQu Ut5KSdPrRgSiSzwkJzZewUFLYd9Ole1v4Req1G01t1Qq9Jjcqimb4XUfHBXdYO3pwmPm 0r2Q== X-Gm-Message-State: AOJu0YyhHEmfWaHCNHQRISHvZVf7pViLvSqvJfLrf9JFiVl/118oEV8t HOLQnm4ILIbzDj3UWY/SsnzeDigkPNnMqpK5Vm+xTaNDu2LJOEBmoQdv/wQfM3gaYmu2Y+gz6ip 9Nr19yw== X-Received: by 2002:a05:600c:354f:b0:42c:b67b:816b with SMTP id 5b1f17b1804b1-432a9a67904mr3179805e9.1.1730846866924; Tue, 05 Nov 2024 14:47:46 -0800 (PST) Received: from localhost.localdomain ([154.14.63.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa6da94fsm1010815e9.29.2024.11.05.14.47.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 14:47:45 -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?= , Richard Henderson , Alistair Francis Subject: [PULL 03/29] hw/microblaze/s3adsp1800: Explicit CPU endianness Date: Tue, 5 Nov 2024 22:47:01 +0000 Message-ID: <20241105224727.53059-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105224727.53059-1-philmd@linaro.org> References: <20241105224727.53059-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 By default the machine's CPU endianness is 'big' order ('little-endian' property set to %false). This corresponds to the default when this machine was added; see commits 6a8b1ae2020 "microblaze: Add petalogix s3a1800dsp MMU linux ref-design." and 72b675caacf "microblaze: Hook into the build-system." which added: [ "$target_cpu" = "microblaze" ] && target_bigendian=yes Later commit 877fdc12b1a ("microblaze: Allow targeting little-endian mb") added little-endian support, forgetting to set the CPU endianness to little-endian. Not an issue since this property was never used, but we will use it soon, so explicit the endianness to get the expected behavior. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-Id: <20241105130431.22564-4-philmd@linaro.org> --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index dad46bd7f98..37e9a05a62a 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -71,6 +71,8 @@ petalogix_s3adsp1800_init(MachineState *machine) cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort); + object_property_set_bool(OBJECT(cpu), "little-endian", + !TARGET_BIG_ENDIAN, &error_abort); qdev_realize(DEVICE(cpu), NULL, &error_abort); /* Attach emulated BRAM through the LMB. */