From patchwork Thu Feb 15 17:57:32 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: 772995 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968801wre; Thu, 15 Feb 2024 10:08:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUJBZU4YvSoWc0PggzKLqJ0xfA/F1JKgYv/BJ3H9SsESeXyCzOswU4/nXjG7oWWhWYpk2xh6amZsZnvvitTFxvq X-Google-Smtp-Source: AGHT+IF7nvSmmHwoKZQCspSRl09XOmTRZLg916apsdJRnz1isdtN+iTUPyZUHDUOXyGN1Sxeak6w X-Received: by 2002:a05:6214:5d91:b0:68e:e4e0:1d70 with SMTP id mf17-20020a0562145d9100b0068ee4e01d70mr2946055qvb.25.1708020494155; Thu, 15 Feb 2024 10:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020494; cv=none; d=google.com; s=arc-20160816; b=gpt6j37hCicgFqw8kxxJeaTpTOHDpr0D8X8pF/rYVFD89dnWsbzrMHojaT54hboxwJ L0Wn0AmAIjGk4XGOsLHjT7HMCsvl9bKoiODRETrnewn+uy4OQp8dlq9WiOyKdfhKdtam hwItiryo9qIxE50YHyIu5hc3cT6PC11RtuAHiDhRw6ebN3a3G4ZAfeEv0KpCIUJ4d9i1 s+z/AIMNS4K1WMmblsFqkQ0JfoDWBWquFITMcGe2dH5l8yvyOb9n9/KftkB9UW4OdWSs 6zs4EMAT0E7WuYJK7neoFzycjZj4nnMEdmHlnc8TnunQW/7eAjymOhDfH4mIrQ8RMXfk TNeA== 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; fh=E4YAJaSvbOqvBPr1eyyeiwk7f81aTdmiXfceOa2hJ1Y=; b=YzhWORB8qBx79g+1/C8rwgPkuJJLQc2q7a7k4fM96v+vVyiONPFbvUUAjO0ht2XqMk Jt35xj1lOTSU3NYSmOiuhx5fQQEzcvyyus7baiADLrmiQZGNmU6YusfyivTw09JtT13y 0XYyHmCpVFoKJr+l0kWfOw9Q8XB6qRQh2iGhBEB+hH9wI8vcSr3CJFZDWQabB4tN3c88 foVD2Uh31a1VoEPDcvJYanyxACsvt3nRnj0S2CtPsn9AcgE2QcsgU/DMb3lVOtDALs2V AOTyWbLag+sKNdbsuXSQOX2kBqZw2W3qNE2Iq0zyTvnb2GpA055hzsGGOHk6sRnZfkBK Es6A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pE9DYsib; 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 o12-20020ad45c8c000000b0068ee633cdc8si2020005qvh.193.2024.02.15.10.08.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:14 -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=pE9DYsib; 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 1rag47-0005Bz-Pm; Thu, 15 Feb 2024 13:02:31 -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 1rag3x-00048F-06 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:22 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3n-0002jV-J4 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:20 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d11d17dddeso13848171fa.3 for ; Thu, 15 Feb 2024 10:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020130; x=1708624930; 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; b=pE9DYsibGvT54p/Xfu7wHXKfOu2lttBIO+Z00OIqVsxYuFgNQJ/sXukfN8mssJ5Rf8 RrUZ6/n5SK+ZH2YB6Hut54Cn8fQ6azoEFl8EG96I0OWG+b7YfBBj9NCG9HM9l9J8dcx2 M8NBFG66bhgepIAaHC4f7Yjx+jQebyfOi/w0dmGb02dl9R/ZsHI+oKczGpsHV96AF7Hm zvvEb+yDlMZNkPPffyfEYFpsJwjlrl0Df0Fd5cwa/CDDMC2Xhqkh6J6F7K6CCASLBJKG vwMMUrM6r3OArjlQNrnPyumBJAtcDdW/5PO3fkQue7/axISiNytLKXB0L9+nJCiZm8hn JiRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020130; x=1708624930; 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; b=jUNcQnQbMvrRADBlpS2gIOaG29H/QGDfc1X2cNo4CKlPc7me+mvRF1M+XNAvOvYSSa EnKPOJAMC/AsvBrQguiv2ee0cXSEN4TkbhW+qQxQT627uiAskPTNMt5x8JVV1xtA/kLW GokfoJdeRCIv+wrkZp9TyPKf2kYSKKBAQ/XzmVJrbDK/oxkIveNNVeLAoTDoXqTqdTv1 aJxx/blRPjNi3rDrwYubVyyWxbCNX0lZmj2l6LKi00BuEoORXsYuR2mvQronIik94A3L Mex4n8VVe5oiTdOMOcEESa7IjeLR1NcJmq+I3DAZvSbpR03hKEIv8CsBCP3H9Pze7szD SMUw== X-Gm-Message-State: AOJu0Yyp1houKtHUblKfO1wR8XZUT/osPxf/q/nPB79/C/+Or45Z/teh SiYY7sg1XJ2v7v4ypZamQ1YuGKK0o1ucD04NRAOeelQroGwjq9oCLl5baQxbO5KD4HCX+UODZia 11es= X-Received: by 2002:a2e:b8c8:0:b0:2d0:c77c:b1ca with SMTP id s8-20020a2eb8c8000000b002d0c77cb1camr2205587ljp.49.1708020129688; Thu, 15 Feb 2024 10:02:09 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id o4-20020a05600c4fc400b00411d0b58056sm2900310wmq.5.2024.02.15.10.02.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 38/56] hw/sparc/leon3: remove SP initialization Date: Thu, 15 Feb 2024 18:57:32 +0100 Message-ID: <20240215175752.82828-39-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 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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 From: Clément Chigot According to the doc (see §4.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-7-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 3f86b74ba4..46fc1e783a 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -69,7 +69,6 @@ typedef struct ResetData { SPARCCPU *cpu; uint32_t entry; /* save kernel entry in case of reset */ - target_ulong sp; /* initial stack pointer */ } ResetData; static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) @@ -135,7 +134,6 @@ static void main_cpu_reset(void *opaque) cpu->halted = 0; env->pc = s->entry; env->npc = s->entry + 4; - env->regbase[6] = s->sp; } static void leon3_cache_control_int(CPUSPARCState *env) @@ -246,7 +244,6 @@ static void leon3_generic_hw_init(MachineState *machine) /* Reset data */ reset_info = g_new0(ResetData, 1); reset_info->cpu = cpu; - reset_info->sp = LEON3_RAM_OFFSET + ram_size; qemu_register_reset(main_cpu_reset, reset_info); ahb_pnp = GRLIB_AHB_PNP(qdev_new(TYPE_GRLIB_AHB_PNP));