From nobody Fri Jan 14 13:42:09 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D50A1940D0C; Fri, 14 Jan 2022 13:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jb2Xg1dnpz50hh; Fri, 14 Jan 2022 13:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642167731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+62r2oYg/hRhUIBj9vE7p+PyYwzSRcGuiWm1QPb6B3Q=; b=ami6BekEOWEi5Wq+jjeyMm58UIGM7Dbnuh8BXosm4fam9Sincl9ysl/ANmRm+sqH5Qfw1J dTSv7o+KW9l/4oRYDVXE0NdaBoV1YKWjVt2UbbI3MbwA6jOSnFi1xTv+/5uXRu7GdmPSZb l+IeFgYUqNVRcZlEZpJp6G0oO99uaqgFOKboPQa44VOMM3byPQmztRmTmLBSE0Qnz8kKFi 0qupLPgWy8QE8lZ94vfmpUvQjyvXIO73VKHR9R37fCPJ1eQm67KRov3ww6+bUvBF+Fewgd C9nvto+TXT6HZE3PJ3ZOgfuRsJ9WUW9HjJI07tOeBLa8Lu8m8xnIdX4tVXPr8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5BA514C61; Fri, 14 Jan 2022 13:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20EDg9ic034391; Fri, 14 Jan 2022 13:42:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EDg9KR034390; Fri, 14 Jan 2022 13:42:09 GMT (envelope-from git) Date: Fri, 14 Jan 2022 13:42:09 GMT Message-Id: <202201141342.20EDg9KR034390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 14f0497aa49b - stable/13 - loader: Add more bus name to pnpautoload List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14f0497aa49b1cee48407ba77a9c67e117ec8562 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642167731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+62r2oYg/hRhUIBj9vE7p+PyYwzSRcGuiWm1QPb6B3Q=; b=SBVTDd2AdRjDPtU7SoJ08Pij1M4Dc7ohz4iur7J6PYKydmFNhx9QqCsNtFU6+FwziRu7JP k9vDhZE+WdEYuWfeNYLh1EdLmFd4Dvr7gAMIsbAjnVTeB29Z/tyoolFsX680wkJps7rqvE wMwQvOs/4bxhdVodH6jJkooSrWvDEUBtrmcLchR4ShwZTaG3NWDWUWNUXQ6IWZ1RYaJPOu s9d1XWpKM+vAHjGF1xwsz2gSqgtqXxUx1V07yex20HllJeBMsDTz6cDet8osga69owEz9Z N+f5vwGEp4zoVK03knRH8QKI0P+Jx/CtC30CQgPpZolFfGhcfTgAHiKlzhiruA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642167731; a=rsa-sha256; cv=none; b=gy0YcKtX3aM9q6+oSnKN1c+QgAb+mGIXycAPH44V2TpaadwaCHuk34ZcdY+3AKxdn4/IoG lDNYK7ytVGPQkP+49SubCrDIx3issqfmNzBi0xlpJdESr30PBEZVXK3XfRigZhD9tyTj0K lxUKag2PU3uqDNsPWcrQ/Ipr1X9eQod6ZxXuZPd1XuDo4Z1hwAxANUS9/lDUoP0Pe6OWcN wy2UpI/MZKnDeRyS8Q4zKCn2GK0r6NlqXLNtXWADPwJxa8P6jq6NNpsQ9cfh1++4IdOj03 5EU5GLCs5Ew8eBXJHxbM4cdGzQMC6ccbpn8z2DCHS/X6IgIgRTQam4CcJp7fcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=14f0497aa49b1cee48407ba77a9c67e117ec8562 commit 14f0497aa49b1cee48407ba77a9c67e117ec8562 Author: Emmanuel Vadot AuthorDate: 2021-11-14 14:32:00 +0000 Commit: Emmanuel Vadot CommitDate: 2022-01-14 13:38:07 +0000 loader: Add more bus name to pnpautoload Add ofwbus, iicbus and spibus to pnpautoload so modules under those buses will be loaded. On my rockpro64 now : OK pnpautoload -v Autoloading modules for simplebus Using DTB provided by EFI at 0x8100000. Autoloading modules for ofwbus /boot/kernel/rk_spi.ko text=0x14b2 text=0xd4c data=0x4d0+0x8 syms=[0x8+0xa98+0x8+0x807] /boot/kernel/dwwdt.ko text=0x12e2 text=0x78c data=0x4c8+0x10 syms=[0x8+0x990+0x8+0x6e1] Autoloading modules for iicbus Autoloading modules for spibus /boot/kernel/mx25l.ko text=0x1613 text=0x114c data=0x6e8+0x8 syms=[0x8+0xa08+0x8+0x665] loading required module 'fdt_slicer' /boot/kernel/fdt_slicer.ko text=0x95e text=0x340 data=0x290 syms=[0x8+0x6c0+0x8+0x4a0] (cherry picked from commit 4c0c353d0e48d06f82cae16aba02e5923794ba98) --- stand/common/module.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index e6567c735f36..f28771396af0 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -446,7 +446,7 @@ command_pnpload(int argc, char *argv[]) #if defined(LOADER_FDT_SUPPORT) static void -pnpautoload_simplebus(void) { +pnpautoload_fdt_bus(const char *busname) { const char *pnpstring; const char *compatstr; char *pnpinfo = NULL; @@ -464,7 +464,7 @@ pnpautoload_simplebus(void) { pnplen += strlen(compatstr) + 1; asprintf(&pnpinfo, "compat=%s", compatstr); - module = mod_searchmodule_pnpinfo("simplebus", pnpinfo); + module = mod_searchmodule_pnpinfo(busname, pnpinfo); if (module) { error = mod_loadkld(module, 0, NULL); if (error) @@ -480,12 +480,15 @@ pnpautoload_simplebus(void) { struct pnp_bus { const char *name; - void (*load)(void); + void (*load)(const char *busname); }; struct pnp_bus pnp_buses[] = { #if defined(LOADER_FDT_SUPPORT) - {"simplebus", pnpautoload_simplebus}, + {"simplebus", pnpautoload_fdt_bus}, + {"ofwbus", pnpautoload_fdt_bus}, + {"iicbus", pnpautoload_fdt_bus}, + {"spibus", pnpautoload_fdt_bus}, #endif }; @@ -528,8 +531,8 @@ command_pnpautoload(int argc, char *argv[]) continue; } if (verbose) - printf("Autoloading modules for simplebus\n"); - pnp_buses[i].load(); + printf("Autoloading modules for %s\n", pnp_buses[i].name); + pnp_buses[i].load(pnp_buses[i].name); match = 1; } if (match == 0)