diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 6af498019e5d..b03f1dc2e828 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -350,6 +350,20 @@ intreg_i586_bzero: ret #endif /* I586_CPU && defined(DEV_NPX) */ +ENTRY(sse2_pagezero) + pushl %ebx + movl 8(%esp),%ecx + movl %ecx,%eax + addl $4096,%eax + xor %ebx,%ebx +1: + movnti %ebx,(%ecx) + addl $4,%ecx + cmpl %ecx,%eax + jne 1b + popl %ebx + ret + ENTRY(i686_pagezero) pushl %edi pushl %ebx diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 4fe29d3ad352..526c39017879 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -93,6 +93,7 @@ void i586_bzero(void *buf, size_t len); int i586_copyin(const void *udaddr, void *kaddr, size_t len); int i586_copyout(const void *kaddr, void *udaddr, size_t len); void i686_pagezero(void *addr); +void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); int is_physical_memory(vm_offset_t addr); vm_paddr_t kvtop(void *addr);