xref: /reactos/ntoskrnl/ke/i386/zeropage.S (revision 51258295)
1/*
2 * PROJECT:     ReactOS Kernel
3 * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE:     Fast zeroing of pages
5 * COPYRIGHT:   Copyright 2021 Jérôme Gardou <jerome.gardou@reactos.org>
6 */
7
8#include <asm.inc>
9
10/* FUNCTIONS ****************************************************************/
11.code
12
13/*
14 * VOID
15 * FASTCALL
16 * KeZeroPages(void* ptr, ULONG Size)
17 */
18PUBLIC @KeZeroPages@8
19FUNC @KeZeroPages@8
20    FPO 0, 0, 0, 0, 0, FRAME_FPO
21
22    push edi
23    mov edi, ecx
24    mov ecx, edx
25    shr ecx, 2
26    xor eax, eax
27    rep stosd
28    pop edi
29    ret
30ENDFUNC
31
32END
33