Changeset dd4d6b0 in mainline for arch/amd64/include


Ignore:
Timestamp:
2006-02-06T23:47:47Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37b451f7
Parents:
40ca402
Message:

Basic amd syscall support.

Location:
arch/amd64/include
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/asm.h

    r40ca402 rdd4d6b0  
    189189}
    190190
     191/** Write to MSR */
     192static inline void write_msr(__u32 msr, __u64 value)
     193{
     194        __asm__ volatile (
     195                "wrmsr;" : : "c" (msr),
     196                "a" ((__u32)(value)),
     197                "d" ((__u32)(value >> 32))
     198                );
     199}
     200
     201static inline __native read_msr(__u32 msr)
     202{
     203        __u32 ax, dx;
     204
     205        __asm__ volatile (
     206                "rdmsr;" : "=a"(ax), "=d"(dx) : "c" (msr)
     207                );
     208        return ((__u64)dx << 32) | ax;
     209}
     210
    191211
    192212/** Enable local APIC
  • arch/amd64/include/cpu.h

    r40ca402 rdd4d6b0  
    3838#define AMD_NXE_FLAG    11
    3939
     40/* MSR registers */
     41#define AMD_MSR_STAR    0xc0000081
     42#define AMD_MSR_LSTAR   0xc0000082
     43#define AMD_MSR_SFMASK  0xc0000084
     44
    4045#ifndef __ASM__
    4146
  • arch/amd64/include/pm.h

    r40ca402 rdd4d6b0  
    4040
    4141#define NULL_DES        0
     42/* Warning: Do not reorder next items, unless you look into syscall.c!!! */
    4243#define KTEXT_DES       1
    4344#define KDATA_DES       2
    44 #define UTEXT_DES       3
    45 #define UDATA_DES       4
     45#define UDATA_DES       3
     46#define UTEXT_DES       4
    4647#define KTEXT32_DES     5
     48/* EndOfWarning */
    4749#define TSS_DES         6
    4850
Note: See TracChangeset for help on using the changeset viewer.