From nobody Tue Nov 18 11:49:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) client-ip=209.85.221.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1609707165; cv=none; d=zohomail.com; s=zohoarc; b=UMJqgtYC2gtljI1AORCAhg+mBnQRwnC9ql8i7sloQNWaGxL9JIlEwcKuYbsuBLsxyzdEHAdPgiQfb+q/wHgQOOxOr9hvZuVAWSvFqU44wDbUSTgy+oZjhagwgbM5p1nRjCyXVmAZ5EY5uKujLCNpRNGmAhhWKzHqBeMvAl1jx6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609707165; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wl6SwD6rhHXZkyr+JvQ9IE37tD/v6VssJI8HTk5wOP0=; b=bNHeMKbjMuBIEJNLyd1jT2toogaec8uxpo3SrK8wAHc8G/nuljtWLe9K8Bac5utnE5GUfHBfSPjOJy38GR8GMKAdUdsHfLNvl9KskWfcxO8Fwxdu53LIS2pdRQMzUx8Vbu57foXvrFtdm2St61Lm9M0Ry4G0q/2ISxkKD2nIZcQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.zohomail.com with SMTPS id 1609707165628143.49908193465672; Sun, 3 Jan 2021 12:52:45 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id a12so29451050wrv.8 for ; Sun, 03 Jan 2021 12:52:45 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (194.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.194]) by smtp.gmail.com with ESMTPSA id k128sm30374711wma.43.2021.01.03.12.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 12:52:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Wl6SwD6rhHXZkyr+JvQ9IE37tD/v6VssJI8HTk5wOP0=; b=g55UkzV3Y/lYN54ws1yacJxa7HfsyjtRj3eIJBCYzHCbTA3Zm5LAUo67rp5VTzjJkh 8WVuEvn4O0ZYsxpZy9aq6ydGxPrNByMAVJxUnNlEoa3XRZMNQEonIYCBSLl7ZY6Y8392 MKMOH4/znsEYrFE8hEYD3bfScyqaLzM2OMLPdBjWFBFZDEWsIEE7tSv7ykl9T55WjP4d 1QmnJbo2PLtcO/zKQreQEIyTfRpxwd7c8jkYbPfOVx67H0ZlNCvi07f5z9TthiMBA82k rKcEZy2Vaqjgc3p+Il+cgDQHGxrDFtrtQhqKHGRorb+sWyxGUvQNSdvTbqlVEQrzg00P oHXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Wl6SwD6rhHXZkyr+JvQ9IE37tD/v6VssJI8HTk5wOP0=; b=Lps/wO4GEW7qe7/KSq+u4WzXCuXXDqarE3FCUnjQp6cG3PNxG/YaMfRvYNWwUpaqYq 65WH/J10zrDAYTtT9+m8JXun/AQrUzaPqtsnhAfk4On0TTI4nvri7kOGEj/3To3XvxhA Q8IECnhkYa69892UEjAuBnYoRiWsR+NeGQLK5+0sKyFASr2HrccPiFhoGRqlO7aVT7TM E+8gCS8pFjkD5XCh2p1n1dqrRX6ob7nnZ5d4DkFyhSSqitkADyEFSHT7HI7V4tQdUt3s rsTSgBMGDcElCRB79H0nZeEmpF7ZTgBHqvnw7Ci8fhq84FFTv7iKCN9X3wgw+nd3CX8b TwQg== X-Gm-Message-State: AOAM532GS4/IQD7lAXzHLbMLDhFDBb6w+NFV7xj+WoXkmYvhv3xWpR/n e13DOiAyHzio0BLQLrNPvpI= X-Google-Smtp-Source: ABdhPJzXGaXrdGPC+3cvkxXcPfxQek+zImMW4gFYHCImDgoiJbafi9FAheWVnzr47Vr5heFXpHODng== X-Received: by 2002:adf:eac7:: with SMTP id o7mr77876460wrn.23.1609707163837; Sun, 03 Jan 2021 12:52:43 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Huacai Chen , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 29/35] hw/mips/malta: Use address translation helper to calculate bootloader_run_addr Date: Sun, 3 Jan 2021 21:50:15 +0100 Message-Id: <20210103205021.2837760-30-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210103205021.2837760-1-f4bug@amsat.org> References: <20210103205021.2837760-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Jiaxun Yang So it will sign extend adresses properly. Signed-off-by: Jiaxun Yang Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201215064200.28751-3-jiaxun.yang@flygoat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/malta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 7db009a3e96..1fbb8a32207 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1302,9 +1302,9 @@ void mips_malta_init(MachineState *machine) /* For KVM we reserve 1MB of RAM for running bootloader */ if (kvm_enabled()) { ram_low_size -=3D 0x100000; - bootloader_run_addr =3D 0x40000000 + ram_low_size; + bootloader_run_addr =3D cpu_mips_kvm_um_phys_to_kseg0(NULL, ra= m_low_size); } else { - bootloader_run_addr =3D 0xbfc00000; + bootloader_run_addr =3D cpu_mips_phys_to_kseg0(NULL, RESET_ADD= RESS); } =20 /* Write a small bootloader to the flash location. */ --=20 2.26.2