diff --git a/src/vendorcode/amd/pi/Lib/amdlib.c b/src/vendorcode/amd/pi/Lib/amdlib.c index cc742301d6..ec3b53b017 100644 --- a/src/vendorcode/amd/pi/Lib/amdlib.c +++ b/src/vendorcode/amd/pi/Lib/amdlib.c @@ -45,6 +45,8 @@ #include #include +#include +#include #include #include #include @@ -488,8 +490,8 @@ LibAmdCLFlush ( address32 = 0; hwcrSave = SetFsBase (Address); for (Index = 0; Index < Count; Index++){ - _mm_mfence (); - _mm_clflush_fs (&address32 [Index * 64]); + mfence(); + clflush(&address32 [Index * 64]); } RestoreHwcr (hwcrSave); } diff --git a/src/vendorcode/amd/pi/Makefile.inc b/src/vendorcode/amd/pi/Makefile.inc index e62abab9cd..b00e38b2e8 100644 --- a/src/vendorcode/amd/pi/Makefile.inc +++ b/src/vendorcode/amd/pi/Makefile.inc @@ -88,7 +88,6 @@ AGESA_INC += -I$(src)/commonlib/include AGESA_INC += -I$(src)/commonlib/bsd/include AGESA_INC += -I$(VBOOT_SOURCE)/firmware/include -AGESA_CFLAGS += -march=amdfam10 -mno-3dnow AGESA_CFLAGS += -Wno-pragma-pack AGESA_CFLAGS += -fno-strict-aliasing -D__LIBAGESA__ CFLAGS_x86_32 += $(AGESA_CFLAGS)