qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	BALATON Zoltan <balaton@eik.bme.hu>,
	Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	dbarboza@redhat.com, "QEMU Developers" <qemu-devel@nongnu.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Greg Kurz" <groug@kaod.org>, "Alexander Graf" <agraf@csgraf.de>,
	qemu-ppc <qemu-ppc@nongnu.org>, "Cédric Le Goater" <clg@kaod.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: Deprecate the ppc405 boards in QEMU?
Date: Wed, 20 Oct 2021 12:21:29 +0200	[thread overview]
Message-ID: <75686a5d-63da-fda7-8dab-7e0f190b6282@redhat.com> (raw)
In-Reply-To: <be7a734a-b88b-3130-fee8-398387fb65b4@redhat.com>

On 10/19/21 13:11, Thomas Huth wrote:
> On 19/10/2021 12.07, BALATON Zoltan wrote:
>> On Tue, 19 Oct 2021, Christophe Leroy wrote:
>>> Le 19/10/2021 à 11:39, Thomas Huth a écrit :
>>>> On 19/10/2021 11.31, Christophe Leroy wrote:
>>>>> Le 11/10/2021 à 15:24, Thomas Huth a écrit :
>>>>>> On 11/10/2021 11.20, David Gibson wrote:
>>>>>>> On Mon, Oct 11, 2021 at 10:10:36AM +0200, Thomas Huth wrote:
>>>>>>>> On 06/10/2021 09.25, Thomas Huth wrote:
>>>>>>>>> On 05/10/2021 23.53, BALATON Zoltan wrote:
>>>>>>>>> [...]
>>>>>>>>>> Maybe these 405 boards in QEMU ran with modified firmware
>>>>>>>>>> where the
>>>>>>>>>> memory detection was patched out but it seems to detect the
>>>>>>>>>> RAM so I
>>>>>>>>>> wonder where it gets that from. Maybe by reading the SDRAM
>>>>>>>>>> controller DCRs ppc4xx_sdram_init() sets up. Then I'm not sure
>>>>>>>>>> what
>>>>>>>>>> it needs the SPD for, I forgot how this worked on sam460ex. Maybe
>>>>>>>>>> for the speed calibration, so could be it detects ram by reading
>>>>>>>>>> DCRs then tries to get SPD data and that's where it stops as
>>>>>>>>>> i2c is
>>>>>>>>>> not emulated on taihu. This could be confirmed by checking
>>>>>>>>>> what it
>>>>>>>>>> pokes with -d guest_errors that shows accesses to missing devices
>>>>>>>>>> but don't know where 405 has the i2c controller and if it's
>>>>>>>>>> the same
>>>>>>>>>> as newer SoCs. If so that could be reused and an i2c bus could be
>>>>>>>>>> added with the SPD data like in sam460ex to make u-boot happy
>>>>>>>>>> or you
>>>>>>>>>> could skip this in u-boot.
>>>>>>>>>
>>>>>>>>> FWIW, I've just tried the latter (skipping the sdram init in
>>>>>>>>> u-boot),
>>>>>>>>> and indeed, I can get to the u-boot prompt now.
>>>>>>>> [...]> I've also attached the patch with my modifications to
>>>>>>>> u-boot.
>>>>>>>>
>>>>>>>> FYI, the changes can now be found on this branch here:
>>>>>>>>
>>>>>>>>   https://gitlab.com/huth/u-boot/-/commits/taihu
>>>>>>>>
>>>>>>>> I also added a gitlab-CI file, so you can now download the
>>>>>>>> u-boot.bin as an
>>>>>>>> artifact from the corresponding pipeline, e.g.:
>>>>>>>>
>>>>>>>>   https://gitlab.com/huth/u-boot/-/jobs/1667201028
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Are you going to send a v2 of your proposed deprecation patches?
>>>>>>
>>>>>> No, since there was interest in keeping the 405 boards for testing
>>>>>> the 405 code in the Linux kernel, and since there is now a way to
>>>>>> do at least some very basic testing of these boards (with the
>>>>>> u-boot firmware), I don't plan to respin the deprecation patch. I
>>>>>> just sent a patch for adding the boards to our CI instead:
>>>>>>
>>>>>>   https://lists.gnu.org/archive/html/qemu-devel/2021-10/msg02072.html
>>>>>>
>>>>>
>>>>> I have downloaded your u-boot.bin and tried it with both QEMU 5.2.0
>>>>> and mainline, and I get:
>>>>>
>>>>> ERROR:../accel/tcg/tcg-accel-ops.c:79:tcg_handle_interrupt:
>>>>> assertion failed: (qemu_mutex_iothread_locked())
>>>>> Bail out!
>>>>> ERROR:../accel/tcg/tcg-accel-ops.c:79:tcg_handle_interrupt:
>>>>> assertion failed: (qemu_mutex_iothread_locked())
>>>>> Abandon (core dumped)
>>>>>
>>>>> I see in the mail history that you got that problem as well at some
>>>>> point. How did you fix it ?
>>>>
>>>> You need this patch here to fix this issue:
>>>>
>>>>   https://lists.gnu.org/archive/html/qemu-devel/2021-10/msg01019.html
>>>>   ("hw/ppc: Fix iothread locking in the 405 code")
>>>>
>>>
>>> Thank you.
>>>
>>> Is there anything special to do then in order to boot a Linux kernel ?
>>>
>>> I build the uImage for ppc40x_defconfig
>>>
>>> I use the following command, but it does nothing, it stays in uboot
>>> prompt as when I don't get a kernel argument
>>>
>>>     ~/qemu/build/qemu-system-ppc -M taihu -bios
>>> ~/Téléchargements/u-boot.bin -serial null -serial mon:stdio -kernel
>>> arch/powerpc/boot/uImage
>>
>> I'm not sure using -bios and -kernel together makes sense, it probably
>> starts u-boot in this case and you have to load and start the kernel
>> from u-boot as you'd notmally do on a real machine. Alternatively you
>> could use -kernel instead of -bios which then loads a kernel and
>> starts it directly but not sure if it needs a firmware to work.
>>
>> Ot I could be completely wrong as I don't know this machine and
>> haven't tried it.
> 
> Actually, these 405 machines are quite weird. They refuse to boot
> without bios image, so you currently need the firmware image for sure.

When using -kernel/-append, if a BIOS is required by the kernel,
then it should be crafted by the machine IMO. Usually OS only
access a configuration area in PROM. The PROM must be mapped,
and the minimum configuration structure filled.

Anyhow I find -bios confusing, I never know if this option parse
or expects a full/partial raw flash image, an ELF image, something
else...



  parent reply	other threads:[~2021-10-20 11:12 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  4:48 [PATCH v3 0/7] Reduce load on ppc target maintainers David Gibson
2021-09-27  4:48 ` [PATCH v3 1/7] qemu: Split machine_ppc.py acceptance tests David Gibson
2021-09-27  4:50   ` Philippe Mathieu-Daudé
2021-09-27 16:44   ` Philippe Mathieu-Daudé
2021-09-27 16:53     ` Cédric Le Goater
2021-09-27 17:18       ` Philippe Mathieu-Daudé
2021-09-27  4:48 ` [PATCH v3 2/7] MAINTAINERS: Remove machine specific files from ppc TCG CPUs entry David Gibson
2021-09-27  4:48 ` [PATCH v3 3/7] MAINTAINERS: Remove David & Greg as reviewers for a number of boards David Gibson
2021-09-27  4:48 ` [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms David Gibson
2021-10-01  8:35   ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Thomas Huth
2021-10-01  9:14     ` Christophe Leroy
2021-10-01  9:43       ` Thomas Huth
2021-10-01 11:12         ` Peter Maydell
2021-10-01 12:04           ` Thomas Huth
2021-10-01 13:04             ` Christophe Leroy
2021-10-01 13:14               ` Cédric Le Goater
2021-10-01 13:24               ` Peter Maydell
2021-10-01 14:18               ` Thomas Huth
2021-10-05  0:48                 ` David Gibson
2021-10-05  4:44                   ` Christophe Leroy
2021-10-05  6:18                     ` Alexey Kardashevskiy
2021-10-05  6:42                       ` Thomas Huth
2021-10-05  8:05                         ` Alexey Kardashevskiy
2021-10-05  8:07                           ` Thomas Huth
2021-10-05  8:51                             ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-05 12:17                               ` BALATON Zoltan
2021-10-05 12:35                                 ` Thomas Huth
2021-10-05 21:53                                   ` BALATON Zoltan
2021-10-06  6:39                                     ` Thomas Huth
2021-10-06  7:25                                     ` Thomas Huth
2021-10-11  8:10                                       ` Thomas Huth
2021-10-11  9:20                                         ` David Gibson
2021-10-11 13:24                                           ` Thomas Huth
2021-10-19  9:31                                             ` Christophe Leroy
2021-10-19  9:39                                               ` Thomas Huth
2021-10-19  9:48                                                 ` Christophe Leroy
2021-10-19 10:07                                                   ` BALATON Zoltan
2021-10-19 11:11                                                     ` Thomas Huth
2021-10-19 11:51                                                       ` Christophe Leroy
2021-10-19 12:38                                                         ` BALATON Zoltan
2021-10-19 13:44                                                           ` Christophe Leroy
2021-10-19 14:24                                                             ` Christophe Leroy
2021-10-19 14:56                                                               ` BALATON Zoltan
2021-10-19 16:12                                                                 ` Christophe Leroy
2021-10-19 20:55                                                                   ` Cédric Le Goater
2021-10-19 21:30                                                                   ` Cédric Le Goater
2021-10-20  9:02                                                                     ` Christophe Leroy
2021-10-20 10:10                                                                       ` Cédric Le Goater
2021-10-20 13:27                                                                         ` LEROY Christophe
2021-10-20 14:31                                                                           ` BALATON Zoltan
2021-10-20 14:34                                                                             ` Thomas Huth
2021-10-20 14:41                                                                               ` Cédric Le Goater
2021-10-20 15:03                                                                                 ` LEROY Christophe
2021-10-20 14:39                                                                           ` Cédric Le Goater
2021-10-20 15:28                                                                             ` LEROY Christophe
2021-10-20 10:21                                                       ` Philippe Mathieu-Daudé [this message]
2021-10-20 11:40                                                         ` BALATON Zoltan
2021-10-20 10:12                                                     ` CLI: Using -bios AND -kernel Philippe Mathieu-Daudé
2021-10-20 10:54                                                       ` Thomas Huth
2021-10-20 11:35                                                         ` BALATON Zoltan
2021-10-19  9:41                                               ` Deprecate the ppc405 boards in QEMU? Greg Kurz
2021-10-05  8:14                       ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Cédric Le Goater
2021-10-05 12:20                         ` BALATON Zoltan
2021-10-05 12:29                           ` Thomas Huth
2021-10-20 10:26                             ` Philippe Mathieu-Daudé
2021-10-20 11:42                               ` BALATON Zoltan
2021-10-20 12:43                                 ` Cédric Le Goater
2021-10-20 13:16                                   ` LEROY Christophe
2021-10-20 15:04                                     ` Simon Marchi
2021-10-21  6:48                                     ` Christophe Leroy
2021-10-21  7:25                                       ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-21  8:01                                         ` Christophe Leroy
2021-10-28 12:24                                     ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Luis Machado
2021-10-28 17:27                                       ` Christophe Leroy
2021-10-20 13:35                                   ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-20 14:55                                     ` BALATON Zoltan
2021-10-20 15:04                                       ` Thomas Huth
2021-10-20 14:16                                   ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) BALATON Zoltan
2021-10-05  8:49                     ` Daniel P. Berrangé
2021-10-05 16:15                       ` Philippe Mathieu-Daudé
2021-10-05 16:20                         ` Daniel P. Berrangé
2021-10-27  4:06                           ` Philippe Mathieu-Daudé
2021-10-27  8:40                             ` Cédric Le Goater
2021-10-27 10:42                               ` Christophe Leroy
2021-10-27 10:48                                 ` Philippe Mathieu-Daudé
2021-10-27 17:03                                 ` Cédric Le Goater
2021-09-27  4:48 ` [PATCH v3 5/7] MAINTAINERS: Remove David & Greg as reviewers/co-maintainers of powernv David Gibson
2021-09-27  4:48 ` [PATCH v3 6/7] MAINTAINERS: Add information for OpenPIC David Gibson
2021-09-29  7:08   ` Mark Cave-Ayland
2021-09-27  4:48 ` [PATCH v3 7/7] MAINTAINERS: Demote sPAPR from "Supported" to "Maintained" David Gibson
2021-09-30  1:15 ` [PATCH v3 0/7] Reduce load on ppc target maintainers David Gibson
2021-10-06  9:52   ` Alexey Kardashevskiy
2021-10-06 11:03     ` Greg Kurz

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=75686a5d-63da-fda7-8dab-7e0f190b6282@redhat.com \
    --to=philmd@redhat.com \
    --cc=agraf@csgraf.de \
    --cc=balaton@eik.bme.hu \
    --cc=christophe.leroy@csgroup.eu \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dbarboza@redhat.com \
    --cc=groug@kaod.org \
    --cc=hpoussin@reactos.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.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).