]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMemRep1.c
d41d4bcf310311669b66ac66a9fa0b0c194eba70
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / EfiZeroMemRep1.c
1 /*++
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 EfiZeroMemRep1.c
15
16 Abstract:
17
18 This is the code that uses rep stosb ZeroMem service
19
20 --*/
21
22 #include "Tiano.h"
23
24 VOID
25 EfiCommonLibZeroMem (
26 IN VOID *Buffer,
27 IN UINTN Count
28 )
29 /*++
30
31 Input: VOID *Buffer - Pointer to buffer to clear
32 UINTN Count - Number of bytes to clear
33
34 Output: None.
35
36 Saves:
37
38 Modifies:
39
40 Description: This function uses rep stosb to zero memory.
41
42 --*/
43 {
44 __asm {
45 mov ecx, Count
46 xor eax, eax
47 mov edi, Buffer
48 rep stosb
49 Exit:
50 }
51 }
52