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?

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected]http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to