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>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6558 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Kerry She 2011-05-07 08:37:38 +00:00 committed by Kerry She
parent 8c4b499ba5
commit 1c85c7794e
2 changed files with 22 additions and 18 deletions

View File

@ -572,7 +572,6 @@ static __inline__ __attribute__((always_inline)) void _mm_stream_si128_fs (void
data = (__m128i) __builtin_ia32_lddqu ((char const *)__B); data = (__m128i) __builtin_ia32_lddqu ((char const *)__B);
_mm_stream_si128_fs2 (__A, data); _mm_stream_si128_fs2 (__A, data);
} }
#endif
static __inline__ __attribute__((always_inline)) void _mm_clflush_fs (void *__A) static __inline__ __attribute__((always_inline)) void _mm_clflush_fs (void *__A)
{ {
@ -589,6 +588,7 @@ static __inline __attribute__(( __always_inline__)) void _mm_sfence (void)
{ {
__builtin_ia32_sfence (); __builtin_ia32_sfence ();
} }
#endif
static __inline__ __attribute__((always_inline)) void __stosb(unsigned char *dest, unsigned char data, size_t count) static __inline__ __attribute__((always_inline)) void __stosb(unsigned char *dest, unsigned char data, size_t count)
{ {

View File

@ -401,6 +401,8 @@ LibAmdSimNowEnterDebugger (
}; };
((VOID (*)(VOID)) (size_t) opcode) (); // call the function ((VOID (*)(VOID)) (size_t) opcode) (); // call the function
} }
#ifdef __SSE3__
VOID F10RevDProbeFilterCritical ( VOID F10RevDProbeFilterCritical (
IN PCI_ADDR PciAddress, IN PCI_ADDR PciAddress,
IN UINT32 PciRegister IN UINT32 PciRegister
@ -416,23 +418,7 @@ VOID F10RevDProbeFilterCritical (
_mm_mfence (); _mm_mfence ();
__writemsr (0xC001001F, msrsave); __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 VOID
LibAmdCLFlush ( LibAmdCLFlush (
IN UINT64 Address, IN UINT64 Address,
@ -450,7 +436,25 @@ LibAmdCLFlush (
} }
RestoreHwcr (hwcrSave); 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);
}
/*---------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------*/
/** /**