Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106107467
D30357.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30357.diff
View Options
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -735,10 +735,6 @@
b abort
END(abort)
- .align 3
-init_pt_va:
- .quad pagetable /* XXX: Keep page tables VA */
-
.section .init_pagetable, "aw", %nobits
.align PAGE_SHIFT
/*
@@ -773,8 +769,6 @@
el2_pagetable:
.space PAGE_SIZE
- .globl init_pt_va
-
.align 4
initstack:
.space (PAGE_SIZE * KSTACK_PAGES)
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -742,35 +742,13 @@
pmap->pm_stats.resident_count -= count;
}
-static pt_entry_t *
-pmap_early_page_idx(vm_offset_t l1pt, vm_offset_t va, u_int *l1_slot,
- u_int *l2_slot)
-{
- pt_entry_t *l2;
- pd_entry_t *l1;
-
- l1 = (pd_entry_t *)l1pt;
- *l1_slot = (va >> L1_SHIFT) & Ln_ADDR_MASK;
-
- /* Check locore has used a table L1 map */
- KASSERT((l1[*l1_slot] & ATTR_DESCR_MASK) == L1_TABLE,
- ("Invalid bootstrap L1 table"));
- /* Find the address of the L2 table */
- l2 = (pt_entry_t *)init_pt_va;
- *l2_slot = pmap_l2_index(va);
-
- return (l2);
-}
-
static vm_paddr_t
pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va)
{
- u_int l1_slot, l2_slot;
- pt_entry_t *l2;
-
- l2 = pmap_early_page_idx(l1pt, va, &l1_slot, &l2_slot);
+ vm_paddr_t pa_page;
- return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET));
+ pa_page = arm64_address_translate_s1e1r(va) & PAR_PA_MASK;
+ return (pa_page | (va & PAR_LOW_MASK));
}
static vm_offset_t
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -228,7 +228,6 @@
extern vm_paddr_t dmap_phys_max;
extern vm_offset_t dmap_max_addr;
extern vm_offset_t vm_max_kernel_address;
-extern vm_offset_t init_pt_va;
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 12:47 PM (11 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15604847
Default Alt Text
D30357.diff (1 KB)
Attached To
Mode
D30357: Clean up early arm64 pmap code
Attached
Detach File
Event Timeline
Log In to Comment