Changeset e3bc355 in mainline for kernel/arch/amd64


Ignore:
Timestamp:
2013-07-28T23:07:18Z (13 years ago)
Author:
Dominik Taborsky (AT DOT) <brembyseznamcz>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b55edb
Parents:
283ea3d (diff), ccdc63e (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:

mainline merge

Location:
kernel/arch/amd64
Files:
7 added
8 deleted
5 edited
27 moved

Legend:

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

    r283ea3d re3bc355  
    3030BFD_ARCH = i386:x86-64
    3131BFD = binary
    32 CLANG_ARCH = x86_64
    3332
    3433FPU_NO_CFLAGS = -mno-sse -mno-sse2
     
    3635GCC_CFLAGS += $(CMN1)
    3736ICC_CFLAGS += $(CMN1)
     37CLANG_CFLAGS += $(CMN1)
    3838
    3939BITS = 64
     
    7676        arch/$(KARCH)/src/proc/thread.c \
    7777        arch/$(KARCH)/src/userspace.c \
    78         arch/$(KARCH)/src/syscall.c \
    79         arch/$(KARCH)/src/debugger.c
     78        arch/$(KARCH)/src/syscall.c
    8079
    8180ifeq ($(CONFIG_SMP),y)
  • kernel/arch/amd64/include/arch/istate.h

    r283ea3d re3bc355  
    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/include/arch/pm.h

    r283ea3d re3bc355  
    5757#ifdef CONFIG_FB
    5858
    59 #define VESA_INIT_DES      8
    6059#define VESA_INIT_SEGMENT  0x8000
     60#define VESA_INIT_CODE_DES      8
     61#define VESA_INIT_DATA_DES      9
    6162
    6263#undef GDT_ITEMS
    63 #define GDT_ITEMS  9
     64#define GDT_ITEMS  10
    6465
    6566#endif /* CONFIG_FB */
  • kernel/arch/amd64/include/arch/stack.h

    r283ea3d re3bc355  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2013 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup inet
     29/** @addtogroup amd64
    3030 * @{
    3131 */
    32 /**
    33  * @file
    34  * @brief
     32/** @file
    3533 */
    3634
    37 #ifndef INET_UTIL_H_
    38 #define INET_UTIL_H_
     35#ifndef KERN_amd64_STACK_H_
     36#define KERN_amd64_STACK_H_
    3937
    40 #include <sys/types.h>
     38#include <config.h>
    4139
    42 uint32_t inet_netmask(int bits);
     40#define MEM_STACK_SIZE  STACK_SIZE
    4341
    4442#endif
  • kernel/arch/amd64/src/amd64.c

    r283ea3d re3bc355  
    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

    r283ea3d re3bc355  
    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

    r283ea3d re3bc355  
    7878void page_fault(unsigned int n, istate_t *istate)
    7979{
    80         uintptr_t page = read_cr2();
     80        uintptr_t badvaddr = read_cr2();
    8181       
    8282        if (istate->error_word & PFERR_CODE_RSVD)
     
    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        (void) as_page_fault(badvaddr, access, istate);
    9895}
    9996
  • kernel/arch/amd64/src/pm.c

    r283ea3d re3bc355  
    112112        /* VESA Init descriptor */
    113113#ifdef CONFIG_FB
    114         {
    115                 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_CODE | DPL_KERNEL,
    116                     0xf, 0, 0, 0, 0, 0
    117         }
     114        { 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_CODE | AR_READABLE | DPL_KERNEL, 0xf, 0, 0, 0, 0, 0 },
     115        { 0xffff, 0, VESA_INIT_SEGMENT >> 12, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_KERNEL, 0xf, 0, 0, 0, 0, 0 }
    118116#endif
    119117};
Note: See TracChangeset for help on using the changeset viewer.