Changeset 5a4fef9 in mainline for kernel/arch


Ignore:
Timestamp:
2009-11-16T21:24:28Z (16 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18baf9c0
Parents:
5f678b1c (diff), 9c70ed6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merged head changes to this branch

Location:
kernel/arch
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/mm/page.h

    r5f678b1c r5a4fef9  
    177177#define PFERR_CODE_ID           (1 << 4)
    178178
    179 static inline int get_pt_flags(pte_t *pt, size_t i)
     179static inline unsigned int get_pt_flags(pte_t *pt, size_t i)
    180180{
    181181        pte_t *p = &pt[i];
  • kernel/arch/amd64/src/cpu/cpu.c

    r5f678b1c r5a4fef9  
    130130        CPU->arch.vendor = VendorUnknown;
    131131        if (has_cpuid()) {
    132                 cpuid(0, &info);
     132                cpuid(INTEL_CPUID_LEVEL, &info);
    133133
    134134                /*
     
    150150                }
    151151                               
    152                 cpuid(1, &info);
     152                cpuid(INTEL_CPUID_STANDARD, &info);
    153153                CPU->arch.family = (info.cpuid_eax >> 8) & 0xf;
    154154                CPU->arch.model = (info.cpuid_eax >> 4) & 0xf;
  • kernel/arch/ia32/include/cpu.h

    r5f678b1c r5a4fef9  
    5050#include <arch/pm.h>
    5151#include <arch/asm.h>
     52#include <arch/cpuid.h>
    5253
    5354typedef struct {
     
    5657        unsigned int model;
    5758        unsigned int stepping;
     59        cpuid_feature_info fi;
     60
    5861        tss_t *tss;
    5962       
  • kernel/arch/ia32/include/cpuid.h

    r5f678b1c r5a4fef9  
    6363
    6464struct __cpuid_feature_info {
    65         unsigned                        : 23;
     65        unsigned      : 11;
     66        unsigned sep  :  1;
     67        unsigned      : 11;
    6668        unsigned mmx  :  1;
    6769        unsigned fxsr :  1;
  • kernel/arch/ia32/include/mm/page.h

    r5f678b1c r5a4fef9  
    146146#define PFERR_CODE_RSVD         (1 << 3)       
    147147
    148 static inline int get_pt_flags(pte_t *pt, size_t i)
     148static inline unsigned int get_pt_flags(pte_t *pt, size_t i)
    149149{
    150150        pte_t *p = &pt[i];
  • kernel/arch/ia32/src/boot/boot.S

    r5f678b1c r5a4fef9  
    8585        pse_supported:
    8686       
    87         bt $(INTEL_SEP), %edx
    88         jc sep_supported
    89        
    90                 movl $sep_msg, %esi
    91                 jmp error_halt
    92        
    93         sep_supported:
    94 
    9587#include "vesa_prot.inc"
    9688
     
    225217        .asciz "Page Size Extension not supported. System halted."
    226218
    227 sep_msg:
    228         .asciz "SYSENTER/SYSEXIT not supported. System halted."
  • kernel/arch/ia32/src/cpu/cpu.c

    r5f678b1c r5a4fef9  
    9292void cpu_arch_init(void)
    9393{
    94         cpuid_feature_info fi;
    9594        cpuid_extended_feature_info efi;
    9695        cpu_info_t info;
     
    102101        CPU->fpu_owner = NULL;
    103102       
    104         cpuid(1, &info);
     103        cpuid(INTEL_CPUID_STANDARD, &info);
    105104       
    106         fi.word = info.cpuid_edx;
     105        CPU->arch.fi.word = info.cpuid_edx;
    107106        efi.word = info.cpuid_ecx;
    108107       
    109         if (fi.bits.fxsr)
     108        if (CPU->arch.fi.bits.fxsr)
    110109                fpu_fxsr();
    111110        else
    112111                fpu_fsr();
    113112       
    114         if (fi.bits.sse) {
     113        if (CPU->arch.fi.bits.sse) {
    115114                asm volatile (
    116115                        "mov %%cr4, %[help]\n"
     
    122121        }
    123122       
    124         /* Setup fast SYSENTER/SYSEXIT syscalls */
    125         syscall_setup_cpu();
     123        if (CPU->arch.fi.bits.sep) {
     124                /* Setup fast SYSENTER/SYSEXIT syscalls */
     125                syscall_setup_cpu();
     126        }
    126127}
    127128
     
    132133        CPU->arch.vendor = VendorUnknown;
    133134        if (has_cpuid()) {
    134                 cpuid(0, &info);
     135                cpuid(INTEL_CPUID_LEVEL, &info);
    135136
    136137                /*
     
    150151                        CPU->arch.vendor = VendorIntel;
    151152               
    152                 cpuid(1, &info);
     153                cpuid(INTEL_CPUID_STANDARD, &info);
    153154                CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f;
    154155                CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f;
  • kernel/arch/ia32/src/proc/scheduler.c

    r5f678b1c r5a4fef9  
    6161            SP_DELTA];
    6262       
    63         /* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */
    64         write_msr(IA32_MSR_SYSENTER_ESP, kstk);
     63        if (CPU->arch.fi.bits.sep) {
     64                /* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */
     65                write_msr(IA32_MSR_SYSENTER_ESP, kstk);
     66        }
    6567       
    6668        /* Set kernel stack for CPL3 -> CPL0 switch via interrupt */
  • kernel/arch/ia32/src/userspace.c

    r5f678b1c r5a4fef9  
    7070                "movl %[uarg], %%eax\n"
    7171               
    72                 /* %ebx is defined to hold pcb_ptr - set it to 0 */
    73                 "xorl %%ebx, %%ebx\n"
     72                /* %edi is defined to hold pcb_ptr - set it to 0 */
     73                "xorl %%edi, %%edi\n"
    7474               
    7575                "iret\n"
  • kernel/arch/mips32/include/mm/page.h

    r5f678b1c r5a4fef9  
    141141#include <arch/exception.h>
    142142
    143 static inline int get_pt_flags(pte_t *pt, size_t i)
     143static inline unsigned int get_pt_flags(pte_t *pt, size_t i)
    144144{
    145145        pte_t *p = &pt[i];
  • kernel/arch/ppc32/include/mm/page.h

    r5f678b1c r5a4fef9  
    131131#include <arch/interrupt.h>
    132132
    133 static inline int get_pt_flags(pte_t *pt, size_t i)
     133static inline unsigned int get_pt_flags(pte_t *pt, size_t i)
    134134{
    135135        pte_t *p = &pt[i];
Note: See TracChangeset for help on using the changeset viewer.