[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 08/18] hw/arm/arm_cpus: add arm_cpus device
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 08/18] hw/arm/arm_cpus: add arm_cpus device |
Date: |
Sat, 16 Apr 2022 20:01:30 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 30/3/22 14:56, Damien Hedde wrote:
This object can be used to create a group of homogeneous
arm cpus.
Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
---
include/hw/arm/arm_cpus.h | 45 ++++++++++++++++++++++++++++
hw/arm/arm_cpus.c | 63 +++++++++++++++++++++++++++++++++++++++
hw/arm/meson.build | 1 +
3 files changed, 109 insertions(+)
create mode 100644 include/hw/arm/arm_cpus.h
create mode 100644 hw/arm/arm_cpus.c
+/**
+ * ArmCpusState:
+ * @reset_hivecs: use to initialize cpu's reset-hivecs
+ * @has_el3: use to initialize cpu's has_el3
+ * @has_el2: use to initialize cpu's has_el2
+ * @reset_cbar: use to initialize cpu's reset-cbar
+ */
+struct ArmCpusState {
+ CpusState parent_obj;
+
+ bool reset_hivecs;
+ bool has_el3;
+ bool has_el2;
+ uint64_t reset_cbar;
+};
+
+/*
+ * arm_cpus_get_cpu:
+ * Helper to get an ArmCpu from the container.
+ */
+static inline ARMCPU *arm_cpus_get_cpu(ArmCpusState *s, unsigned i)
Maybe we can avoid using 'State' suffix for CPU (still using Class
suffixes) and name this:
ARMCPU *arm_cpus_group_get_cpu(ArmCpusGroup *s, unsigned index);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [RFC PATCH 08/18] hw/arm/arm_cpus: add arm_cpus device,
Philippe Mathieu-Daudé <=