qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qemu-4.2.0


From: Peter Maydell
Subject: Re: Qemu-4.2.0
Date: Tue, 6 Jul 2021 16:34:54 +0100

On Tue, 6 Jul 2021 at 16:14, abhijeet inamdar
<abhijeetinamdar3005@gmail.com> wrote:
>
> The warnings are as follows:
>
> warning: implicit declaration of function 'armv7m_init' 
> [-Wimplicit-function-declaration]
> nvic = armv7m_init(systemMemory, memsz, NUM_IRQ_LINES, kernel_filename, 
> cpu_type);

This function was removed as part of a refactoring. Board code
should instead create the ARMV7M device like any other, and
then call armv7m_load_kernel() at the end of their init function.
See commit f04d44654d85e25f7 for an example of the change to the
stellaris board.

> In addition to this in armv7m.c
>
> warning: no previous prototype for 'armv7m_init'[-Wmissing-prototypes]
>
> DeviceState *armv7m_init(Memory region *system_memory, int mem_size, int 
> num_irq,

This sounds like your source tree is in a confused state where it
has some changes from 4.2.0 but is not a complete 4.2.0 tree.
In upstream 4.2.0 this file does not have this function in it at all.
You should start with a clean 4.2.0 upstream and then apply your
changes to it; don't try to hold onto pre-4.2 versions of any
upstrema source files.

> warning: implicit declaration of function 'qemu_allocate_irq' 
> [-Wimplicit-function-declaration]
> qdev_connect_gpio_out_named(nvic, "SYSRESETREQ", 0, 
> qemu_allocate_irq(&do_sys_reset, NULL, 0));

This function's prototype is in include/hw/irq.h (as "git grep"
will tell you). A cleanup in 4.2.0 reduced the number of other
headers that implicitly pull in irq.h, which means your .c file
now needs to explicitly "#include "hw/irq.h"". (This was done
for the tree in general in 64552b6be4758d3a77.)

If you look at the 'git log' for some upstream M-profile board (eg
if there is one you have copied for your own implementation) then
you will see the commit messages for changes to that board, which
is a good place to start in tracking down this kind of thing.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]