All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: <qemu-ppc@nongnu.org>,
	Daniel Henrique Barboza <danielhb413@gmail.com>,
	<qemu-devel@nongnu.org>, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v3 00/22] ppc: QOM'ify 405 board
Date: Mon, 8 Aug 2022 15:10:39 +0200	[thread overview]
Message-ID: <db56128c-4e25-5c23-97a4-c9a8a2fa0f49@kaod.org> (raw)
In-Reply-To: <65dff991-cf15-75e9-8cb-d55e72ae5560@eik.bme.hu>

On 8/8/22 14:16, BALATON Zoltan wrote:
> On Mon, 8 Aug 2022, Cédric Le Goater wrote:
>> Hello,
>>
>> Here is large series QOM'ifying the PPC405 board. It introduces a new
>> generic machine and SoC models, converts the current device models to
>> QOM and populates the SoC. The process is quite mechanical without too
>> much issues to handle. The noisy part is the initial patch introducing
>> the SoC realize routine.
>>
>> What's left ?
>>
>> * the SDRAM mappings are very baroque and certainly could be simplified.
>>  I think we should QOMify the ppc440 machines before addressing this
>>  part.
> 
> The issue with SDRAM controller and the likely reason why its model looks so complex is that it can't handle any RAM size because of how the bank sizes are encoded in the registers so it only really supports real RAM modules which are predefined sizes. Also the firmware discovers RAM by looking at SPD data and may only check the slots that the real hardware has which may not be the first one. 
>
> Previously I had code to round down the memory size specified on the command line to an acceptable size and issue a warning to let the user know but this was dropped because of some changes in code elsewhere which now allocates memory before the machine could check and ajust it so we can only adjust it by wasting some. 

I don't think we should care adjusting the values. the machine init
routine should check that the RAM size is valid or fail. The machine
should also have a sane RAM size value by default.

See how the aspeed machine deals with similar constraints of its SDRAM
controller in aspeed_machine_init(). If the sdram controller does not
validate the RAM size, aspeed_sdmc_set_ram_size() fails with an error.

C.

> Take this into account and check the ppc4xx_sdram_banks() function and 440 machines before changing this.
> 
> Regards,
> BALATON Zoltan
> 
> 
>> Thanks,
>>
>> C.
>>
>> Changes in v3 :
>>
>> - New device model Ppc4xxDcrDeviceState
>> - Removal of ppc4xx_mal_init(), ppc4xx_plb_init() and ppc405_ebc_init()
>> - Fixes for some reset issues
>> - Kept 2 RAM banks at the Soc level but only one is initialized.
>> - Moved SRAM under the machine. It's not part of the SoC according
>>   to the 405 specs
>>
>> Changes in v2 :
>>
>> - docs/about/removed-features.rst update
>> - Fix compile breakage (uic)
>> - Fix CPU reset, which breaking u-boot boot
>> - Changed prefix of memory regions to "ppc405"
>> - Reduced the number of RAM banks to 1. Second was a dummy one to
>>   please ppc405ep_init()
>>
>> Cédric Le Goater (22):
>>  ppc/ppc405: Remove taihu machine
>>  ppc/ppc405: Introduce a PPC405 generic machine
>>  ppc/ppc405: Move devices under the ref405ep machine
>>  ppc/ppc405: Move SRAM under the ref405ep machine
>>  ppc/ppc405: Introduce a PPC405 SoC
>>  ppc/ppc405: Start QOMification of the SoC
>>  ppc/ppc405: QOM'ify CPU
>>  ppc/ppc4xx: Introduce a DCR device model
>>  ppc/ppc405: QOM'ify CPC
>>  ppc/ppc405: QOM'ify GPT
>>  ppc/ppc405: QOM'ify OCM
>>  ppc/ppc405: QOM'ify GPIO
>>  ppc/ppc405: QOM'ify DMA
>>  ppc/ppc405: QOM'ify EBC
>>  ppc/ppc405: QOM'ify OPBA
>>  ppc/ppc405: QOM'ify POB
>>  ppc/ppc405: QOM'ify PLB
>>  ppc/ppc405: QOM'ify MAL
>>  ppc/ppc405: QOM'ify FPGA
>>  ppc/ppc405: Use an explicit PPCUIC object
>>  ppc/ppc405: Use an explicit I2C object
>>  ppc/ppc4xx: Fix sdram trace events
>>
>> docs/about/deprecated.rst       |   9 -
>> docs/about/removed-features.rst |   6 +
>> docs/system/ppc/embedded.rst    |   1 -
>> hw/ppc/ppc405.h                 | 198 +++++++-
>> include/hw/ppc/ppc4xx.h         |  48 +-
>> hw/ppc/ppc405_boards.c          | 375 ++++-----------
>> hw/ppc/ppc405_uc.c              | 828 +++++++++++++++++---------------
>> hw/ppc/ppc4xx_devs.c            | 184 ++++---
>> hw/ppc/sam460ex.c               |  24 +-
>> MAINTAINERS                     |   2 +-
>> 10 files changed, 903 insertions(+), 772 deletions(-)
>>
>>



  reply	other threads:[~2022-08-08 13:13 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 10:27 [PATCH v3 00/22] ppc: QOM'ify 405 board Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 01/22] ppc/ppc405: Remove taihu machine Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 02/22] ppc/ppc405: Introduce a PPC405 generic machine Cédric Le Goater
2022-08-08 12:23   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 03/22] ppc/ppc405: Move devices under the ref405ep machine Cédric Le Goater
2022-08-08 12:23   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 04/22] ppc/ppc405: Move SRAM " Cédric Le Goater
2022-08-08 12:25   ` BALATON Zoltan
2022-08-08 13:38     ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 05/22] ppc/ppc405: Introduce a PPC405 SoC Cédric Le Goater
2022-08-08 12:43   ` BALATON Zoltan
2022-08-08 13:51     ` Cédric Le Goater
2022-08-08 14:02       ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 06/22] ppc/ppc405: Start QOMification of the SoC Cédric Le Goater
2022-08-08 12:59   ` BALATON Zoltan
2022-08-08 15:20     ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 07/22] ppc/ppc405: QOM'ify CPU Cédric Le Goater
2022-08-08 13:17   ` BALATON Zoltan
2022-08-08 16:06     ` Cédric Le Goater
2022-08-08 17:05       ` BALATON Zoltan
2022-08-08 17:14         ` Peter Maydell
2022-08-08 17:25           ` BALATON Zoltan
2022-08-09 10:09             ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 08/22] ppc/ppc4xx: Introduce a DCR device model Cédric Le Goater
2022-08-08 13:29   ` BALATON Zoltan
2022-08-08 15:35     ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 09/22] ppc/ppc405: QOM'ify CPC Cédric Le Goater
2022-08-08 14:12   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 10/22] ppc/ppc405: QOM'ify GPT Cédric Le Goater
2022-08-08 14:25   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 11/22] ppc/ppc405: QOM'ify OCM Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 12/22] ppc/ppc405: QOM'ify GPIO Cédric Le Goater
2022-08-08 14:32   ` BALATON Zoltan
2022-08-08 14:50     ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 13/22] ppc/ppc405: QOM'ify DMA Cédric Le Goater
2022-08-08 14:35   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 14/22] ppc/ppc405: QOM'ify EBC Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 15/22] ppc/ppc405: QOM'ify OPBA Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 16/22] ppc/ppc405: QOM'ify POB Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 17/22] ppc/ppc405: QOM'ify PLB Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 18/22] ppc/ppc405: QOM'ify MAL Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 19/22] ppc/ppc405: QOM'ify FPGA Cédric Le Goater
2022-08-08 14:55   ` BALATON Zoltan
2022-08-08 15:58     ` Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 20/22] ppc/ppc405: Use an explicit PPCUIC object Cédric Le Goater
2022-08-08 14:58   ` BALATON Zoltan
2022-08-08 10:27 ` [PATCH v3 21/22] ppc/ppc405: Use an explicit I2C object Cédric Le Goater
2022-08-08 10:27 ` [PATCH v3 22/22] ppc/ppc4xx: Fix sdram trace events Cédric Le Goater
2022-08-08 12:16 ` [PATCH v3 00/22] ppc: QOM'ify 405 board BALATON Zoltan
2022-08-08 13:10   ` Cédric Le Goater [this message]
2022-08-08 14:08     ` BALATON Zoltan

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=db56128c-4e25-5c23-97a4-c9a8a2fa0f49@kaod.org \
    --to=clg@kaod.org \
    --cc=balaton@eik.bme.hu \
    --cc=danielhb413@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.