From patchwork Tue Jun 6 20:23:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Paratey X-Patchwork-Id: 9769929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 246EB6034B for ; Tue, 6 Jun 2017 20:26:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DEBB284A8 for ; Tue, 6 Jun 2017 20:26:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2F02284DA; Tue, 6 Jun 2017 20:26:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BE80284A8 for ; Tue, 6 Jun 2017 20:25:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIL0d-0007lV-Qp; Tue, 06 Jun 2017 20:23:23 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIL0c-0007lP-Mv for xen-devel@lists.xenproject.org; Tue, 06 Jun 2017 20:23:22 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 0D/25-03058-A3F07395; Tue, 06 Jun 2017 20:23:22 +0000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d.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1496780598!72462982!1 X-Originating-IP: [104.47.42.78] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36131 invoked from network); 6 Jun 2017 20:23:20 -0000 Received: from mail-by2nam03on0078.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) (104.47.42.78) by server-9.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 6 Jun 2017 20:23:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=soMgviYcrjYvh+UJRmmd/02FJtVUj9S/UDCkYebWKbE=; b=l20qxqIgsxHyyWFtQk3njrE4Hdu5B+K3AZTKyV5QKkPCdYK8DYdqMYHp4q/u41YcWavQTxhW9NieVSfCk5eqn+sg1hflDbSHJZjxha3lD6TZch89NWraFft6pw+74hwLE3KOQcNdVQFZOmsFOfHaKMG4kS+gzHijqzMn9Vj1nC4= Received: from nsfw.amd.com (165.204.78.1) by BN6PR12MB1858.namprd12.prod.outlook.com (10.175.97.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Tue, 6 Jun 2017 20:23:15 +0000 From: Swapnil Paratey To: xen-devel@lists.xenproject.org Date: Tue, 6 Jun 2017 15:23:02 -0500 Message-Id: <1496780582-9050-1-git-send-email-swapnil.paratey@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR1701CA0007.namprd17.prod.outlook.com (10.172.58.17) To BN6PR12MB1858.namprd12.prod.outlook.com (10.175.97.23) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR12MB1858: X-MS-Office365-Filtering-Correlation-Id: 6acd2813-21f2-45b8-9111-08d4ad19ddf5 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BN6PR12MB1858; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1858; 3:E+skf2EELJfVNVWwLxZ+dJ7ct/f1T++jSpINg3WGdpfig/RWLDgNgJbmIlu520J32nDNlkA/wwOBjtWQPjJEpjCLn9liTfqskVeYQUx5mvTUfTJs9Tj8MhBEFD2M2CxythO+NIGFulLZqeH0O7JPvUi9jaR0J7hpZkSCwYjlR6mrNItOj7S2aOC+NnxkJKscxie+ihzITeYbgnVmkUS30HAwNawrAo4+hZWM4+dGD2wcRZ5kVyTVVDSSSQmuehSmjwwsCdqdUy0Bvf2XyyKvS4XxVpr4dHIUULiawZkg+0DdI7ywAl9I3S3XxAQPXkXzKYZdB0q5SXt47xpcn+ocNAI/ekrfu1FjTk4GqCKAceg=; 25:ISA9AdicES5lJPsq/T9ZymwqNelTtSmWwmk1LJvWhmq0D7XtRxp5xq/cfg8IA7Kp1VGHsIqjrqjG/EXlqF+QxhYyy7ibX3WlVaOP4zOi7g4e/BsXiphgEyPVq7xTRUAhSSAKBxFXkOB2VktHFxbA0YeLaKJy+wRJWkNDK+RZb9pELa8aam62c3n+DC4Wip1FUPtbDy8uxRFKkF64wzJ5uAdgg5/Jvtktf254e1ztZ35hAYahR1BtIlchl22kAcyys5Gv1pAh1QhYAWXZhNrCRu73ijp3CWvTKL1bHss8wNtPA37K2rWe+K0enM0v2L93w0p4u1C8xP1rOwHOZgtyW1psDrHjrlyn+xVWmy1WvNcuGYn5E/NI7kFUlnKjvmN9nURuNpWBjnD9NsEYjjvqTwMbOIeVlnz8SkFrY32/LW008yuts8s9Fmx9X0LpCJnE/rfx4FHXn59HMIXDXOzV3IT6V75EfEMz3SfMh84CUNA= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1858; 31:03zov0KDWEvoxdz5LDM8IbgJUPWMqwjVzzUe7H8DBHrfnB3/iT0hGewsmauFxP5xRucSdoOm+KplFgnH80ryQ/F3ZCDv264mFyRbvWVHDjtpqUXY9MrzT3ZG7gwOiJH4ZXE6cXA4Hni6xfYRQe+Gwmapk+0b3UXM7SBYxnOQKQ3BXNIehYUSndwleCz7zQK0dUijAZLrysi97nUckaJtWlxwHhWFoad+MlBG/K3eSJo=; 20:+/d4UYLaT4JZlztviQeZfjngKFolRZVvoZSXDZ+4X9hTooNcs+QKi6DVHhJhEQGLkWuKGxxa3NcJk8yGVOABv3mOgcVjYM7n2WNrVagrPHf3bfEhegYiRrcwZOQH2/nrGv66TZvPUdLuijevMfcuiWM/Jo+zO43mkk3UGAF3T28Xt8pBXH67H8Yf0IKq0vGAq+Ec1SdoBW7LlfOwy0mT7+kR2BW/VKrVhSgUSmnw7e7zVLSCp6Y9Cttn9tXEW1yycWmik//ezFiXX2XZ1YfcmSFNgbivDm5rqNDo4cZHgMStcWFilTXVCItauaF0dOE9DBIyR1uInMiRMN+3vOwybbaC7F+jbb3PqhOTChzg/RK/dYGUj8tWNNpJ5YgVLyLtPd8Rx4CVmShjM4XsahA1WpkLry2n7qpx5H3BAYOORk+cmrbEM8tVfhszApK9YFgrrMHGagHQ/PS49Q2FSGIPzINXLLHC3qWkaoZjiypBeOUGvAAN6Fk/8vbUd+Yd6zDn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1858; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1858; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1858; 4:xbYkhlEi0d0SSyCa7ynlj2pFDQxdCCVmgRU9sz3pHS?= =?us-ascii?Q?sZBIl7q7dlm6b017fZfgO0UopL0+iCfUPHJkzwTzIJA/Nbn8hGZMzsYoAY95?= =?us-ascii?Q?Vc9Z8ACNNS8/FXJzaeQpJDB9WyeZ7rDyqhjaQwQAr7hUpYpRUReS+Xl3eAhG?= =?us-ascii?Q?2W2mergM9Sc7pi8ET/c6ktaWo5rTNaSSTX+ALo1py2Cs2dzyL2NKlOi7siTH?= =?us-ascii?Q?U1cFhdFDGm8xTC+nYQs40GOTG55hDrQAUzPogeCal9mmKXLFh5d9knr0RfTc?= =?us-ascii?Q?2A+LJ+zucsieijkUmVXb3gnIHELN8muRNea0UyzNuUjyJiPkqGj6/Vq0+PLT?= =?us-ascii?Q?ztuBNEZgoAwbif3/B5MVUpH4AVFwov+9wcf2rb8nPh81Ix/7A/dTOU0d6IpU?= =?us-ascii?Q?nPlnzUaYBjWdLh0Flg7kulDvdh2/rxFWCzJverU8Vn6dj+XqOFNJXD8s3IzA?= =?us-ascii?Q?/ZpyDzUftabBuaAzRtmvlzkpCVLfg/tuMuO6LDmpnQC/RG5q9ZXq8EJ2fAM5?= =?us-ascii?Q?2l/7kDt7zBvKBYFk3v9XAcqoUNPBwE0pGovD3z73djQIpHlpH8nhCcuUPB1k?= =?us-ascii?Q?7bRdtP1zfHEgScb3fRK+mQ14oD4dQK39czi3Oh6QCeM29CCUnKHpQy7yMIlg?= =?us-ascii?Q?eRU8BHKz3LMqhvcZnupT6roWuyFSnBazZuy+C9BYKq+dwbti9TMtRiixMaEp?= =?us-ascii?Q?1ST1GJ/D5exd4/2UdtTEYTio/Vrx5GWdv0SxfyVsjoDHIcU/HdMcjAyzDVDY?= =?us-ascii?Q?au8zdKMgp3GrL5Fo7qVxND9qNn+esih77IIa5HwIOEXOJfot6iMZVDPVga1p?= =?us-ascii?Q?HsFXrEWHwO7uUAnUuUpnLjISqz/eMR6Y+skKodDbG/v76ZYZiO0HqT8RGRHl?= =?us-ascii?Q?34jH1DNyZxdx0piD3/CwjQFb5F10Qg5F7BTw/thgh+6fMpHKyGbkFTFYvuJj?= =?us-ascii?Q?N0ysa6NzAuCpQPUDGNV8xtq/e3qWZMlGLzztxL9dUNMZOUL0wABZiIvVCQ+W?= =?us-ascii?Q?4Czzu+OhikdaXEpx+PWAfw91+78ncXEmUEhbTR2f0oop0B94jTi92fszQ+nY?= =?us-ascii?Q?dS7IenKrtGAlXe4BeSSbFSH9dK7Gpy1X5UokBQsNTeRKAE7peVGUSlg2Vzd2?= =?us-ascii?Q?3SKwDYeT4Khf7AKJO0Ti4PspKJaLEg86dqYQXH2hTyFevLSYvmSmH2zkPCfj?= =?us-ascii?Q?mVlwjjWruHNpLZONwC0t1uKRCpAn7AqjpodTYCr3LCZDGFryBDE7mSfw=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39860400002)(39850400002)(39400400002)(39410400002)(39450400003)(66066001)(48376002)(2361001)(33646002)(110136004)(3846002)(38730400002)(53936002)(2351001)(2906002)(4326008)(6116002)(47776003)(6486002)(8666007)(50226002)(8676002)(81166006)(25786009)(36756003)(189998001)(50466002)(53416004)(42186005)(5003940100001)(5660300001)(50986999)(575784001)(86362001)(7736002)(6666003)(6916009)(305945005)(72206003)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1858; H:nsfw.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1858; 23:xFyc4ugWeZURaVe1N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mdTwhZnA2e6nhinytrIMcpeSSYWCjU6Rkg8AVp8Thp2jO/0u+i?= =?us-ascii?Q?SsPN9dR9v2XT2+EIvDqf4cUZzi90XxHMQtYLjKeQseSUggUCBfj8WhKGCvCv?= =?us-ascii?Q?On2mL80Wp6MeIWEc9jbKouClP0qlijY4hrYGG/C2okwP9D8kqPRS5l3YGgba?= =?us-ascii?Q?v+YUQWdjYVe90SDTkGB2DoNl4h7OrnS1I9zITj6FnH3b3hEMg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1858; 6:lgqxXMlqhwoiMj5LK59GZdffI96cPFOUi51hMsD2fEbioPul1C+l+0+Humf5TEwhzk42dNv/5cv8Y+3AJEGDlCptmeZE811L2IBLcF/lYlGvTO8/K4CnOHuLBmcZIo+pa9Ama02EvXiw8Btm6A6Vqi2QuMxlcrKmjZSTyyJFmbAtOqxe/10cgiDPXDS6bJb3pewgsF47ImmIcCosNXw2IsbYUhA3J2iXvH+Jaz/ac642FT6dWscOOYXMLAvEhfWi9Euc+8+3h+qSYmprCcfnf6M7gR2fFbCxQK+mihepphd/9ZJQTL+tl2+fQkTVDss8/Rk5ugNvxYpEOHHou++S4OjxnYn4ifgVbm6YIV75dV6P+o4QkQdWCCfZJwuxopFGpUXLagsXcY+7lNxia79DXs6AUW5jiTpKsw03uZj1soy0kRo1bBdYyjgEeCgVDa9krTzxFbDEoDoptJGnKkA1jFw0DRCd+g7Tr9ETrDQs/Gv61ls5OtJtpWKYcaXRmeFlaQNggBmz991NISUFJnwX6p1KOeocMn6lofi66oQ3jHo= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1858; 5:kzAPIFsQGxl132hIQCRQJHuSrPvPAUtE3OUuvTTc4qb4kkNotBvguNBR5QSzuW3XuCMxVwJUXcuLLOkAs7MATUW25DYedJuMMiqknxzEpR091hPazIP20J0cu9gIsHEwNE2lHCtMUlXyGXUP31h6F/cfCtjQUrrapxt4DTUfGVCvUgDfldBvxc+jWbf7R4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cjVNravBP5n5ChpQmGvq6QzAQUjeEvm8/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 20:23:15.7758 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1858 Cc: Swapnil Paratey , sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com Subject: [Xen-devel] [PATCH v9] ns16550: Add support for UART parameters to be specifed with name-value pairs X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add name=value parsing options for com1 and com2 to add flexibility in setting register values for MMIO UART devices. Maintain backward compatibility with previous positional parameter specfications. eg. com1=115200,8n1,0x3f8,4 eg. com1=115200,8n1,0x3f8,4,reg_width=4,reg_shift=2 eg. com1=baud=115200,parity=n,reg_width=4,reg_shift=2,irq=4 Signed-off-by: Swapnil Paratey Reviewed-by: Jan Beulich --- Changed since v8: * Combined bridge_bdf, device and port_bdf case statements inside parse_namevalue_pairs() for CONFIG_HAS_PCI macro Changed since v7: * Added CONFIG_HAS_PCI macros for bridge_bdf, device and port_bdf case statements inside parse_namevalue_pairs() that caused ARM build fails Changed since v6: * Changed '1' to bool true in bridge_bdf case statement for uart->ps_bdf_enable * Removed break for default case in switch block in parse_namevalue_pairs() Changed since v5: * Extended changelist for PATCH v4 and v5 * Removed const for name[12] in serial_param_var * Changed "ext_value" pointer to "value" double pointer in get_token() * Removed parenthesis in clock_hz case statement Changed since v4: * Changed max_serial_params to num_serial_params in enum e_serial_param_type * Changed *sp_name in struct serial_param_var to a 12 byte buffer * Removed sp_ prefix in sp_name in struct serial_param_var * Removed if ( name_val_pos ) check before while() loop in parse_positional() * Added blank lines for non-fall-through case blocks in switch statement inside parse_namevalue_pairs * Changed comparison of a bool with "true" for dev_set in io_base case. * Changed cmdline to com_console_options in ns16550_parse_port_config() * Changed io_base setting after pci device specification to give an error message instead of PARSE_ERR_RET * Removed config_parsed goto statements outside of error cleanup * Removed the full-stop (.) in sanity checks for reg_width at the end of ns16550_parse_port_config Changed since v3: * Changed subject/title of the patch Previous name: ns16550-Add-command-line-parsing-adjustments * Increased length of opt_com1 and opt_com2 buffers to 128 bytes. * Changed wrongly used bus:device:function to bus:device.function in xen-command-line.markdown * Using '-' instead of '_' for name-value pairs eg. reg-width instead of reg_width, stop-bits instead of stop_bits * Used __initconst for serial_param_var struct * Changed get_token_value function name to get_token * Values for name-value pairs in get_token are extracted only when a match is found in the table for valid name-value pairs * Removed intermediate return variable for get_token function and used it directly in the switch statement for setting UART configs in parse_namevalue_pairs Changed since v2: * Added name=value specification for com1 and com2 command line parameter input for UART devices Syntax: "com1=(positional parameters),(name-value parameters)" * Maintained previous positional specification for UART parameters * All parameters should be comma-separated Changed since v1: * Changed opt_com1 and opt_com2 array size to 64 (power of 2). * Added descriptions for reg_width and reg_shift in docs/misc/xen-command-line.markdown * Changed subject to ns16550 from 16550 for better tracking. --- docs/misc/xen-command-line.markdown | 38 ++++++ xen/common/kernel.c | 2 +- xen/drivers/char/ns16550.c | 249 +++++++++++++++++++++++++++++++++--- 3 files changed, 272 insertions(+), 17 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 44d9985..8c939c4 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -324,6 +324,44 @@ Both option `com1` and `com2` follow the same format. A typical setup for most situations might be `com1=115200,8n1` +In addition to the above positional specification for UART parameters, +name=value pair specfications are also supported. This is used to add +flexibility for UART devices which require additional UART parameter +configurations. + +The comma separation still delineates positional parameters. Hence, +unless the parameter is explicitly specified with name=value option, it +will be considered a positional parameter. + +The syntax consists of +com1=(comma-separated positional parameters),(comma separated name-value pairs) + +The accepted name keywords for name=value pairs are + * `baud` - accepts integer baud rate (eg. 115200) or `auto` + * `bridge`- Similar to bridge-bdf in positional parameters. + Used to determine the PCI bridge to access the UART device. + Notation is xx:xx.xx :. + * `clock-hz`- accepts large integers to setup UART clock frequencies. + Do note - these values are multiplied by 16. + * `data-bits` - integer between 5 and 8 + * `dev` - accepted values are `pci` OR `amt`. If this option + is used to specify if the serial device is pci-based. The io_base + cannot be specified when `dev=pci` or `dev=amt` is used. + * `io-base` - accepts integer which specified IO base port for UART registers + * `irq` - IRQ number to use + * `parity` - accepted values are same as positional parameters + * `port` - Used to specify which port the PCI serial device is located on + Notation is xx:xx.xx :. + * `reg-shift` - register shifts required to set UART registers + * `reg-width` - register width required to set UART registers + (only accepts 1 and 4) + * `stop-bits` - only accepts 1 or 2 for the number of stop bits + +The following are examples of correct specifications: +`com1=115200,8n1,0x3f8,4` +`com1=115200,8n1,0x3f8,4,reg_width=4,reg_shift=2` +`com1=baud=115200,parity=n,stop_bits=1,io_base=0x3f8,reg_width=4` + ### conring\_size > `= ` diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 8461871..e1ebb0b 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -49,7 +49,7 @@ static void __init assign_integer_param( static void __init _cmdline_parse(const char *cmdline) { - char opt[100], *optval, *optkey, *q; + char opt[128], *optval, *optkey, *q; const char *p = cmdline; const struct kernel_param *param; int bool_assert; diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index e4de3b4..6ab5ec3 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -38,11 +38,30 @@ * can be specified in place of a numeric baud rate. Polled mode is specified * by requesting irq 0. */ -static char __initdata opt_com1[30] = ""; -static char __initdata opt_com2[30] = ""; +static char __initdata opt_com1[128] = ""; +static char __initdata opt_com2[128] = ""; string_param("com1", opt_com1); string_param("com2", opt_com2); +enum serial_param_type { + baud, + clock_hz, + data_bits, + io_base, + irq, + parity, + reg_shift, + reg_width, + stop_bits, +#ifdef CONFIG_HAS_PCI + bridge_bdf, + device, + port_bdf, +#endif + /* List all parameters before this line. */ + num_serial_params +}; + static struct ns16550 { int baud, clock_hz, data_bits, parity, stop_bits, fifo_size, irq; u64 io_base; /* I/O port or memory-mapped I/O address. */ @@ -77,6 +96,32 @@ static struct ns16550 { #endif } ns16550_com[2] = { { 0 } }; +struct serial_param_var { + char name[12]; + enum serial_param_type type; +}; + +/* + * Enum struct keeping a table of all accepted parameter names for parsing + * com_console_options for serial port com1 and com2. + */ +static const struct serial_param_var __initconst sp_vars[] = { + {"baud", baud}, + {"clock-hz", clock_hz}, + {"data-bits", data_bits}, + {"io-base", io_base}, + {"irq", irq}, + {"parity", parity}, + {"reg-shift", reg_shift}, + {"reg-width", reg_width}, + {"stop-bits", stop_bits}, +#ifdef CONFIG_HAS_PCI + {"bridge", bridge_bdf}, + {"dev", device}, + {"port", port_bdf}, +#endif +}; + #ifdef CONFIG_HAS_PCI struct ns16550_config { u16 vendor_id; @@ -1083,26 +1128,73 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt, unsigned int idx) } #endif +/* + * Used to parse name value pairs and return which value it is along with + * pointer for the extracted value. + */ +static enum __init serial_param_type get_token(char *token, char **value) +{ + const char *param_name; + unsigned int i; + + param_name = strsep(&token, "="); + if ( param_name == NULL ) + return num_serial_params; + + /* Linear search for the parameter. */ + for ( i = 0; i < ARRAY_SIZE(sp_vars); i++ ) + { + if ( strcmp(sp_vars[i].name, param_name) == 0 ) + { + *value = token; + return sp_vars[i].type; + } + } + + return num_serial_params; +} + #define PARSE_ERR(_f, _a...) \ do { \ printk( "ERROR: " _f "\n" , ## _a ); \ return; \ } while ( 0 ) -static void __init ns16550_parse_port_config( - struct ns16550 *uart, const char *conf) +#define PARSE_ERR_RET(_f, _a...) \ + do { \ + printk( "ERROR: " _f "\n" , ## _a ); \ + return false; \ + } while ( 0 ) + + +static bool __init parse_positional(struct ns16550 *uart, char **str) { int baud; + const char *conf; + char *name_val_pos; - /* No user-specified configuration? */ - if ( (conf == NULL) || (*conf == '\0') ) + conf = *str; + name_val_pos = strchr(conf, '='); + + /* Finding the end of the positional parameters. */ + while ( name_val_pos > *str ) { - /* Some platforms may automatically probe the UART configuartion. */ - if ( uart->baud != 0 ) - goto config_parsed; - return; + /* Working backwards from the '=' sign. */ + name_val_pos--; + if ( *name_val_pos == ',' ) + { + *name_val_pos = '\0'; + name_val_pos++; + break; + } } + *str = name_val_pos; + /* When there are no positional parameters, we return from the function. */ + if ( conf == *str ) + return true; + + /* Parse positional parameters here. */ if ( strncmp(conf, "auto", 4) == 0 ) { uart->baud = BAUD_AUTO; @@ -1132,13 +1224,13 @@ static void __init ns16550_parse_port_config( if ( strncmp(conf, "pci", 3) == 0 ) { if ( pci_uart_config(uart, 1/* skip AMT */, uart - ns16550_com) ) - return; + return true; conf += 3; } else if ( strncmp(conf, "amt", 3) == 0 ) { if ( pci_uart_config(uart, 0, uart - ns16550_com) ) - return; + return true; conf += 3; } else @@ -1157,19 +1249,142 @@ static void __init ns16550_parse_port_config( conf = parse_pci(conf, NULL, &uart->ps_bdf[0], &uart->ps_bdf[1], &uart->ps_bdf[2]); if ( !conf ) - PARSE_ERR("Bad port PCI coordinates"); - uart->ps_bdf_enable = 1; + PARSE_ERR_RET("Bad port PCI coordinates"); + uart->ps_bdf_enable = true; } if ( *conf == ',' && *++conf != ',' ) { if ( !parse_pci(conf, NULL, &uart->pb_bdf[0], &uart->pb_bdf[1], &uart->pb_bdf[2]) ) - PARSE_ERR("Bad bridge PCI coordinates"); - uart->pb_bdf_enable = 1; + PARSE_ERR_RET("Bad bridge PCI coordinates"); + uart->pb_bdf_enable = true; } #endif + return true; +} + +static bool __init parse_namevalue_pairs(char *str, struct ns16550 *uart) +{ + char *token, *start = str; + char *param_value = NULL; + bool dev_set = false; + + if ( (str == NULL) || (*str == '\0') ) + return true; + + do + { + /* When no tokens are found, start will be NULL */ + token = strsep(&start, ","); + + switch ( get_token(token, ¶m_value) ) + { + case baud: + uart->baud = simple_strtoul(param_value, NULL, 0); + break; + + case clock_hz: + uart->clock_hz = simple_strtoul(param_value, NULL, 0) << 4; + break; + + case io_base: + if ( dev_set ) + { + printk(XENLOG_WARNING + "Can't use io_base with dev=pci or dev=amt options\n"); + break; + } + uart->io_base = simple_strtoul(param_value, NULL, 0); + break; + + case irq: + uart->irq = simple_strtoul(param_value, NULL, 0); + break; + + case data_bits: + uart->data_bits = simple_strtoul(param_value, NULL, 0); + break; + + case parity: + uart->parity = parse_parity_char(*param_value); + break; + + case stop_bits: + uart->stop_bits = simple_strtoul(param_value, NULL, 0); + break; + + case reg_shift: + uart->reg_shift = simple_strtoul(param_value, NULL, 0); + break; + + case reg_width: + uart->reg_width = simple_strtoul(param_value, NULL, 0); + break; + +#ifdef CONFIG_HAS_PCI + case bridge_bdf: + if ( !parse_pci(param_value, NULL, &uart->ps_bdf[0], + &uart->ps_bdf[1], &uart->ps_bdf[2]) ) + PARSE_ERR_RET("Bad port PCI coordinates\n"); + uart->ps_bdf_enable = true; + break; + + case device: + if ( strncmp(param_value, "pci", 3) == 0 ) + { + pci_uart_config(uart, 1/* skip AMT */, uart - ns16550_com); + dev_set = true; + } + else if ( strncmp(param_value, "amt", 3) == 0 ) + { + pci_uart_config(uart, 0, uart - ns16550_com); + dev_set = true; + } + break; + + case port_bdf: + if ( !parse_pci(param_value, NULL, &uart->pb_bdf[0], + &uart->pb_bdf[1], &uart->pb_bdf[2]) ) + PARSE_ERR_RET("Bad port PCI coordinates\n"); + uart->pb_bdf_enable = true; + break; +#endif + + default: + PARSE_ERR_RET("Invalid parameter: %s\n", token); + } + } while ( start != NULL ); + + return true; +} + +static void __init ns16550_parse_port_config( + struct ns16550 *uart, const char *conf) +{ + char com_console_options[128]; + char *str; + + /* No user-specified configuration? */ + if ( (conf == NULL) || (*conf == '\0') ) + { + /* Some platforms may automatically probe the UART configuartion. */ + if ( uart->baud != 0 ) + goto config_parsed; + return; + } + + strlcpy(com_console_options, conf, ARRAY_SIZE(com_console_options)); + str = com_console_options; + + /* parse positional parameters and get pointer for name-value pairs */ + if ( !parse_positional(uart, &str) ) + return; + + if ( !parse_namevalue_pairs(str, uart) ) + return; + config_parsed: /* Sanity checks. */ if ( (uart->baud != BAUD_AUTO) && @@ -1177,6 +1392,8 @@ static void __init ns16550_parse_port_config( PARSE_ERR("Baud rate %d outside supported range.", uart->baud); if ( (uart->data_bits < 5) || (uart->data_bits > 8) ) PARSE_ERR("%d data bits are unsupported.", uart->data_bits); + if ( (uart->reg_width != 1) && (uart->reg_width != 4) ) + PARSE_ERR("Accepted values of reg_width are 1 and 4 only"); if ( (uart->stop_bits < 1) || (uart->stop_bits > 2) ) PARSE_ERR("%d stop bits are unsupported.", uart->stop_bits); if ( uart->io_base == 0 )