new cache_as_ram support

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2232 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Yinghai Lu
2006-04-03 20:38:34 +00:00
parent ffb7d8a31a
commit 9a791dffea
58 changed files with 2271 additions and 554 deletions

View File

@@ -4,15 +4,13 @@
/* Optimized generic x86 assembly for clearing memory */
static inline void clear_memory(void *addr, unsigned long size)
{
asm volatile(
"1: \n\t"
"movl %0, (%1)\n\t"
"addl $4, %1\n\t"
"subl $4, %2\n\t"
"jnz 1b\n\t"
: /* No outputs */
: "a" (0), "D" (addr), "c" (size)
);
asm volatile(
"cld \n\t"
"rep stosl\n\t"
: /* No outputs */
: "a" (0), "D" (addr), "c" (size>>2)
);
}
#endif /* CPU_X86_MEM_H */