From patchwork Wed Nov 21 18:58:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10693039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AE8313B5 for ; Wed, 21 Nov 2018 18:59:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F322C229 for ; Wed, 21 Nov 2018 18:59:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B39B2C23A; Wed, 21 Nov 2018 18:59:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A1882C229 for ; Wed, 21 Nov 2018 18:59:21 +0000 (UTC) Received: from localhost ([::1]:41607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPXia-0002lv-MB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Nov 2018 13:59:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPXhy-0002Q8-Md for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:58:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPXhw-00073A-C0 for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:58:42 -0500 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]:36823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPXhv-0006ts-Oa for qemu-devel@nongnu.org; Wed, 21 Nov 2018 13:58:40 -0500 Received: by mail-lf1-x144.google.com with SMTP id a16so4780039lfg.3 for ; Wed, 21 Nov 2018 10:58:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=POQAFLbgL+YR1/drZQth39qH213Qv/6OeYVeQwo03jo=; b=uh0uSDtJ8G89l0l6yYy9/rvSj1Z0JxFwZKmVieklbnZfJMowpMI4tY7Q60nB/3wdhe 5/CXu1M/Dgco9mObcy7Y3vVz416vYRk6SmCMsrF6+IZic6YbZCJCP7VuyOPH3LeMoHC4 4+1FJoW898hwao5nImFiTJKTVfVn3k89Ee8pUYXPiRCCncYFqaxVM2PlMqtgaOYSoPyL BU1vVBmC4lIHIv18FA0YXJlWzW6XOaoJV8UzqH6MYTuO1I6D9IDAODYNGtnN4P123KoH Lh+okIQPsfF5EQfiefobWNKBkIEtKxEXEA0KgemHCaElVEzB/AwFIv9HucC6ZpHhNvt1 25kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=POQAFLbgL+YR1/drZQth39qH213Qv/6OeYVeQwo03jo=; b=eNVQB//UQ5MGWZV1b13hm9lQ2Ly51gZbhiQKkEzknITBwcQ5dsjLS9Y9KTgapbYi65 iG7SHC0yOg510YVHezZZC0clZLKlgWD4PeA9DHyuep52+d9VYFfHGB/ByxWKfgd0BMZC rVLz5GqZwKvaUFDG3PO1qObyPTPd24rsFs2bdrQr2tOxnfOVIdIuvWZwCrolz4gNtw8E w7h7aX8LgHo1SKB/uWCn6g3Ig5mVoj+zSG02/HjE+ClYFA1UsyGdb7+CpTivM/QxskbH ZarGPAo69VF3dksxsdPVZAQ5B4sl3N/y3mXjItD86NgT+zPVHTIJeTeVORJNMb/ARm1p IoSA== X-Gm-Message-State: AGRZ1gJ3In4NJw//tMthqUUbpHazx8dS/zdSsh+sDm0zLxIS3ClgJ0ju ALfboPyKFrz23Qp4Tp0ZZiMJflDNa6s= X-Google-Smtp-Source: AJdET5fAuqGULirTkpIzEYm7IYQM0+W4LZYCezW0QCOjdBRUKWIfkU8wfTSYUYvefcBKeJ6yoVfbug== X-Received: by 2002:a19:e01e:: with SMTP id x30mr4357086lfg.89.1542826703756; Wed, 21 Nov 2018 10:58:23 -0800 (PST) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id l63sm6833551lfl.76.2018.11.21.10.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 10:58:23 -0800 (PST) From: Max Filippov To: qemu-devel@nongnu.org Date: Wed, 21 Nov 2018 10:58:10 -0800 Message-Id: <20181121185810.24647-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::144 Subject: [Qemu-devel] [PATCH v3] target/xtensa: xtfpga: provide default memory sizes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Provide default RAM sizes for all XTFPGA boards, so that when started without -m option they do the right thing. Signed-off-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé --- Changes v2->v3: - add XTFPGA_MMU_RESERVED_MEMORY_SIZE definition and express Xilinx board memory sizes using it as suggested by Philippe; Changes v1->v2: - fix memory sizes for ml605 and kc705 with MMU hw/xtensa/xtfpga.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index b3161de32093..21094319a659 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -446,6 +446,8 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) } } +#define XTFPGA_MMU_RESERVED_MEMORY_SIZE (128 * MiB) + static const hwaddr xtfpga_mmu_io[2] = { 0xf0000000, }; @@ -568,6 +570,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx60_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 64 * MiB; } static const TypeInfo xtfpga_lx60_type = { @@ -584,6 +587,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx60_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 64 * MiB; } static const TypeInfo xtfpga_lx60_nommu_type = { @@ -600,6 +604,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx200_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 96 * MiB; } static const TypeInfo xtfpga_lx200_type = { @@ -616,6 +621,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx200_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 96 * MiB; } static const TypeInfo xtfpga_lx200_nommu_type = { @@ -632,6 +638,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_ml605_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE; } static const TypeInfo xtfpga_ml605_type = { @@ -648,6 +655,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_ml605_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 256 * MiB; } static const TypeInfo xtfpga_ml605_nommu_type = { @@ -664,6 +672,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_kc705_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE; } static const TypeInfo xtfpga_kc705_type = { @@ -680,6 +689,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_kc705_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 256 * MiB; } static const TypeInfo xtfpga_kc705_nommu_type = {