[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 12/14] hw/arm/musca: Add MPCs
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 12/14] hw/arm/musca: Add MPCs |
Date: |
Tue, 19 Feb 2019 12:29:11 +0000 |
On Thu, 14 Feb 2019 at 12:51, Peter Maydell <address@hidden> wrote:
>
> The Musca board puts its SRAM and flash behind TrustZone
> Memory Protection Controllers (MPCs). Each MPC sits between
> the CPU and the RAM/flash, and also has a set of memory mapped
> control registers. Wire up the MPCs, and the memory behind them.
> For the moment we implement the flash as simple ROM, which
> cannot be reprogrammed by the guest.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/arm/musca.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 147 insertions(+), 8 deletions(-)
>
> diff --git a/hw/arm/musca.c b/hw/arm/musca.c
> index 8774e0b87b7..5fadac8c09b 100644
> --- a/hw/arm/musca.c
> +++ b/hw/arm/musca.c
> @@ -27,11 +27,15 @@
> #include "hw/arm/armsse.h"
> #include "hw/boards.h"
> #include "hw/core/split-irq.h"
> +#include "hw/misc/tz-mpc.h"
> #include "hw/misc/tz-ppc.h"
> #include "hw/misc/unimp.h"
>
> #define MUSCA_NUMIRQ_MAX 96
> #define MUSCA_PPC_MAX 3
> +#define MUSCA_MPC_MAX 5
> +
> +typedef struct MPCInfo MPCInfo;
[...]
> +typedef struct MPCInfo {
> + const char *name;
> + hwaddr addr;
> + hwaddr size;
> + MPCInfoType type;
> +} MPCInfo;
This should just be "struct MPCInfo { ... };" to avoid clang
complaining:
hw/arm/musca.c:165:3: error: redefinition of typedef 'MPCInfo' is a C11
feature [-Werror,-Wtypedef-redefinition]
Since it's a minor thing I'll just squash it in when I
apply this series, assuming I don't need to respin for
anything else.
thanks
-- PMM
- [Qemu-arm] [PATCH 00/14] Add model of the Arm Musca devboards, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 02/14] hw/misc/tz-ppc: Support having unused ports in the middle of the range, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 10/14] hw/arm/musca.c: Implement models of the Musca-A and -B1 boards, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 12/14] hw/arm/musca: Add MPCs, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 09/14] hw/arm/armsse: Allow boards to specify init-svtor, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 13/14] hw/arm/musca: Wire up PL031 RTC, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 04/14] hw/timer/pl031: Convert to using trace events, Peter Maydell, 2019/02/14
- [Qemu-arm] [PATCH 14/14] hw/arm/musca: Wire up PL011 UARTs, Peter Maydell, 2019/02/14