RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-29 Thread Dong, Eddie
Using a union can better reflect this. Also, it can avoid the convert from 2 32-bits register to 64 bits, like the above code does. ibex_timer_update_irqs() also does this conversion. It took me a bit of time, but now I think I understand what you mean: a union of 2 uint32_t's (perhaps packed

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-29 Thread Tyler Ng
gt; Huth ; Paolo Bonzini ; Palmer > Dabbelt ; Laurent Vivier > Subject: Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes > to mtime > > Hi Eddie, > > On Mon, Sep 26, 2022 at 2:06 PM Dong, Eddie <mailto:eddie.d...@intel.com> > wrote: > > >

RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-28 Thread Dong, Eddie
>; Paolo > Bonzini <mailto:pbonz...@redhat.com>; Palmer Dabbelt > <mailto:pal...@dabbelt.com>; > Laurent Vivier <mailto:lviv...@redhat.com> > Subject: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to > mtime > > 1. Adds fields to hold the value

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-26 Thread Tyler Ng
pers > > Cc: Alistair Francis ; Meng, Bin > > ; Thomas Huth ; Paolo > > Bonzini ; Palmer Dabbelt ; > > Laurent Vivier > > Subject: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to > > mtime > > > > 1. Adds fields to hold the value of

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-26 Thread Tyler Ng
On Thu, Sep 22, 2022 at 2:45 PM Philippe Mathieu-Daudé wrote: > On 22/9/22 17:58, Tyler Ng wrote: > > 1. Adds fields to hold the value of mtime in timer_upper0 and > timer_lower0. > > > > 2. Changes the read and write functions to use the mtime fields. > > > > 3. Updates the value of mtime in

RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-26 Thread Dong, Eddie
> Laurent Vivier > Subject: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to > mtime > > 1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. > > 2. Changes the read and write functions to use the mtime fields. > > 3. Updates

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: 1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the

[PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Tyler Ng
1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the prescalar is implemented. 4. Adds