From patchwork Fri Jun 21 12:59:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 13707577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EEAEC27C4F for ; Fri, 21 Jun 2024 13:01:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKdrX-00011A-84; Fri, 21 Jun 2024 08:59:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrU-0000zw-U4; Fri, 21 Jun 2024 08:59:29 -0400 Received: from mail-bn8nam11on20615.outbound.protection.outlook.com ([2a01:111:f403:2414::615] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrS-00011K-ES; Fri, 21 Jun 2024 08:59:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RavxIA3qFGHGKTGoLNErWwYJAr33KrSrQi4/CbYxWtvBaemf51BUc8hsC9aO2fh2UapQyDE9Wb3okEetQjoMYGTzKFc9zz0T9XTOn3aNsa7w8YvhZnOiCZstGjwodbKtE8NCVIBPo9dtjMiEVevBLumnW5T/1gqv6FUiw0CP4HliaZdn030IVT/RSkTITklRlnDR0wgyZGfVU2Nf2rnmPPi+xq+vumOzbGLTwXpvyodYMyHqFcm7a3WboC0v/5xZf4HRmybFHKPz2D/XuKnGJdUEataju+PacXUFpMNaISF50L0ZdR78tsysX5GHvPctN2z/QC6fiszbx+DgwG9Y3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ph4643cO025ca9eUYz9ivbIwo7EqfTmIm6Q+4fA0p8A=; b=GqMzNwWIN+uDnOk1GB7gL6O+rBAVaDh3tDv3S2jl3QUvWkOdkw7Yc3XZm8Nctj7CcCOLxea56ew0qJD2Vv8CLdMgqJYcPV8ZAZ9EOQB4hqszANpQ2KnfZ36zRcrhOokqZuZsweVxVxakm+epFNuhMPO3yIbSO8XQfOtMzvaPV5bbjArRi83UW7UtdMtz00Gh19Z3lBY+ejSk3WvnXkyuZDcW1m/nEHCsTbVwVvU2vHtxlkZiYIeFeSXPlKhi5UwVBjOcHAjk3k5w1J3Bdc9M4SBTR72eDXx2h1X/bOpPjf9PyIMCv+2trP5dYFGMWKhTHU1pXVh6F75jmX9w8FufJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ph4643cO025ca9eUYz9ivbIwo7EqfTmIm6Q+4fA0p8A=; b=OJXcDcVGGpZeSGAG6BuYIyCgSbJCqs2iZFG4YuSkVdXlPASvDV8pFFW1LJ8qYO9VEglG2OTFTu7CO2WOKnWA8OI9Q2S2jVZzIret6N7ZYdFy9YhepCVd5Foz5vzs0k1o1ENp/PpiP6zzhDjyIZ/SqgnaAGLQ8hnpbTc9maUswG0= Received: from CH2PR02CA0027.namprd02.prod.outlook.com (2603:10b6:610:4e::37) by PH8PR12MB7206.namprd12.prod.outlook.com (2603:10b6:510:226::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Fri, 21 Jun 2024 12:59:21 +0000 Received: from CH1PEPF0000A349.namprd04.prod.outlook.com (2603:10b6:610:4e:cafe::92) by CH2PR02CA0027.outlook.office365.com (2603:10b6:610:4e::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.36 via Frontend Transport; Fri, 21 Jun 2024 12:59:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CH1PEPF0000A349.mail.protection.outlook.com (10.167.244.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Fri, 21 Jun 2024 12:59:20 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:19 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:19 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 21 Jun 2024 07:59:17 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , , "Edgar E . Iglesias" Subject: [PATCH v4 1/3] hw/misc/zynq_slcr: Add boot-mode property Date: Fri, 21 Jun 2024 18:29:04 +0530 Message-ID: <20240621125906.1300995-2-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> References: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000A349:EE_|PH8PR12MB7206:EE_ X-MS-Office365-Filtering-Correlation-Id: c052f004-7ccc-46b5-ebad-08dc91f1f7bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|82310400023|36860700010|1800799021|376011; X-Microsoft-Antispam-Message-Info: 3G9CSf9+n7ffGXgRq6P6MQYPlC31bOvnrMecGQ1c45N1/f1ytfWXbVUiThTHMxEaAfN0qQN7WRgMIkWOjA2YtYAHOFJrOKw3KzaAuZaWXse7rEIziN0tHBgsFgf/xv5SthHfquVilBnoENsHXeEtyyg93bfrRg1ef0b4V898YMH6e6RB7lrSlIz+VO2Lwouq5CWnjtraKd67OH0VhgzVo7PQT6VXazf/UZqMEJV+2f/2wRHpNXZW54ztaCG3Y3QQTqXkZAjUqxanhcyiO/k0L4BhhxGbTlnfA4xXBfwG9gYy7Kwq0DKGvq9NbpAad6nSFtZIGtUpjI8k7gXBuIhLuCVd1eNrApzfThlLF5SEAbBdzlhIDKgzwX4SZE8ND9vEMpZx1nBolhYPOYmbUZ56vH0Qw2gpdSACuJoSmvGQYOnqWZlwMSF+fJBKtS1nh8yKfj3x7D6QCky+hvDLZNSa8LNMqS7RbOGjLVVl6CthuvOhBVJU+G2KDnHwCXbVVN7V72nsiBIlz6SpzE25fJNe4hhGokAoq+i38z1lbzmQCjsQImU5050vGQNYdQiJ86dAblKIRfVqAOkzEILt5LF2ViDFPgIuOdhtWuzeEqxSWuxvGxUTTzzlPAGzPTaa89qlfPCKfjfP1CU7fG2b/qFZ3j27OludwIMQbnYa65BWmN/1yg42vkgGKxqXDTDgkN4AaVM7Jd9Wc11N7OU9/7ydfgcqZgmlcNPtr9p35gQJ3nS0qCaH4v73bL70AatnggSwb9jzW6qgLCrP6I1GiCtRS7Lk4OGbATmnBxPGqdcWW/MP6Rl9NG/ndwxFT6tXsOjpX2Dyq6mFmrf66D+TP5/TUa+RxDtAlLrULhRdJ3SKMof4dJHU+Kwvy86nvxB34kB9usBgDfItowdcu+NnwMtC8o6s0Ihe3aSLb/PT5vLYKU6uTomfjsCTjI226tw5rubVo1OlRwkO+0pdJ5FUAmzMa2gXY+NhZVAL+d7l3MMth1JOA5y/K40oz1Ql3Y6+a2B7JhAqI0QaSD78aiDDa2ax1c/QP25wCbmZVY6iyi47qUDi7YpdMheiAlRxyyExPZjqJ6yw0XxCskYI+udNT1s4rmW0BxM0bm8HQkyvPBY/MPW7QkauooBkv1fYFQOr6yB99PARTLKhH2wYhNBX8Tf9WyzXh1FePihf6QcIR+Ksajj5MtJKMhr0IgzTGRzGlJviAK3yig6Axa+Jo37LXFKTyG36zi339TOjqjthN+mBiJChbVJmaQZHKwIfCy4g5LHsNR7s69emYlT5nVB46O7Kk6KMKJ/yimIksea6fDQhPBL1wKQ/8/A+CBoVzfSyDS/gh93ZJiuU+HD3rvUedu83R2JI8iK2FoGELUUd7G5b6AsbJ33XY7BOpJzrAS6NEWFOT1RoCBLIFEVGAxdjqWi/AQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230037)(82310400023)(36860700010)(1800799021)(376011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2024 12:59:20.3576 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c052f004-7ccc-46b5-ebad-08dc91f1f7bb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000A349.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7206 Received-SPF: permerror client-ip=2a01:111:f403:2414::615; envelope-from=sai.pavan.boddu@amd.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org boot-mode property sets user values into BOOT_MODE register, on hardware these are derived from board switches. Signed-off-by: Sai Pavan Boddu Reviewed-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias --- hw/misc/zynq_slcr.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index 3412ff099ea..ad814c3a79b 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -24,6 +24,8 @@ #include "hw/registerfields.h" #include "hw/qdev-clock.h" #include "qom/object.h" +#include "hw/qdev-properties.h" +#include "qapi/error.h" #ifndef ZYNQ_SLCR_ERR_DEBUG #define ZYNQ_SLCR_ERR_DEBUG 0 @@ -121,6 +123,7 @@ REG32(RST_REASON, 0x250) REG32(REBOOT_STATUS, 0x258) REG32(BOOT_MODE, 0x25c) + FIELD(BOOT_MODE, BOOT_MODE, 0, 4) REG32(APU_CTRL, 0x300) REG32(WDT_CLK_SEL, 0x304) @@ -195,6 +198,7 @@ struct ZynqSLCRState { Clock *ps_clk; Clock *uart0_ref_clk; Clock *uart1_ref_clk; + uint8_t boot_mode; }; /* @@ -371,7 +375,7 @@ static void zynq_slcr_reset_init(Object *obj, ResetType type) s->regs[R_FPGA_RST_CTRL] = 0x01F33F0F; s->regs[R_RST_REASON] = 0x00000040; - s->regs[R_BOOT_MODE] = 0x00000001; + s->regs[R_BOOT_MODE] = s->boot_mode & R_BOOT_MODE_BOOT_MODE_MASK; /* 0x700 - 0x7D4 */ for (i = 0; i < 54; i++) { @@ -588,6 +592,15 @@ static const ClockPortInitArray zynq_slcr_clocks = { QDEV_CLOCK_END }; +static void zynq_slcr_realize(DeviceState *dev, Error **errp) +{ + ZynqSLCRState *s = ZYNQ_SLCR(dev); + + if (s->boot_mode > 0xF) { + error_setg(errp, "Invalid boot mode %d specified", s->boot_mode); + } +} + static void zynq_slcr_init(Object *obj) { ZynqSLCRState *s = ZYNQ_SLCR(obj); @@ -610,15 +623,22 @@ static const VMStateDescription vmstate_zynq_slcr = { } }; +static Property zynq_slcr_props[] = { + DEFINE_PROP_UINT8("boot-mode", ZynqSLCRState, boot_mode, 1), + DEFINE_PROP_END_OF_LIST(), +}; + static void zynq_slcr_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); ResettableClass *rc = RESETTABLE_CLASS(klass); dc->vmsd = &vmstate_zynq_slcr; + dc->realize = zynq_slcr_realize; rc->phases.enter = zynq_slcr_reset_init; rc->phases.hold = zynq_slcr_reset_hold; rc->phases.exit = zynq_slcr_reset_exit; + device_class_set_props(dc, zynq_slcr_props); } static const TypeInfo zynq_slcr_info = { From patchwork Fri Jun 21 12:59:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 13707575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8B4DC27C4F for ; Fri, 21 Jun 2024 13:00:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKdre-00018U-Ke; Fri, 21 Jun 2024 08:59:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrY-000123-0X; Fri, 21 Jun 2024 08:59:32 -0400 Received: from mail-bn7nam10on2061f.outbound.protection.outlook.com ([2a01:111:f403:2009::61f] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrW-00013E-1P; Fri, 21 Jun 2024 08:59:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UFq/84e+LQk4IL+mmCe/xGoWml7BIBginqOlhI/78Uhf8O5j+O4CQ+noyLrdbP4aFLj4o0LpnAO9j+hb2VBeqSvjVWFWYprHVVphFs5SuJE2hpxZm8vblSIPcupTNMULhkcThn90SkZQPzA9dOV+ElqyAmLyirGnHauOxxGFA7W/BcDbKFVrsBP52Dj5/Kmaf6z6pUL+GzSv/tz0aYvQngBJKCThCY3XQRG0V50+v31Dl2Xf3m6hMZ/tkuxuoZHNGvZ1TTXF9A/q4PJXEHzWGFgteec7+qTSl9UIqkW5zqqiZP1bQc0PDXcWT/8LMrfBrm9OIcq124T0MjMXP5hDPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UJ6n6nZoM54e8HZCrnceC2U4DysPCWXSlPZ3QhACs6w=; b=ScFYh0p5vMgQajvAOv6g+kDJSo98PpN7boiWOouVrwXBvZdM4BekcYyhEWU4w/lMAhP9/ApBj3E15XNsrYHay9Yo7tmJPT6MMKm+t2jPIrfkzVDMv2Jha3emCTTcPpicl3JXaJIrzp07uL+o3JU2y/qkr5cN//t+qFqVaZ3JdnpLOnhJuYeeP+il5KN+3/2MxLVsL1aKZuTVPZRmBYhE+LpnI8qLpzfM/5X82gW9PZKkPai6ps7s/UeiAxLyOhvjv8g3jlxgvVMILyiXteYkhnimFWkZ+c+G3y4Cf2xCF79eCU5507MtHfqM+Gy6QVgFkPhOLH2EFy668ygrA9xT5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UJ6n6nZoM54e8HZCrnceC2U4DysPCWXSlPZ3QhACs6w=; b=MfPSw3/NuSKyzGL1py8WV5+8sievnwR7f2JTAO1MPbvIjtd0Yrq4Qr1sHnXyf5uojf2CfDpRMLRDR6C3clQIT7sXtI6ELMTgdpTbJoVpw6tjMZ8gZxhCvmPeC4AemHD9t0emN09zbmELe+VmJ9p8TDTKSfSR2HLe7KSMvf4xZjc= Received: from SJ0PR03CA0364.namprd03.prod.outlook.com (2603:10b6:a03:3a1::9) by MW4PR12MB5642.namprd12.prod.outlook.com (2603:10b6:303:187::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Fri, 21 Jun 2024 12:59:23 +0000 Received: from SJ1PEPF0000231B.namprd03.prod.outlook.com (2603:10b6:a03:3a1:cafe::a6) by SJ0PR03CA0364.outlook.office365.com (2603:10b6:a03:3a1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.36 via Frontend Transport; Fri, 21 Jun 2024 12:59:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF0000231B.mail.protection.outlook.com (10.167.242.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Fri, 21 Jun 2024 12:59:23 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:22 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:21 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 21 Jun 2024 07:59:19 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , , "Edgar E . Iglesias" Subject: [PATCH v4 2/3] hw/arm/xilinx_zynq: Add boot-mode property Date: Fri, 21 Jun 2024 18:29:05 +0530 Message-ID: <20240621125906.1300995-3-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> References: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231B:EE_|MW4PR12MB5642:EE_ X-MS-Office365-Filtering-Correlation-Id: 184162ac-68e3-45ab-48ee-08dc91f1f912 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|376011|36860700010|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: qp+orFz4vMuETUekul6yznNpampYvMbRAVGJxYo/rq3Dqt34boMQ7RSIXkae9ptiQnGBQ9o8oFVHy5IeP5a3IIeiICib98saH9sI0j2zlxvid5/eoe+uLnTu0HSsrVEieZA3EokJNPVggWLKloH4Sq/l8deaMTPSUlA9Xlvuvrwoydwpm8dYnRhi5dbuJBjxUPkzhVeE8XwtsHPJhXADzwOTez1RYVi3RywrHHwiNoO/Y8X8ip989Ll1ZjnQpNjYTySvcDpIk3+/xrkPnDEG+5yUXQh74+R5idMXRAoxKqNwWXDls8ZDwrI1vTMaqaN5RrFSBh56PXPN761T5Ii3T3q2r6JM5rWIOJ7/7APtruAlhlMktlwFVthodpgra/qBnlIJVCO+tsYjR62jHYQaqydo4LRwfwc9gLIvC2nEQ0zM3SZ4uERnQgRndC/fowLb/7BFBCh8JKNwPdaZLdbtbV7WgFNn/nZp8SLsaAq6v2TG3W3YPPMsU0OMZ9W4HR87BombgPW6ZnAWFmFzeWV1lAeXopyKedijDTEMWl8WwLrwTD9LvINNo8iDyp6L2ckDXSibfA1n064Y+KopvigxtA78SRxtG9sz2DtTDt6a4QIEaIrS4a/XSBZM+4io1issjML1TUFWXUylr00T6Yj0ifchSdTfGXRNLhl9G0fUcf/Xdf99hi69+VgdOyseVc6I391dIBRb3QVhJOBRe4SGPjxcyXfh9nCgqLKST8ZD4dQgeCvHAPgM3WgMoRxqfyBBmiDu+SWcoxfaynvWuDWvCkhhLwl2bbfr3dSjRGLBmxpsTMXfXg6HgkBwtKZRKXsediVNqjpRA/ryqh3t/Ie9Zbto+RxMnqZeutCptkE+UgKpi58BFg/B2EpsuZ+DN64OPd9qdk1tEQm7/joS3s75bTy5xybXuUyOzGKErRXNzW2ip92z8SKX3seVHushwOE8F7KUUr36e1z3H6it46bSxm0Ue5Qzlxhj1UD9GaZ/Jd32vzWgY2adkTkemnSoWzAw4L7QV+FC6+KoCG+S/cnnh2Lbh1gXiYdPLgmNDuukjGegHDHeJWfSB9pD6faafEXCsTNK6/DE8Zm2O7loWOlSDh00dbASCjfofHG7+mx1AmOSChKYfhWbNuC5xJmtorEMTXcIfHXLDADPE1s9gyvCgS2J8krH6cP0uKZmVkZyZFnRz4SWZLV9zf6Q7ZFeMWWo2LzSlmipTOTVSRVINMkqEkNlalf4XIoRu5xxvGnQrSyq1Le7IpDq2+vagdFiN+jkjkiGUCXTNodQRmTML2F0qj4qh6Uw+JPxw4gmwRAT8aNkokysSzrUAIJCC7syic1CcMB0OeADF/88wkKa0URbbey/R4mU9rP2hiTtJE36i9Rmq5wV7q4SIz5yF+AVeN85RBBd9qFcIYztEExSn7J3lg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230037)(376011)(36860700010)(1800799021)(82310400023); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2024 12:59:23.0232 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 184162ac-68e3-45ab-48ee-08dc91f1f912 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5642 Received-SPF: permerror client-ip=2a01:111:f403:2009::61f; envelope-from=sai.pavan.boddu@amd.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Read boot-mode value as machine property and propagate that to SLCR.BOOT_MODE register. Signed-off-by: Sai Pavan Boddu Acked-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias --- hw/arm/xilinx_zynq.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 7f7a3d23fbe..97b6fd8e35d 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -38,6 +38,7 @@ #include "qom/object.h" #include "exec/tswap.h" #include "target/arm/cpu-qom.h" +#include "qapi/visitor.h" #define TYPE_ZYNQ_MACHINE MACHINE_TYPE_NAME("xilinx-zynq-a9") OBJECT_DECLARE_SIMPLE_TYPE(ZynqMachineState, ZYNQ_MACHINE) @@ -90,6 +91,7 @@ struct ZynqMachineState { MachineState parent; Clock *ps_clk; ARMCPU *cpu[ZYNQ_MAX_CPUS]; + uint8_t boot_mode; }; static void zynq_write_board_setup(ARMCPU *cpu, @@ -176,6 +178,27 @@ static inline int zynq_init_spi_flashes(uint32_t base_addr, qemu_irq irq, return unit; } +static void zynq_set_boot_mode(Object *obj, const char *str, + Error **errp) +{ + ZynqMachineState *m = ZYNQ_MACHINE(obj); + uint8_t mode = 0; + + if (!strncasecmp(str, "qspi", 4)) { + mode = 1; + } else if (!strncasecmp(str, "sd", 2)) { + mode = 5; + } else if (!strncasecmp(str, "nor", 3)) { + mode = 2; + } else if (!strncasecmp(str, "jtag", 4)) { + mode = 0; + } else { + error_setg(errp, "%s boot mode not supported", str); + return; + } + m->boot_mode = mode; +} + static void zynq_init(MachineState *machine) { ZynqMachineState *zynq_machine = ZYNQ_MACHINE(machine); @@ -241,6 +264,7 @@ static void zynq_init(MachineState *machine) /* Create slcr, keep a pointer to connect clocks */ slcr = qdev_new("xilinx-zynq_slcr"); qdev_connect_clock_in(slcr, "ps_clk", zynq_machine->ps_clk); + qdev_prop_set_uint8(slcr, "boot-mode", zynq_machine->boot_mode); sysbus_realize_and_unref(SYS_BUS_DEVICE(slcr), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(slcr), 0, 0xF8000000); @@ -372,6 +396,7 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data) NULL }; MachineClass *mc = MACHINE_CLASS(oc); + ObjectProperty *prop; mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9"; mc->init = zynq_init; mc->max_cpus = ZYNQ_MAX_CPUS; @@ -379,6 +404,12 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data) mc->ignore_memory_transaction_failures = true; mc->valid_cpu_types = valid_cpu_types; mc->default_ram_id = "zynq.ext_ram"; + prop = object_class_property_add_str(oc, "boot-mode", NULL, + zynq_set_boot_mode); + object_class_property_set_description(oc, "boot-mode", + "Supported boot modes:" + " jtag qspi sd nor"); + object_property_set_default_str(prop, "qspi"); } static const TypeInfo zynq_machine_type = { From patchwork Fri Jun 21 12:59:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 13707572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15B76C27C4F for ; Fri, 21 Jun 2024 13:00:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKdrb-00013b-QW; Fri, 21 Jun 2024 08:59:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrZ-00012v-Mv; Fri, 21 Jun 2024 08:59:33 -0400 Received: from mail-co1nam11on20600.outbound.protection.outlook.com ([2a01:111:f403:2416::600] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKdrX-00013Q-B2; Fri, 21 Jun 2024 08:59:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dW+dEkFKzQDI9a4/W7CgxfjwiQHMc0BbYSrxvIUvWaqanFd0djwIg7C5FOAs5MfOb5zxr58nTcyjvbK7D/RyY/Wt1RPasLF1VWFJrA9+7NgrifSkN6j/7Nz2r5LHYuUNRi45+j8ZnCLiuHe0/TMbAGMdPvMXjDjg0KsvTJhhp/kScOuqPI+Mw4nuMjZmbXEh/+SuF78989wUxA/nBv3kCc1Eyv/8rBzION+g3EkLkA5vH37SCB9opWQdFmlP8gxTKXcNveIp8jlAkQgNVa5ZziGY03eCal2uoXV1KBr6iDc0u6m+iPvz21Gz33AMBkNAILQRK/Jtb5vlx5KJdmMSrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vsbUIP9Ok9jpGdpzLD4Xs/YbIUf6TMu4/snoy+PHiAU=; b=QInP9dmClIph4pXjy/cXWHL67iigi6taIqvi01KYzHPXyPR+3AXaAcCICEGNSbfnNJcWfbt7scCQRutL0hGwqdDfNtOjceg719fYBFPpERzQicJ6E0EiswmFZUt3ex49zD2nrs4gnNhwM8J7mlKXcqZ+5RZvvoOiZMTBzCINtIEnGrcMsFcDhe59AZmWM0PJmmjeYhXvx90xNikD5czd/972YyfK3d3dI5sS4aBZl/zoHHgb4phIs68MLpxwcro87/2gmDjBn60vITp0YleGu0+Bd/CLh7nRnOnJ7zhkNG+ZglUFa7BXWe2kgQGXt3gE5lswzE9lZ+xb5PVcxFZWlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vsbUIP9Ok9jpGdpzLD4Xs/YbIUf6TMu4/snoy+PHiAU=; b=3quZJ9gS1WS5M4XPL3Cb2TjMdw9RaF1Yl92+K0dplEn7xvUdyNy+7k21sMR0nNeE3UjvNC/p97nCH0LH+4fM36n4dUn5vOHSR8PAT3IyjBfcYgpkYVzh9HvrHE0s+n59mSlL/faUdxsUSbPiqvv3OGoPStdDJxTknoKWyTGe5aY= Received: from BYAPR08CA0038.namprd08.prod.outlook.com (2603:10b6:a03:117::15) by SA0PR12MB4431.namprd12.prod.outlook.com (2603:10b6:806:95::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.21; Fri, 21 Jun 2024 12:59:26 +0000 Received: from SJ1PEPF0000231F.namprd03.prod.outlook.com (2603:10b6:a03:117:cafe::ca) by BYAPR08CA0038.outlook.office365.com (2603:10b6:a03:117::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.36 via Frontend Transport; Fri, 21 Jun 2024 12:59:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF0000231F.mail.protection.outlook.com (10.167.242.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Fri, 21 Jun 2024 12:59:25 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:24 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 21 Jun 2024 07:59:24 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 21 Jun 2024 07:59:22 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , , "Edgar E . Iglesias" Subject: [PATCH v4 3/3] docs/system/arm: Add a doc for zynq board Date: Fri, 21 Jun 2024 18:29:06 +0530 Message-ID: <20240621125906.1300995-4-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> References: <20240621125906.1300995-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231F:EE_|SA0PR12MB4431:EE_ X-MS-Office365-Filtering-Correlation-Id: ec10487c-c1ba-4e30-da7e-08dc91f1fac8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|82310400023|376011|1800799021|36860700010; X-Microsoft-Antispam-Message-Info: BRzPN5sBgjZmX5EDYtyy+N79JK8/A+Vt+4dUyVvJedPx878vcxQLin5jbRAcI2QDN4Jl7/Ma3b9RyEb+G35+z1oNSCyB5FfCNwvbr1xbuZXPBp0oNqOkyadl1AwcaCEW19oY+zZDndOjIGIYntSkHCjYG58GeYuTJmyogan0uiQbfwLV0mn0OOcnhjaRD7Bj3jrUfn/x6PbcVKADYCXhK0tb35Lr9YhD5BxhVNmaBrUFeQsLO6G6xnAZ8zL4jmpU75JiCEXJrsv3qjucb7Y1RF63VQDcwjjDwAQg5yZFtkCwsCjvTUSAbCYYphYfsrmSPVuh7D4ljm3A/6rzIFZZMzSsFJSr4yo0rqULUnvrUoDtan/plD9w0bm/pdwwk+qOBzfDp9KyxlTQ8Tu5VozJQU/3IukjS8yqyLt2qTP8BlxeEw4e5bQTVvaaaOpsSL7t0mdpFebJTSfV5N5Ng4y5kET2KgHq33PzbOe7SjUC6RV0GvtR7EsIDOfFHTFlFk0aOJRZCqlJkKmvTTsfY7+Ip2Ob2LlimwRrtIoTXH3i1Ok0kgBSUUSWAtI1m7U8JhU4mMWzwTJwVI0i85N/XiF7C6R9DuiK5iXoylKZLr90WOq9yh9UM++ouzJQKpauz1uPnwcmUvPfnLxl4Uxgm7c6/QgAmWgxcda4LJzY+gL12w36pW1i40q4FD4LUNa3/A02lU3SVaeX4d0rabsTKDMEZ+X/D3o5dPG2TjlZNygaLqAxtWKxPVt1XZZkHYpAHCBBGXk6KoJC85l2sMnb9rzlQDRIiZV9FQa/pDWMMVobahYvT/34OYJ6R/+U22tmP8KPE9yyTUdtd90CKNIa1O3ePVhd7gUNM6VtR8xaYhKgwwGQT8g2qjX4y1ntLZ6b1Dbl39CAyhTNAclRMea5PLphREiPWQCLxYHQ02FZ1GHvP/YD68v187dy8sa7Yx1sRA4A8xruQFSfwCypJ6xtvvBcm+hAp7YsIPJUHxPqBHQYmENKogoZPQAfbvOwJAxbgyeVZ1bSJaUKuCoqXuAwQ2ZrPcAM/TRTw4m/ZmQnFM9jGaN7xVgQLsK7FW5bcDkKPffWPilAT5nxwLnAa+ymlvPrutdPT6NVyfE2/SztQMMyAuYUTuPiP31CKjtHJSI/3eN1x64FhzVn+HYeZ7gjfGYt7w31pHf5C4cNFVHwGEU0jQ/n8jFP2ESDY0kc0PzTVHlxwcwGN5atOVowA4xuMLmsNzkQpxen4tbsmg9tG7WUtZTGNDLjVpRjrVooQVwXYBO12D/rX33a7ivgjf9tWNGOZz+fbElBf7OuSZy0hsBUFaS3LIDh+Se3GfmZX0Lw39Ij9BzNyV5N3avVzpC++s89vTP1HLZmRYf6vAvwaeSBerc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230037)(82310400023)(376011)(1800799021)(36860700010); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2024 12:59:25.8974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec10487c-c1ba-4e30-da7e-08dc91f1fac8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4431 Received-SPF: permerror client-ip=2a01:111:f403:2416::600; envelope-from=sai.pavan.boddu@amd.com; helo=NAM11-CO1-obe.outbound.protection.outlook.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Added the supported device list and an example command. Signed-off-by: Sai Pavan Boddu Reviewed-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias --- MAINTAINERS | 1 + docs/system/arm/xlnx-zynq.rst | 47 +++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + 3 files changed, 49 insertions(+) create mode 100644 docs/system/arm/xlnx-zynq.rst diff --git a/MAINTAINERS b/MAINTAINERS index 951556224a1..2f06febc676 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1033,6 +1033,7 @@ F: hw/adc/zynq-xadc.c F: include/hw/misc/zynq_slcr.h F: include/hw/adc/zynq-xadc.h X: hw/ssi/xilinx_* +F: docs/system/arm/xlnx-zynq.rst Xilinx ZynqMP and Versal M: Alistair Francis diff --git a/docs/system/arm/xlnx-zynq.rst b/docs/system/arm/xlnx-zynq.rst new file mode 100644 index 00000000000..ade18a3fe13 --- /dev/null +++ b/docs/system/arm/xlnx-zynq.rst @@ -0,0 +1,47 @@ +Xilinx Zynq board (``xilinx-zynq-a9``) +====================================== +The Zynq 7000 family is based on the AMD SoC architecture. These products +integrate a feature-rich dual or single-core Arm Cortex-A9 MPCore based +processing system (PS) and AMD programmable logic (PL) in a single device. + +More details here: +https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Zynq-7000-SoC-Technical-Reference-Manual + +QEMU xilinx-zynq-a9 board supports following devices: + - A9 MPCORE + - cortex-a9 + - GIC v1 + - Generic timer + - wdt + - OCM 256KB + - SMC SRAM@0xe2000000 64MB + - Zynq SLCR + - SPI x2 + - QSPI + - UART + - TTC x2 + - Gigabit Ethernet Controller x2 + - SD Controller x2 + - XADC + - Arm PrimeCell DMA Controller + - DDR Memory + - USB 2.0 x2 + +Running +""""""" +Direct Linux boot of a generic ARM upstream Linux kernel: + +.. code-block:: bash + + $ qemu-system-aarch64 -M xilinx-zynq-a9 \ + -dtb zynq-zc702.dtb -serial null -serial mon:stdio \ + -display none -m 1024 \ + -initrd rootfs.cpio.gz -kernel zImage + +For configuring the boot-mode provide the following on the command line: + +.. code-block:: bash + + -machine boot-mode=qspi + +Supported values are jtag, sd, qspi, nor. diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index 870d30e3502..7b992722846 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -109,6 +109,7 @@ undocumented; you can get a complete list by running arm/virt arm/xenpvh arm/xlnx-versal-virt + arm/xlnx-zynq Emulated CPU architecture support =================================