From patchwork Thu Jun 20 10:41:37 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: 13705125 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 59812C27C79 for ; Thu, 20 Jun 2024 10:43:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKFF0-0002Yl-Hg; Thu, 20 Jun 2024 06:42:06 -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 1sKFEs-0002ST-Ku; Thu, 20 Jun 2024 06:41:58 -0400 Received: from mail-bn8nam11on20625.outbound.protection.outlook.com ([2a01:111:f403:2414::625] 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 1sKFEq-0005WV-B5; Thu, 20 Jun 2024 06:41:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WoCCuNle2tJ7MXYXECOGKfwQ4bpprSKsfjkS7ChA6yill/dIbaEHfFIerEiNDK+fqRCfodbUjI1+iuAWO6wQfvpVU8iD8lUtpjFvs4UTtB1ya2O7jrygjjeCDpsXNgGU889Q6auN6GJoYGpbds8dbtdWm1JDj/aP9zf6WnikLcO7ORN5486JB0RPatopGzw/ys4VN8HzYcF7ouSqssT/dc2D+JNlnhrr9YDKaRJP3vpsiIFiKZkfueGAEgQF/nONmx1FK3d4sFTDhP8fD9hcb/fS85bhVLMHSs/RNfycXEO8/AAqyuH7ioX8YOiitYR62o8nIgR+YDvI+UTcpOo3Ow== 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=WYBn8cCYSZrcur3F/f8p6OefFN+BgWWm0p4D6nqogtA=; b=nsMcgNiS9GTChgP8sAtBDtkUgXUO5ZRINndnlvMPI3LR3+2L5aN8CjxPeuazuzejQRORCr2ptvzevHhX2kZrJnXVvQvGndcQ2O6t8ryMI+91rhCpyCqCn4A2udQhv2PJJO+LhhgfYQEHqOCh7JKH1TtgEIQeWO34yInGbhURbBYybP6K2yV7kY3112pYLebG21ehlM0FLLnF0NBhsSFpxeYkSiHa3MEGjkls5/rXLGj/9Cnt0Poq0NI9SsuzPJZfqR/e8IJxF0TCbCp4MG9ke/R+42clTFjbL3ktTLDdkeAvKcJZq6RBxp0qtqrF9M9aeGD0iyQk+y40kOAJVmCFCw== 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=WYBn8cCYSZrcur3F/f8p6OefFN+BgWWm0p4D6nqogtA=; b=lkfGVFZ73aixBik9ZzGZeLX04KN0NBp6lKyz1TvVa4QL3AXJXjUCzsEMlkoGe3wiZadZq9X8/Gc9TctuWmxJIjW4DZK7b8+Ypf5/uJYeeSrpBjRSz+4aHzwtDgNDEOJYdjRlYrCgfqYpguPuztPKBEVppN21Mvo++QKTzzk7W20= Received: from BYAPR05CA0093.namprd05.prod.outlook.com (2603:10b6:a03:e0::34) by PH7PR12MB7818.namprd12.prod.outlook.com (2603:10b6:510:269::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.21; Thu, 20 Jun 2024 10:41:52 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:a03:e0:cafe::e4) by BYAPR05CA0093.outlook.office365.com (2603:10b6:a03:e0::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.33 via Frontend Transport; Thu, 20 Jun 2024 10:41:52 +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 CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 20 Jun 2024 10:41:51 +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; Thu, 20 Jun 2024 05:41:50 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Thu, 20 Jun 2024 05:41:49 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 20 Jun 2024 05:41:48 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , "Edgar E . Iglesias" Subject: [PATCH v3 1/3] hw/misc/zynq_slcr: Add boot-mode property Date: Thu, 20 Jun 2024 16:11:37 +0530 Message-ID: <20240620104139.217908-2-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240620104139.217908-1-sai.pavan.boddu@amd.com> References: <20240620104139.217908-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: CO1PEPF000042A7:EE_|PH7PR12MB7818:EE_ X-MS-Office365-Filtering-Correlation-Id: 661a38b3-3bdd-4201-bde8-08dc91159895 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|1800799021|82310400023|36860700010|376011; X-Microsoft-Antispam-Message-Info: M0rzBIpGCAIeYfsPU9oYhG7pKnE1bUGmZeYVYgGD/uLUefo7VBnwVRLpJuP/babykBshBPy6rbVa7CZepe2cft98RLqQ6QjmgYPlzTheACM6n6c4RPds+0NLc6Mg/tanRo3sE1l+gXqfzG/bcumsFkeTEHG2Oh+WI2BOqWzVdJBhnZCIpDTITqNMQOjBBmi2nnmXKbwAMlgA81v0hJ1apHix1fVqpkByh8XA+lQws3qLL3itjVepkM9KOOCdH0XxTUAhltQWX+hzGR914kaazhE9tKgI6CfPGYckhy4a+evjZ9KBXYAdqEMkLjGdmpkIfQvhGoFS03Isi4E3G3w2eWBdtWCuEYBh8zcDFzLFje4uVr5QUTOjkFXYTLdjFoCiTnxXyQbUiegPG/wn55D3vZJYFc2JQ0JRQN5k+H1Z9Hr32X8Cd07OuAAXGCC++uNKZaaGLzdpF+gyugkO8f679EMLH8Rl5PN793ZhmGOR21FGNPofXxI8SVTLBUHOy30czNVxfo0TkhY/JV3bhXf5zZYK9qRqiTdoGG8bLEEXrYpC4VbgnsV76n56RCv5RtWrHY8ZzjJdyX5U/eVJiBpLVfdjVa90bijAScAa6xlzHqQltTqMQmCuM4MowqTN0/WJ5+FsyB81UCRNWIsB6C6OFVVAq4abIaGXyKPW5hnIIx6O/E92HmZ7aJIj/+68hvcIxsPWOk7TNfl2bTGEnTlbXBmKkTpzUAk6oPq2mjzVy23khhq5Wb4ES/SjPRkHFdenSumTa30ucUjgdzO0FppUEuC0S4u6DedfZL2qbH+J45ksYxVxIH5/PfOAu4y3iWFXGjObEC2/7108DmwNneqaVwsGPtdvXwSpKTVOeIE7TLGZuFJ4CaT5zf1x10ufahayJDzZ7AKUNwc+BS7eNDlJu3cTovoFr0a5yrR+kP8gqFpkANvSka5wso72puqHPkarnN1iA0jv5JHvaAINB0QFlbPAiDLs36HZnnAhdP+T6alDuEVWAlnrMmPEDzHtG6fNH1pz1e554w8zBtDMDe/rwAPofZJKAJSOw0984EE04c47U+njaChx0q38KgTs9JAfGs94QjkQ8pu13EIDSeuaXxkR0p6MDoWZ7v1Oq5GoRnMvEC1AT+OukM5sFuJPwZ5ITZ2t7AMd1TZCZYVfGBlJUjgRxvUT7bBihwC8ASkvfHQEMvTNaccezW6jKhxnD0sMQkSr2VnYqlBAxrA7PEFXf4OgXVo8L0Je1xw4UZEK2Kl3HbXgFQ34WUaimMCFusrmALhsxXTuZz+08F4cbc91uAYCbdXfsax6N6qUKoTNrsKHly286v7wqQ/yS7uaG3198bcheihwhA36LJU09vxqLKzvS9eGqWNb7xl8PEPF7qA9IMRdqxKy+Lj5FaDkm6NHBiTCDG9o2QEStnaKcHby2w== 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)(1800799021)(82310400023)(36860700010)(376011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2024 10:41:51.8340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 661a38b3-3bdd-4201-bde8-08dc91159895 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: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7818 Received-SPF: permerror client-ip=2a01:111:f403:2414::625; envelope-from=sai.pavan.boddu@amd.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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, T_SCC_BODY_TEXT_LINE=-0.01 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 Thu Jun 20 10:41:38 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: 13705123 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 4F73CC2BA1A for ; Thu, 20 Jun 2024 10:43:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKFF3-0002cU-Gd; Thu, 20 Jun 2024 06:42:10 -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 1sKFEy-0002Wv-S3; Thu, 20 Jun 2024 06:42:04 -0400 Received: from mail-bn8nam11on20605.outbound.protection.outlook.com ([2a01:111:f403:2414::605] 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 1sKFEw-0005Y3-S6; Thu, 20 Jun 2024 06:42:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jYW1v8fGo8bk8LHvuvhohHR8bDPa5LXIw6n4Io0Mn+HERVG2a6GMCbfX6/ssq8Jc35akO8uRL3KsxUMaIVfVnPkHBqhntbft5gq0rsUiO5RdyBHUP30tzZYCcvJ9L809D0dpAuXzdNdxeSxyQGO2PeFSGs+S8hgWo4RCAo9dAx8iiymniyeUyyDlJDAhpNAwsyLQfRfZe1oXA7gXloEhUjiqPKNcQaMfj+bxHKaOyyxICxKUSckSY2aFhJkthghJ5UwnthElRkvpVvfmlVudky2FnPxbgrdbf0j+gCoJmjGoad50JYSk1URPwv9/uyXO6hhOK89YgKC+gvUFzySxPw== 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=2/j6hEXsPcVnXJNDyZ+iR/T2sfMvC89VlDtZBGjX1Xk=; b=Ytk8W0ecT/nI/P6aj5PKvTiLFn8RgnHbTQFllT+wqc306x26qFFEWm3YtQ485EY8nIZ0y0S8+aI/sHa1B/YuQEZ/S46zmOwX5cvFMvJpJ56q0+u8fRvNKBR+Kbqvw14qnQJcfZjc+R98xm7sV7xIveALnnSamOdOho9dlmsXzxiCjeyd1NduYP61BzadMJQwbWYqnBFHzsfTRXcy0sMsgM2FDAOzTl2S/Xnxx3SCnV1FPYPaMRHm0nndKFPAq6lwrJr+rRAE3Ix6LRPmt8clmYeu7z01opTf/VbHuTx0Zllc3BhC2dJ94I7rNpVnsvsYYCScBSOM4Zm7DFeTLUXj+w== 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=2/j6hEXsPcVnXJNDyZ+iR/T2sfMvC89VlDtZBGjX1Xk=; b=QNr0IRrOcHkinGp1PSNQvAvj17LVkhK9zSkTz0e+QZtiP8s5IlcbDIayGrjVwsGNEuT5eRVw7p0KgsWviupzF0Wiumm0aQmmVGH/vQTI1uP8yGxYS6RxTwvSY1nkvFbEdyZRdxgk6rXAydh2hrlFsoOFiKjskFAiKcyctkvXR9E= Received: from BYAPR05CA0088.namprd05.prod.outlook.com (2603:10b6:a03:e0::29) by DM4PR12MB5964.namprd12.prod.outlook.com (2603:10b6:8:6b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.21; Thu, 20 Jun 2024 10:41:55 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:a03:e0:cafe::9e) by BYAPR05CA0088.outlook.office365.com (2603:10b6:a03:e0::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.33 via Frontend Transport; Thu, 20 Jun 2024 10:41:55 +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 CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 20 Jun 2024 10:41:54 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Thu, 20 Jun 2024 05:41:53 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 20 Jun 2024 05:41:51 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , "Edgar E . Iglesias" Subject: [PATCH v3 2/3] hw/arm/xilinx_zynq: Add boot-mode property Date: Thu, 20 Jun 2024 16:11:38 +0530 Message-ID: <20240620104139.217908-3-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240620104139.217908-1-sai.pavan.boddu@amd.com> References: <20240620104139.217908-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A7:EE_|DM4PR12MB5964:EE_ X-MS-Office365-Filtering-Correlation-Id: cb6fabd8-7b78-4dc0-0b4f-08dc91159a69 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: QCsz2uJzPxrTRGLarSuzP3Gty7LOLT3bwmCuiHTvfOY1VsNLq7ZsNLv1vrAzxFJ5B0zHkPK81rb+1/3T96BTSQ5CV3FOyiJQ30OHI1oWQ5xMAeNVFKdHXFgHtNVIsnyV2mZ0I5KPeO1Dv9jB6D7Guxe1J5CmPPChsg5HTsXMmkdvxug/F9kkNrPifRNe2Uicz6s4rVbEfJ3onoD2kzgbdNIQDDtoep8RTDDwMQdx8/Wms8fiMtue90ljG4hwZ/G2Jj8XquCX8tW7yUB0GmbL9yu10zUFiDvdP1qLB+FZNpVaeoqZmBnKV2mSHPnOVdwYqbonvpduzTRWLA5+t19G/OukRb5/e+ScoFjKkONP8fs1IkPryOvs7W+qG7gXzaQotezdqJjdkJAW7p8ioP484PKKAMaqZ8HkitPEhma2gFNhoFY3CLckHPS/yz++93JUJbrqBkDHYvI1Sqz40Zx3dDvqWgOMyjJntp5p3W03VfsqIAlv+wYnS3ZAgvsw4VsboM5tKWafiZa3HgbRsMHJon4HsY6u6sp7ti8teyF3DEJ0SV8v/E9H2aL+iQxkZUT5IiB/gW46IduK77i9QzjhKmMh3tXDd6YoRCNiQq4wZrSx/bY7atl6PWkUtSBKnpSXHYt/O9UehU7IwyNDGShnWT2jspTZ0+K49aCXDJ35IPNr2jrP+kxkdadV9leegUeLmjANYWm4K7HEXHBXCeKKuTegXOrZvnvCm+v2jRTANbLNWWsGS8wVWFB7wlXAd8MPIq4eaB9iyR4W9VP3S02r7h1XovumbB0EF48vNxwLMwQDrnL6EkpUsLF7+7LYme0BBEiIkXaJI1V27xpjGJnQzuUcoGPnIxBA1RzXvKjvx3tTFbSed0iaC9MRXNaxAwTFyMrzfZPCPNXhWm+gAS7tGpV9bZNeLn2q8Z8/K9Yp25gLeWvFsebALOl7UXkRE8q8q/xgOGf+UuawnkDrO/c2+uK1dgAjP1MPl0ttA3e2PJ1V6CTjOhuTLHIiUPHX7dozkbZ6aQibUpRuM01Y3eJreKosv7Db6xk+Qnw15MtyvHTBHsivylIAO1xVwxAiN0ypeNTjYFxnlPmgQWNeqjicJC/X2JOPdYUhfsKGSdnKIa2mPjExtFF4l5mhfg17ZrO4bsiXDc4AwT/zfaxZ02qibi5bLlz2qqTDWMZslCuxkMdZ+7nOQZMHFuOGdIW0+VTluJCoDNU+LGqba2uXLvKhn2HE8xAs8e4lFb/UzXyOPV5iVaHAoChvYznkmkNAHOM6xOKmiwpTsueC9Vg4nfN3fQNEm7BwwURRMF9oqD8WEleKJHYNRQ7LYPOjxjamAiy9LDlbxIUb293MNGiXmPd39fgVaIFgHVIkaJtHnS+hXDcgsuije1J6gKOyLZgw2pIdMp94Dlx0AmlXiwIVsuYlsQ== 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)(376011)(36860700010)(1800799021)(82310400023); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2024 10:41:54.8496 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb6fabd8-7b78-4dc0-0b4f-08dc91159a69 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: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5964 Received-SPF: permerror client-ip=2a01:111:f403:2414::605; envelope-from=sai.pavan.boddu@amd.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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, T_SCC_BODY_TEXT_LINE=-0.01 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..39f07e6dfd8 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 (!strcasecmp(str, "QSPI")) { + mode = 1; + } else if (!strcasecmp(str, "SD")) { + mode = 5; + } else if (!strcasecmp(str, "NOR")) { + mode = 2; + } else if (!strcasecmp(str, "JTAG")) { + mode = 0; + } else { + error_setg(errp, "bootmode %s 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 Thu Jun 20 10:41:39 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: 13705124 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 08DBDC27C79 for ; Thu, 20 Jun 2024 10:43:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKFF4-0002d2-4V; Thu, 20 Jun 2024 06:42:10 -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 1sKFF0-0002Y7-0R; Thu, 20 Jun 2024 06:42:06 -0400 Received: from mail-bn8nam12on20606.outbound.protection.outlook.com ([2a01:111:f403:2418::606] helo=NAM12-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 1sKFEy-0005YO-6D; Thu, 20 Jun 2024 06:42:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i3SLZu4vFN+cfAE2mQ/k2Ly7VXHwAoEO0LbY3bUhV6bCeZu8DkKhRcCGdCUE7uKvQvaqQX9wZfTpmEm+ZBduH6z7PYJqzEaAHmobXKONSKJ/EsGHIbO8/qfLienAJndei3vxn0YZuyWypXlSjwkEjWTFV4pD1eo1yIVBNzL/Cs12Ls6DMDEcOl9QTElgI0p/8TNW7w2/mdYoRHX1EW6zFE5eXalY9z3tce+p4dSvWTimL+wwAvgjVoOzwjU1nZfuTGVXkVujfF6xa5e/gYlyoMy/wD83m94T7Dxl66ZfAY0FYno2NndFH8hVtqa5X+eA+CEmmlJWmN9MFnlandiFfw== 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=0QtWRXaVYHO3xyKxfaWo0PfJ4Cs0EXokrOGNp/Ejot4=; b=kS/fpq6E18NqVOp5BGkV8zJZh3wQi6tgOWybzwDwNOpub/c4m1xjbJG9zMpSBwZE9Tsx9YrjueJn66IRpRV00mDO8zDYERZPAhmZ9LhEPT4y5V+sFGTTl/gyhHCXxgtm3D3iHtXc24tcjDUbqtUsIfGOA3eDoT936vlDOF12AV2I8SF0Maj8+5ZsKLtMspcjedIAqdSHJ0xcliQSL9NTf1e5qVlPWumW+r+pmkMcSLDLgzwJGYhICoHehkHuh/wvPbHX7pDEfIyUx+uP2TVwZWCa8iQ6Z9YAXklSACuZVLe//eWh4grzotczI6do1NHAASPOX12YbaEfvJCRKo+TyA== 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=0QtWRXaVYHO3xyKxfaWo0PfJ4Cs0EXokrOGNp/Ejot4=; b=rjYA4eLcH7+g68Gu0zeqCEA8Gz6tZyyA5culPAEn72FHSsX/RLs5b4miPdfpCk0cnnhcamfLmw2C0Sg9/I+wd6Z00B5pFUPz9VeSRVxCQP6Z998ZReD2KnnSefEBPs4HwLwxFeRQS2gkALvTDHltSbq6ioYkHFhY+bdcrEZllDY= Received: from BYAPR05CA0080.namprd05.prod.outlook.com (2603:10b6:a03:e0::21) by SA3PR12MB9107.namprd12.prod.outlook.com (2603:10b6:806:381::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Thu, 20 Jun 2024 10:41:57 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:a03:e0:cafe::bd) by BYAPR05CA0080.outlook.office365.com (2603:10b6:a03:e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.33 via Frontend Transport; Thu, 20 Jun 2024 10:41:57 +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 CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 20 Jun 2024 10:41:57 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Thu, 20 Jun 2024 05:41:56 -0500 Received: from xhdsaipava41.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 20 Jun 2024 05:41:54 -0500 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , , "Edgar E . Iglesias" Subject: [PATCH v3 3/3] docs/system/arm: Add a doc for zynq board Date: Thu, 20 Jun 2024 16:11:39 +0530 Message-ID: <20240620104139.217908-4-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240620104139.217908-1-sai.pavan.boddu@amd.com> References: <20240620104139.217908-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A7:EE_|SA3PR12MB9107:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e2a3e08-fb60-4fef-fa8d-08dc91159bdc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|376011|36860700010|82310400023|1800799021; X-Microsoft-Antispam-Message-Info: wNy9OX/l6as0nmkAvxtro7HDCE1eoSUG2G8bkF2PaL2kjFw1AnYOpZrgZMQ8r3C2k9QTifalryK6rAypYFdO43nVqr08N670N3kJfgbZ6LfoA4+cjup/OQnobtccHpg7NHY6kuvnWau65V3WQYPeqFLZ+AhGKPfY7Fu642RbfqA+gn1kLBy/wwCz545rO/+rXxYrtKW3CwUqp9hkBE8/kUv3m7Ibf6nNnhcS1M0epjj/OgpOnkA1tjrcbGA2qCq9KU/WF9047JNvt5NMA59TgfxoWU94VQvz6VF916rfZTB1OETy5YE3eoJ9m5dk1JGV7DRml5pdJCCL09ZsQUFdVHTXPJ60DpaQQSki4vZMZ9X6HAYBbxW/s5ND9RFHigIkjqq5msm+u9drEVzUj4XgbndgvGXAU2WMA0wC1ia250MHZ55UsjOOmLG5OUohXKyJ945P69EBtGgGWoR1xivRrlXrwEKB4AWLeiCRdafumHIb6WtS+p+8Pu5zxL8Ybnu1LMQw2S5eAJ1juvAR+spy3g1g1YjJFsuzuUVxwWheRayVGcgamYEd49vghUCHZvl8JY8Gbu0RLmQi0gqbvvEMIdhlsP6mekZf0A8aqwBtdJ/XYKMHPjITxNyKhgj5gmEg2u0LrSmri49Z1IvIGE9R44/lF2sF1VMmDolUyTFQDwWCgTe20UPhINNq454Zo8Co2jq2N2aXKH0T/4jZFxHrwUvlc6QIO/bbQwGRyWfYilzB8f3NcTPURjHjZKIKmKoi4fvinzcM51og6qutWzzVTu/jnh6uSS5dVrOwOWtp7c+oOqL5tMpO04hAjbokqVYIWkdd2ipZ1qOBU3YbSA9/4ftAOKg6OczZkGHT/wDk5nxSd3Mxryy5FKeEr4bmbWur6Muy27k5msZJ9mFRoBx87MfBz0kXV/aeSAdeZK4y1cmeJxU3UnVX/1I4EYTJzeZj50IT/2Vi5jNfTUYSSS8Nyu4mcAeUCLikawdCC/q716BXoaY+sIIh8faJo2zL0Xjeo5UDT1h5CW+gq7R3nDIbKx/wtyQm1+7pXacv6Y+Szx71ynnAQiAUYBr+PO8kswneBfGGly+duPhGUPPISQo4oTe1Q1v2XaS57EushJsjncmnG9LKrQcCn8lOgZwjrH3bgVezkC5t6Ez+Hl8+SYyNdOGFh5WJQlCtAtpsC1NbZGENkZRmxEHHWa5DmaK1D6zmDKVMxNYkPwBO8Vvx3Uf3fiErlrMm7hOUnmYlkuyVevL3MyF6mmeKBgdxwOt8cFfY3sGkc01dKJmVMsmphprDyand3jVi2hTYbekj7tfZ9Cxl5eLmykM/NtA/Qu/MTysptS/CqXjDkYnkz+X2WngxW0NC8bI0lmoSEjeB7V6/254= 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)(376011)(36860700010)(82310400023)(1800799021); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2024 10:41:57.2402 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e2a3e08-fb60-4fef-fa8d-08dc91159bdc 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: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9107 Received-SPF: permerror client-ip=2a01:111:f403:2418::606; envelope-from=sai.pavan.boddu@amd.com; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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, T_SCC_BODY_TEXT_LINE=-0.01, 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 =================================