From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Edgar Iglesias <edgar.iglesias@xilinx.com>,
Ryota Ozaki <ozaki.ryota@gmail.com>,
"michals@xilinx.com" <michals@xilinx.com>,
QEMU Developers <qemu-devel@nongnu.org>,
zach.pfeffer@xilinx.com
Subject: Re: [Qemu-devel] [PATCH target-arm v4 14/16] arm: xilinx-ep108: Add external RAM
Date: Thu, 23 Apr 2015 17:36:18 -0700 [thread overview]
Message-ID: <CAEgOgz7R7OS+X90w2g17T-NQAnZX0sYOGqGEbds9vsdd0ur8-w@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-ExowE9bj03Hhzeq6kT0iq__19z87G7q9GAVZbWRCrWw@mail.gmail.com>
On Thu, Apr 23, 2015 at 11:12 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 23 March 2015 at 11:05, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
>> Zynq MPSoC supports external DDR RAM. Add a RAM at 0 to the model.
>>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> ---
>> changed since v1:
>> Add ram size clamps and warnings
>>
>> hw/arm/xlnx-ep108.c | 21 +++++++++++++++++++++
>> 1 file changed, 21 insertions(+)
>>
>> diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c
>> index 81704bb..6e89456 100644
>> --- a/hw/arm/xlnx-ep108.c
>> +++ b/hw/arm/xlnx-ep108.c
>> @@ -18,11 +18,16 @@
>> #include "hw/arm/xlnx-zynqmp.h"
>> #include "hw/boards.h"
>> #include "qemu/error-report.h"
>> +#include "exec/address-spaces.h"
>>
>> typedef struct XlnxEP108 {
>> XlnxZynqMPState soc;
>> + MemoryRegion ddr_ram;
>> } XlnxEP108;
>>
>> +/* Max 2GB RAM */
>> +#define EP108_MAX_RAM_SIZE 0x80000000ull
>> +
>> static void xlnx_ep108_init(MachineState *machine)
>> {
>> XlnxEP108 *s = g_new0(XlnxEP108, 1);
>> @@ -37,6 +42,22 @@ static void xlnx_ep108_init(MachineState *machine)
>> error_report("%s", error_get_pretty(err));
>> exit(1);
>> }
>> +
>> + if (machine->ram_size > EP108_MAX_RAM_SIZE) {
>> + error_report("WARNING: RAM size " RAM_ADDR_FMT " above max supported, "
>> + "reduced to %llx", machine->ram_size, EP108_MAX_RAM_SIZE);
>> + machine->ram_size = EP108_MAX_RAM_SIZE;
>> + }
>> +
>> + if (machine->ram_size <= 0x08000000) {
>> + error_report("WARNING: RAM size " RAM_ADDR_FMT " is small for EP108\n",
>> + machine->ram_size);
>
> error_report() strings don't need the trailing \n.
>
Actually error_report is too noisy for this, so changing to qemu_log.
As-is, this comes up in make check.
>> + }
>> +
>> + memory_region_init_ram(&s->ddr_ram, NULL, "ddr-ram", machine->ram_size,
>> + &error_abort);
>> + vmstate_register_ram_global(&s->ddr_ram);
>
> This should probably be using memory_region_allocate_system_memory().
>
Fixed.
Regards,
Peter
>> + memory_region_add_subregion(get_system_memory(), 0, &s->ddr_ram);
>> }
>>
>> static QEMUMachine xlnx_ep108_machine = {
>
> -- PMM
>
next prev parent reply other threads:[~2015-04-24 0:36 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 11:05 [Qemu-devel] [PATCH target-arm v4 00/16] Next Generation Xilinx Zynq SoC Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 01/16] cpus: Don't kick un-realized cpus Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 03/16] target-arm: cpu64: Add support for cortex-a53 Peter Crosthwaite
2015-03-23 13:17 ` Ryota Ozaki
2015-04-24 16:42 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 02/16] target-arm: cpu64: Factor out ARM cortex init Peter Crosthwaite
2015-04-23 17:35 ` Peter Maydell
2015-04-24 16:39 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 04/16] arm: Introduce Xilinx ZynqMP SoC Peter Crosthwaite
2015-03-30 1:17 ` Alistair Francis
2015-04-23 17:42 ` Peter Maydell
2015-04-23 19:21 ` Peter Crosthwaite
2015-04-23 21:38 ` Peter Maydell
2015-04-24 15:26 ` Peter Maydell
2015-04-24 16:31 ` Peter Crosthwaite
2015-04-23 17:47 ` Peter Maydell
2015-04-23 19:30 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 05/16] arm: xlnx-zynqmp: Add GIC Peter Crosthwaite
2015-04-23 17:45 ` Peter Maydell
2015-04-23 23:55 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 07/16] net: cadence_gem: Clean up variable names Peter Crosthwaite
2015-04-23 17:50 ` Peter Maydell
2015-04-24 16:51 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 06/16] arm: xlnx-zynqmp: Connect CPU Timers to GIC Peter Crosthwaite
2015-03-30 1:29 ` Alistair Francis
2015-04-24 0:02 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 08/16] net: cadence_gem: Split state struct and type into header Peter Crosthwaite
2015-04-23 17:51 ` Peter Maydell
2015-04-24 0:10 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 11/16] char: cadence_uart: " Peter Crosthwaite
2015-04-23 18:00 ` Peter Maydell
2015-04-24 0:20 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 10/16] char: cadence_uart: Clean up variable names Peter Crosthwaite
2015-04-23 17:59 ` Peter Maydell
2015-04-24 0:25 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 13/16] arm: Add xlnx-ep108 machine Peter Crosthwaite
2015-03-30 1:11 ` Alistair Francis
2015-04-23 18:09 ` Peter Maydell
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 14/16] arm: xilinx-ep108: Add external RAM Peter Crosthwaite
2015-03-30 1:31 ` Alistair Francis
2015-04-23 18:12 ` Peter Maydell
2015-04-24 0:36 ` Peter Crosthwaite [this message]
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 15/16] arm: xilinx-ep108: Add bootloading Peter Crosthwaite
2015-03-30 1:42 ` Alistair Francis
2015-04-23 18:15 ` Peter Maydell
2015-04-24 0:43 ` Peter Crosthwaite
2015-04-24 19:10 ` Peter Crosthwaite
2015-03-23 11:05 ` [Qemu-devel] [PATCH target-arm v4 16/16] arm: xlnx-zynqmp: Add PSCI setup Peter Crosthwaite
2015-04-23 18:16 ` Peter Maydell
2015-04-24 0:46 ` Peter Crosthwaite
2015-03-30 1:21 ` [Qemu-devel] [PATCH target-arm v4 00/16] Next Generation Xilinx Zynq SoC Alistair Francis
[not found] ` <267e60dda9e3d2ecfbd43d7fa86bf884a955ba44.1427108387.git.peter.crosthwaite@xilinx.com>
2015-04-23 17:52 ` [Qemu-devel] [PATCH target-arm v4 09/16] arm: xilinx-zynqmp: Add GEM support Peter Maydell
2015-04-24 0:12 ` Peter Crosthwaite
[not found] ` <9c0afa7c2c54b22be3ad95f74efa4ccc3f0ca4ba.1427108387.git.peter.crosthwaite@xilinx.com>
2015-04-23 18:09 ` [Qemu-devel] [PATCH target-arm v4 12/16] arm: xilinx-zynqmp: Add UART support Peter Maydell
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=CAEgOgz7R7OS+X90w2g17T-NQAnZX0sYOGqGEbds9vsdd0ur8-w@mail.gmail.com \
--to=peter.crosthwaite@xilinx.com \
--cc=edgar.iglesias@xilinx.com \
--cc=michals@xilinx.com \
--cc=ozaki.ryota@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=zach.pfeffer@xilinx.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).