From nobody Mon Nov 25 00:43:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1718788656; cv=pass; d=zohomail.com; s=zohoarc; b=LR+xsUgFb0GzVTYZq8YwTYwqi23YehRrWSOI5z4Igp8ET8sDEHZhKyJ9aM2kKTR3QBiMmDuvR/ucETtBRcEl3Nj715doB8CCyn6iZV9n7ugLzv9QewfQy3axha6bVvZcUsgn3jq9ngMFa118Mp3b/7naQ5axikj+MDM7t2vKTLc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718788656; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9WN67zXjHmDGowiH2idVIydJ1Mr0xx31g4bqPPMHYsw=; b=DvWQ1zX8Kdh7cFbjoh+6YAAZE9FGgEgeQ3AFyROuieEXCl8sd52QJxfZPdHzHlh4cnrxSXEj+x9Eq+S8fIHtuyvQhGrS8TnFcsuwM934CbLLefd5+4dJw1+BmrmKLLXsSfKGRHMQqYScTOrBDOCR+LKGPaZsDO3R2iXXdqfKOvY= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718788656972254.71478023839882; Wed, 19 Jun 2024 02:17:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJrR5-00047p-5G; Wed, 19 Jun 2024 05:16:59 -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 1sJrR2-00046Y-Jw; Wed, 19 Jun 2024 05:16:56 -0400 Received: from mail-dm6nam12on20601.outbound.protection.outlook.com ([2a01:111:f403:2417::601] helo=NAM12-DM6-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 1sJrR0-0003rA-Dy; Wed, 19 Jun 2024 05:16:56 -0400 Received: from BL0PR05CA0014.namprd05.prod.outlook.com (2603:10b6:208:91::24) by CY8PR12MB7241.namprd12.prod.outlook.com (2603:10b6:930:5a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Wed, 19 Jun 2024 09:16:49 +0000 Received: from BL6PEPF00022570.namprd02.prod.outlook.com (2603:10b6:208:91:cafe::ae) by BL0PR05CA0014.outlook.office365.com (2603:10b6:208:91::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Wed, 19 Jun 2024 09:16:49 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00022570.mail.protection.outlook.com (10.167.249.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Wed, 19 Jun 2024 09:16:49 +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; Wed, 19 Jun 2024 04:16:48 -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; Wed, 19 Jun 2024 04:16:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dAT4A1WUpTEDbO1pqFWt/SG3t5Fo7uARFWDKY4fwMv0V3IylHsWMHwL2esE/ufWCp7Mz1TKWNIIsphrOJBRjv3kf4N2GpCCDstwZNNF1et7I8Dq2PKQpO7rNp3o3wo8keRgmzGVPV9tf5KwImQKZZM3VkTVoYWhuPnHVLJZ/XsHqrtc/SrIKlouOQCoxxuvl9DblYSZdIdsJBX+8Z4UnO9J7ZamXeiWpX4Gn68kpvSeoGZHRInkkeCPEayR76ObJpa5vx498EYf7FQld0bzzvsb7nbFa4FSMv1pJKJEKXqh4H6cJT5+j6QrMJxhJWTcsGHGM0T04916EqLYZQApi5w== 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=9WN67zXjHmDGowiH2idVIydJ1Mr0xx31g4bqPPMHYsw=; b=Wtd4igSS+Kc0BKmcsY6GAj9d6dbVEWlUNn4dr2C+rWNUJwnb+S09V9MC/sRfXS75VzUFCD5lr7UXwve102Hc1JFGzi8TA9c+iF3yUZABlzkeuKEJv61+LcV/q02Fu9x+sYGhvq+j0pB08uUYYG8kp6jNBUqViiuJylgFDjm1viC3mK9dz+x9KUYIVzsUIAaY/Vs6Xq67ccDsDJzd6t0I3G8aKjeVvXaQ1sL1l76CWxqH6xk/llt0Z2X2k4BZdEbfe+98JV2udL7qWEi+tNLDIJ9qNn4JV4uOLe6ekdjlbPm5/nnVlc3LepJxDJlpZeTd3x2rkxT8qaTqugKJWAnSzQ== 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=9WN67zXjHmDGowiH2idVIydJ1Mr0xx31g4bqPPMHYsw=; b=x6WFh3mX1y6CqqZat/RaQ/V83odv8ZESFD+TskUNt2PnVMQYhn5fa1EZt3EPPK14VoSQahUmcyqzoKBIwxzZ8k+cgkzZZN+6AT+OyewnP0gl0IaivgQfP2DysXP4dPY+Zi3+B1Y739HHc5jSz51hxi+7smHH9nNfvBgovRf6gIk= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , Subject: [PATCH v2 1/3] hw/misc/zynq_slcr: Add BootMode property Date: Wed, 19 Jun 2024 14:46:30 +0530 Message-ID: <20240619091632.2825550-2-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> References: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: BL6PEPF00022570:EE_|CY8PR12MB7241:EE_ X-MS-Office365-Filtering-Correlation-Id: d05d77a5-d018-4c56-8987-08dc90408cdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|82310400023|1800799021|36860700010|376011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mTZaVEqdlp51MyquSdtChUjHtk0YnNGqvTKgD++yCPC/7pS6oBZoXgpt+uIF?= =?us-ascii?Q?9Y67WDq6227UIWdWBWOXLgaG540zcfoJmBBAZflZPHhxpy9qsap/USFvRD2D?= =?us-ascii?Q?jSXbzjIZoQLZFOw6u5ZZq857DceX9kpk0c95QzxhkZpXkvS2lpjZXqVIPhM/?= =?us-ascii?Q?GQfvzN0gxGqdf+uwitI1FFjMA25AOyCLHni817wdCwjgNaD3j4HRgCZqVoEO?= =?us-ascii?Q?PCA+cQnJpsIAXcFrvrxx9wZBTpeifcqK0wSjWhv9I/h0Z2VhGVGOSVYhXarY?= =?us-ascii?Q?diHjSE0fQRVgqRrz5qMdLdrUA/cJw3H2ehe9huZdVTfQ2fbLjBk+zuLtxlwh?= =?us-ascii?Q?1E9DpBPdmY5EkrCI956CqKfQQ+AOnuUZSX6tn1xyZYCmVRpmZHYFRjlDo8Bd?= =?us-ascii?Q?orpFKyizJzgG3QIaeeSu6uNNUEZtS5WAea5tcWNKqp119eRLTFe22th08Ydv?= =?us-ascii?Q?XNsHmOrHroriGH942NAYyZmqa0SmmtSLIESg7zk9xEGb6eKF9XPH42ysMT3f?= =?us-ascii?Q?uK9AZ0ZA6pT13f1AEoAujkoMZXfVmBbeReeYZZHTIjkUc2PIHakgP10dVMgh?= =?us-ascii?Q?KsPQimriP3Swpk2tq3MXmLjffB7fFxJLGtunUffz4O9dPwmH2Y22/qW0E3nr?= =?us-ascii?Q?p9kgaQ4S4IVs7f8ONm+kOSFpt4w2qKwDFQ4pZ7j88GxNQn0cPS3q11khXOcT?= =?us-ascii?Q?8MQh+YJyjfA9c9epAntEygZ61276a8/78L/bj0ijJuew6qvtAMXQLPPprFD7?= =?us-ascii?Q?ELaDqI7Byq9ceYJnDgGBCVZbCSpQr3qkR2OIrTPZ2Etmx6Faj1K7yRXS2OdT?= =?us-ascii?Q?l2VLrheVepfiq5+HbTjNEm7E+dVl0Fw1SpugqgA6B5M/CG7JVHxAceCCnihZ?= =?us-ascii?Q?jLV9xBcUEkqQ/+UuuqD1DuGBoDz+Xn2U7YBNDaxKWSr08Bxc0wyFZn2VLktg?= =?us-ascii?Q?ux21G9UMOz92EwaWnN+Ijay6WnOYlXWsCm7TRoMz8984NoT+gFiCFp1fO36t?= =?us-ascii?Q?5Jq9fcCj0aRjDps9i3MPwqHEdHNuJ7p6/vswUHOSqpM3gHHIKBltQHD2h5qz?= =?us-ascii?Q?GieArgvGcU2suif3ul7iyaq3w/DIjxFJ4TvRsfguE7lLnan05TNPDJrPLO4A?= =?us-ascii?Q?cujynmjWMGwQnWVrMQ3XgCQfp16yIOlQP7n/Va4vHc2A/LC/ULsHwlpLGuqu?= =?us-ascii?Q?UG5Z9lF1uEiozIi4CHJ+SHoQyoVhKLNdjeTTKzT2jMCbLN2+PLpW/wGcgWcQ?= =?us-ascii?Q?VgzyDXGBNfLmQfSF7tUo1PB3gF/lg3TuWM97Jgqce3k6fxkrseV+89UrfZqS?= =?us-ascii?Q?KHngsKztxkEROImMVM1natQJHruJYdSB6gM/U0HhDSRZxvLT7c7sPLMytx57?= =?us-ascii?Q?iWlKbYaOz+rxkNQIj8+QLEecXf1u5m80AUolfALCKI/kxzsn0w=3D=3D?= 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)(1800799021)(36860700010)(376011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 09:16:49.4909 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d05d77a5-d018-4c56-8987-08dc90408cdf 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: BL6PEPF00022570.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7241 Received-SPF: permerror client-ip=2a01:111:f403:2417::601; envelope-from=sai.pavan.boddu@amd.com; helo=NAM12-DM6-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.148, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1718788658843100005 Content-Type: text/plain; charset="utf-8" BootMode 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 --- 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" =20 #ifndef ZYNQ_SLCR_ERR_DEBUG #define ZYNQ_SLCR_ERR_DEBUG 0 @@ -121,6 +123,7 @@ REG32(RST_REASON, 0x250) =20 REG32(REBOOT_STATUS, 0x258) REG32(BOOT_MODE, 0x25c) + FIELD(BOOT_MODE, BOOT_MODE, 0, 4) =20 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; }; =20 /* @@ -371,7 +375,7 @@ static void zynq_slcr_reset_init(Object *obj, ResetType= type) s->regs[R_FPGA_RST_CTRL] =3D 0x01F33F0F; s->regs[R_RST_REASON] =3D 0x00000040; =20 - s->regs[R_BOOT_MODE] =3D 0x00000001; + s->regs[R_BOOT_MODE] =3D s->boot_mode & R_BOOT_MODE_BOOT_MODE_MAS= K; =20 /* 0x700 - 0x7D4 */ for (i =3D 0; i < 54; i++) { @@ -588,6 +592,15 @@ static const ClockPortInitArray zynq_slcr_clocks =3D { QDEV_CLOCK_END }; =20 +static void zynq_slcr_realize(DeviceState *dev, Error **errp) +{ + ZynqSLCRState *s =3D 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 =3D ZYNQ_SLCR(obj); @@ -610,15 +623,22 @@ static const VMStateDescription vmstate_zynq_slcr =3D= { } }; =20 +static Property zynq_slcr_props[] =3D { + 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 =3D DEVICE_CLASS(klass); ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->vmsd =3D &vmstate_zynq_slcr; + dc->realize =3D zynq_slcr_realize; rc->phases.enter =3D zynq_slcr_reset_init; rc->phases.hold =3D zynq_slcr_reset_hold; rc->phases.exit =3D zynq_slcr_reset_exit; + device_class_set_props(dc, zynq_slcr_props); } =20 static const TypeInfo zynq_slcr_info =3D { --=20 2.34.1 From nobody Mon Nov 25 00:43:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1718788692; cv=pass; d=zohomail.com; s=zohoarc; b=klC4wVahMfOU8rO6GuwcF8CK0CXy0S0SxAAa2q0qIU0JkDjkc/nGniq65JmzMTHOjwCYt/m/5bho/OFasvg/1+TLP6M9PzYHDntScbn5SYw/ElkF7KoqIA+dAhKfSkbQRydz8Ab4g7qm0yNXczRVL1UNVssjem3RiJXxS+efgrE= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718788692; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jvamlq+3atkXRl9UXQ722T+p7FhrjBnF4rhoNIqGCXs=; b=Ion56fqbsZKiNmN8pMGL+uQ/BtzD5kgGt1PRmLVSqsaMZ47kYuOq1Y5Ob6F+mdNTLGKwI8lxahM6J5J+O4/KyTn1RXo3vl0Gfq78zmX0G9yRjFxbySqy21e2TVPMWPNrVQY0M+hpyozHHWWsNabWt1EpeNDGTdDNNrlDV2Y9qJI= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171878869238597.8356473183826; Wed, 19 Jun 2024 02:18:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJrR6-00049U-TG; Wed, 19 Jun 2024 05:17:00 -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 1sJrR4-00047N-At; Wed, 19 Jun 2024 05:16:58 -0400 Received: from mail-dm3nam02on20601.outbound.protection.outlook.com ([2a01:111:f403:2405::601] helo=NAM02-DM3-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 1sJrR2-0003rP-Ef; Wed, 19 Jun 2024 05:16:58 -0400 Received: from BL1P221CA0007.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:2c5::33) by SN7PR12MB8436.namprd12.prod.outlook.com (2603:10b6:806:2e3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.24; Wed, 19 Jun 2024 09:16:51 +0000 Received: from BL6PEPF0001AB55.namprd02.prod.outlook.com (2603:10b6:208:2c5:cafe::98) by BL1P221CA0007.outlook.office365.com (2603:10b6:208:2c5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.32 via Frontend Transport; Wed, 19 Jun 2024 09:16:51 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB55.mail.protection.outlook.com (10.167.241.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Wed, 19 Jun 2024 09:16:51 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Wed, 19 Jun 2024 04:16:50 -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; Wed, 19 Jun 2024 04:16:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ETCCkCLiau00kObTUOkQjC8J9ez7uIU+a4ZcXhtp7U3Xg4VDY0+mrgz2JIkVBzpHWQrSs08EcfXwVDqMveH7y7lzYjtNrR0e2BRNVSRNa+gTvAwiKZFmbeFyNZ4jLdggnMn/Rfybmk44bv5kGmcO2K23qHnCz9G8o6m3imMUMEDwWyqtosc3Swh3kk2zmH1j24axtHXLkJxW9+hgC2x6rZB9ItAhvA4lGjD4B8qs9wZXDq/+zUFVtvslGzHZjdyc41OJPs9RSWqirTxz2Ebt2Qg+D8FtPq/RLyaVOIcHvrqda0OlhQu2+bDt8S2cxUYysZ7sMmxtf+0p7D9eSpenyA== 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=jvamlq+3atkXRl9UXQ722T+p7FhrjBnF4rhoNIqGCXs=; b=Hsq4pzXqfPY9bsWQ14DJX3ZxB2UgU1nB23kFB0qLooapQjl2A8oMNwF+o2lECXsSBPrOxnMJi5ZAWp2zCEdeAJK7Vn3mD89MCbnq14yt6He8KOuPKGskIceoAh+tfl7PRPYUGRhHthKCqVYV5fkigKN7xYCKrFmcgdCm9vHOEOFSw5IPcdMfGgLUNwgh6xc2tu8w6fsaej2bhwFyY/1bdcVNrTeChqPqejhHe+enP5a41/TVXlHee03yCwczLCtS/eGCXRNMXPVTGu6FgolBdQOnEX8t+nNVJFEKyyqtMP7Xl6B9I8+Ry7aX0b0a5kxi2jnvai/E5dNijALYgJiOGw== 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=jvamlq+3atkXRl9UXQ722T+p7FhrjBnF4rhoNIqGCXs=; b=aAGI17fJAelODIyFZDBvLYf/coi7Na375liv1OCgSAsqPxxRa5YN2AuBIKKLLa0h2uKVy03x3g6J3JWTcu0dPwvDKruQRvfrBb5vJ+EnBAxB0b3lXOV1rBeuzcfRkyyhvPUbWHk3eaXqm+fQ0jzqHv8I4dMPAx3KN60FWV7D2V0= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , Subject: [PATCH v2 2/3] hw/arm/xilinx_zynq: Add boot-mode property Date: Wed, 19 Jun 2024 14:46:31 +0530 Message-ID: <20240619091632.2825550-3-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> References: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: None (SATLEXMB04.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB55:EE_|SN7PR12MB8436:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f89437a-83fc-4b18-0e33-08dc90408e10 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: =?us-ascii?Q?iUYUDoTz+2CqSPAU0oZaHoSGi6ILjZccuBu3F2yOXGsz4lR/XrmHtJxqVIdc?= =?us-ascii?Q?NjUouaX6/AZju20u3tGBHUgr9dRoLtA2J8iaM8bOCWjQoGYCybHp2RN19PUb?= =?us-ascii?Q?XPc/u67yu9DQ+1NK6ucwWFkg5uVlFaYYwCICBk/U/v5MnA45ImRi4uVQDJA7?= =?us-ascii?Q?njcy607YVH6mvsyP9koVZV6MzDKaiFDCO0qv3Uz86oBNR6SB6j3P2euQemgp?= =?us-ascii?Q?kj3BFWYbbpJ7k5QoGEX0pvWTmhGR5h8quq1y4ovN9dzZoBOmubxR/95mAwwt?= =?us-ascii?Q?EophAv05K01uJsL3wExlve94WfytI3ihDhVnR33ObBqUwX0KN/kfBzKScknx?= =?us-ascii?Q?7fMmbO/u0KaQPoCXdJOMCOqzu0heI/S3opZZhvVOYVS7zAzdwlP4ixSEkvi0?= =?us-ascii?Q?mAA8JUb75C/s4ppHHeI7CqfzG0ePA6tEwijWlI9iYZ+OoZsBbl6oRz3LcFvq?= =?us-ascii?Q?LNSRhY5rTlf6TeKi//XSNLatNlRft7YyVF2KqxWwhXAGhkkp3HnLsntV3Ikn?= =?us-ascii?Q?aQqUoK0ccdm52kaMBmYGAcZsCB3pyNrANXETUeXdfdEZlQHESVLHnxYz5hm0?= =?us-ascii?Q?/Rzgb5bv2zGeNm7Vxj0YE+cW6VbswoHgmK0c7mNnl4cHRNnzFlMIW0pdSllz?= =?us-ascii?Q?TkAFETWhNIVpj0D33uiKit7ybymTPyaK3qjjNQiUrKO4sty8zHCHs7cQ8GAB?= =?us-ascii?Q?vP5fgcvUJ0RL8x3JLGwEXNRwQXh2biPKPMvgYAIi24vYRyde7vN7OIoNXprm?= =?us-ascii?Q?x36JwrzgThZxRZvN/5eyCkEBbtkRGD5YMtaUlD3WNNh0JY2owBQriPWLe6Uz?= =?us-ascii?Q?mkzbhhgYbqE/g7mOf9ey4yBY5LetuZu7riWf6hxh2Ig5kuxyb+d5JCoc21zB?= =?us-ascii?Q?1SXoqEDhcz4AYnujEE2ZcUZ2TBtuELZgCgxoj5hdN0a0E/10kdHhQFsA2XcA?= =?us-ascii?Q?Jc9+PNJTBn1BIIWMMW/6wD2e6rNuHEsVcLrPCTN3RnJnfIytERw5Z9JnegFB?= =?us-ascii?Q?zE+b1VezL8irFgaeeve7mUYMAPP14WQEEerU6ygZ0HKSVLxo+HfiySyGXEOZ?= =?us-ascii?Q?JDQ/w14VEj5kT1sI4fpZjEu3QHk5AaGd1oEwzKGABh8UiQMqaaXJK1Q4U14Q?= =?us-ascii?Q?bS4mvjL6GNGzPCEH1ISYVKc0NW6hhltzHuJU6Ud2VZwR8bIyc8ftCCQnSSlY?= =?us-ascii?Q?3IVsc9LyqV/ji7iEZetIA4w6QfJU/gdztXUpT2cl0K4FqDXaY3SI9MGBp8Qa?= =?us-ascii?Q?t6WablGSgAcnCDsIL0ZOk9y+o4VRbD+6u+a0B3uOEFyEbuZwNIOiMSP6U3L5?= =?us-ascii?Q?m48XSBPvjG5r0jG7TCS9y5AvICOZWnQ9WyiTVVEUrFi96QHe97wabw7a9KpZ?= =?us-ascii?Q?8RV3ilzipWwcbyy8CQUFFMhNTRdC5TXR0Ls3lc4DA9mceXfRRg=3D=3D?= 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)(1800799021)(82310400023)(36860700010)(376011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 09:16:51.4866 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f89437a-83fc-4b18-0e33-08dc90408e10 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: BL6PEPF0001AB55.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8436 Received-SPF: permerror client-ip=2a01:111:f403:2405::601; envelope-from=sai.pavan.boddu@amd.com; helo=NAM02-DM3-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.148, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1718788692980100001 Content-Type: text/plain; charset="utf-8" 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 --- 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" =20 #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; }; =20 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; } =20 +static void zynq_set_boot_mode(Object *obj, const char *str, + Error **errp) +{ + ZynqMachineState *m =3D ZYNQ_MACHINE(obj); + uint8_t mode =3D 0; + + if (!strcasecmp(str, "QSPI")) { + mode =3D 1; + } else if (!strcasecmp(str, "SD")) { + mode =3D 5; + } else if (!strcasecmp(str, "NOR")) { + mode =3D 2; + } else if (!strcasecmp(str, "JTAG")) { + mode =3D 0; + } else { + error_setg(errp, "%s bootmode is not supported", str); + return; + } + m->boot_mode =3D mode; +} + static void zynq_init(MachineState *machine) { ZynqMachineState *zynq_machine =3D ZYNQ_MACHINE(machine); @@ -241,6 +264,7 @@ static void zynq_init(MachineState *machine) /* Create slcr, keep a pointer to connect clocks */ slcr =3D 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); =20 @@ -372,6 +396,7 @@ static void zynq_machine_class_init(ObjectClass *oc, vo= id *data) NULL }; MachineClass *mc =3D MACHINE_CLASS(oc); + ObjectProperty *prop; mc->desc =3D "Xilinx Zynq Platform Baseboard for Cortex-A9"; mc->init =3D zynq_init; mc->max_cpus =3D ZYNQ_MAX_CPUS; @@ -379,6 +404,12 @@ static void zynq_machine_class_init(ObjectClass *oc, v= oid *data) mc->ignore_memory_transaction_failures =3D true; mc->valid_cpu_types =3D valid_cpu_types; mc->default_ram_id =3D "zynq.ext_ram"; + prop =3D 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"); } =20 static const TypeInfo zynq_machine_type =3D { --=20 2.34.1 From nobody Mon Nov 25 00:43:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1718788657; cv=pass; d=zohomail.com; s=zohoarc; b=ImD+d+02owFyGOw7Lp+W1Of+QXEwskI09EW/VDdrV868JDvpvz/g6+1WdZ3aaNDiC/sG3IUIrMyJMByGQ+x/0GsBgMeL9Z5iXKUk9WFhpUAjfaFP/F9wKp8EutPcRq9y5iFPT5dvzd04JMffY9+5YYUS56WQOvmuc1SkN4vOrDo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718788657; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2Q2XwiHhQDPY6HBUB/s6+x8qVqjvUZ3B/o+F4Yxi36Q=; b=N71D3Yd9odsA9V3Bf5yUjVe1OhIMJmrls61lPrFXkHQkNpuZVrxpZI8FAwFR4tcdiAIF+tfCXosUCf60lc6dj41pbSbXNEeLU5ajDNyJQfXYgiIt4RVqebP46MUFO1G4UYa3UXqcH5nRouIQ/JsIdewo65tdW6wzjL/uh5NVDVc= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718788657055877.5957062759356; Wed, 19 Jun 2024 02:17:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJrR7-00049w-Mt; Wed, 19 Jun 2024 05:17:01 -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 1sJrR5-00048W-Ms; Wed, 19 Jun 2024 05:16:59 -0400 Received: from mail-bn8nam11on20610.outbound.protection.outlook.com ([2a01:111:f403:2414::610] 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 1sJrR3-0003rZ-LK; Wed, 19 Jun 2024 05:16:59 -0400 Received: from BLAP220CA0011.NAMP220.PROD.OUTLOOK.COM (2603:10b6:208:32c::16) by IA1PR12MB6210.namprd12.prod.outlook.com (2603:10b6:208:3e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Wed, 19 Jun 2024 09:16:53 +0000 Received: from BL6PEPF0001AB56.namprd02.prod.outlook.com (2603:10b6:208:32c:cafe::8) by BLAP220CA0011.outlook.office365.com (2603:10b6:208:32c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31 via Frontend Transport; Wed, 19 Jun 2024 09:16:53 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB56.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Wed, 19 Jun 2024 09:16:53 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Wed, 19 Jun 2024 04:16:52 -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; Wed, 19 Jun 2024 04:16:51 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WfD+YYlYqII6HTKO9mziEvAfg35gliuZhxpSVopqebECBZS3QbcPyxUvY01tiek+u9Ps60BBWdO4uIG5ZdohcS53lC+hCfaDhjFnCjSO6gNXZYIX2gkYks19sLqPxeTmhI4kLtvlcXEjHmmLTQ+HuqZTDm2Gukzgf4Rvv6plQ33cSrw5C1bnpAMA8VQCYNnGh0B6hm5MMQgFp72xd4D01FP1+ZMLazTXxh4MaspJkWIoKQnh9bNYmpxV3WZdE3TSS/rKtax69mKENzhdUKAp9LHIcYVZGaX6lYbmeCfKT1ELnSBm4uRBOIqpfGOUlPINJyAJwDyufkzB8FNUEb+bRQ== 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=2Q2XwiHhQDPY6HBUB/s6+x8qVqjvUZ3B/o+F4Yxi36Q=; b=TLJ1VfgXIIrLj/BhsCRMc7bZDzxL9aUsLxRpm6PtWOuZDvGNHZ2yu0lj4EJ4x/H+TGRg73NCYbQaEiDAbJ9WO5sPhMoh9hDdZysXQAfIxz0yumpIZo1K+ixhQADnJuv8Hpm0cJvCl05AZq7DXalk6HbCBH4TQ+yGjqAyiKsBfYLkO9fXeNC4jL9dgANh9bnMyk/znXJcfqmcFqiGlcJXPchUrHSMveoaUWue/fXFr+HrrIR8mpWKUJx0p0I0GQjYyFhcapSSao53zC4q4CENAXPoIyycDJ1uQM7190J3jcFGZlhTlXoJ7gyz+JVvMUHlJvE5Q/pkhZW5TPkvVG26GA== 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=2Q2XwiHhQDPY6HBUB/s6+x8qVqjvUZ3B/o+F4Yxi36Q=; b=t27byTVeYlPnH27Gg9zka7cOpgwLSYT4WhMO5tvQJrf4jKjhYTSGY/qwlTD1ZoiewpCsmAdH+K/5y+NUE/LLOLomrTr+FmNZe9N/9a8yVY7BJLD4J2hmHHAcrAuoZCw3cYHYLt5h3tBKxIbXZfnVRQRAPlqEAgsNU7Lx/tu5z/g= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 From: Sai Pavan Boddu To: , CC: "'Edgar E . Iglesias'" , Peter Maydell , Subject: [PATCH v2 3/3] docs/system/arm: Add a doc for zynq board Date: Wed, 19 Jun 2024 14:46:32 +0530 Message-ID: <20240619091632.2825550-4-sai.pavan.boddu@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> References: <20240619091632.2825550-1-sai.pavan.boddu@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: None (SATLEXMB04.amd.com: sai.pavan.boddu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB56:EE_|IA1PR12MB6210:EE_ X-MS-Office365-Filtering-Correlation-Id: d0ffbd67-bcda-443d-fdc8-08dc90408f42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|1800799021|36860700010|82310400023|376011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?T99EIB38X+XJP2pXqCuIrO4bDKAOlyCihrj4H9w/hMpwf3ltmk6wXR/kfrZs?= =?us-ascii?Q?W9Eo3NFfC3P9Fy6WDECdrS9KvVsR28zcN5x32M01Dd8SzjmLSxPuNfR4Nfbu?= =?us-ascii?Q?pCmysY5A11ar2j/PZD/AE1uPNfOCnFAlf9eFFwB5A9/KW2//IanLJV8svpY8?= =?us-ascii?Q?hLo+ahzN11Y9hInv6o05holhdAIT516H00pt+G8fBDS6lcrNdEinifG7FcZE?= =?us-ascii?Q?FlIg5liJuuRi7OTSEBRXZZAUNreC9zv+EKfFu+57a/QWunqgmCBY42MbT1/Y?= =?us-ascii?Q?iwSN4XHR5L0apOLeEi+QMk7n1NePwQS2cTfn0swV5zKjbjJlgHfQraEDC75u?= =?us-ascii?Q?+aWk9kb1HKwYDLIt22fq1Poa6Nj7JoIf1zYVhtucSi23fFtmF28xXFRpFotK?= =?us-ascii?Q?mTRUSQH938p6jrX8BTp0HzMGc2elE1MGdSbM6MEK3DQl0PSph5318k7oi/NQ?= =?us-ascii?Q?LFRS/Njyu7gr8PUGZdYMq+jrlOTFTTLEnzOSuc1qQ+Qvey97Of0KooayS8Gb?= =?us-ascii?Q?2IXOW1ZEGYg8Kviezq7byKLqTbXwuDlY83oNJunRoDgm7HQ0+VOLVVSB9+d4?= =?us-ascii?Q?+XA9MO9AwOxZtuc1Ky2vu6ntkk7WtOpwRrFdSIjSKDS5MSjY4h8JDeLnpWCY?= =?us-ascii?Q?dzkfJWf9y/BetCZYmU/phrSAXS907YP0EsaYoMF9U0XTXzdjC6IVStXCW8Tp?= =?us-ascii?Q?6M1ldcypt1F80WX7dXTFb8w9N2Oaa2QIy4x2NIbaxE4UI2X8KOxnmMrkZQB3?= =?us-ascii?Q?+TkuNswhHCqTrfFN9H2EVZpgzNGdt9L2NyQxeysO8jVZDVRaca7fGErynppW?= =?us-ascii?Q?ymfvt78MlxRAU84y7HexNqYYOiri+K0lpAbbj/xL91wnV8O9+8P9zGQzRSyU?= =?us-ascii?Q?vUGBTwGQHYla07zX4ZUtXI8CkVeZlLZp0RJuODjBDHsD+TTBbl7E9zNpROgx?= =?us-ascii?Q?+fZMSaqdYsR/+AFBMzWoJYHF9LRiFIGo0w3dlfSYNw3NzYHZsE71W8674sn+?= =?us-ascii?Q?4sUFLwtJHy4+iXXkFYj/J7WZU2omFw1VPYyvUvcV+ZpBQCrDDDdyvnfDLoEu?= =?us-ascii?Q?dmaelcuIhMlFCVb+EJwP2nA3MmZbOxiws8jjUAUMUFQEC8tyvbfNuMHbNrIR?= =?us-ascii?Q?0pj24XiqPXZbC+0F/mWsIjnOIpKXkEJy4DB/+u1J8j1OkNSC8Vop/bdKFn6D?= =?us-ascii?Q?e2pQWx3s2XZRW8U46HZaOmiaOSRmBNCExWgOsDMfispxyDOrWVc+O8sXBHF5?= =?us-ascii?Q?oJeYMFFSChjmp7LGUIyqdFKAjJaNyjzBeTjRboVBe+8ZNaiHuNhScLRnL5Kc?= =?us-ascii?Q?ZOqddnKl9Ql7dipnCz07SjT3xWPtCqHDNwf27gIE8fFUsnqC7amaat/3psZm?= =?us-ascii?Q?UF+zJqQ=3D?= 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)(1800799021)(36860700010)(82310400023)(376011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 09:16:53.4825 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0ffbd67-bcda-443d-fdc8-08dc90408f42 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: BL6PEPF0001AB56.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6210 Received-SPF: permerror client-ip=2a01:111:f403:2414::610; 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.148, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1718788658844100006 Content-Type: text/plain; charset="utf-8" Added the supported device list and an example command. Signed-off-by: Sai Pavan Boddu Reviewed-by: Edgar E. Iglesias --- docs/system/arm/xlnx-zynq.rst | 47 +++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + 2 files changed, 48 insertions(+) create mode 100644 docs/system/arm/xlnx-zynq.rst diff --git a/docs/system/arm/xlnx-zynq.rst b/docs/system/arm/xlnx-zynq.rst new file mode 100644 index 00000000000..419cc1aec8b --- /dev/null +++ b/docs/system/arm/xlnx-zynq.rst @@ -0,0 +1,47 @@ +Xilinx Zynq board (``xilinx-zynq-a9``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +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-Technic= al-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=3Dqspi + +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 =20 Emulated CPU architecture support =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.34.1