diff options
author | Tom Rini <trini@ti.com> | 2014-11-24 12:00:00 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-24 12:00:00 -0500 |
commit | 746667f1e56bf08d03e66a178df3c4f4f6c806e1 (patch) | |
tree | e42c7fd72cb1ef97a5a05a73b06b3cd2fc118147 /arch/x86/include/asm/processor.h | |
parent | 6c016485a685b5cdac28edb25147311a3e88d51f (diff) | |
parent | fe5b9b447c6eea3873833b1f3ba15c9854aa2ef8 (diff) | |
download | u-boot-imx-746667f1e56bf08d03e66a178df3c4f4f6c806e1.zip u-boot-imx-746667f1e56bf08d03e66a178df3c4f4f6c806e1.tar.gz u-boot-imx-746667f1e56bf08d03e66a178df3c4f4f6c806e1.tar.bz2 |
Merge git://git.denx.de/u-boot-x86
Conflicts:
arch/x86/cpu/Makefile
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index bb3172f..b9317cb 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -30,4 +30,25 @@ enum { #define X86_GDT_SIZE (X86_GDT_NUM_ENTRIES * X86_GDT_ENTRY_SIZE) +#ifndef __ASSEMBLY__ + +#define PORT_RESET 0xcf9 + +static inline __attribute__((always_inline)) void cpu_hlt(void) +{ + asm("hlt"); +} + +static inline ulong cpu_get_sp(void) +{ + ulong result; + + asm volatile( + "mov %%esp, %%eax" + : "=a" (result)); + return result; +} + +#endif /* __ASSEMBLY__ */ + #endif |