qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@calxeda.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Rob Herring" <rob.herring@calxeda.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Mark Langsdorf" <mark.langsdorf@calxeda.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH arm-devs v2 8/8] arm/highbank.c: Fix MPCore periphbase name
Date: Fri, 29 Nov 2013 08:52:47 +0100	[thread overview]
Message-ID: <529847CF.4070409@calxeda.com> (raw)
In-Reply-To: <CAFEAcA_J7n-Uz4HVY6Yt5NvBtGuwj2mYXXHdYm=MohdfqhueEA@mail.gmail.com>

On 11/28/2013 08:41 PM, Peter Maydell wrote:

(CCing Rob)

> On 28 November 2013 03:31, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
>> GIC_BASE_ADDR is not the base address of the GIC. Its clear from the
>> code that this is the base address of the MPCore. Rename to
>> MPCORE_PERIPHBASE accordingly.
>
> "MPCore" is one of those terms I dislike because it
> doesn't actually match up with the documentation's
> terminology...
>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> ---
>>
>>   hw/arm/highbank.c | 15 ++++++++-------
>>   1 file changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
>> index cb32325..be2cc20 100644
>> --- a/hw/arm/highbank.c
>> +++ b/hw/arm/highbank.c
>> @@ -28,11 +28,11 @@
>>   #include "exec/address-spaces.h"
>>   #include "qemu/error-report.h"
>>
>> -#define SMP_BOOT_ADDR 0x100
>> -#define SMP_BOOT_REG  0x40
>> -#define GIC_BASE_ADDR 0xfff10000
>> +#define SMP_BOOT_ADDR           0x100
>> +#define SMP_BOOT_REG            0x40
>> +#define MPCORE_PERIPHBASE       0xfff10000
>>
>> -#define NIRQ_GIC      160
>> +#define NIRQ_GIC                160
>>
>>   /* Board init.  */
>>
>> @@ -55,7 +55,7 @@ static void hb_write_secondary(ARMCPU *cpu, const struct arm_boot_info *info)
>>           0xe1110001, /* tst     r1, r1 */
>>           0x0afffffb, /* beq     <wfi> */
>>           0xe12fff11, /* bx      r1 */
>> -        GIC_BASE_ADDR      /* privbase: gic address.  */
>> +        MPCORE_PERIPHBASE   /* privbase: gic address.  */
>
> Comment no longer matches code.
>
> More seriously, this secondary-boot code has a bunch
> of hardcoded offsets for GIC registers which are
> correct for the A9 but wrong for A15. Andre, did you
> test Midway with an SMP boot config?

Obviously not ;-)
In the moment I cannot care about this, but it looks like we need 
different SMP stubs for Highbank and Midway.
Thanks for the hint,

Andre.

>
> The generic hw/arm/boot code dealt with this problem
> by feeding the boot code the GIC CPU interface base
> address rather than the generic peripheral base address;
> the offsets within the CPU i/f are the same for both
> cores.
>
>>       };
>>       for (n = 0; n < ARRAY_SIZE(smpboot); n++) {
>>           smpboot[n] = tswap32(smpboot[n]);
>> @@ -236,7 +236,8 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
>>
>>           cpu = ARM_CPU(object_new(object_class_get_name(oc)));
>>
>> -        object_property_set_int(OBJECT(cpu), GIC_BASE_ADDR, "reset-cbar", &err);
>> +        object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar",
>> +                                &err);
>>           if (err) {
>>               error_report("%s", error_get_pretty(err));
>>               exit(1);
>> @@ -287,7 +288,7 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
>>       qdev_prop_set_uint32(dev, "num-irq", NIRQ_GIC);
>>       qdev_init_nofail(dev);
>>       busdev = SYS_BUS_DEVICE(dev);
>> -    sysbus_mmio_map(busdev, 0, GIC_BASE_ADDR);
>> +    sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE);
>>       for (n = 0; n < smp_cpus; n++) {
>>           sysbus_connect_irq(busdev, n, cpu_irq[n]);
>>       }
>> --
>> 1.8.4.4
>>
>
> thanks
> -- PMM
>

      parent reply	other threads:[~2013-11-29  7:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28  3:26 [Qemu-devel] [PATCH arm-devs v2 0/8] Fix Support for ARM A9 CBAR Peter Crosthwaite
2013-11-28  3:27 ` [Qemu-devel] [PATCH arm-devs v2 1/8] qom/object: Make uintXX added properties writable Peter Crosthwaite
2013-11-28  3:27 ` [Qemu-devel] [PATCH arm-devs v2 2/8] target-arm: Define and use ARM_FEATURE_CBAR Peter Crosthwaite
2013-11-28  3:28 ` [Qemu-devel] [PATCH arm-devs v2 3/8] target-arm/cpu: Convert reset CBAR to a property Peter Crosthwaite
2013-11-28  3:28 ` [Qemu-devel] [PATCH arm-devs v2 4/8] arm/highbank: Use object_new() rather than cpu_arm_init() Peter Crosthwaite
2013-11-28  3:29 ` [Qemu-devel] [PATCH arm-devs v2 5/8] arm/highbank: Fix CBAR intialisation Peter Crosthwaite
2013-11-28 19:34   ` Peter Maydell
2013-11-28 23:55     ` Peter Crosthwaite
2013-11-29  8:16       ` Peter Maydell
2013-11-28  3:29 ` [Qemu-devel] [PATCH arm-devs v2 6/8] arm/xilinx_zynq: Use object_new() rather than cpu_arm_init() Peter Crosthwaite
2013-11-28  3:30 ` [Qemu-devel] [PATCH arm-devs v2 7/8] arm/xilinx_zynq: Implement CBAR intialisation Peter Crosthwaite
2013-11-28 19:42   ` Peter Maydell
2013-11-28  3:31 ` [Qemu-devel] [PATCH arm-devs v2 8/8] arm/highbank.c: Fix MPCore periphbase name Peter Crosthwaite
2013-11-28 19:41   ` Peter Maydell
2013-11-29  0:09     ` Peter Crosthwaite
2013-12-03  6:31       ` Peter Crosthwaite
2013-11-29  7:52     ` Andre Przywara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=529847CF.4070409@calxeda.com \
    --to=andre.przywara@calxeda.com \
    --cc=afaerber@suse.de \
    --cc=mark.langsdorf@calxeda.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob.herring@calxeda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).