On 5/26/10 11:44 AM, Arne Georg Gleditsch wrote:
+#define MSR_GS_BASE 0xc0000101
#include <arch/mmio_conf.h>
+static inline __attribute__((always_inline)) void set_gs_base(uint64_t base) +{
- /* Make sure %gs is a valid descriptor */
- __asm__ volatile (
"mov %%ds, %%ax\n\tmov %%ax, %%gs" ::: "eax");
- /* Set base */
- __asm__ volatile (
"wrmsr" :: "A"(base), "c"(MSR_GS_BASE));
+}
This also breaks on all non-AMD platforms.
I think we should move all of this code to some AMD specific directory (northbridge or cpu) before applying these changes.
Comments?