projects
/
coreboot.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
4849ed289a074c8dd43026a97a5c0615aa3e6d54
[coreboot.git]
/
src
/
include
/
cpu
/
x86
/
mem.h
1
#ifndef CPU_X86_MEM_H
2
#define CPU_X86_MEM_H
3
4
/* Optimized generic x86 assembly for clearing memory */
5
static inline void clear_memory(void *addr, unsigned long size)
6
{
7
asm volatile(
8
"1: \n\t"
9
"movl %0, (%1)\n\t"
10
"addl $4, %1\n\t"
11
"subl $4, %2\n\t"
12
"jnz 1b\n\t"
13
: /* No outputs */
14
: "a" (0), "D" (addr), "c" (size)
15
);
16
}
17
18
#endif /* CPU_X86_MEM_H */