From patchwork Sat Dec 10 15:54:58 2022 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: 632899 Delivered-To: patch@linaro.org Received: by 2002:a17:906:82c7:b0:7c1:1f1c:138d with SMTP id a7csp1886051ejy; Sat, 10 Dec 2022 07:56:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf41JtqrbNDfcEvI6XKxpxEHa0iXbvGNFqb6f61eiLZXOXvMeiNT0oDEgINGLj4AYYvKVoMu X-Received: by 2002:a05:622a:1a1a:b0:3a8:cf9:d33d with SMTP id f26-20020a05622a1a1a00b003a80cf9d33dmr4246840qtb.4.1670687763664; Sat, 10 Dec 2022 07:56:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670687763; cv=none; d=google.com; s=arc-20160816; b=Hse5la8TlNrnG2iDBLAVJ8HKqgrDgbkQj3iSV1+/a261VbU6tVv4n8xJipJNY3OrV6 8cyjQXF0gIlCVhY5YIkW3zyBv0Y5o2t//PAayabGJETpIii1GyvKbkOvHIwR8TkIggXU MfS7zIXdvWHGNvio2kKr4pliHXKADbtQlFH1+TVqV6hAPH30qBuMSO11Ysloh2KU+vMe HKy4uat8291i8eeWkrVVCQiC7LS2aJyCm8aKMUUGWKKMFofmxfXXmvObXF7IwGJiPYK5 KaE6qnO631oOdCXUVsbkfLWX8bADdG6Inc4azj91+n0wM/INDr0/CC2+FYg5pHnU6cav kVIg== 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=rPsrEY4rtblWI0rx96iiEsOKP/PxGkNW2C7Zi9iNKyM=; b=aUN+ueKr2X2CuHyQVFR8tnJ/DrDYjGlh75i7IXZfd4wbMOA8MTftlBGdK6a+wigSvo 2A6FNq0g87XNxU/i5M9pJwPlEQjuW3WPEjON9M4gwSxW4MbSyYd5A6JPmUrwg9+Eav/n 1sT5AnVcqP9LN5BFLp1jNPQagGSTHRokE6dgIVoTOnY2+vHeEk2UiUEK0H3Sm1k2lkBy 5pkwasa/Bo2e5yRc4/d/0nV36soIJWwm0g+9DQqUo5I3DQDSo5K+TRltawSyrkdU0zer 3+J3O/fyqgqYCp/eP85eGuVCK/qgE54CZrBgAlnprXRn2TmBsdA5RVnA006G2ycaFf9I zPZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cvgb+jTT; 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 fc18-20020a05622a489200b003a7e04d07afsi2637744qtb.466.2022.12.10.07.56.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Dec 2022 07:56:03 -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=cvgb+jTT; 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 1p42CP-0003Vl-2H; Sat, 10 Dec 2022 10:55:37 -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 1p42CF-0003Q2-GJ for qemu-devel@nongnu.org; Sat, 10 Dec 2022 10:55:27 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p42CC-0004MY-2f for qemu-devel@nongnu.org; Sat, 10 Dec 2022 10:55:26 -0500 Received: by mail-wm1-x335.google.com with SMTP id h8-20020a1c2108000000b003d1efd60b65so1889565wmh.0 for ; Sat, 10 Dec 2022 07:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=rPsrEY4rtblWI0rx96iiEsOKP/PxGkNW2C7Zi9iNKyM=; b=cvgb+jTT3FrxLB3+OhGSyWxqMuJeO8bIlY/Mlnfo+ZjoS6zhlYyAuJlOpY6OuygkaS lSQ0S+rbIpZnog5gc4WcfKELUwiM0Ze891IYhl53KMmNZhNYnUoBBdzGQtzdVXJzQWjn 5OZ7xvkLJfZLwt3jk5cgOjJ8wqyep6kPnf4HfpLmmNBM68OQclmi28KimfpWQIVdblUn VjL/VEwxlCnKUwmQ9bn5Eb3XAwQVPtkA25J2mKDixfc6KuN/Ytv2b5mUbyDJZIuqbTt7 GpUvgG0ZdgxiISog3K7+Dj3MIvxpRD1OMNVQjFMugVh7Tu72mr7DLfur5DHa1BTEZvYt aGpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rPsrEY4rtblWI0rx96iiEsOKP/PxGkNW2C7Zi9iNKyM=; b=l73AL2M9W7E6Esk1ts4ZZ+6DiPZ1qVlM84d+fFYRnI+w/mnBNDdpRR2WkteqFR2Lr0 XNLw8WZr+I3CAHz8Ea+YTt3H2UhCHpL8hD7XO62dSS19ikR7xgvrSd8v24IEorctfHJu 0kpv2SKz6uqEOJ8ienvBrXBf8GaYdWTjxaxpcBlBJ3Ibql8ShVt356wA09QesLnCX79S T3nRkNH8Jr4xdeRTPNQYiWhN4LVx5sQTT93H+Sup7kwBBatJ7pYC04+TmoFZfFnRy+QD FSPouQAmp7DS5lOFXfpkWy3ow+6Jf3dYT9GCMConCToqxdTkXe9QGlvSRGZ5AQ2SvwnM vymQ== X-Gm-Message-State: ANoB5plj3+/4OteOtk+dlYfJKn0L1lOaeFiLERfqYB9o+KzlVOe7RsN7 ecxgMYA2S7K7LRnN8xfdx7+m0rFn7LZWEmH3mHQ= X-Received: by 2002:a05:600c:a10:b0:3cf:ca4c:1e29 with SMTP id z16-20020a05600c0a1000b003cfca4c1e29mr7709916wmp.41.1670687722384; Sat, 10 Dec 2022 07:55:22 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id ay13-20020a05600c1e0d00b003c6bd91caa5sm3260782wmb.17.2022.12.10.07.55.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 10 Dec 2022 07:55:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Milica Lazarevic , Dragan Mladjenovic , Aurelien Jarno , Djordje Todorovic , Jiaxun Yang , Bernhard Beschow Subject: [PATCH-for-8.0 3/7] hw/mips/bootloader: Implement nanoMIPS NOP opcode Date: Sat, 10 Dec 2022 16:54:58 +0100 Message-Id: <20221210155502.74609-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210155502.74609-1-philmd@linaro.org> References: <20221210155502.74609-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/mips/bootloader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index 3a4573118c..7f7d938f2e 100644 --- a/hw/mips/bootloader.c +++ b/hw/mips/bootloader.c @@ -59,7 +59,11 @@ static void bl_gen_nop(void **ptr) { uint32_t *p = (uint32_t *)*ptr; - stl_p(p, 0); + if (bootcpu_supports_isa(ISA_NANOMIPS32)) { + stl_p(p, 0x8000c000); + } else { + stl_p(p, 0); + } p++; *ptr = p; }