qemu/include/hw/misc
Igor Mammedov 533eb415df arm/aspeed: actually check RAM size
It's supposed that SOC will check if "-m" provided
RAM size is valid by setting "ram-size" property and
then board would read back valid (possibly corrected
value) to map RAM MemoryReging with valid size.
It isn't doing so, since check is called only
indirectly from
  aspeed_sdmc_reset()->asc->compute_conf()
or much later when guest writes to configuration
register.

So depending on "-m" value QEMU end-ups with a warning
and an invalid MemoryRegion size allocated and mapped.
(examples:
 -M ast2500-evb -m 1M
    0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
      0000000080000000-00000000800fffff (prio 0, ram): ram
      0000000080100000-00000000bfffffff (prio 0, i/o): max_ram
 -M ast2500-evb -m 3G
    0000000080000000-000000017ffffffe (prio 0, i/o): aspeed-ram-container
      0000000080000000-000000013fffffff (prio 0, ram): ram
      [DETECTED OVERFLOW!] 0000000140000000-00000000bfffffff (prio 0, i/o): max_ram
)
On top of that sdmc falls back and reports to guest
"default" size, it thinks machine should have.

This patch makes ram-size check actually work and
changes behavior from a warning later on during
machine reset to error_fatal at the moment SOC.ram-size
is set so user will have to fix RAM size on CLI
to start machine.

It also gets out of the way mutable ram-size logic,
so we could consolidate RAM allocation logic around
pre-allocated hostmem backend (supplied by user or
auto created by generic machine code depending on
supplied -m/mem-path/mem-prealloc options.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200219160953.13771-10-imammedo@redhat.com>
2020-02-19 16:49:54 +00:00
..
macio include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
a9scu.h
arm11scu.h
arm_integrator_debug.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
armsse-cpuid.h hw/misc/armsse-cpuid: Implement SSE-200 CPU_IDENTITY register block 2019-02-01 14:55:43 +00:00
armsse-mhu.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
aspeed_scu.h hw: aspeed_scu: Add AST2600 support 2019-10-15 18:09:04 +01:00
aspeed_sdmc.h arm/aspeed: actually check RAM size 2020-02-19 16:49:54 +00:00
aspeed_xdma.h hw/misc/aspeed_xdma: New device 2019-07-01 17:29:00 +01:00
auxbus.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
bcm2835_mbox_defs.h bcm2835_mbox: add BCM2835 mailboxes 2016-02-03 14:56:32 +00:00
bcm2835_mbox.h hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
bcm2835_property.h hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
bcm2835_rng.h target-arm: Implement BCM2835 hardware RNG 2017-02-28 12:08:13 +00:00
bcm2835_thermal.h hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor 2019-10-25 13:09:27 +01:00
cbus.h Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
grlib_ahb_apb_pnp.h leon3: introduce the plug and play mechanism 2019-05-17 09:17:11 +01:00
imx2_wdt.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
imx6_ccm.h i.MX: Add i.MX6 CCM and ANALOG device. 2016-03-16 17:42:18 +00:00
imx6_src.h i.MX: Add i.MX6 System Reset Controller device. 2016-05-12 13:22:28 +01:00
imx6ul_ccm.h i.MX6UL: Add i.MX6UL specific CCM device 2018-08-16 14:05:28 +01:00
imx7_ccm.h i.MX: Add code to emulate i.MX7 CCM, PMU and ANALOG IP blocks 2018-02-09 10:40:29 +00:00
imx7_gpr.h i.MX: Add implementation of i.MX7 GPR IP block 2018-02-09 10:40:30 +00:00
imx7_snvs.h i.MX: Add code to emulate i.MX7 SNVS IP-block 2018-02-09 10:40:30 +00:00
imx25_ccm.h i.MX: Add an i.MX25 specific CCM class/instance 2015-12-17 13:37:16 +00:00
imx31_ccm.h i.MX: move i.MX31 CCM object to register array 2016-01-11 15:52:18 +00:00
imx_ccm.h i.MX: split the GPT timer implementation into per SOC definitions 2016-07-07 13:47:01 +01:00
imx_rngc.h i.MX: add an emulation for RNGC 2020-01-17 14:27:16 +00:00
iotkit-secctl.h hw/misc/iotkit-secctl: Support 4 internal MPCs 2019-02-01 14:55:42 +00:00
iotkit-sysctl.h hw/arm/armsse: Unify init-svtor and cpuwait handling 2019-02-28 11:03:04 +00:00
iotkit-sysinfo.h iotkit-sysinfo: Make SYS_VERSION and SYS_CONFIG configurable 2019-02-01 14:55:42 +00:00
ivshmem.h
mac_via.h q800: add a block backend to the PRAM 2020-01-07 13:35:53 +01:00
mips_cmgcr.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
mips_cpc.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
mips_itu.h target/mips: Update ITU to utilize SAARI and SAAR CP0 registers 2019-01-18 16:53:28 +01:00
mos6522.h mos6522: remove anh register 2020-01-08 11:01:59 +11:00
mps2-fpgaio.h hw/misc/mps2-fpgaio: Implement PSCNTR and COUNTER 2018-08-24 13:17:40 +01:00
mps2-scc.h hw/misc/mps2_scc: Implement MPS2 Serial Communication Controller 2017-07-17 13:36:08 +01:00
msf2-sysreg.h msf2: Microsemi Smartfusion2 System Register block 2017-09-21 16:36:56 +01:00
nrf51_rng.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
pca9552_regs.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pca9552.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pvpanic.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
stm32f2xx_syscfg.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
stm32f4xx_exti.h hw/misc: Add the STM32F4xx EXTI device 2020-01-17 14:09:29 +00:00
stm32f4xx_syscfg.h hw/misc: Add the STM32F4xx Sysconfig device 2020-01-17 14:09:29 +00:00
tmp105_regs.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
tz-mpc.h hw/misc/tz-mpc.c: Implement registers 2018-06-22 13:28:39 +01:00
tz-msc.h hw/misc/tz-msc: Model TrustZone Master Security Controller 2018-08-24 13:17:43 +01:00
tz-ppc.h hw/misc/tz-ppc: Support having unused ports in the middle of the range 2019-02-21 18:17:46 +00:00
unimp.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
vmcoreinfo.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
zynq-xadc.h