Author: kerry Date: Sat May 7 10:37:38 2011 New Revision: 6558 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6558
Log: 1. move _mm_clflush_fs() to __SSE3__ block, because __builtin_ia32_sfence() is the sse built-in function 2. move the Amd Lib functions using sse build-in functions to __SSE3__ block
Signed-off-by: Kerry She kerry.she@amd.com Acked-by: Marc Jones marcj303@gmail.com
Modified: trunk/src/vendorcode/amd/agesa/Include/gcc-intrin.h trunk/src/vendorcode/amd/agesa/Lib/amdlib.c
Modified: trunk/src/vendorcode/amd/agesa/Include/gcc-intrin.h ============================================================================== --- trunk/src/vendorcode/amd/agesa/Include/gcc-intrin.h Sat May 7 10:33:14 2011 (r6557) +++ trunk/src/vendorcode/amd/agesa/Include/gcc-intrin.h Sat May 7 10:37:38 2011 (r6558) @@ -572,7 +572,6 @@ data = (__m128i) __builtin_ia32_lddqu ((char const *)__B); _mm_stream_si128_fs2 (__A, data); } -#endif
static __inline__ __attribute__((always_inline)) void _mm_clflush_fs (void *__A) { @@ -589,6 +588,7 @@ { __builtin_ia32_sfence (); } +#endif
static __inline__ __attribute__((always_inline)) void __stosb(unsigned char *dest, unsigned char data, size_t count) {
Modified: trunk/src/vendorcode/amd/agesa/Lib/amdlib.c ============================================================================== --- trunk/src/vendorcode/amd/agesa/Lib/amdlib.c Sat May 7 10:33:14 2011 (r6557) +++ trunk/src/vendorcode/amd/agesa/Lib/amdlib.c Sat May 7 10:37:38 2011 (r6558) @@ -401,6 +401,8 @@ }; ((VOID (*)(VOID)) (size_t) opcode) (); // call the function } + +#ifdef __SSE3__ VOID F10RevDProbeFilterCritical ( IN PCI_ADDR PciAddress, IN UINT32 PciRegister @@ -416,23 +418,7 @@ _mm_mfence (); __writemsr (0xC001001F, msrsave); } -VOID -IdsOutPort ( - IN UINT32 Addr, - IN UINT32 Value, - IN UINT32 Flag - ) -{ - __outdword ((UINT16) Addr, Value); -} -VOID -StopHere ( - VOID - ) -{ - VOLATILE UINTN x = 1; - while (x); -} + VOID LibAmdCLFlush ( IN UINT64 Address, @@ -450,7 +436,25 @@ } RestoreHwcr (hwcrSave); } +#endif //__SSE3__
+VOID +IdsOutPort ( + IN UINT32 Addr, + IN UINT32 Value, + IN UINT32 Flag + ) +{ + __outdword ((UINT16) Addr, Value); +} +VOID +StopHere ( + VOID + ) +{ + VOLATILE UINTN x = 1; + while (x); +}
/*---------------------------------------------------------------------------------------*/ /**