From owner-freebsd-hackers@freebsd.org Sun Oct 27 21:52:13 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 E50F01581F5 for ; Sun, 27 Oct 2019 21:52:13 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 471Wlw6XSfz4BxK for ; Sun, 27 Oct 2019 21:52:12 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb1-xb2a.google.com with SMTP id h202so3375777ybg.13 for ; Sun, 27 Oct 2019 14:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sjWUF5h0+ElpCbeu78oDhAsTOHBhPgwK4SslbkO4WQE=; b=kcKuiOCEfUc/AfPd/n45CLklUTdZIqDACMT/J/aBPNg17kHCcmatH7/2K109T4fLLm jqbXQH/69KnOEN5jQAoIvk0Typfse9CVUSGEPkgwE5jSaXXzigHvw07X5wpTT0Y1jTRy BRy3TWpptnZkLyaybP319x5I61tE/GePb++maBhBdZhzxp80nDNg3E5QdGpBmzIWZCqz k/KV4WjIqcd2IzGg5OxkGZEQOCrovwTgY94p4pMEnvBsx7Jh9aHbFjT0dhLYxAIF/Qh5 ItLsuQCXWZH3ZyaWOiyCJ8NlA+ReZld8yyAKoE7nWm2wiPYqSo3lBL8VE9x27G2CHkHn Cyyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sjWUF5h0+ElpCbeu78oDhAsTOHBhPgwK4SslbkO4WQE=; b=IiEicYes/Yp73FXdldorcXoeNC6VeNxMigV9KA+2b48mkVfobPXhlV5zgoQp0vnj3w cZFQoEtDIHm0WXsauqsXOqTFYhnlqtw1usxTfnRbXAWDTUEKXA53wV/cPoqmy4rPQjgD YOsdUl4Q5WFs9w0oXG7GpojAKaX509qvRlAPlQtGHrV+iWqtEIsBmeP1rfljbul9AGXc Ep0bMLnOMDPaZMhVg3Q2+QIMCEXJC+mxAxlZBFcI0/m0eFOZ7PdQEAw4YmJXgQ8IW47F u3V1zc7WyZt+hRAiLFyC894VVu+FmK4OLq15no3L7oshXB2BX4h0DSY2p5HotN5psqJV DfWQ== X-Gm-Message-State: APjAAAUq1+hcNNnKGJgDoUtaJJY5NpWZKUuMFt7n7aVdle14V4DbRNm+ RpcLCljfO0Kriow7gRBf/+I02zSJ4FVrAcwJIIudGaGoDpc= X-Google-Smtp-Source: APXvYqyQQztSoZocFWjRhMMvWpfWgD764B3pNrITV+LUZcl6uQjwEkbLcIVuBOhBr/8WZuknXsOBliUlq1xT/V/j9Rk= X-Received: by 2002:a25:1444:: with SMTP id 65mr10973344ybu.132.1572213131176; Sun, 27 Oct 2019 14:52:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:7b47:0:0:0:0:0 with HTTP; Sun, 27 Oct 2019 14:52:10 -0700 (PDT) In-Reply-To: <20191027214209.712d62ca@zeta.dino.sk> References: <20191027214209.712d62ca@zeta.dino.sk> From: Oliver Pinter Date: Sun, 27 Oct 2019 22:52:10 +0100 Message-ID: Subject: Re: UART driver as kld - how? To: Milan Obuch Cc: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 471Wlw6XSfz4BxK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=kcKuiOCE; dmarc=none; spf=pass (mx1.freebsd.org: domain of oliver.pinter@hardenedbsd.org designates 2607:f8b0:4864:20::b2a as permitted sender) smtp.mailfrom=oliver.pinter@hardenedbsd.org X-Spamd-Result: default: False [-4.31 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[a.2.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.81)[ip: (-9.56), ipnet: 2607:f8b0::/32(-2.40), asn: 15169(-2.05), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 21:52:14 -0000 On Sunday, October 27, 2019, Milan Obuch wrote: > 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... https://github.com/freebsd/freebsd/tree/master/share/examples/kld > > Regards, > Milan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >