Changeset 850235d in mainline for kernel/arch/ia32


Ignore:
Timestamp:
2013-03-10T14:56:21Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
05bab88
Parents:
ea906c29 (diff), 2277e03 (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:

Merge mainline changes

Location:
kernel/arch/ia32
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/Makefile.inc

    rea906c29 r850235d  
    105105        arch/$(KARCH)/src/boot/memmap.c \
    106106        arch/$(KARCH)/src/fpu_context.c \
    107         arch/$(KARCH)/src/debugger.c \
    108107        arch/$(KARCH)/src/syscall.c
  • kernel/arch/ia32/include/arch/istate.h

    rea906c29 r850235d  
    6868} istate_t;
    6969
     70#define RPL_USER        3
     71
    7072/** Return true if exception happened while in userspace */
    7173NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    7274{
    73         return !(istate->eip & UINT32_C(0x80000000));
     75        return (istate->cs & RPL_USER) == RPL_USER;
    7476}
    7577
  • kernel/arch/ia32/src/fpu_context.c

    rea906c29 r850235d  
    3737#include <arch.h>
    3838#include <cpu.h>
     39
     40
     41/** x87 FPU scr values (P3+ MMX2) */
     42enum {
     43        X87_FLUSH_ZERO_FLAG = (1 << 15),
     44        X87_ROUND_CONTROL_MASK = (0x3 << 13),
     45        x87_ROUND_TO_NEAREST_EVEN = (0x0 << 13),
     46        X87_ROUND_DOWN_TO_NEG_INF = (0x1 << 13),
     47        X87_ROUND_UP_TO_POS_INF = (0x2 << 13),
     48        X87_ROUND_TO_ZERO = (0x3 << 13),
     49        X87_PRECISION_MASK = (1 << 12),
     50        X87_UNDERFLOW_MASK = (1 << 11),
     51        X87_OVERFLOW_MASK = (1 << 10),
     52        X87_ZERO_DIV_MASK = (1 << 9),
     53        X87_DENORMAL_OP_MASK = (1 << 8),
     54        X87_INVALID_OP_MASK = (1 << 7),
     55        X87_DENOM_ZERO_FLAG = (1 << 6),
     56        X87_PRECISION_EXC_FLAG = (1 << 5),
     57        X87_UNDERFLOW_EXC_FLAG = (1 << 4),
     58        X87_OVERFLOW_EXC_FLAG = (1 << 3),
     59        X87_ZERO_DIV_EXC_FLAG = (1 << 2),
     60        X87_DENORMAL_EXC_FLAG = (1 << 1),
     61        X87_INVALID_OP_EXC_FLAG = (1 << 0),
     62
     63        X87_ALL_MASK = X87_PRECISION_MASK | X87_UNDERFLOW_MASK | X87_OVERFLOW_MASK | X87_ZERO_DIV_MASK | X87_DENORMAL_OP_MASK | X87_INVALID_OP_MASK,
     64};
     65
    3966
    4067typedef void (*fpu_context_function)(fpu_context_t *fctx);
     
    98125}
    99126
     127/** Initialize x87 FPU. Mask all exceptions. */
    100128void fpu_init()
    101129{
     
    111139                "ldmxcsr %[help0]\n"
    112140                : [help0] "+m" (help0), [help1] "+r" (help1)
    113                 : [magic] "i" (0x1f80)
     141                : [magic] "i" (X87_ALL_MASK)
    114142        );
    115143}
  • kernel/arch/ia32/src/ia32.c

    rea906c29 r850235d  
    4545#include <arch/bios/bios.h>
    4646#include <arch/boot/boot.h>
    47 #include <arch/debugger.h>
    4847#include <arch/drivers/i8254.h>
    4948#include <arch/drivers/i8259.h>
     
    118117#endif
    119118               
    120                 /* Enable debugger */
    121                 debugger_init();
    122119                /* Merge all memory zones to 1 big zone */
    123120                zone_merge_all();
Note: See TracChangeset for help on using the changeset viewer.