From patchwork Wed Dec 18 18:21:06 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: 851757 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp1078428wrq; Wed, 18 Dec 2024 10:23:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVSeQGaQvjoPpHrmrltIZIvm2IyOnQ9/3DjR9LKIR22AsNepNR8PJKNrUq8+DJfKO6JIzMRAQ==@linaro.org X-Google-Smtp-Source: AGHT+IHV58AaTvSMWjAec2PCITt6qZS3EvmL1ASEY4lf3dXwsEdoroeuDV47uTOI+1mcXTNzptfl X-Received: by 2002:a05:620a:2492:b0:7b1:4fba:b02e with SMTP id af79cd13be357-7b9aa8b4f41mr47767085a.12.1734546191360; Wed, 18 Dec 2024 10:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734546191; cv=none; d=google.com; s=arc-20240605; b=A4vvaeqvVO81FyhYKnH4Xb80vtMbqUdOC0zWOfW2XRDwFxT9KMLf3hd/ARhQ8QnZW8 pxUNiuOQ0yhv+7mWi57xGqX7YGFO373cZqSubtHaVdj97djBDRDeedwf7O/XnGZyUBYj RIcFDtrKvqecp8qT64+cHdlKBKFVnYAAmpLKM6gtvf7YZ021P/I1h84HWOH3yLTfnrpS d+7YjkhL7aWVQQCfeJNURaoFrX4R/wzgFvbn5nM51pxsXGsJ/SoIan7W3v69QDTsjvFA VV0yp5Db3Ot74XyxVGG17Rdk3hBhuXQ82zhFI6EDUYzK+x54YdnHJ6YSmHm+W9O/5doS Xdug== 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=wByjU5ClK1ME+AZ2OTGYKkBeJBTU4EpbHV73WRFFne8=; fh=aDK3AYW/tYhipRsN4fimbcHK1l9GCjVTlWyiAdYPq8A=; b=csy2X9jKTEz6q9lMVUpnZnEfM91sGZdfiWXeHyfoIgbbrFpDVLD+h+yBLSm8O2+H7q D8X5XzUqfAWIEzTLbBCy5gtAadoBJ4kDdc8uPFUyVLCSQ44lSGhwbbbghp4RHHYW9HoE /Eo0s9in6rRy9xDMCx0CPw3da/mq5BcLYsHEW1f23fr01tz+3Cs48GuPeI+1xZD2g9Eg 3NNRVps1k0W+jRss21tFcZFVNM8LqDiCQhkml/VeFIpueDb3awgxV4Kf8Tz8dH1Upyyl uBkCb9XUf04/882TB8S1gLI2WvufSNIP1SHdSYxRj6b/Vdsbih2kTTXRhwA7gg7ieFmL WQUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MGyYA0X5; 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-7b7048c0250si1230327285a.213.2024.12.18.10.23.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 10:23:11 -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=MGyYA0X5; 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 1tNygB-0000Vj-9l; Wed, 18 Dec 2024 13:21: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 1tNyg6-0000Pe-SL for qemu-devel@nongnu.org; Wed, 18 Dec 2024 13:21:47 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNyg4-0001pA-7Y for qemu-devel@nongnu.org; Wed, 18 Dec 2024 13:21:46 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-434b3e32e9dso73321125e9.2 for ; Wed, 18 Dec 2024 10:21:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734546102; x=1735150902; 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=wByjU5ClK1ME+AZ2OTGYKkBeJBTU4EpbHV73WRFFne8=; b=MGyYA0X5iPFczs+R/0YE3fuxq8mCs8eDC22X3mXKzGrdAhL4MoiDgXwD+I+XtNlkbE vN0IxugRsQ49eFQeeDj0553MUwWjWEWCuXVQgUpgv1c5XW4CvabVMAaqamsEkuct5hZ9 8apzjaXKNS0RRgoQbOZaQvQYxaV08ah1FBQbc8YlryIpjFspZLjnwsh8PdyYwirq8fNd HPlTIpJ4rVcvnyk+Oa05vjjzcCMyY40+TWhiCR6BlXud0wHi8ZvpcQBuIUz9zdjnpeX3 MjrkQ8JOPBf7VrghVcFBSqIW3B2wCua1M+SE/bUjENPMGDSHCgwkgefiwn9dyZBeLA6t wvWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734546102; x=1735150902; 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=wByjU5ClK1ME+AZ2OTGYKkBeJBTU4EpbHV73WRFFne8=; b=h7ChY1RMvOBzF7J/3aQJC5cmtj6Jux4S5KDkr2m9FpD6OezQeBpIhzjqGnOT+7sXH3 LWAJLqzpm066US1uE8L9R/CrMY5sR4+o7Dp24ybmTAhOb0Wsb9t6+JxWpHWCyyg5KH0M Lo49LBDvxeVR7vcYOwTxqBbfV5l44tZMD1DuLlH5jNnSUEHfrckOQrqjFxU4XGpaSETB mvvu0c93yR9Gf6wN7IjqK3e+BhcUqVW+ZojXp/zcgDZXHSWnva//KoM2IOFlrdxyFKNp GvbiTNEVL3o87l9Lq8oveGv2fo6zFiiQ2TQFq7TlepfCzDLdGP72THkEyh0s2smhNwMF Uv5Q== X-Gm-Message-State: AOJu0Yzu6438ph/QNXngQBH+dSTXPDx7gIPW/YOQ2SsJrZR2cF1TXZfB 00djEeX4maEBAR+eJ+owx+Upj+pUVCI3vg+Jkk+2P79g7xjTsN7Fv81R88vuObvArslAZ3HrWa2 1 X-Gm-Gg: ASbGncuhUdbhN6W4zqBb8MyzB1Rv0kBcs8oovGSdHYslGv8IYm2jHRNNAH9C5oencsh OG442JLklwImNC5O2xq17JDSn/NEyQk+8qg+njkUNBXJ3LjgsxO1v0hiilRtpw0zWnB8bU+fjG5 LbOb8zNDa7ELLnx5oV52omieFPTDDPqRBmpDkMsj9qW0AyWRYLMbX+V3W6d/Nx7wQP0VU8Yrr6K ynTJmp9TvSaD8jgpp9IU8EtMlSgKz9vlTe3+qcSZJiC3qR8hs+k092/k0Bo9+nW3PcoGyNSaeCa Rout X-Received: by 2002:a7b:c392:0:b0:434:a802:43d with SMTP id 5b1f17b1804b1-4365aa5a397mr20136245e9.27.1734546102430; Wed, 18 Dec 2024 10:21:42 -0800 (PST) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80120e8sm14927833f8f.6.2024.12.18.10.21.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 10:21:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Nicholas Piggin , Daniel Henrique Barboza , "Edgar E. Iglesias" , =?utf-8?q?Daniel_P=2E_Berra?= =?utf-8?q?ng=C3=A9?= , BALATON Zoltan , qemu-ppc@nongnu.org, =?utf-8?q?Marc-An?= =?utf-8?q?dr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH v3 7/7] hw/ppc/epapr: Do not swap ePAPR magic value Date: Wed, 18 Dec 2024 19:21:06 +0100 Message-ID: <20241218182106.78800-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218182106.78800-1-philmd@linaro.org> References: <20241218182106.78800-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 The ePAPR magic value in $r6 doesn't need to be byte swapped. See ePAPR-v1.1.pdf chapter 5.4.1 "Boot CPU Initial Register State" and the following mailing-list thread: https://lore.kernel.org/qemu-devel/CAFEAcA_NR4XW5DNL4nq7vnH4XRH5UWbhQCxuLyKqYk6_FCBrAA@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Nicholas Piggin --- hw/ppc/sam460ex.c | 2 +- hw/ppc/virtex_ml507.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 78e2a46e753..db9c8f3fa6e 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -234,7 +234,7 @@ static void main_cpu_reset(void *opaque) /* Create a mapping for the kernel. */ booke_set_tlb(&env->tlb.tlbe[0], 0, 0, 1 << 31); - env->gpr[6] = tswap32(EPAPR_MAGIC); + env->gpr[6] = EPAPR_MAGIC; env->gpr[7] = (16 * MiB) - 8; /* bi->ima_size; */ } else { diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index f378e5c4a90..6197d31d88f 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -119,7 +119,7 @@ static void main_cpu_reset(void *opaque) /* Create a mapping spanning the 32bit addr space. */ booke_set_tlb(&env->tlb.tlbe[0], 0, 0, 1U << 31); booke_set_tlb(&env->tlb.tlbe[1], 0x80000000, 0x80000000, 1U << 31); - env->gpr[6] = tswap32(EPAPR_MAGIC); + env->gpr[6] = EPAPR_MAGIC; env->gpr[7] = bi->ima_size; }