9a791dffea
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2232 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
16 lines
387 B
C
16 lines
387 B
C
#ifndef CPU_X86_MEM_H
|
|
#define CPU_X86_MEM_H
|
|
|
|
/* Optimized generic x86 assembly for clearing memory */
|
|
static inline void clear_memory(void *addr, unsigned long size)
|
|
{
|
|
asm volatile(
|
|
"cld \n\t"
|
|
"rep stosl\n\t"
|
|
: /* No outputs */
|
|
: "a" (0), "D" (addr), "c" (size>>2)
|
|
);
|
|
|
|
}
|
|
|
|
#endif /* CPU_X86_MEM_H */
|