From owner-freebsd-hackers@freebsd.org Fri Apr 19 19:31:08 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61FFC1576738 for ; Fri, 19 Apr 2019 19:31:08 +0000 (UTC) (envelope-from embaudarm@gmail.com) Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (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 77B1C8E4BB; Fri, 19 Apr 2019 19:31:07 +0000 (UTC) (envelope-from embaudarm@gmail.com) Received: by mail-oi1-x22b.google.com with SMTP id v84so4651397oif.4; Fri, 19 Apr 2019 12:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XxTw1eN3uez754ZlON/qxieQFKedAP/sSSNGrZOHNuU=; b=AIstS+MGeNcILz00gCJV0HPz4pfIzpsLBFDkfZnpNLGMlQXaiVHrCCi7Umhw0Istb4 FK6/c9wHobWMgHfd0F6rMZAmdZb3Hof1kAn5oE47fXZ8RbFP4Vil7OzMRqhCIrzog6sj kn4gvpxPv9jUtCatuTX9o0DEdq0cdrVfwDeJt3myWzsFui+Fze3+awTvk0Mow6rMQMGu wveAYxSm2e+0A6G4rIMJUV0CNbVB7Vv5Kq51LyFOhTROdeRT957J+RwaQnGzBp/cdZWh nYXrYGTauiAl/spRMskSabF62ejQgAUKpiW+gtYmzMec/CuV3hSoC3hKRpbgN5HTfLhp 3clA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XxTw1eN3uez754ZlON/qxieQFKedAP/sSSNGrZOHNuU=; b=HieHMysnqK3ZMR4rQnviXRLi1uRYi6ACgRQuGX8wdmRBJy4Tx3J5SiYKTwDHRvdOy6 Sertag/HzmAA2xDgZgaYZyMbF7UjmHJIWOC9UAYd3FLUWitW+zz+GcDZvst8BkiIoNpc b2zX/36n8I4p1/Bk3H8mXLN31vYfn3er9NFyD9Q3bCRxu+bOiyhqqirBoibFtYlJS+5b oNyR1pRDdpYY6HMnzUkoSvOdpfG51+p3SrJXXAniGvWhIp/RPi+WLYWgw5VxsDzEGm9j I5s4S00KY3fUac0zJFO8LXjctid5r41Rsf166Xez2DIH8Tt39nyOpn2stjxIidpRrxzy N/3A== X-Gm-Message-State: APjAAAW39ceL7G/33B4InKHg4guXRd7qrj1QNa15eCQK0grhFJYUMQFI UOCfQiSGcD2vOKruM/7x0E3Ri5dzFm+l6JEzICzR36oD X-Google-Smtp-Source: APXvYqwdLz1oGd6xqTFs6aDEAEXcVZkmhybC9luP5RIYwGybWg8FeDpqGc2KhjS2mzcVJLOCrBdk4ecgmujYEyWOzgU= X-Received: by 2002:aca:ad8e:: with SMTP id w136mr2871654oie.109.1555702266332; Fri, 19 Apr 2019 12:31:06 -0700 (PDT) MIME-Version: 1.0 References: <173b3741db8be891cff8b7005b2058a416d43115.camel@freebsd.org> In-Reply-To: <173b3741db8be891cff8b7005b2058a416d43115.camel@freebsd.org> From: Lee D Date: Fri, 19 Apr 2019 15:29:57 -0400 Message-ID: Subject: Re: What code loads kernel modules at boot? To: Ian Lepore Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 77B1C8E4BB X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=AIstS+MG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of embaudarm@gmail.com designates 2607:f8b0:4864:20::22b as permitted sender) smtp.mailfrom=embaudarm@gmail.com X-Spamd-Result: default: False [-5.68 / 15.00]; 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)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.78)[-0.780,0]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[b.2.2.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]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.89)[ip: (-9.02), ipnet: 2607:f8b0::/32(-3.12), asn: 15169(-2.25), country: US(-0.06)]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] 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: Fri, 19 Apr 2019 19:31:08 -0000 On Wed, Apr 17, 2019 at 11:04 PM Ian Lepore wrote: > > The bulk of the module-loading code (the arch-independent part of it) > is in src/stand/common/module.c. There is also archsw.arch_loadaddr, > which figures out where to put the modules (handling arch-specific > things like alignment requirements). > > For some reason, I thought Zynq used u-boot. That would allow using > either ubldr or the arm uefi loader (depending on how old the u-boot > is); those are just flavors of loader(8) that would get you module > handling and all the other loader goodness. > > -- Ian > I think I sent this incorrectly the first time, so here it is again. Zynq does indeed have u-boot as a booting method, but back when I started this project I made the decision to write my own boot loader for various reasons (expediency and customization). So I am not using u-boot or loader(8), and have to prepare everything for the kernel startup myself. Lee