aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/agesa/f14/Include
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2012-04-05 13:20:50 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-04-12 00:17:35 +0200
commit392562263858011ef898e377477124f5f66b1302 (patch)
tree8ac8b9437dbfb6f5f56af42f0163a006b0f745e8 /src/vendorcode/amd/agesa/f14/Include
parent9bcdbf8eaa0c73d130ba555163f89fa1759c8c99 (diff)
S3 code in vendorcode folder.
Change the ExecuteFinalHltInstruction to assembly code. so we can make sure the code can run stackless. Change-Id: I783ced6cf7c5bc29c12a37aef29077e610d8957d Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/622 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/vendorcode/amd/agesa/f14/Include')
-rw-r--r--src/vendorcode/amd/agesa/f14/Include/gcc-intrin.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f14/Include/gcc-intrin.h b/src/vendorcode/amd/agesa/f14/Include/gcc-intrin.h
index 58438b9815..5ce3ee3d23 100644
--- a/src/vendorcode/amd/agesa/f14/Include/gcc-intrin.h
+++ b/src/vendorcode/amd/agesa/f14/Include/gcc-intrin.h
@@ -305,7 +305,9 @@ static __inline__ __attribute__((always_inline)) unsigned long __readcr0(void)
unsigned long value;
__asm__ __volatile__ (
"mov %%cr0, %[value]"
- : [value] "=a" (value));
+ : [value] "=a" (value)
+ :
+ : "memory");
return value;
}
@@ -379,6 +381,7 @@ static __inline__ __attribute__((always_inline)) void __writecr0(unsigned long D
"mov %%eax, %%cr0"
:
: "a" (Data)
+ : "memory"
);
}
@@ -508,13 +511,16 @@ static __inline__ __attribute__((always_inline)) void __debugbreak(void)
__asm__ __volatile__ ("int3");
}
+static __inline__ __attribute__((always_inline)) void __invd(void)
+{
+ __asm__ __volatile__ ("invd");
+}
static __inline__ __attribute__((always_inline)) void __wbinvd(void)
{
__asm__ __volatile__ ("wbinvd");
}
-
static __inline__ __attribute__((always_inline)) void __lidt(void *Source)
{
__asm__ __volatile__("lidt %0" : : "m"(*(short*)Source));