From owner-freebsd-current@freebsd.org Sat Feb 1 14:55:52 2020 Return-Path: Delivered-To: freebsd-current@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 5A8441F8DD3 for ; Sat, 1 Feb 2020 14:55:52 +0000 (UTC) (envelope-from gsnb.gn@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 488xwl4tCZz4cyF for ; Sat, 1 Feb 2020 14:55:51 +0000 (UTC) (envelope-from gsnb.gn@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id c16so11677556ioh.6 for ; Sat, 01 Feb 2020 06:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=42ywrTxZXNkGj4Kvwj+qOtb2BJRFhPAFSemSr8wpx3c=; b=M58pC9eMdhlnHMrlPkuomZxfpFJ1bDIob71kM0lpaucpvW0KbLq+J/EZETaLMJWgaI jZvkfF6hXNIkE6D6ei1Egc4ws4OhXigB/nrZyKFaPHNyiO6/ofyn0nzzIre/2JoBT3KI mY8KRBo6ZPEvnbM+kNXOUB6ELOdKSu2n3qzlP+XZfpVkvW0jMlhrhEe01fXSHSPr6ObH JqZIwn7HisinMqgvJFPyg9/78XNy+JGkNTStGzP3y2+lTxn/trshXy6a1DzaWYbK2FeU k6E4z7TtN1kNmyPVVJ6u7rZ9rIiYLE+GX9QSXaNqUwy4WVVklIrdpZvGl6ZAlGt/4yz8 DTkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=42ywrTxZXNkGj4Kvwj+qOtb2BJRFhPAFSemSr8wpx3c=; b=LVbDK0eZ6944D3f07xixzryemZ2rk5o3s4kO+yUjkSQrTKD1vXPM51c2W9aUH+ZcPo I3fb2AsOn/VYPl+G3vnoXvRPZm+CRxsuovNJ3C36YRXykDz/ae/mT1Xou1x2ZkGgozuz bYlxqxeZB2nmEoaBoS2UO1cGwfQVdE3gyel9ItRUhPYfCFKt1sqVF4+P5+30D1KFNg/x g/505ZajcyYZCSe4zlBTTHM7c8c/szYi958ITr2g7zg4nWl2lXpDAZi0/ya5bH+hMGkn du6JmyjSrckBpyXma1naK8XbL5+s0laoPvRYcRW/kC4pY1udPI1fwK0jr93oD4JpWbFn LpZQ== X-Gm-Message-State: APjAAAUldOmjWHrOzppITpMJeqpEwnqjI3z7HwG8laJQfpiJV/rHLDDe ca8gp1/mC0Wxq9+vlm3AIqw+ZmxARdpOxWNYiNPZBQwn X-Google-Smtp-Source: APXvYqzvFslPhSnVRkrLgteI2+Jmxs9ro0Byw/wn5QykSGIN99GTqOXGwJRSZJ4Q9o9dQDNhA4KYveC0urgQog1UR1M= X-Received: by 2002:a02:cf2e:: with SMTP id s14mr12192767jar.124.1580568949757; Sat, 01 Feb 2020 06:55:49 -0800 (PST) MIME-Version: 1.0 From: Niteesh Date: Sat, 1 Feb 2020 20:25:38 +0530 Message-ID: Subject: OFWBUS: How does autoconfiguration work? To: freebsd-current@freebsd.org X-Rspamd-Queue-Id: 488xwl4tCZz4cyF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=M58pC9eM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gsnbgn@gmail.com designates 2607:f8b0:4864:20::d2f as permitted sender) smtp.mailfrom=gsnbgn@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-6.47), ipnet: 2607:f8b0::/32(-2.00), asn: 15169(-1.76), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[f.2.d.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]; 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-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Feb 2020 14:55:52 -0000 I am interested in adding autoconfiguration to one of my projects. The current drivers use lazy initialization, for example, the UART drivers initialize the hardware only during their first invocation. I would like to add a subsystem, that will read the DTB and call the appropriate drivers. I want to know how it is implemented in FreeBSD, I took a look at the code, but I am still couldn't figure out, when does FreeBSD start to parse the DTB, how does it fill up the device struct and few more. Can someone please explain how all this works with reference to code or point me to some documentation? Thanks, Niteesh