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: 1001349 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uh0uSDtJ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 430X150FT7z9s3C for ; Thu, 22 Nov 2018 05:59:05 +1100 (AEDT) Received: from localhost ([::1]:41585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPXiI-0002Qo-D2 for incoming@patchwork.ozlabs.org; Wed, 21 Nov 2018 13:59:02 -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?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 = {