From owner-freebsd-hackers@freebsd.org Sun Oct 27 20:42:15 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79ED81A573E for ; Sun, 27 Oct 2019 20:42:15 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 471VCB2DMVz46Qr for ; Sun, 27 Oct 2019 20:42:13 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Sun, 27 Oct 2019 21:42:10 +0100 id 00F407D1.5DB60122.0000DADE Date: Sun, 27 Oct 2019 21:42:09 +0100 From: Milan Obuch To: freebsd-hackers@freebsd.org Subject: UART driver as kld - how? Message-ID: <20191027214209.712d62ca@zeta.dino.sk> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd11.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 471VCB2DMVz46Qr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-hackers@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-hackers@dino.sk X-Spamd-Result: default: False [-4.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dino.sk]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[72.65.245.84.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.96)[ip: (-8.30), ipnet: 84.245.64.0/18(-4.15), asn: 16160(-2.45), country: SK(0.08)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:16160, ipnet:84.245.64.0/18, country:SK]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2019 20:42:15 -0000 Hi, I am trying to create a driver for Xilinx' AXI UART Lite IP core. I can't find a way to do it as kld module. I started with uart_dev_cdnc.c, but I can't see how it is hooked into the kernel - or, better formulated, how can I created kld loadable module. As Zynq has uart_dev_cdnc driver for its PS UART, all necessary files are compiled into kernel, but how can I extend those modules tables to work with new driver too? You can ask why I want it this way, if I can put this into kernel... simply this would make development awkward - every change would mean recompile everything (or at least relinking kernel) and reboot. With kld, I can just rebuild the module, reinstall it, unload old/load new version and test. Other thing is, for any IP core I must first load hw design into PL part (FPGA bitstream, actually), there is simply no device without this step performed. Did anybody already create something similar? Any help/hint/pointer appreciated... Regards, Milan