aspeed/sdmc: Check RAM size value at realize time
commit61578d1e806d7271813c870e31160a7b21eab508
authorCédric Le Goater <clg@redhat.com>
Tue, 25 Jun 2024 06:37:43 +0000 (25 08:37 +0200)
committerCédric Le Goater <clg@redhat.com>
Tue, 2 Jul 2024 05:52:43 +0000 (2 07:52 +0200)
tree74e61c00335f921903a2abe29418dfa444968e70
parent56a37eda93edafabcc4de0184b88d082ede6dec1
aspeed/sdmc: Check RAM size value at realize time

The RAM size of the SDMC device is validated for the SoC and set when
the Aspeed machines are initialized and then later used by several
SoC implementations. However, the SDMC model never checks that the RAM
size has been actually set before being used. Do that at realize.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Jamin_lin < jamin_lin@aspeedtech.com>
hw/misc/aspeed_sdmc.c