mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Shuffle pagezero() into the same location as in sys/i386/i386/pmap.c.
This commit is contained in:
parent
54d1bac5bb
commit
0ad6375395
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196723
@ -148,9 +148,7 @@ IdlePDPT: .long 0 /* phys addr of kernel PDPT */
|
||||
.globl KPTphys
|
||||
#endif
|
||||
KPTphys: .long 0 /* phys addr of kernel page tables */
|
||||
#ifdef SMP
|
||||
.globl gdtset
|
||||
#endif
|
||||
gdtset: .long 0 /* GDT is valid */
|
||||
|
||||
.globl proc0kstack
|
||||
|
@ -328,22 +328,6 @@ CTASSERT(KERNBASE % (1 << 24) == 0);
|
||||
|
||||
|
||||
|
||||
static __inline void
|
||||
pagezero(void *page)
|
||||
{
|
||||
#if defined(I686_CPU)
|
||||
if (cpu_class == CPUCLASS_686) {
|
||||
#if defined(CPU_ENABLE_SSE)
|
||||
if (cpu_feature & CPUID_SSE2)
|
||||
sse2_pagezero(page);
|
||||
else
|
||||
#endif
|
||||
i686_pagezero(page);
|
||||
} else
|
||||
#endif
|
||||
bzero(page, PAGE_SIZE);
|
||||
}
|
||||
|
||||
void
|
||||
pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type)
|
||||
{
|
||||
@ -3343,6 +3327,22 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
|
||||
PMAP_UNLOCK(dst_pmap);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
pagezero(void *page)
|
||||
{
|
||||
#if defined(I686_CPU)
|
||||
if (cpu_class == CPUCLASS_686) {
|
||||
#if defined(CPU_ENABLE_SSE)
|
||||
if (cpu_feature & CPUID_SSE2)
|
||||
sse2_pagezero(page);
|
||||
else
|
||||
#endif
|
||||
i686_pagezero(page);
|
||||
} else
|
||||
#endif
|
||||
bzero(page, PAGE_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
* pmap_zero_page zeros the specified hardware page by mapping
|
||||
* the page into KVM and using bzero to clear its contents.
|
||||
|
Loading…
Reference in New Issue
Block a user