diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-02-25 13:40:49 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-02-25 13:40:49 +0000 |
commit | a7acc515bd10f24d400b3aa3a3c807076cac4f95 (patch) | |
tree | b177d2bff5eceb06ce47f90b743ddcf04ffa80fd /src/lib | |
parent | 3a54ac9c362d2e5900edd7e1c459ffea1e29df64 (diff) | |
download | coreboot-a7acc515bd10f24d400b3aa3a3c807076cac4f95.tar.xz |
HAVE_MOVNTI really means SSE2. Also add sfence in the MOVNTI case.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5159 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ramtest.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c index 4f00030b89..6268aaa6cd 100644 --- a/src/lib/ramtest.c +++ b/src/lib/ramtest.c @@ -1,6 +1,8 @@ static void write_phys(unsigned long addr, unsigned long value) { -#if CONFIG_HAVE_MOVNTI + // Assembler in lib/ is very ugly. But we properly guarded + // it so let's obey this one for now +#if CONFIG_SSE2 asm volatile( "movnti %1, (%0)" : /* outputs */ @@ -50,6 +52,10 @@ static void ram_fill(unsigned long start, unsigned long stop) } write_phys(addr, addr); }; +#if CONFIG_SSE2 + // Needed for movnti + asm volatile ("sfence" ::: "memory"); +#endif /* Display final address */ #if CONFIG_USE_PRINTK_IN_CAR printk_debug("%08lx\r\nDRAM filled\r\n", addr); |