[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG
Re: [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M
Fri, 28 Apr 2017 08:58:20 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 04/28/2017 07:09 AM, Peter Maydell wrote:
> On 28 April 2017 at 01:10, Wei Huang <address@hidden> wrote:
>> In our downstream code, we try to minimize the number of supported
>> devices to reduce the maintenance effort. ARM v7M is not in the
>> supported list.
>> For most unsupported devices, we can remove them by configuring
>> default-configs file, except for CONFIG_ARM_V7M=y. This is because the
>> ARMv7m code in target/arm/helper.c intertwines with NVIC code. As a
>> result we have to keep NVIC and SysTick in order to compile helper.c,
>> which is not desirable.
>> This patchset tries to address the problem by making NVIC and SysTick
> I think that's the wrong way to do it. If you want to not compile
> in ARMv7M support then you need more ifdeffery in the target/arm
> code to disable the v7M code and CPUs entirely. NVIC and systick
We do disable most CPUs, which means only a limited number of CPUs
(host, cortex-a15, cortex-53/57) are left.
Using #ifdef is indeed a cleaner solution. However I can't use "#ifdef
CONFIG_ARM_V7M" & co inside target/arm/cpu.c file because CONFIG_xxx
aren't available as preprocessor directives. From what I saw the
CONFIG_xxx options can only control compiling source file. One solution
is to extract out all v7M code into separate files and use
CONFIG_ARM_V7M to direct compilation. A bit messy though. Any other
> are required core parts of v7M CPUs and so if they are not
> present then QEMU will claim to support the v7M cores but not
> in fact correctly do so.
> -- PMM