qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 2/3] include/hw/arm: move BSA definitions to bsa.h


From: Peter Maydell
Subject: Re: [PATCH v1 2/3] include/hw/arm: move BSA definitions to bsa.h
Date: Mon, 18 Sep 2023 11:46:56 +0100

On Fri, 15 Sept 2023 at 12:55, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> virt.h defines a number of IRQs that are ultimately described by Arm's
> Base System Architecture specification. Move these to a dedicated header
> so that they can be reused by other platforms that do the same.
> Include that header from virt.h to minimise churn.
>
> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
> ---
>  include/hw/arm/bsa.h  | 35 +++++++++++++++++++++++++++++++++++
>  include/hw/arm/virt.h | 12 +-----------
>  2 files changed, 36 insertions(+), 11 deletions(-)
>  create mode 100644 include/hw/arm/bsa.h
>
> diff --git a/include/hw/arm/bsa.h b/include/hw/arm/bsa.h
> new file mode 100644
> index 0000000000..b7db1cacf1
> --- /dev/null
> +++ b/include/hw/arm/bsa.h
> @@ -0,0 +1,35 @@
> +/*
> + * Common definitions for Arm Base System Architecture (BSA) platforms.
> + *
> + * Copyright (c) 2015 Linaro Limited
> + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2 or later, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> + * more details.
> + *
> + * You should have received a copy of the GNU General Public License along 
> with
> + * this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#ifndef QEMU_ARM_BSA_H
> +#define QEMU_ARM_BSA_H
> +
> +#define ARCH_GIC_MAINT_IRQ  25

Given the confusion over indexing that seems to be endemic in the
GIC world, a comment
 /* These are architectural INTID values */

might help.

> +
> +#define ARCH_TIMER_VIRT_IRQ   27
> +#define ARCH_TIMER_S_EL1_IRQ  29
> +#define ARCH_TIMER_NS_EL1_IRQ 30
> +#define ARCH_TIMER_NS_EL2_IRQ 26
> +
> +#define VIRTUAL_PMU_IRQ 23
> +
> +#define PPI(irq) ((irq) - 16)
> +
> +#endif /* QEMU_ARM_BSA_H */

thanks
-- PMM



reply via email to

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