hw/riscv: microchip_pfsoc: Correct DDR memory map
commitf03100d718579f022316349687dc9127ff01f0ee
authorBin Meng <bin.meng@windriver.com>
Sun, 1 Nov 2020 17:05:38 +0000 (2 01:05 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 3 Nov 2020 15:17:23 +0000 (3 07:17 -0800)
tree461cf268331fc4fa290dbbe9412d113e9ebe0d5e
parent27c22b2de08f71500df581563cc9d22638a14b4d
hw/riscv: microchip_pfsoc: Correct DDR memory map

When system memory is larger than 1 GiB (high memory), PolarFire SoC
maps it at address 0x10_0000_0000. Address 0xC000_0000 and above is
aliased to the same 1 GiB low memory with different cache attributes.

At present QEMU maps the system memory contiguously from 0x8000_0000.
This corrects the wrong QEMU logic. Note address 0x14_0000_0000 is
the alias to the high memory, and even physical memory is only 1 GiB,
the HSS codes still tries to probe the high memory alias address.
It seems there is no issue on the real hardware, so we will have to
take that into the consideration in our emulation. Due to this, we
we increase the default system memory size to 1537 MiB (the minimum
required high memory size by HSS) so that user gets notified an error
when less than 1537 MiB is specified.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20201101170538.3732-1-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/microchip_pfsoc.c
include/hw/riscv/microchip_pfsoc.h