[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.2 21/25] hw/timer/armv7m_systick: Use clock inputs inst
From: |
Damien Hedde |
Subject: |
Re: [PATCH for-6.2 21/25] hw/timer/armv7m_systick: Use clock inputs instead of system_clock_scale |
Date: |
Tue, 17 Aug 2021 18:14:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 |
On 8/17/21 5:59 PM, Peter Maydell wrote:
> On Tue, 17 Aug 2021 at 16:55, Damien Hedde <damien.hedde@greensocs.com> wrote:
>>
>>
>>
>> On 8/12/21 11:33 AM, Peter Maydell wrote:
>> According to
>> https://developer.arm.com/documentation/ddi0403/d/System-Level-Architecture/System-Address-Map/The-system-timer--SysTick/SysTick-Calibration-value-Register--SYST-CALIB
>> , the field is 24bits wide.
>>
>> Should we prevent an overflow into the reserved bits and other fields ?
>> by doing something like this:
>> val &= SYSCALIB_TENMS;
>> with the following #define with the other ones, above.
>> #define SYSCALIB_TENMS ((1U << 24) - 1)
>>
>> Note, the overflow would happen around ~1.68GHz refclk frequency, it is
>> probably a config that will never happen. I'm not sure if we should care
>> or do something if this happens because it is probably an error
>> somewhere else.
>
> I guess we should do something, yes, though pretty much anything
> we do will not really provide the guest with sensible data...
> I suppose masking out the higher bits is no worse than anything else.
>
> -- PMM
>
Then, with the masking.
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
--
Damien
[PATCH for-6.2 20/25] hw/arm/msf2-soc: Wire up refclk, Peter Maydell, 2021/08/12
[PATCH for-6.2 22/25] hw/arm/stellaris: Fix code style issues in GPTM code, Peter Maydell, 2021/08/12
[PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale, Peter Maydell, 2021/08/12
[PATCH for-6.2 18/25] hw/arm/msf2_soc: Don't allocate separate MemoryRegions, Peter Maydell, 2021/08/12
[PATCH for-6.2 23/25] hw/arm/stellaris: Split stellaris-gptm into its own file, Peter Maydell, 2021/08/12