From nobody Fri Nov 1 07:17: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=1708020220; cv=none; d=zohomail.com; s=zohoarc; b=n5SOjxzIi1Uj/Ef7qUo4SEgAT4YvXBQXMghouSqEQsVGG5Qf7ZjWRs2HhTLLWjFPTV4RuY79Re3t9NUVa3ocCRlLBl4ovra+79h2TIdLq0grjJbasV2cZcd5wDSbjtawGpNpuP2JAHwjUQhwyQp39dFSK+/CeySgG7lWi1/rfIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708020220; 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; b=M8fHoznFvVDwD5oSMUebV15r2ZwndqMN2Wa4+dXsu5/06SAQPf8vQererBkutvZszLdO8ce9Ob8lblDWWh8Q/T8Cfe/WY2xK/Mf0SzM38NNuFRRMkz/a5cyey9BqfiIXvAsWNOYt8raFOSOE2Hm6wLMbvYK9NihjH7nTD0Bqr5Y= 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 1708020220400532.1835539120068; Thu, 15 Feb 2024 10:03:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rag3H-0002zT-Sh; Thu, 15 Feb 2024 13:01:40 -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 1rag3A-0002qB-Sg for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:33 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag38-0002VQ-Ds for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:32 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a26fa294e56so175743266b.0 for ; Thu, 15 Feb 2024 10:01:30 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id kt22-20020a170906aad600b00a3d07f3ac61sm789679ejb.101.2024.02.15.10.01.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020088; x=1708624888; 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; b=JzyX1D1EIt4/krNzw6j5g5htFeR7YEbAUgRfXQFfnIMzInSPy7ugN5doIIMhsGWdsT evNocsCn1mumw/ZCBni3xhgOz2f9vNwTMStbfzGqHWD5eq+AtruZ99crTtJlAzjH8fpt YeIOxEVu+slVEec8OccYEH5J1FIiWjjKENhtqtHj8oWGFF6ZIw8Xg0Po/Skm2teBoza2 bMMICcHW+Bh+P2HVkJaC3ZI7B+YaKcSh1OmfOPk8iN3E51EU+RGqrZb2DjEFB4vnXLfN fOEPW4XDnLDJPlxDOiETONJfXzilYlTrRZIrml9L7RpLIrelibV1SjeXPaU8cfniET+A zzbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020088; x=1708624888; 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; b=fJboswfgtjWKR6+ssyqEstcTcMI3UuvkiRWE2j2arP59YWTqjW3Szq/A/6kN73av0A BFtVhftggSXvc1Yxftsbj8Rs0IZ2AA+arARZtiH3uD5PecSt2/PYSaKHP4EHQXtGbdzY 5aBdH3srb5TGJ3PehSOvcS75tUHDcBD5lZSfyZwDgewYk6BsYN/RXXoZgPZM+gawzinj byXfkKycCt/8aC/0gzTFOU5fADzPIwJJZq9wbZMMbG2UzHZLX5ON3GRSfXgbiBzLVUGM lEdRGEv0bXjlbRRXRqV18JAIV7VhNBvNcck/nmE86QELOvylEyLDibGO4fhylQNfHdVz 32wA== X-Gm-Message-State: AOJu0YylpNU1oMt60E4WI5A6GIOGCA3DIsfPyUi8VoPe+jo5cwF0xEMN MA+uGl3wXJxqIwxpyCfCMxSQNYOsIVJPC11wUTm1SQlrswyW4DNqr5Kiutk5zprieK0tVm+95+3 6Pvk= X-Google-Smtp-Source: AGHT+IGLjYXXn47agCKkDasZ8sqbAnzvkM+d+mq/LLVoEFmWhes1gzf4+LC/PgvosYBszWeMDN4qqw== X-Received: by 2002:a17:906:2b55:b0:a3d:624d:3e7 with SMTP id b21-20020a1709062b5500b00a3d624d03e7mr2042719ejg.45.1708020088563; Thu, 15 Feb 2024 10:01:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 32/56] hw/sparc/leon3: Have write_bootloader() take a void pointer argument Date: Thu, 15 Feb 2024 18:57:26 +0100 Message-ID: <20240215175752.82828-33-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-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::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1708020222349100003 Directly use the void pointer argument returned by memory_region_get_ram_ptr(). Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240215132824.67363-3-philmd@linaro.org> --- hw/sparc/leon3.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 5c670b92db..fa4fbe4b30 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -94,9 +94,9 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr add= r, uint32_t val) * state (eg: initialized by the bootloader). This little code reproduces * this behavior. */ -static void write_bootloader(uint8_t *base, hwaddr kernel_addr) +static void write_bootloader(void *ptr, hwaddr kernel_addr) { - uint32_t *p =3D (uint32_t *) base; + uint32_t *p =3D ptr; =20 /* Initialize the UARTs */ /* *UART_CONTROL =3D UART_RECEIVE_ENABLE | UART_TRANSMIT_ENABLE; */ @@ -338,10 +338,7 @@ static void leon3_generic_hw_init(MachineState *machin= e) * the machine in an initialized state through a little * bootloader. */ - uint8_t *bootloader_entry; - - bootloader_entry =3D memory_region_get_ram_ptr(prom); - write_bootloader(bootloader_entry, entry); + write_bootloader(memory_region_get_ram_ptr(prom), entry); reset_info->entry =3D LEON3_PROM_OFFSET; } } --=20 2.41.0