mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
xlnx-zynqmp: Add support for high DDR memory regions
The Xilinx ZynqMP SoC and EP108 board supports three memory regions: - A 2GB region starting at 0 - A 32GB region starting at 32GB - A 256GB region starting at 768GB This patch adds support for the first two memory regions, which is automatically created based on the size specified by the QEMU memory command line argument. On hardware the physical memory region is one continuous region, it is then mapped into the three different regions by the DDRC. As we don't model the DDRC this is done at startup by QEMU. The board creates the memory region and then passes that memory region to the SoC. The SoC then maps the memory regions. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: a1e47db941d65733724a300fcd98b74fbeeaaf22.1452637205.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
deb2db996c
commit
dc3b89ef87
3 changed files with 70 additions and 19 deletions
|
@ -51,6 +51,14 @@
|
|||
#define XLNX_ZYNQMP_GIC_REGION_SIZE 0x1000
|
||||
#define XLNX_ZYNQMP_GIC_ALIASES (0x10000 / XLNX_ZYNQMP_GIC_REGION_SIZE - 1)
|
||||
|
||||
#define XLNX_ZYNQMP_MAX_LOW_RAM_SIZE 0x80000000ull
|
||||
|
||||
#define XLNX_ZYNQMP_MAX_HIGH_RAM_SIZE 0x800000000ull
|
||||
#define XLNX_ZYNQMP_HIGH_RAM_START 0x800000000ull
|
||||
|
||||
#define XLNX_ZYNQMP_MAX_RAM_SIZE (XLNX_ZYNQMP_MAX_LOW_RAM_SIZE + \
|
||||
XLNX_ZYNQMP_MAX_HIGH_RAM_SIZE)
|
||||
|
||||
typedef struct XlnxZynqMPState {
|
||||
/*< private >*/
|
||||
DeviceState parent_obj;
|
||||
|
@ -60,8 +68,12 @@ typedef struct XlnxZynqMPState {
|
|||
ARMCPU rpu_cpu[XLNX_ZYNQMP_NUM_RPU_CPUS];
|
||||
GICState gic;
|
||||
MemoryRegion gic_mr[XLNX_ZYNQMP_GIC_REGIONS][XLNX_ZYNQMP_GIC_ALIASES];
|
||||
|
||||
MemoryRegion ocm_ram[XLNX_ZYNQMP_NUM_OCM_BANKS];
|
||||
|
||||
MemoryRegion *ddr_ram;
|
||||
MemoryRegion ddr_ram_low, ddr_ram_high;
|
||||
|
||||
CadenceGEMState gem[XLNX_ZYNQMP_NUM_GEMS];
|
||||
CadenceUARTState uart[XLNX_ZYNQMP_NUM_UARTS];
|
||||
SysbusAHCIState sata;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue