From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
To: "Román Cárdenas" <rcardenas.rod@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Alistair.Francis@wdc.com,
bin.meng@windriver.com, palmer@dabbelt.com, liwei1518@gmail.com,
zhiwei_liu@linux.alibaba.com, qemu-riscv@nongnu.org
Subject: Re: [PATCH] Fix SiFive E CLINT clock frequency (#1978)
Date: Thu, 16 Nov 2023 15:32:54 -0300 [thread overview]
Message-ID: <e97bf3de-12d8-42ca-b728-4f9edcbc50e2@ventanamicro.com> (raw)
In-Reply-To: <20231116120702.53170-1-rcardenas.rod@gmail.com>
I believe you forgot to add your Signed-off-by tag. Without it we can't accept
the patch hehe
Since you'll need to send another version with the S-o-b, please change the commit
title to
"riscv: Fix SiFive E CLINT clock frequency"
That way other people will quickly identify which sub-tree this patch belongs. The Gitlab
bug number you put it in the end of the commit msg in a tag:
On 11/16/23 09:07, Román Cárdenas wrote:
> If you check the manual of SiFive E310 (https://cdn.sparkfun.com/assets/7/f/0/2/7/fe310-g002-manual-v19p05.pdf?_gl=1*w2ieef*_ga*MTcyNDI2MjM0Ny4xNjk2ODcwNTM3*_ga_T369JS7J9N*MTY5Njg3MDUzNy4xLjAuMTY5Njg3MDUzNy42MC4wLjA.), you can see in Figure 1 that the CLINT is connected to the real time clock, which also feeds the AON peripheral (they share the same clock).
>
> In page 43, the docs also say that the timer registers of the CLINT count ticks from the rtcclk.
>
> I am currently playing with bare metal applications both in QEMU and a physical SiFive E310 board and I confirm that the CLINT clock in the physical board runs at 32.768 kHz. In QEMU, the same app produces a completely different outcome, as sometimes a new CLINT interrupt is triggered before finishing other tasks.
>
> You can check issue #1978 on GitLab for more information.
>
Like this:
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1978
The rest of the commit msg and the code looks good to me. Thanks,
Daniel
> ---
> hw/riscv/sifive_e.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
> index 0d37adc542..87d9602383 100644
> --- a/hw/riscv/sifive_e.c
> +++ b/hw/riscv/sifive_e.c
> @@ -225,7 +225,7 @@ static void sifive_e_soc_realize(DeviceState *dev, Error **errp)
> RISCV_ACLINT_SWI_SIZE,
> RISCV_ACLINT_DEFAULT_MTIMER_SIZE, 0, ms->smp.cpus,
> RISCV_ACLINT_DEFAULT_MTIMECMP, RISCV_ACLINT_DEFAULT_MTIME,
> - RISCV_ACLINT_DEFAULT_TIMEBASE_FREQ, false);
> + SIFIVE_E_LFCLK_DEFAULT_FREQ, false);
> sifive_e_prci_create(memmap[SIFIVE_E_DEV_PRCI].base);
>
> /* AON */
prev parent reply other threads:[~2023-11-16 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 12:07 [PATCH] Fix SiFive E CLINT clock frequency (#1978) Román Cárdenas
2023-11-16 18:32 ` Daniel Henrique Barboza [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e97bf3de-12d8-42ca-b728-4f9edcbc50e2@ventanamicro.com \
--to=dbarboza@ventanamicro.com \
--cc=Alistair.Francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rcardenas.rod@gmail.com \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.