From patchwork Thu Feb 15 13:28:23 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: 772894 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp827906wre; Thu, 15 Feb 2024 05:29:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWWEz84hzRtS6+CG6HpfR129LyMZOTQ+f5tnS5eRqkyCMGoKTsTllb6bmTaWRLIVI+EWEFk+YioSgqSzaznJtnz X-Google-Smtp-Source: AGHT+IGVU4uqOGovFYDIQXurJLG8PLBp76luirUShIi2m0XCd48gv21QyDWKYpYUkfDRXkbomU42 X-Received: by 2002:a05:6214:ca5:b0:685:396c:7c51 with SMTP id s5-20020a0562140ca500b00685396c7c51mr1726533qvs.21.1708003764372; Thu, 15 Feb 2024 05:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708003764; cv=none; d=google.com; s=arc-20160816; b=LiWow3K3m+l7TwuVysXA/DSlvz/v0WglcuEI/UuHYSzEnofD+mCh1dlLI1CU52IaGG i0Wvi3NbwWxRHLu49pzS+/qXec2xfLWjIrEiMMC6/a+oCIfBAtdfN1+3nLQ70oy/oUAg mEwZqtD48gOlmNdTymjosTjAi8N6uPGt7yRGb8mmmEIxDBTvL11BQ5HhPdqS/YeCzRKY U1ICtVS7y1uUEzEZFVFAg4sx8mX2vo+29xHU12tHRqyB4qe401dMYWQ0LchigaFIC+OE Axd8zjUWv5T9udCJMkhHB3mI7gvp1Zs5cdjUxGfdwAST9sk+iidGJD5xJ8q7uXXP7c1S zCgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=xv9D61ihW9+zNcqu4fMkz7lbwoA5M0MKjWkLl/a3sH4=; fh=mQKCequP4C09lLwWPkzV0gYr2OXFJAerQjJ9ifUbVZ4=; b=tyDW2bq/35e/Rbit5GHpobtV/0DP84yE5Pdu/nT7DDkV0pb82UWyt/7xdJk1ETV2eQ DfponGNeXf5Y1vWDqQvP50WzB9YGLuKnlZx4YnlcMmOY3ebS6vsJWu7bHWNh2K28nn5N HQ/nElQgI6eY2pDa7Hmd4tgHWU6Kx6jV29VbRi1sZPf3mlvCzkJvRRb1xXsi3j37YyMq ATzwE5hRWBjzfIOe9TziqujEn42PGCUjlMAo9ZELCLiVN1YxuQXdiq5hsenwG8BqBArY oAJyJu/p5fKogzpmt+c/DRTuVwO2N5N1OJqqBWK8e32s9k09KlyaF4E1E4s1jQxszDaz zkpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b1dmyyyu; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ed11-20020ad44eab000000b0068efe8cf6dasi1434780qvb.12.2024.02.15.05.29.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 05:29:24 -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=b1dmyyyu; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rabn4-0004bU-CV; Thu, 15 Feb 2024 08:28:38 -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 1rabn2-0004XR-So for qemu-devel@nongnu.org; Thu, 15 Feb 2024 08:28:36 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rabn1-0004ni-DJ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 08:28:36 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-562178003a1so1082759a12.1 for ; Thu, 15 Feb 2024 05:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708003713; x=1708608513; 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=xv9D61ihW9+zNcqu4fMkz7lbwoA5M0MKjWkLl/a3sH4=; b=b1dmyyyu+6CtctGkew9IBvvJvdKHPrnMpvQQCfsPmQJzyONl/gHXaJsR/OyVrKkQB9 sIgPOqk1tmtTUyRvU7NHdhEtJEHjJ/Ta+MtT+RpW35EFOLYoA3J12Cp0DpwnFUEb1u5/ BTJS88VhGvgOXxQHUtBberzF/fwFdkjUzZh4lRZq4eb8j1WMBblEx1Zr0WF90hzKRGMP 3Md0sVZvO6W7ogvnM6GYI3vHvo00fFnhRklon3sp1SeyTqk35onfnqjljQQ72oMS9lO/ QtdDazEM0quOB+5/VZesMHhbmKaPwyTpPa4hcR8WFO+H7zSUiLL4C65naopYxotCqTFo cgzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003713; x=1708608513; 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=xv9D61ihW9+zNcqu4fMkz7lbwoA5M0MKjWkLl/a3sH4=; b=A3JZpzjDpriNnEPg2uHEiXwoffICq4OeZcdTmyQdpz9MgvgZIJjm5qxjhnK7X7bzLd zeY9u6qYGvl5kur5RnftVBlUNIrGrXmdDMDSKnOYmBYxJO3Bsx6bK6zyqMaT1ypjdp2W AE7jDDlG5bPVdefutxw2ANuNPcXyMt3qbZaBwbQjspJZERoHVGhg88OgaQaGoR9VpI8i LyeFea/67mwd3x5zjxKsJPquHQPQommZtDeRv4Wt3LIQ6AeJkHAu3Pkis533mrzIsIKA ZaOX97oMPdHDU/gmqbbmEeC1fySbYpZ5FlVKyv12ONEre4znW5vhKM4MpE2Dr9oGUHgO G6aA== X-Gm-Message-State: AOJu0YyW+D3/wo/XMHgAZf5YVMRaH8bpZm0qLbe5IvaPb/M/ZXaPqrCK ghX0hCVj9ncM45z/xY+waoPUPBPWON/hKoFDDPUbqU4kvtYdXVbEiN1muIhbDKPbPHUp5CNby2K QAYA= X-Received: by 2002:aa7:d354:0:b0:560:463:8cd7 with SMTP id m20-20020aa7d354000000b0056004638cd7mr1368500edr.34.1708003713718; Thu, 15 Feb 2024 05:28:33 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id ek5-20020a056402370500b00560c07f986asm538071edb.58.2024.02.15.05.28.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 05:28:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Artyom Tarasenko , Manos Pitsidianakis , Mark Cave-Ayland , Michael Tokarev , Pierrick Bouvier , Frederic Konrad , =?utf-8?q?Cl=C3=A9ment_Chigot?= , qemu-trivial@nongnu.org, Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] hw/sparc/leon3: Remove unused 'env' argument of write_bootloader() Date: Thu, 15 Feb 2024 14:28:23 +0100 Message-ID: <20240215132824.67363-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215132824.67363-1-philmd@linaro.org> References: <20240215132824.67363-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'CPUSPARCState *env' argument is unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/sparc/leon3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 2dfb742566..d096fb04cb 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -94,8 +94,7 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) * state (eg: initialized by the bootloader). This little code reproduces * this behavior. */ -static void write_bootloader(CPUSPARCState *env, uint8_t *base, - hwaddr kernel_addr) +static void write_bootloader(uint8_t *base, hwaddr kernel_addr) { uint32_t *p = (uint32_t *) base; @@ -342,7 +341,7 @@ static void leon3_generic_hw_init(MachineState *machine) uint8_t *bootloader_entry; bootloader_entry = memory_region_get_ram_ptr(prom); - write_bootloader(env, bootloader_entry, entry); + write_bootloader(bootloader_entry, entry); env->pc = LEON3_PROM_OFFSET; env->npc = LEON3_PROM_OFFSET + 4; reset_info->entry = LEON3_PROM_OFFSET; From patchwork Thu Feb 15 13:28:24 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: 772893 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp827671wre; Thu, 15 Feb 2024 05:28:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUUNiXj1Ze0Zt+quNiCp75ZY8Y2Ht9Y0ribIASHWR8pVxhpz13I9V86tpZXQUA/ChwiQYG1iU3+OIF46ZtJ5Y+o X-Google-Smtp-Source: AGHT+IFARZ1ZKXMzciYh7H69cFoU61SfDE/tHehnPIiIiWV52OtjQvvAo6514ZZ9y59PnzJQp7fW X-Received: by 2002:a05:620a:46:b0:783:afb3:d16 with SMTP id t6-20020a05620a004600b00783afb30d16mr2073555qkt.30.1708003738343; Thu, 15 Feb 2024 05:28:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708003738; cv=none; d=google.com; s=arc-20160816; b=yRTewMWvKUkWVCgY2VSEwokpgaPolBa0LvDtEHUpwlrsJ//oLwMwLv8P+Z6DbNXfoD vN4/LyXh3c8lekEHqZs/UBnRejqZvBiGsWRPbXrCkb24M9TpDO9IwBNce4Ki8lfPn9WJ LduvFVdDWIsYXIQrhwiBBoRFUXXAVXOqsSnsT96qowFomvLhhBuEtqhbOkKBR/QBfE3/ Wbv+DVysfBJSLL079s7nmf20c7QTay4vd98v1r1gOEs5kzD04zsL2v6d4nAiOgx5+L4I lv9IcDmQ3OHRiW5HrH8CzmWI45nUxl7R7xRGqxL/AROdcSdyjOznOMDFuKmGDJrtYfxr V0Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=bseUpOju7YvUN3+/fm6a697urfBk+5lMG7vEa3ydvK4=; fh=mQKCequP4C09lLwWPkzV0gYr2OXFJAerQjJ9ifUbVZ4=; b=oy67vpUbLhsCPLyKW8t/LzBWlqCs819JJNOnSbu3dg4nRfZ9ak28/8ruAtOD1DyKje oBIY/RRXpqfcV4GttVntZoGiIYL1VrnI6yAAw4Hl07kVnaqec+jLadB9Qb9ZyWMiGX3e 4yboXfBdnujYgzOn+UztOR8Ah/H/WGBfdWXfyMyrlLAw4UsuSVMDdU9V1WFuWj9pS+wc PzGXhCR7tVpbJamwckopT7kYOqGaDBT5Sj7i3g5P3LIldSzLNc1M+HZez6tis8c3ZlsI QF6PWjrUz9auJ97B57jq9uwZ10AmIqGuqrJQ/ZtFmFGeshjydkOLdOuqlUSpaJG0ohqf ++pQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PK67UTuw; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j25-20020a05620a001900b007869b745e1esi1498626qki.696.2024.02.15.05.28.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 05:28:58 -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=PK67UTuw; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rabnH-0004oD-TU; Thu, 15 Feb 2024 08:28: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 1rabn9-0004ht-Fo for qemu-devel@nongnu.org; Thu, 15 Feb 2024 08:28:43 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rabn7-0004oZ-SM for qemu-devel@nongnu.org; Thu, 15 Feb 2024 08:28:43 -0500 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5118d65cf9cso1049592e87.0 for ; Thu, 15 Feb 2024 05:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708003719; x=1708608519; 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=bseUpOju7YvUN3+/fm6a697urfBk+5lMG7vEa3ydvK4=; b=PK67UTuwczeTU1trXoRyNCSN/xJiZMA+c4p2+tMwAxU9qpw6jB4RTt3SOHj1dzaSB8 cCuwRX6nXlg2RKNZdFoC5mL0QGsnkDKrUIPqBdMrn7jKIvJpLaYk5zZv4YLtyUcEulaj Tt2p11Ff0u+GtrYN4x1082jTrXfvPVRLFeIRJb0rO7IMbng/7TTffhArHAkGf8PlSxKy cqWYEHfUrfA1qN+IpIxsZiNZBbGSIWRq3RPQiPF6isR7W96WnzI5aoosUJSCLeXzZjJl 0JKQ4KhYOCdmrO4lzA9gXCjof7mTvqmw81K+PzDIeV02ps89oqJk6RA0/aNErRsiGrXO VpZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003720; x=1708608520; 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=bseUpOju7YvUN3+/fm6a697urfBk+5lMG7vEa3ydvK4=; b=IaqLOcvJ4huk+uZQLxXKARRwug5rKut6JE8eHnMcd27Aw0OoY6ithXnY4HIJPq1AN/ iRqOTAMrcRsW9Q/Rt9IOf4oO0PKRRjxsKEBUUULaBGDTBATafwetv5QUF0VILCdAOGE0 EvGlUXx7eTpYXHoaq6QCb7hA3SqYwAp3AuycQm86XagG8eZ//r1sHiuONeWxq/xkUOto CJiNKt6u8Kt8EKzMnGRTfLbBXe0wPrVnX110U6FPaarB6nFqt5EYvS3lta5KPyt9+DRr e8ZH6r8uE7eivHiXhBkdtxks4mZYi1eG9QxFdVRG9N1hf+jxQG4YVuFb2rRWDen/Vf70 TPtg== X-Gm-Message-State: AOJu0Yzv0/Pq4efn3QJ/o52gwsv/K/Pjm66SYrkz22XjzBrHRlLqfzVg EXQkaYiRrhPdvNnZFhKVBTAZUP4/0+9J4en+Ijr1YKve5XLwPhhI4e6H4zcOETYK2kVOIaXRXoK jEIs= X-Received: by 2002:a05:6512:3baa:b0:512:88b2:abff with SMTP id g42-20020a0565123baa00b0051288b2abffmr1271397lfv.6.1708003719656; Thu, 15 Feb 2024 05:28:39 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id vx2-20020a170907a78200b00a3d9a94b13fsm446246ejc.136.2024.02.15.05.28.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 05:28:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Artyom Tarasenko , Manos Pitsidianakis , Mark Cave-Ayland , Michael Tokarev , Pierrick Bouvier , Frederic Konrad , =?utf-8?q?Cl=C3=A9ment_Chigot?= , qemu-trivial@nongnu.org, Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] hw/sparc/leon3: Have write_bootloader() take a void pointer argument Date: Thu, 15 Feb 2024 14:28:24 +0100 Message-ID: <20240215132824.67363-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215132824.67363-1-philmd@linaro.org> References: <20240215132824.67363-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=philmd@linaro.org; helo=mail-lf1-x12b.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Directly use the void pointer argument returned by memory_region_get_ram_ptr(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- 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 d096fb04cb..8717c72e77 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 addr, 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 = (uint32_t *) base; + uint32_t *p = (uint32_t *) ptr; /* Initialize the UARTs */ /* *UART_CONTROL = UART_RECEIVE_ENABLE | UART_TRANSMIT_ENABLE; */ @@ -338,10 +338,7 @@ static void leon3_generic_hw_init(MachineState *machine) * the machine in an initialized state through a little * bootloader. */ - uint8_t *bootloader_entry; - - bootloader_entry = memory_region_get_ram_ptr(prom); - write_bootloader(bootloader_entry, entry); + write_bootloader(memory_region_get_ram_ptr(prom), entry); env->pc = LEON3_PROM_OFFSET; env->npc = LEON3_PROM_OFFSET + 4; reset_info->entry = LEON3_PROM_OFFSET;