Message ID | 303b8e9c013e9c5a74f9441d500102d70a4cf493.1386053678.git.peter.crosthwaite@xilinx.com |
---|---|
State | New |
Headers | show |
On 3 December 2013 07:01, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote: > The reset Value of the CP15 CBAR is a vendor (machine) configurable no need to capitalize "value" here. > property. If ARM_FEATURE_CBAR is set, add it as a property at > post_init time. > > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> PS: this patch has conflicts (largely textual, easy enough to resolve) with the patches in my v7-mach-virt series. If you do a respin of this before I get round to the next target-arm pullreq (likely to be early next week) it might be simplest to base that respin on top of the target-arm.next branch (in git://git.linaro.org/people/pmaydell/qemu-arm.git ; nb the server is down for maintanance this Sunday). That would save me the effort of fixing up the conflicts ;-) thanks -- PMM
On Sat, Dec 7, 2013 at 12:41 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 3 December 2013 07:01, Peter Crosthwaite > <peter.crosthwaite@xilinx.com> wrote: >> The reset Value of the CP15 CBAR is a vendor (machine) configurable > > no need to capitalize "value" here. > Fixed, Regards, Peter >> property. If ARM_FEATURE_CBAR is set, add it as a property at >> post_init time. >> >> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > > Reviewed-by: Peter Maydell <peter.maydell@linaro.org> > > PS: this patch has conflicts (largely textual, easy enough to resolve) > with the patches in my v7-mach-virt series. If you do a respin of this > before I get round to the next target-arm pullreq (likely to be early next > week) it might be simplest to base that respin on top of the target-arm.next > branch (in git://git.linaro.org/people/pmaydell/qemu-arm.git ; nb the > server is down for maintanance this Sunday). That would save me > the effort of fixing up the conflicts ;-) > > thanks > -- PMM >
On Sat, Dec 7, 2013 at 12:41 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 3 December 2013 07:01, Peter Crosthwaite > <peter.crosthwaite@xilinx.com> wrote: >> The reset Value of the CP15 CBAR is a vendor (machine) configurable > > no need to capitalize "value" here. > >> property. If ARM_FEATURE_CBAR is set, add it as a property at >> post_init time. >> >> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > > Reviewed-by: Peter Maydell <peter.maydell@linaro.org> > I am trying a different implementation that removes the need for the QOM core patches and implements the desired Qdev write-until-realize semantic so I have removed your RB in V5 due to fundamental differences. Regards, Peter > PS: this patch has conflicts (largely textual, easy enough to resolve) > with the patches in my v7-mach-virt series. If you do a respin of this > before I get round to the next target-arm pullreq (likely to be early next > week) it might be simplest to base that respin on top of the target-arm.next > branch (in git://git.linaro.org/people/pmaydell/qemu-arm.git ; nb the > server is down for maintanance this Sunday). That would save me > the effort of fixing up the conflicts ;-) > > thanks > -- PMM >
diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 90413ee..cbe108b 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -20,6 +20,7 @@ #include "cpu.h" #include "qemu-common.h" +#include "qapi/qmp/qerror.h" #if !defined(CONFIG_USER_ONLY) #include "hw/loader.h" #endif @@ -223,6 +224,18 @@ static void arm_cpu_initfn(Object *obj) } } +static void arm_cpu_post_init(Object *obj) +{ + ARMCPU *cpu = ARM_CPU(obj); + Error *err = NULL; + + if (arm_feature(&cpu->env, ARM_FEATURE_CBAR)) { + object_property_add_uint32_ptr(obj, "reset-cbar", &cpu->reset_cbar, + &err); + assert_no_error(err); + } +} + static void arm_cpu_finalizefn(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); @@ -934,6 +947,7 @@ static const TypeInfo arm_cpu_type_info = { .parent = TYPE_CPU, .instance_size = sizeof(ARMCPU), .instance_init = arm_cpu_initfn, + .instance_post_init = arm_cpu_post_init, .instance_finalize = arm_cpu_finalizefn, .abstract = true, .class_size = sizeof(ARMCPUClass),
The reset Value of the CP15 CBAR is a vendor (machine) configurable property. If ARM_FEATURE_CBAR is set, add it as a property at post_init time. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> --- Change since v1: Re-implement as dynamic property target-arm/cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)