From nobody Tue Feb 01 18:00:24 2022 X-Original-To: dev-commits-src-main@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 8C75419BCB1D; Tue, 1 Feb 2022 18:00:25 +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 4JpCQJ6Q1tz3kJH; Tue, 1 Feb 2022 18:00:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643738425; 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=FzqiNbOD2XFDmxJ2UAjKeFbmop/nOazhKvsckTjcABQ=; b=Pe2PGLDfqeuc4H7p+ugaIg4xzyAtvICBIipa9/5NLWtOx+RWgQqdd8moz5FOmI4ZdYe7lO tAg62rjyaSKpiM1bxhxTV/c7+QAJ7BrtycRuWmFXKV3az8zho45ff3AOW9L+mIjohNFB4c wdUKHR8KnlvvV0YP4jhMaNpVnE6ax8hv2fPR93WJ59aWlk3KFthugir2XPMwsEoX5y3lwo 2t4GL+gzUIlE/svA3BZlJgdSb0h+EO98udrCvTfvWo2M50fAzL//Yhrs+ju47QaK1OhWdw fUefI+ejKX9KsptzgV/rT3NeekDaw8uHBL8JUOtdPWVJdZdWpTuw/qH1A23EyA== 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 4C0A614F7E; Tue, 1 Feb 2022 18:00:24 +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 211I0O3c063499; Tue, 1 Feb 2022 18:00:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211I0OEq063498; Tue, 1 Feb 2022 18:00:24 GMT (envelope-from git) Date: Tue, 1 Feb 2022 18:00:24 GMT Message-Id: <202202011800.211I0OEq063498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4e1bc961bb44 - main - arm64, riscv: handle RB_KDB List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e1bc961bb4467f074e48aa6e710ccd1aa7f2888 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643738425; 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=FzqiNbOD2XFDmxJ2UAjKeFbmop/nOazhKvsckTjcABQ=; b=sLMV7sh79plhSNj0QQ5TkGJuiXpkWxgCxTHdwgAKnxr8YqXevZP6JPJaINtjQrPyWFMRzD VRrRjxgofjh2QA1mBPNzxOHyhSoOSKj77ViepP8aO9GR3EptQaWtsHCt/+6n5p1pBM6/Kp sugwDklhWMA8Iu7phLTDNE2QhPUmEQxk6y6awrX4YyQXg/QUJhyBVFxSK8ADXbfG3HLhSU VrVwV3KGqcJyGD0Z7itCUpyf+btGSgTiPuSF3TZ3u+oyp1a9HUNC2CLXZryQo7wIa+JOdV DjJi19+LW84qU0aqhv9tSwpGKCZPlLBaWk+G+mbZh0x6+J/+YCMXqhJdbfDG1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643738425; a=rsa-sha256; cv=none; b=w19OQ45FdOeJtzvHoZgoo659WegNrViCf9Knnnelr3c+yJUt1T/RyC6/UYcI0YCeTaRO9O Tdo+ymn+TW/3FPElcH9X7nLVp+WBcriyFr2PMGdsmphlstlyCe7sKmLtZvr41skn7OLrSF xhFKjr2xgGZbH5uWmptrfMgqepCZNsUbRlEyi4nnzkjgJKGSxCM4gBYyTwYrDfIaneUWRH UtmElQ8bq/S0rEKqKHHX+IAOd8T8QdiF9Qnt8XWGWyaOWy8qgSm+0w+xtUPli8ceDRT+U3 58C3hCsY/2ZnTKNcOGF+veCvD91dp5fzRxmqY5LLSfZzRnDFGAmjktbc/Xc1hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4e1bc961bb4467f074e48aa6e710ccd1aa7f2888 commit 4e1bc961bb4467f074e48aa6e710ccd1aa7f2888 Author: Mitchell Horne AuthorDate: 2022-02-01 17:58:07 +0000 Commit: Mitchell Horne CommitDate: 2022-02-01 17:59:54 +0000 arm64, riscv: handle RB_KDB This allows entering the debugger at the earliest possible time, if the '-d' argument is passed to the kernel. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34120 --- sys/arm64/arm64/machdep.c | 4 ++++ sys/riscv/riscv/machdep.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 950169e50a5f..0e4aa657bb13 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -855,6 +855,10 @@ initarm(struct arm64_bootparams *abp) dbg_init(); kdb_init(); +#ifdef KDB + if ((boothowto & RB_KDB) != 0) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif pan_enable(); kcsan_cpu_init(0); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 340b94448cfe..c27baa2d4a95 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -587,6 +587,10 @@ initriscv(struct riscv_bootparams *rvbp) mutex_init(); init_param2(physmem); kdb_init(); +#ifdef KDB + if ((boothowto & RB_KDB) != 0) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); +#endif env = kern_getenv("kernelname"); if (env != NULL)