From nobody Tue Sep 27 12:56:11 2022 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 4McKPR64sKz4cwTX; Tue, 27 Sep 2022 12:56:11 +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 4McKPR5ZJtz3Ngx; Tue, 27 Sep 2022 12:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664283371; 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=AGTsbEMC4C3rZpP+X3zeu1r2P4fiFB9kn13pj1Lroeo=; b=dvh9ssqR1MpB2d9svX9tG6LVdzIeB7wJZ9zBfrlDDLVDuNW9jWLu0Nl8LJAaAijB4eIjg0 R043iA+Piq5bgsSvxYiXesIct1B6BOmCYACPHcKzEbDYk45zeHYJ9fSctq6APv/J5bO1hE dCSEDhDfBsVoD4sUoQRU/QrtwriLouT5mEp2fQqouJXPDnocpGf1T8A7tXm9hL9MyGuDAx eNCMILZepyutMT4XTs6zZYSm1ATpZOK4nRKT6hg2GXcBTrmlkbG5J12AC+8rA6MIuDHTXe +EHrQnVl0lEUQo/BrdcdSCemzJBmgqbZsx14BSdO7tGD9HspzMKL8N00ommm0g== 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 4McKPR4cqzz16x3; Tue, 27 Sep 2022 12:56:11 +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 28RCuBjh041341; Tue, 27 Sep 2022 12:56:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28RCuBX5041340; Tue, 27 Sep 2022 12:56:11 GMT (envelope-from git) Date: Tue, 27 Sep 2022 12:56:11 GMT Message-Id: <202209271256.28RCuBX5041340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 90ba897b910a - main - Rename arm64 pmap bootstrap to not be dmap specific 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90ba897b910ac098baad4fb02b58fc33bfdd1adc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664283371; 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=AGTsbEMC4C3rZpP+X3zeu1r2P4fiFB9kn13pj1Lroeo=; b=sOfUo3uQ+tf/Kry+rPRLmiUDn5KneiQ4nPJpQn3ArZj+P7s/EjfyHIvrweWrDUtA3esAEQ UShBw5G83PewGWXL9eWa+sYUFJjHwg/Oc5bHwNn5eV1rHEIx2VVPgtT+6Ury1eVs0vfaAP 0pJDpRl9xJdxhuVPjecOWmfSPP3eBwtLDg4B54CbjMTDHegSskWsgi0z9gFvwTtjIqgVCz WIuLAO8czZuhltrlVnqUTs8vRPRsqjMttw/KdM2ztLgHncTtrBNoRH9M8DO3nCjnRilyYX NkZJV2EyMdhhvtdyLxM8yuDTiF66fkM0pHh6MEv3YQZlFen3exhPg6b/enJYcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664283371; a=rsa-sha256; cv=none; b=VfPCjELTm/AEPZ92miMVi5IO4jKn03PvS9MIKJjhj46a7PwWd5spqQAZ1xHqZMjIi1WtP8 vo0xMZ7MtF+Pt5N1+vtXX/nsdM6kEPoCT7wOsnXd1BHXi6EnpK4xFtScGD8e64/U+I/DzF FVeYaO//rJujElXizVbUAkOzWJd+wBdSo1tBlTj86XQDo2582YIU4xehNyVAyZw94TWJNj UDbFajHMEB/1NsiFTtQLsOViEPIPnAXMXCWu8+RMGDphub/sYoqFJ56vFW3UiwNeXwiYqL 1MpWSB4oaj1NGoNLnyu/KoBYjnFTXQw9kBo2q3ZdS9OwNTJU47ItZ195spOwwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=90ba897b910ac098baad4fb02b58fc33bfdd1adc commit 90ba897b910ac098baad4fb02b58fc33bfdd1adc Author: Andrew Turner AuthorDate: 2022-09-26 12:18:28 +0000 Commit: Andrew Turner CommitDate: 2022-09-27 12:26:29 +0000 Rename arm64 pmap bootstrap to not be dmap specific This will be used by KASAN and possibly the kernel in general, rename so we aren't confused by it. Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/pmap.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 83eae8d5791f..bcb6e24cf4b3 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -817,7 +817,7 @@ pmap_early_vtophys(vm_offset_t va) } /* State of the bootstrapped DMAP page tables */ -struct dmap_bootstrap_state { +struct pmap_bootstrap_state { vm_offset_t va; vm_paddr_t pa; pt_entry_t *l1; @@ -830,7 +830,7 @@ struct dmap_bootstrap_state { }; static void -pmap_bootstrap_dmap_l0_table(struct dmap_bootstrap_state *state) +pmap_bootstrap_l0_table(struct pmap_bootstrap_state *state) { vm_paddr_t l1_pa; u_int l0_slot; @@ -863,13 +863,13 @@ pmap_bootstrap_dmap_l0_table(struct dmap_bootstrap_state *state) } static void -pmap_bootstrap_dmap_l1_table(struct dmap_bootstrap_state *state) +pmap_bootstrap_l1_table(struct pmap_bootstrap_state *state) { vm_paddr_t l2_pa; u_int l1_slot; /* Make sure there is a valid L0 -> L1 table */ - pmap_bootstrap_dmap_l0_table(state); + pmap_bootstrap_l0_table(state); /* Link the level 1 table to a level 2 table */ l1_slot = pmap_l1_index(state->va); @@ -897,13 +897,13 @@ pmap_bootstrap_dmap_l1_table(struct dmap_bootstrap_state *state) } static void -pmap_bootstrap_dmap_l2_table(struct dmap_bootstrap_state *state) +pmap_bootstrap_l2_table(struct pmap_bootstrap_state *state) { vm_paddr_t l3_pa; u_int l2_slot; /* Make sure there is a valid L1 -> L2 table */ - pmap_bootstrap_dmap_l1_table(state); + pmap_bootstrap_l1_table(state); /* Link the level 2 table to a level 3 table */ l2_slot = pmap_l2_index(state->va); @@ -927,7 +927,7 @@ pmap_bootstrap_dmap_l2_table(struct dmap_bootstrap_state *state) } static void -pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i) +pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) { u_int l2_slot; bool first; @@ -936,7 +936,7 @@ pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i) return; /* Make sure there is a valid L1 table */ - pmap_bootstrap_dmap_l1_table(state); + pmap_bootstrap_l1_table(state); MPASS((state->va & L2_OFFSET) == 0); for (first = true; @@ -962,7 +962,7 @@ pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i) } static void -pmap_bootstrap_dmap_l3_page(struct dmap_bootstrap_state *state, int i) +pmap_bootstrap_l3_page(struct pmap_bootstrap_state *state, int i) { u_int l3_slot; bool first; @@ -971,7 +971,7 @@ pmap_bootstrap_dmap_l3_page(struct dmap_bootstrap_state *state, int i) return; /* Make sure there is a valid L2 table */ - pmap_bootstrap_dmap_l2_table(state); + pmap_bootstrap_l2_table(state); MPASS((state->va & L3_OFFSET) == 0); for (first = true; @@ -1000,7 +1000,7 @@ static vm_offset_t pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_offset_t freemempos) { - struct dmap_bootstrap_state state; + struct pmap_bootstrap_state state; int i; dmap_phys_base = min_pa & ~L1_OFFSET; @@ -1019,13 +1019,13 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, /* Create L3 mappings at the start of the region */ if ((state.pa & L2_OFFSET) != 0) - pmap_bootstrap_dmap_l3_page(&state, i); + pmap_bootstrap_l3_page(&state, i); MPASS(state.pa <= physmap[i + 1]); if (L1_BLOCKS_SUPPORTED) { /* Create L2 mappings at the start of the region */ if ((state.pa & L1_OFFSET) != 0) - pmap_bootstrap_dmap_l2_block(&state, i); + pmap_bootstrap_l2_block(&state, i); MPASS(state.pa <= physmap[i + 1]); /* Create the main L1 block mappings */ @@ -1033,7 +1033,7 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, (physmap[i + 1] - state.pa) >= L1_SIZE; state.va += L1_SIZE, state.pa += L1_SIZE) { /* Make sure there is a valid L1 table */ - pmap_bootstrap_dmap_l0_table(&state); + pmap_bootstrap_l0_table(&state); MPASS((state.pa & L1_OFFSET) == 0); pmap_store(&state.l1[pmap_l1_index(state.va)], state.pa | ATTR_DEFAULT | ATTR_S1_XN | @@ -1043,17 +1043,17 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, MPASS(state.pa <= physmap[i + 1]); /* Create L2 mappings at the end of the region */ - pmap_bootstrap_dmap_l2_block(&state, i); + pmap_bootstrap_l2_block(&state, i); } else { while (state.va < DMAP_MAX_ADDRESS && (physmap[i + 1] - state.pa) >= L2_SIZE) { - pmap_bootstrap_dmap_l2_block(&state, i); + pmap_bootstrap_l2_block(&state, i); } } MPASS(state.pa <= physmap[i + 1]); /* Create L3 mappings at the end of the region */ - pmap_bootstrap_dmap_l3_page(&state, i); + pmap_bootstrap_l3_page(&state, i); MPASS(state.pa == physmap[i + 1]); if (state.pa > dmap_phys_max) {