From nobody Fri Jun 14 18:02:25 2024 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 4W16Ys1dHZz5PGFw; Fri, 14 Jun 2024 18:02: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 4W16Ys192yz478k; Fri, 14 Jun 2024 18:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718388145; 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=FPI7C0/sQ+DtsyVKlGETor0Rr+onY+kNa2EhNt77GGM=; b=Dffhl1FsD8jaLkP+RUYG8UYqJgR8rV+mRJaz4TIrLec5f7Iwl20657A9DibAYLFmnipOz8 XEUC2pDpTlCfN4/Z24Cs/p19AxGxS9p0cyIEN3h+1oSS6WC0lhdbQSHdEQny6B2IYdGiCe xXbC/HIghYRZYa0odLplkCkMzYGSKrOvIm9aHmzWGDkTLgWOb0LK5HBHaL6HVmXSm/Irh9 1NveUuaHCjfH9j3zw/xjcSpai9ANm7BWsdTEYK8ii9yCSxD4VkdI/eZwGpiLxxuVQPlGCe 2Hj3NFn48jYJJmYKa7Tbjql+quXUlJHifEp8SEURH4xEDBkugxqoVgb3kSyRVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718388145; a=rsa-sha256; cv=none; b=mZGVSpIvOMkxXEXuuGIr3XMPtRwZPhWKTzb54kvAFjxfBm/Mc7cSmVNoo18FrxJGdHyZmJ nzPRmvPxaE1XVcoVFYOIwXKXoCelSWACvxavzRBsysWirakveensbGr+dQ+YU81NAzibbP QRSIH+zn8l9yWZWJN5I+m3bqYh/sbX+15GTWkV3rEqSH78oQYw/0PoSZLrUxfbiYB8RsJt Z5GVMGvQyScRkdGbWJItIxSvIga/IczzVbzD2+E2B802PHCaiFB56njYSSZUxu9RqIUiwx byiuNXF7FVFZaaholJxP2ocjvNpST2nimoNjOlsk2GIkH2GGaHtyWaiIFdLXBw== 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=1718388145; 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=FPI7C0/sQ+DtsyVKlGETor0Rr+onY+kNa2EhNt77GGM=; b=xOR0eRdrRCQsN1a7zhOMir2UEuO2GYFG2fR6t+Isu9sCAzbWSykyRQTj/DHoRwSgnNxdbM 4F22cxAXfzi2jUJjmEmsWkJ4r9bicTWxAtLizLk/3yjej1UdqfYMVQlQV1XO7Qc6NLVwID LKrRIVvWNloml+zpaCe9JSvxpsBgyeVZK+hlktbbWtbB3kEg6hMPK64RRToBSM+1MzdVYt yVNoWLVNrfukED/0q/nPc/1dMygxWmLQ0c508S9RPTLw+3/kyyxPfu0vfpqQqCR3CViNq7 G+uNIb+GE9EvbfQWFZiRHG4JEMKqOtaY5zkuywU+p2+xzwFYORWnS42X1ozyqw== 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 4W16Ys0m2BzX2t; Fri, 14 Jun 2024 18:02:25 +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 45EI2PVC052943; Fri, 14 Jun 2024 18:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45EI2PuH052940; Fri, 14 Jun 2024 18:02:25 GMT (envelope-from git) Date: Fri, 14 Jun 2024 18:02:25 GMT Message-Id: <202406141802.45EI2PuH052940@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: 0e4e77072f65 - main - riscv: adjust physmem reservation 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 0e4e77072f65df71644140e41229b868a73f3371 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0e4e77072f65df71644140e41229b868a73f3371 commit 0e4e77072f65df71644140e41229b868a73f3371 Author: Mitchell Horne AuthorDate: 2024-06-14 17:57:28 +0000 Commit: Mitchell Horne CommitDate: 2024-06-14 18:02:05 +0000 riscv: adjust physmem reservation Make sure we do this BEFORE pmap_bootstrap(). Reviewed by: markj, jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45325 --- sys/riscv/riscv/machdep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index f44056f56212..1e2b96acd3a1 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -549,10 +549,6 @@ initriscv(struct riscv_bootparams *rvbp) cache_setup(); - /* Bootstrap enough of pmap to enter the kernel proper */ - kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); - #ifdef FDT /* * XXX: Unconditionally exclude the lowest 2MB of physical memory, as @@ -565,6 +561,11 @@ initriscv(struct riscv_bootparams *rvbp) physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif + + /* Bootstrap enough of pmap to enter the kernel proper */ + kernlen = (lastaddr - KERNBASE); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); + physmem_init_kernel_globals(); /* Establish static device mappings */