From: Peter Maydell <peter.maydell@linaro.org>
To: Andrew Baumann <Andrew.Baumann@microsoft.com>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Pekka Enberg" <penberg@iki.fi>,
"patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 8/9] hw/arm/bcm2836: Hardcode correct CPU type
Date: Tue, 13 Mar 2018 17:09:30 +0000 [thread overview]
Message-ID: <CAFEAcA8O7EEhoS83eRLH5bVmog_Qu1tAgUzR6NsE+GD2a7FsDw@mail.gmail.com> (raw)
In-Reply-To: <MWHPR21MB018983B74A652443B70680F19ED20@MWHPR21MB0189.namprd21.prod.outlook.com>
On 13 March 2018 at 16:55, Andrew Baumann <Andrew.Baumann@microsoft.com> wrote:
>> From: Qemu-devel <qemu-devel-
>> bounces+andrew.baumann=microsoft.com@nongnu.org> On Behalf Of Peter
>> Maydell
>> Sent: Tuesday, 13 March 2018 08:35
>>
>> Now we have separate types for BCM2386 and BCM2387, we might as well
>> just hard-code the CPU type they use rather than having it passed
>> through as an object property. This then lets us put the initialization
>> of the CPU object in init rather than realize.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> static const BCM283XInfo bcm283x_socs[] = {
>> {
>> .name = TYPE_BCM2836,
>> + .cpu_type = ARM_CPU_TYPE_NAME("cortex-a15"),
>
> At some point I remember seeing a patch to change this to cortex-a7. Is there a reason we didn't make that change?
>
> (Background: the real Pi2 has an A7. When I first implemented the machine model there was no A7 emulation in QEMU, so I used the A15 which was the closest equivalent.)
Yeah, we should do that. I'd forgotten about that, I think
things just got lost in the shuffle of having several
patchsets that tried to change the same things at once.
I guess the simplest thing is to add a patch at the end of
the series that fixes the cpu type for bcm2836.
>> --- a/hw/arm/raspi.c
>> +++ b/hw/arm/raspi.c
>> @@ -150,8 +150,6 @@ static void raspi_init(MachineState *machine, int
>> version)
>> /* Setup the SOC */
>> object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram),
>> &error_abort);
>> - object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type",
>> - &error_abort);
>> object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus",
>> &error_abort);
>> int board_rev = version == 3 ? 0xa02082 : 0xa21041;
>
> What about the default_cpu_type field of MachineClass set in
> raspi[23]_machine_init? That seems irrelevant now...
Mmm. It doesn't hurt anything, though.
> Also, if anyone cares (I don't), we also just lost the ability
> to override the CPU type of a raspi model.
Yeah, that's deliberate -- I think that letting the user randomly
plug nonexistent combinations together just confuses people when
they don't work. I guess I should call it out in the commit message
though.
thanks
-- PMM
next prev parent reply other threads:[~2018-03-13 17:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 15:34 [Qemu-devel] [PATCH 0/9] raspi3: various fixes for Linux booting Peter Maydell
2018-03-13 15:34 ` [Qemu-devel] [PATCH 1/9] hw/arm/raspi: Don't do board-setup or secure-boot for raspi3 Peter Maydell
2018-03-13 16:34 ` Andrew Baumann
2018-03-13 23:20 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-03-13 15:34 ` [Qemu-devel] [PATCH 2/9] hw/arm/boot: assert that secure_boot and secure_board_setup are false for AArch64 Peter Maydell
2018-03-13 23:23 ` Philippe Mathieu-Daudé
2018-03-13 15:34 ` [Qemu-devel] [PATCH 3/9] hw/arm/boot: If booting a kernel in EL2, set SCR_EL3.HCE Peter Maydell
2018-03-13 15:34 ` [Qemu-devel] [PATCH 4/9] hw/arm/bcm2386: Fix parent type of bcm2386 Peter Maydell
2018-03-13 16:40 ` Andrew Baumann
2018-03-13 23:04 ` Philippe Mathieu-Daudé
2018-03-13 15:34 ` [Qemu-devel] [PATCH 5/9] hw/arm/bcm2836: Rename bcm2836 type/struct to bcm283x Peter Maydell
2018-03-13 16:43 ` Andrew Baumann
2018-03-13 22:58 ` Philippe Mathieu-Daudé
2018-03-13 15:34 ` [Qemu-devel] [PATCH 6/9] hw/arm/bcm2836: Create proper bcm2837 device Peter Maydell
2018-03-13 16:47 ` Andrew Baumann
2018-03-13 23:00 ` Philippe Mathieu-Daudé
2018-06-18 16:02 ` Thomas Huth
2018-03-13 15:34 ` [Qemu-devel] [PATCH 7/9] hw/arm/bcm2836: Use correct affinity values for BCM2837 Peter Maydell
2018-03-13 16:48 ` Andrew Baumann
2018-03-13 17:06 ` Peter Maydell
2018-03-15 12:10 ` Philippe Mathieu-Daudé
2018-03-13 15:34 ` [Qemu-devel] [PATCH 8/9] hw/arm/bcm2836: Hardcode correct CPU type Peter Maydell
2018-03-13 16:55 ` Andrew Baumann
2018-03-13 17:09 ` Peter Maydell [this message]
2018-03-13 23:16 ` Philippe Mathieu-Daudé
2018-03-19 10:58 ` Peter Maydell
2018-03-13 23:16 ` Philippe Mathieu-Daudé
2018-03-15 17:13 ` Peter Maydell
2018-03-19 14:40 ` Igor Mammedov
2018-03-19 18:25 ` Peter Maydell
2018-03-13 23:06 ` Philippe Mathieu-Daudé
2018-03-19 11:57 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-03-13 15:34 ` [Qemu-devel] [PATCH 9/9] hw/arm/raspi: Provide spin-loop code for AArch64 CPUs Peter Maydell
2018-03-15 12:31 ` Philippe Mathieu-Daudé
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=CAFEAcA8O7EEhoS83eRLH5bVmog_Qu1tAgUzR6NsE+GD2a7FsDw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=Andrew.Baumann@microsoft.com \
--cc=f4bug@amsat.org \
--cc=patches@linaro.org \
--cc=penberg@iki.fi \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).