Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106943194
D17340.id48524.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
D17340.id48524.diff
View Options
Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -1098,9 +1098,11 @@
vm_offset_t va;
pt_entry_t *pte;
uint64_t cr4;
+ u_long res;
int i;
KERNend = *firstaddr;
+ res = atop(KERNend - (vm_paddr_t)kernphys);
if (!pti)
pg_g = X86_PG_G;
@@ -1120,10 +1122,8 @@
vm_phys_add_seg(KPTphys, KPTphys + ptoa(nkpt));
virtual_avail = (vm_offset_t) KERNBASE + *firstaddr;
-
virtual_end = VM_MAX_KERNEL_ADDRESS;
-
/*
* Enable PG_G global pages, then switch to the kernel page
* table from the bootstrap page table. After the switch, it
@@ -1142,6 +1142,7 @@
/*
* Initialize the kernel pmap (which is statically allocated).
+ * Count bootstrap data as being resident.
*/
PMAP_LOCK_INIT(kernel_pmap);
kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys);
@@ -1149,6 +1150,8 @@
kernel_pmap->pm_ucr3 = PMAP_NO_CR3;
CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */
TAILQ_INIT(&kernel_pmap->pm_pvchunk);
+ kernel_pmap->pm_stats.resident_count = res;
+ kernel_pmap->pm_stats.wired_count = res;
kernel_pmap->pm_flags = pmap_flags;
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 8:13 PM (3 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15726381
Default Alt Text
D17340.id48524.diff (1 KB)
Attached To
Mode
D17340: Initialize kernel pmap resident_count and resident_wired.
Attached
Detach File
Event Timeline
Log In to Comment