Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8c15255 in mainline


Ignore:
Timestamp:
2011-08-18T21:32:56Z (10 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master
Children:
ac7f81d
Parents:
f4fa6d9
Message:

Add support for i486/vortex86 processor

Files:
11 edited
1 moved

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rf4fa6d9 r8c15255  
    7070@ "pentium4" Pentium 4
    7171@ "pentium3" Pentium 3
     72@ "i486" i486
    7273@ "core" Core Solo/Duo
    7374@ "athlon_xp" Athlon XP
  • kernel/arch/ia32/Makefile.inc

    rf4fa6d9 r8c15255  
    6464endif
    6565
     66ifeq ($(PROCESSOR),i486)
     67        CMN2 = -march=i486
     68endif
     69
    6670ifeq ($(PROCESSOR),core)
    6771        CMN2 = -march=prescott
  • kernel/arch/ia32/include/asm.h

    rf4fa6d9 r8c15255  
    311311}
    312312
     313#ifndef PROCESSOR_i486
    313314/** Write to MSR */
    314315NO_TRACE static inline void write_msr(uint32_t msr, uint64_t value)
     
    321322        );
    322323}
     324#endif
    323325
    324326NO_TRACE static inline uint64_t read_msr(uint32_t msr)
  • kernel/arch/ia32/include/atomic.h

    rf4fa6d9 r8c15255  
    121121        asm volatile (
    122122                "0:\n"
     123#ifndef PROCESSOR_i486
    123124                "pause\n"        /* Pentium 4's HT love this instruction */
     125#endif
    124126                "mov %[count], %[tmp]\n"
    125127                "testl %[tmp], %[tmp]\n"
  • kernel/arch/ia32/include/cycle.h

    rf4fa6d9 r8c15255  
    4040NO_TRACE static inline uint64_t get_cycle(void)
    4141{
     42#ifdef PROCESSOR_i486
     43        return 0;
     44#else
    4245        uint64_t v;
    4346       
     
    4851       
    4952        return v;
     53#endif
    5054}
    5155
  • kernel/arch/ia32/src/asm.S

    rf4fa6d9 r8c15255  
    405405        xorl %eax, %eax
    406406        cmpl $(GDT_SELECTOR(KTEXT_DES)), ISTATE_OFFSET_CS(%esp)
     407#ifdef PROCESSOR_i486
     408        jz 0f
     409        movl %eax, %ebp
     4100:
     411#else
    407412        cmovnzl %eax, %ebp
     413#endif
    408414
    409415        movl %ebp, ISTATE_OFFSET_EBP_FRAME(%esp)
  • kernel/arch/ia32/src/cpu/cpu.c

    rf4fa6d9 r8c15255  
    118118                );
    119119        }
    120        
     120
     121#ifndef PROCESSOR_i486
    121122        if (CPU->arch.fi.bits.sep) {
    122123                /* Setup fast SYSENTER/SYSEXIT syscalls */
    123124                syscall_setup_cpu();
    124125        }
     126#endif
    125127}
    126128
  • kernel/arch/ia32/src/proc/scheduler.c

    rf4fa6d9 r8c15255  
    6060        uintptr_t kstk = (uintptr_t) &THREAD->kstack[STACK_SIZE];
    6161       
     62#ifndef PROCESSOR_i486
    6263        if (CPU->arch.fi.bits.sep) {
    6364                /* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */
    6465                write_msr(IA32_MSR_SYSENTER_ESP, kstk - sizeof(istate_t));
    6566        }
     67#endif
    6668       
    6769        /* Set kernel stack for CPL3 -> CPL0 switch via interrupt */
  • kernel/arch/ia32/src/syscall.c

    rf4fa6d9 r8c15255  
    3939#include <arch/pm.h>
    4040
     41#ifndef PROCESSOR_i486
    4142/** Enable & setup support for SYSENTER/SYSEXIT */
    4243void syscall_setup_cpu(void)
     
    4950        write_msr(IA32_MSR_SYSENTER_EIP, (uint32_t) sysenter_handler);
    5051}
     52#endif
    5153
    5254/** @}
  • uspace/lib/c/arch/ia32/Makefile.common

    rf4fa6d9 r8c15255  
    2828
    2929CLANG_ARCH = i386
     30ifeq ($(PROCESSOR),i486)
     31GCC_CFLAGS += -march=i486 -fno-omit-frame-pointer
     32else
    3033GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer
     34endif
    3135
    3236ENDIANESS = LE
  • uspace/lib/c/arch/ia32/Makefile.inc

    rf4fa6d9 r8c15255  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
     30        arch/$(UARCH)/src/entry.S \
    3131        arch/$(UARCH)/src/entryjmp.s \
    3232        arch/$(UARCH)/src/thread_entry.s \
  • uspace/lib/c/arch/ia32/src/entry.S

    rf4fa6d9 r8c15255  
    4646        mov %ax, %fs
    4747        # Do not set %gs, it contains descriptor that can see TLS
    48        
     48
     49#ifndef PROCESSOR_i486 
    4950        # Detect the mechanism used for making syscalls
    5051        movl $(INTEL_CPUID_STANDARD), %eax
     
    5556        movl $__syscall_fast, (%eax)
    56570:
     58#endif
    5759        #
    5860        # Create the first stack frame.
Note: See TracChangeset for help on using the changeset viewer.