Changeset 850235d in mainline for kernel/arch/amd64


Ignore:
Timestamp:
2013-03-10T14:56:21Z (13 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/amd64
Files:
1 deleted
5 edited

Legend:

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

    rea906c29 r850235d  
    3333
    3434FPU_NO_CFLAGS = -mno-sse -mno-sse2
    35 
    36 #
    37 # FIXME:
    38 #
    39 # The -fno-optimize-sibling-calls should be removed as soon as a bug
    40 # in GCC concerning the "large" memory model and tail call optimization
    41 # is fixed.
    42 #
    43 # When GCC generates a code for tail call, instead of generating ..
    44 #
    45 #   jmp *fnc
    46 #
    47 # it generates an assembly code with an illegal immediate prefix:
    48 #
    49 #   jmp *$fnc
    50 #
    51 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48385 for reference.
    52 #
    53 
    54 CMN1 = -m64 -mcmodel=large -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls
     35CMN1 = -m64 -mcmodel=large -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
    5536GCC_CFLAGS += $(CMN1)
    5637ICC_CFLAGS += $(CMN1)
     
    9576        arch/$(KARCH)/src/proc/thread.c \
    9677        arch/$(KARCH)/src/userspace.c \
    97         arch/$(KARCH)/src/syscall.c \
    98         arch/$(KARCH)/src/debugger.c
     78        arch/$(KARCH)/src/syscall.c
    9979
    10080ifeq ($(CONFIG_SMP),y)
  • kernel/arch/amd64/include/arch/istate.h

    rea906c29 r850235d  
    6666} istate_t;
    6767
     68#define RPL_USER        3
     69
    6870/** Return true if exception happened while in userspace */
    6971NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    7072{
    71         return !(istate->rip & UINT64_C(0x8000000000000000));
     73        return (istate->cs & RPL_USER) == RPL_USER;
    7274}
    7375
  • kernel/arch/amd64/src/amd64.c

    rea906c29 r850235d  
    4343#include <arch/bios/bios.h>
    4444#include <arch/boot/boot.h>
    45 #include <arch/debugger.h>
    4645#include <arch/drivers/i8254.h>
    4746#include <arch/drivers/i8259.h>
     
    161160#endif
    162161               
    163                 /* Enable debugger */
    164                 debugger_init();
    165162                /* Merge all memory zones to 1 big zone */
    166163                zone_merge_all();
  • kernel/arch/amd64/src/fpu_context.c

    rea906c29 r850235d  
    5757{
    5858        /* TODO: Zero all SSE, MMX etc. registers */
     59        /* Default value of SCR register is 0x1f80,
     60         * it masks all FPU exceptions*/
    5961        asm volatile (
    6062                "fninit\n"
  • kernel/arch/amd64/src/mm/page.c

    rea906c29 r850235d  
    9292                access = PF_ACCESS_READ;
    9393       
    94         if (as_page_fault(page, access, istate) == AS_PF_FAULT) {
    95                 fault_if_from_uspace(istate, "Page fault: %p.", (void *) page);
    96                 panic_memtrap(istate, access, page, NULL);
    97         }
     94        as_page_fault(page, access, istate);
    9895}
    9996
Note: See TracChangeset for help on using the changeset viewer.