Changeset e3bc355 in mainline for kernel/arch/amd64
- Timestamp:
- 2013-07-28T23:07:18Z (13 years ago)
- 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. - Location:
- kernel/arch/amd64
- Files:
-
- 7 added
- 8 deleted
- 5 edited
- 27 moved
-
Makefile.inc (modified) (3 diffs)
-
include/arch/arch.h (moved) (moved from kernel/arch/amd64/include/arch.h )
-
include/arch/asm.h (moved) (moved from kernel/arch/amd64/include/asm.h )
-
include/arch/atomic.h (moved) (moved from kernel/arch/amd64/include/atomic.h )
-
include/arch/barrier.h (added)
-
include/arch/bios (added)
-
include/arch/boot/boot.h (moved) (moved from kernel/arch/amd64/include/boot/boot.h )
-
include/arch/boot/memmap.h (added)
-
include/arch/context.h (moved) (moved from kernel/arch/amd64/include/context.h )
-
include/arch/context_offset.h (moved) (moved from kernel/arch/amd64/include/context_offset.h )
-
include/arch/cpu.h (moved) (moved from kernel/arch/amd64/include/cpu.h )
-
include/arch/cpuid.h (moved) (moved from kernel/arch/amd64/include/cpuid.h )
-
include/arch/cycle.h (moved) (moved from kernel/arch/amd64/include/cycle.h )
-
include/arch/ddi/ddi.h (moved) (moved from kernel/arch/amd64/include/ddi/ddi.h )
-
include/arch/debugger.h (moved) (moved from kernel/arch/amd64/include/debugger.h )
-
include/arch/drivers (added)
-
include/arch/elf.h (moved) (moved from kernel/arch/amd64/include/elf.h )
-
include/arch/faddr.h (moved) (moved from kernel/arch/amd64/include/faddr.h )
-
include/arch/fpu_context.h (added)
-
include/arch/interrupt.h (moved) (moved from kernel/arch/amd64/include/interrupt.h )
-
include/arch/istate.h (moved) (moved from kernel/arch/amd64/include/istate.h ) (1 diff)
-
include/arch/mm/as.h (moved) (moved from kernel/arch/amd64/include/mm/as.h )
-
include/arch/mm/asid.h (added)
-
include/arch/mm/frame.h (moved) (moved from kernel/arch/amd64/include/mm/frame.h )
-
include/arch/mm/km.h (moved) (moved from kernel/arch/amd64/include/mm/km.h )
-
include/arch/mm/page.h (moved) (moved from kernel/arch/amd64/include/mm/page.h )
-
include/arch/mm/ptl.h (moved) (moved from kernel/arch/amd64/include/mm/ptl.h )
-
include/arch/mm/tlb.h (moved) (moved from kernel/arch/amd64/include/mm/tlb.h )
-
include/arch/pm.h (moved) (moved from kernel/arch/amd64/include/pm.h ) (1 diff)
-
include/arch/proc/task.h (moved) (moved from kernel/arch/amd64/include/proc/task.h )
-
include/arch/proc/thread.h (moved) (moved from kernel/arch/amd64/include/proc/thread.h )
-
include/arch/smp (added)
-
include/arch/stack.h (moved) (moved from uspace/srv/net/inetsrv/inet_util.h ) (2 diffs)
-
include/arch/syscall.h (moved) (moved from kernel/arch/amd64/include/syscall.h )
-
include/arch/types.h (moved) (moved from kernel/arch/amd64/include/types.h )
-
include/barrier.h (deleted)
-
include/bios (deleted)
-
include/boot/memmap.h (deleted)
-
include/drivers (deleted)
-
include/fpu_context.h (deleted)
-
include/mm/asid.h (deleted)
-
include/smp (deleted)
-
src/amd64.c (modified) (2 diffs)
-
src/debugger.c (deleted)
-
src/fpu_context.c (modified) (1 diff)
-
src/mm/page.c (modified) (2 diffs)
-
src/pm.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/Makefile.inc
r283ea3d re3bc355 30 30 BFD_ARCH = i386:x86-64 31 31 BFD = binary 32 CLANG_ARCH = x86_6433 32 34 33 FPU_NO_CFLAGS = -mno-sse -mno-sse2 … … 36 35 GCC_CFLAGS += $(CMN1) 37 36 ICC_CFLAGS += $(CMN1) 37 CLANG_CFLAGS += $(CMN1) 38 38 39 39 BITS = 64 … … 76 76 arch/$(KARCH)/src/proc/thread.c \ 77 77 arch/$(KARCH)/src/userspace.c \ 78 arch/$(KARCH)/src/syscall.c \ 79 arch/$(KARCH)/src/debugger.c 78 arch/$(KARCH)/src/syscall.c 80 79 81 80 ifeq ($(CONFIG_SMP),y) -
kernel/arch/amd64/include/arch/istate.h
r283ea3d re3bc355 66 66 } istate_t; 67 67 68 #define RPL_USER 3 69 68 70 /** Return true if exception happened while in userspace */ 69 71 NO_TRACE static inline int istate_from_uspace(istate_t *istate) 70 72 { 71 return !(istate->rip & UINT64_C(0x8000000000000000));73 return (istate->cs & RPL_USER) == RPL_USER; 72 74 } 73 75 -
kernel/arch/amd64/include/arch/pm.h
r283ea3d re3bc355 57 57 #ifdef CONFIG_FB 58 58 59 #define VESA_INIT_DES 860 59 #define VESA_INIT_SEGMENT 0x8000 60 #define VESA_INIT_CODE_DES 8 61 #define VESA_INIT_DATA_DES 9 61 62 62 63 #undef GDT_ITEMS 63 #define GDT_ITEMS 964 #define GDT_ITEMS 10 64 65 65 66 #endif /* CONFIG_FB */ -
kernel/arch/amd64/include/arch/stack.h
r283ea3d re3bc355 1 1 /* 2 * Copyright (c) 201 2 Jiri Svoboda2 * Copyright (c) 2013 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup inet29 /** @addtogroup amd64 30 30 * @{ 31 31 */ 32 /** 33 * @file 34 * @brief 32 /** @file 35 33 */ 36 34 37 #ifndef INET_UTIL_H_38 #define INET_UTIL_H_35 #ifndef KERN_amd64_STACK_H_ 36 #define KERN_amd64_STACK_H_ 39 37 40 #include < sys/types.h>38 #include <config.h> 41 39 42 uint32_t inet_netmask(int bits); 40 #define MEM_STACK_SIZE STACK_SIZE 43 41 44 42 #endif -
kernel/arch/amd64/src/amd64.c
r283ea3d re3bc355 43 43 #include <arch/bios/bios.h> 44 44 #include <arch/boot/boot.h> 45 #include <arch/debugger.h>46 45 #include <arch/drivers/i8254.h> 47 46 #include <arch/drivers/i8259.h> … … 161 160 #endif 162 161 163 /* Enable debugger */164 debugger_init();165 162 /* Merge all memory zones to 1 big zone */ 166 163 zone_merge_all(); -
kernel/arch/amd64/src/fpu_context.c
r283ea3d re3bc355 57 57 { 58 58 /* TODO: Zero all SSE, MMX etc. registers */ 59 /* Default value of SCR register is 0x1f80, 60 * it masks all FPU exceptions*/ 59 61 asm volatile ( 60 62 "fninit\n" -
kernel/arch/amd64/src/mm/page.c
r283ea3d re3bc355 78 78 void page_fault(unsigned int n, istate_t *istate) 79 79 { 80 uintptr_t page= read_cr2();80 uintptr_t badvaddr = read_cr2(); 81 81 82 82 if (istate->error_word & PFERR_CODE_RSVD) … … 92 92 access = PF_ACCESS_READ; 93 93 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); 98 95 } 99 96 -
kernel/arch/amd64/src/pm.c
r283ea3d re3bc355 112 112 /* VESA Init descriptor */ 113 113 #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 } 118 116 #endif 119 117 };
Note:
See TracChangeset
for help on using the changeset viewer.
