From patchwork Tue Jun 20 13:50:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ~rlakshmibai X-Patchwork-Id: 1799042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qnfns1LdGz20Wk for ; Sat, 24 Jun 2023 00:32:01 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qChos-0003xh-Na; Fri, 23 Jun 2023 10:31:30 -0400 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 1qChop-0003v2-Ep; Fri, 23 Jun 2023 10:31:23 -0400 Received: from mail-b.sr.ht ([173.195.146.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qChon-0004NY-LP; Fri, 23 Jun 2023 10:31:23 -0400 Authentication-Results: mail-b.sr.ht; dkim=none Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 0334B11EEF6; Fri, 23 Jun 2023 14:31:19 +0000 (UTC) From: ~rlakshmibai Date: Tue, 20 Jun 2023 19:20:06 +0530 Subject: [PATCH qemu v3] fdt_load_addr is getting assigned as the result of riscv_compute_fdt_addr(), which is an uint64_t. Message-ID: <168753067876.24231.11584763305862806528-0@git.sr.ht> X-Mailer: git.sr.ht To: qemu-riscv@nongnu.org, dbarboza@ventanamicro.com Cc: alistair.francis@wdc.com, rathinabalan.thalaiappan@bodhicomputing.com, qemu-devel@nongnu.org MIME-Version: 1.0 Received-SPF: pass client-ip=173.195.146.151; envelope-from=outgoing@sr.ht; helo=mail-b.sr.ht X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Reply-To: ~rlakshmibai Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Lakshmi Bai Raja Subramanian fdt_load_addr is declared as uint32_t which is not matching with the return data type of riscv_compute_fdt_addr. Modified fdt_load_addr data type to uint64_t to match the riscv_compute_fdt_addr() return data type. This fix also helps in calculating the right fdt address when DRAM is mapped to higher 64-bit address. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Lakshmi Bai Raja Subramanian --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 95708d890e..c348529ac0 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1244,7 +1244,7 @@ static void virt_machine_done(Notifier *notifier, void *data) target_ulong start_addr = memmap[VIRT_DRAM].base; target_ulong firmware_end_addr, kernel_start_addr; const char *firmware_name = riscv_default_firmware_name(&s->soc[0]); - uint32_t fdt_load_addr; + uint64_t fdt_load_addr; uint64_t kernel_entry = 0; BlockBackend *pflash_blk0;