From nobody Tue Nov 18 10:40:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) client-ip=209.85.221.43; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f43.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1609707189; cv=none; d=zohomail.com; s=zohoarc; b=AqlQDJ8ciIrSYEcIHx9F1p1pndtlV4Nofy1PG9/LlZyTUH2AExnx+ah2iHGamYUMlRKI8WYO7JSPqwm3nZm54vbCsMApPzPvYpNNkvQlDbDUCp+2JVW5nmCdSqq9O3KJ91Pg0X4bNp252QBZh7EcGtsvqiuTSZco8je2axBA8Os= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609707189; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Omfw76hY3844Y9bacXeVCDYHAMRLixZrIVClYxgLMv4=; b=J2jPd2eOXOey/Kx/YBqcYi5b5XS5WgbxetHLDHx1PWmAzPJ6m+o2BmjHm6YAMV05Rh+YGao5gj5ApjAvpEQR81irHchkS5hcMecGHHj06j2/MOK7FlwvNk4Y1GqEoifYDYvywUE+udi4en2MKOqVss1YbSWSBMjhxG8PrPON1P0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.zohomail.com with SMTPS id 1609707189175605.0082761923625; Sun, 3 Jan 2021 12:53:09 -0800 (PST) Received: by mail-wr1-f43.google.com with SMTP id r7so29458594wrc.5 for ; Sun, 03 Jan 2021 12:53:08 -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 v1sm29176820wmj.31.2021.01.03.12.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 12:53:06 -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=Omfw76hY3844Y9bacXeVCDYHAMRLixZrIVClYxgLMv4=; b=MyOGgJwTQshcoYZEbauhdm0dtPNPGqTZEckd0BxS1cTfbaulIP33kGtdowDHmW+Ytk 97TSMenDuEYyvTQrw6PpeHvxRX9DT6PXnTeGFlOlx5KsbozW6vVuqjgfZO9URW698WWu 7O2A6avC1cEtVwcwEY2sg9DA+eq1Bba5xPe1UOfm875GujUdANY5u7+8pIZ+Ut7TY5Wf 89S8opK7Q5RB9aTQOkzfA0eRdThvZrZiT8lXJPbnJh3tPoD8jQXfvxISFN8+/NGjnyz3 viy2PxxXLzn3pfhUwMSF3PjlIU8B9lM6KMCADFiToPsa+63M2nZHFE8CGg3SFF1RjZGX s9vw== 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=Omfw76hY3844Y9bacXeVCDYHAMRLixZrIVClYxgLMv4=; b=OsaqUgVEFH41+NnBZndTgLj9G6F0TQBMAyz3/n3DkvkkJc+Ui9CTyzi+BNuT6fWAjg uJ4CL376L+Y4Fzyeaxec9/3fVWtuH2gzEE62iEtB5gUZi5/DEY2FUh550Ul9KvhH3jLV ysveQVAFZLUKkt89bSml2FS9jAd213hOQwIWWR5XdPriWC+xSPHz/OhGTqkMCbFdyCQS SrvSg9b5//r3suD6PhALIZeA+XLIDzSk8Y69BvjFVYzZuwbj0MBIcJvmx5GotDjei/Nk 3L2rVE/H18H88u6RKZVRJcyWqSz9/62XHUhEFtCJrDhS53xCkk323U3kcDKLhivwTEr1 WlfA== X-Gm-Message-State: AOAM531+epbs4eF2s+lQSZIOmaTQ4vxj4GXdwtsdOeWvh9tfs0gK+5n7 0KmYnPAKq+fla7g0BX8pUb4= X-Google-Smtp-Source: ABdhPJzNAQD1NWOUcthC4P+yxUFupCJvUTNCnA2dzbnevgQNJJ662bcqmvWNryjx2fMSZ3SZtZ6fxA== X-Received: by 2002:adf:8185:: with SMTP id 5mr74922900wra.44.1609707187308; Sun, 03 Jan 2021 12:53:07 -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 34/35] hw/mips/fuloong2e: Correct cpuclock in PROM environment Date: Sun, 3 Jan 2021 21:50:20 +0100 Message-Id: <20210103205021.2837760-35-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 Missed in 3ca7639ff00 ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"), we need to tell the kernel the correct clock. Fixes: 3ca7639ff00 ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"). Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201224031750.52146-7-jiaxun.yang@flygoat.com> [PMD: Reworded] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/fuloong2e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 9b44ac6cf97..29805242caa 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -99,7 +99,7 @@ static void GCC_FMT_ATTR(3, 4) prom_set(uint32_t *prom_bu= f, int index, va_end(ap); } =20 -static uint64_t load_kernel(CPUMIPSState *env) +static uint64_t load_kernel(MIPSCPU *cpu) { uint64_t kernel_entry, kernel_high, initrd_size; int index =3D 0; @@ -159,7 +159,7 @@ static uint64_t load_kernel(CPUMIPSState *env) =20 /* Setup minimum environment variables */ prom_set(prom_buf, index++, "busclock=3D33000000"); - prom_set(prom_buf, index++, "cpuclock=3D100000000"); + prom_set(prom_buf, index++, "cpuclock=3D%u", clock_get_hz(cpu->clock)); prom_set(prom_buf, index++, "memsize=3D%"PRIi64, loaderparams.ram_size= / MiB); prom_set(prom_buf, index++, NULL); =20 @@ -330,7 +330,7 @@ static void mips_fuloong2e_init(MachineState *machine) loaderparams.kernel_filename =3D kernel_filename; loaderparams.kernel_cmdline =3D kernel_cmdline; loaderparams.initrd_filename =3D initrd_filename; - kernel_entry =3D load_kernel(env); + kernel_entry =3D load_kernel(cpu); write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entr= y); } else { filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, --=20 2.26.2