[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/11] armv7m: Split systick out from NVIC
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 09/11] armv7m: Split systick out from NVIC |
Date: |
Fri, 24 Feb 2017 14:58:35 +0000 |
On 24 February 2017 at 14:29, Alex Bennée <address@hidden> wrote:
>
> Peter Maydell <address@hidden> writes:
>
>> The SysTick timer isn't really part of the NVIC proper;
>> we just modelled it that way back when we couldn't
>> easily have devices that only occupied a small chunk
>> of a memory region. Split it out into its own device.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> + default:
>> + qemu_log_mask(LOG_GUEST_ERROR,
>> + "SysTick: Bad read offset 0x%" HWADDR_PRIx "\n",
>> addr);
>> + break;
>> + }
>> +
>> + trace_systick_read(addr, val, size);
>
> I'm getting the compiler complain:
>
> hw/timer/armv7m_systick.c: In function ‘systick_read’:
> hw/timer/armv7m_systick.c:81:14: error: ‘val’ may be used uninitialized in
> this function [-Werror=maybe-uninitialized]
> uint32_t val;
> ^
> cc1: all warnings being treated as errors
>
> I suspect the trace function could pick up garbage if we take the
> GUEST_ERROR leg and default out....
Indeed, missing 'val = 0;' in the default case.
thanks
-- PMM
- [Qemu-devel] [PATCH 11/11] stm32f205: Rename 'nvic' local to 'armv7m', (continued)
- [Qemu-devel] [PATCH 11/11] stm32f205: Rename 'nvic' local to 'armv7m', Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 06/11] armv7m: Make NVIC expose a memory region rather than mapping itself, Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 09/11] armv7m: Split systick out from NVIC, Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 03/11] armv7m: QOMify the armv7m container, Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 07/11] armv7m: Make bitband device take the address space to access, Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 08/11] armv7m: Don't put core v7M devices under CONFIG_STELLARIS, Peter Maydell, 2017/02/20
- [Qemu-devel] [PATCH 02/11] armv7m: Move NVICState struct definition into header, Peter Maydell, 2017/02/20