From nobody Mon May 20 04:08:33 2024 X-Original-To: dev-commits-src-all@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 4VjPFF70Jkz5LhH9; Mon, 20 May 2024 04:08:33 +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 4VjPFF6Fblz4CpB; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; 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=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=rzBc/NaY1CDCB2rHxDNJYn4LSIjL1LCPC6d5LJB+PmNqx7LVBsCoSBfRyGQk//0pSpgo7S jb7NyBL7aYXj9H1LhWMWXvaeiivMWczEwxr8cWpRpD/rIRsu1ZJxSImY/NkwIERn2Gi+Ql 2ZOP9yAlACFPfzdEDWSx5C20Sz8ilTS8+iGQXOrmZ7EDuUPS8CqgMna6OiD7IH9l3Pf1or iUIjLsfW2GAHMEw5AA0AxQkv5N06XjUtylxLszDTDtnIfZpL8C6D7XaIvJmTO2pxgreT6l YRyE5BkZCt0dX2UKPN8faRT8Je7jI9Prue1MQ21bChOXXA2gJNXIFgE73pUgFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178113; a=rsa-sha256; cv=none; b=yAFiX2CODov2XmJ8PzibTbrEwLF0dCtnB5G/iZgOdV/lxDQPo5wJhb79C+slkVlYIFXhml 52XeMlLXyf4UkiabTWvIj2IymH059nlCj3kzop6IIhSwpMf7y0iTCzN+1DTUqBibLHmCs7 HP3dLjZ8NFc+IfXtjvKL6vpmSAbUEW6ZEhbk3zIuZwAYRMhy9hQEBTN4DLjf9kPi7IyvEA OKZLBk/Y1ri93RNeqPstoGcI54JAiSGSNUTrvCHqCGPh2pG9pd5+KoULP68zrLRzOUBlcM W8PwggElx/HeuiDJgBeDcqxn3tEt1tKGPiSvl5JkSL/ddQvWsa9A3EXxPtG/6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; 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=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=sVVHgrd7XoQVpESPs6LlhVf0Ocvq0cpJuZhK4kPVm54FzCeUxocfWUNa67es4e5lt10l6e /GguQp4IxNqsF5kesSlCjkIPwO70eQXWdmO9MzPkkDslVtjXwdo+JsSxPS36pxRhufSZMU wn37dIYvX1TXgXiQsjxkZAbwh9rDrco+CMl0CSFsftTvPDRfvpT757XdoECk2TFMsCrRBa NypKGvwvPX79p0J9mRZQAlr/qg/ct8Nve7PhuPH+4yi6BnK0vWKifIWxDNrdIihiI/9OoQ d2a+nDSIMbA/j80G0t6DBmKIzc5iJmW4WZUXCFwk9suRboDq9dZSgGuUl3MZaw== 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 4VjPFF5rZwzNbh; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48Xv9081049; Mon, 20 May 2024 04:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48XEa081046; Mon, 20 May 2024 04:08:33 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:33 GMT Message-Id: <202405200408.44K48XEa081046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1d7bdae9ca3c - main - kboot: Move console, acpi and smbios init List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d7bdae9ca3ca821e93386d85e87de491471cad7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7bdae9ca3ca821e93386d85e87de491471cad7 commit 1d7bdae9ca3ca821e93386d85e87de491471cad7 Author: Warner Losh AuthorDate: 2024-05-19 16:41:52 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:40 +0000 kboot: Move console, acpi and smbios init Move the console probing to as early as possible. There's no real support for anything but hostcons, and setting it up early will show other error messages. ACPI and SMBIOS probing can be done just after we have the console, so move it there. This allows other parts of the early code to use info from that, as well as overriding and env vars set by these things on the command line (smbios data may be wrong during initial development phases as the automated way to populate per-board data may not be established, etc). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index e57446baa47d..ed5cad450000 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -342,16 +342,23 @@ main(int argc, const char **argv) heapbase = host_getmem(heapsize); setheap(heapbase, heapbase + heapsize); + /* + * Set up console so we get error messages. + */ + cons_probe(); + + /* + * Find acpi and smbios, if they exists. This allows command line and + * later scripts to override if necessary. + */ + find_acpi(); + find_smbios(); + /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); parse_file("host:/kboot.conf"); - /* - * Set up console. - */ - cons_probe(); - /* Initialize all the devices */ devinit(); @@ -394,13 +401,6 @@ main(int argc, const char **argv) memory_limits(); enumerate_memory_arch(); - /* - * Find acpi, if it exists - */ - find_acpi(); - - find_smbios(); - interact(); /* doesn't return */ return (0);