Subversion Repositories HelenOS

Rev

Go to most recent revision | Hide changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff Changes
2055 6528 d 18 h jermar /trunk/kernel/arch/sparc64/src/ sparc64 work:
- No need to lock kernel stack and userspace window buffer into DTLB.
 
/trunk/kernel/arch/sparc64/src/cpu/cpu.c
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1977 6563 d 2 h jermar /trunk/ Fix bad indentation in ofw.c

sparc64 work:
o Fix copyright in main.c
o Move code from unused parts of the trap table.
 
/trunk/boot/arch/sparc64/loader/main.c
/trunk/boot/genarch/ofw.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1917 6601 d 7 h jermar /trunk/ sparc64 work:
- hw_map() can now support up to 8M requests
- CPU stacks are now locked in DTLB of the respective processor
- kernel in the boot phase no longer relies on the stack provided by OpenFirmware
- instead of of doing FLUSHW during kernel startup, simply set the
window state registers to the wanted state
- NWINDOW -> NWINDOWS
- Add/fix some comments and copyrights.
 
/trunk/boot/arch/sparc64/loader/boot.S
/trunk/kernel/arch/sparc64/include/arch.h
/trunk/kernel/arch/sparc64/src/cpu/cpu.c
/trunk/kernel/arch/sparc64/src/mm/page.c
/trunk/kernel/arch/sparc64/src/mm/tsb.c
/trunk/kernel/arch/sparc64/src/start.S
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1916 6602 d 5 h jermar /trunk/kernel/arch/sparc64/src/trap/ Small change of code organization.
No functional difference.
 
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1915 6602 d 6 h jermar /trunk/kernel/ A quote from from SPARC V9 specification:

The Y register is deprecated; it is provided only for compatibility with previous versions
of the architecture. It should not be used in new SPARC-V9 software. It is
recommended that all instructions that reference the Y register (i.e., SMUL,
SMULcc, UMUL, UMULcc, MULScc, SDIV, SDIVcc, UDIV, UDIVcc, RDY, and
WRY) be avoided. See the appropriate pages in Appendix A, “Instruction Definitions,”
for suitable substitute instructions.

Still gcc is generating code which uses Y and some of the instructions above.
This change modifies the preemptible_handler() to preserve the Y register
across preemption.
 
/trunk/kernel/arch/sparc64/include/trap/trap_table.h
/trunk/kernel/arch/sparc64/src/dummy.s
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/doc/arch/sparc64
/trunk/kernel/generic/src/mm/as.c
1883 6627 d 12 h jermar /trunk/kernel/arch/sparc64/ More sparc64 FPU trap handlers.  
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/src/trap/exception.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1882 6627 d 13 h jermar /trunk/kernel/ Support for sparc64 FPU context.  
/trunk/kernel/arch/sparc64/src/fpu_context.c
/trunk/kernel/arch/amd64/include/arch.h
/trunk/kernel/arch/ia32/include/arch.h
/trunk/kernel/arch/ia64/include/arch.h
/trunk/kernel/arch/ia64/src/interrupt.c
/trunk/kernel/arch/mips32/include/arch.h
/trunk/kernel/arch/mips32/src/fpu_context.c
/trunk/kernel/arch/ppc32/include/arch.h
/trunk/kernel/arch/ppc64/include/arch.h
/trunk/kernel/arch/sparc64/Makefile.inc
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/fpu_context.h
/trunk/kernel/arch/sparc64/include/regdef.h
/trunk/kernel/arch/sparc64/include/register.h
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/dummy.s
/trunk/kernel/arch/sparc64/src/trap/exception.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/fpu_context.h
/trunk/kernel/generic/src/proc/scheduler.c
/trunk/kernel/kernel.config
/trunk/kernel/test/fpu/fpu1/test.c
1880 6630 d 5 h jermar /trunk/ Small improvements here and there.  
/trunk/kernel/arch/sparc64/_link.ld.in
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/console.c
/trunk/kernel/arch/sparc64/src/mm/tlb.c
/trunk/kernel/arch/sparc64/src/start.S
/trunk/kernel/arch/sparc64/src/trap/exception.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/genarch/src/kbd/ns16550.c
/trunk/kernel/generic/src/printf/printf_core.c
/trunk/kernel/generic/src/proc/task.c
/trunk/kernel/generic/src/sysinfo/sysinfo.c
/trunk/uspace/ns/ns.c
1876 6631 d 17 h jermar /trunk/kernel/arch/sparc64/src/trap/ Fixes for sparc64's preemptible_handler().
Resynchronize CWP with that of TL=0.
 
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1870 6635 d 5 h jermar /trunk/kernel/ Handle more sparc64 traps and improve handling of already handled traps.  
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/include/trap/mmu.h
/trunk/kernel/arch/sparc64/src/mm/tlb.c
/trunk/kernel/arch/sparc64/src/trap/exception.c
/trunk/kernel/arch/sparc64/src/trap/interrupt.c
/trunk/kernel/arch/sparc64/src/trap/mmu.S
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/interrupt.h
1865 6636 d 7 h jermar /trunk/kernel/ sparc64 kernel fixes  
/trunk/kernel/arch/sparc64/src/trap/mmu.S
/trunk/kernel/arch/sparc64/Makefile.inc
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/trap/mmu.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/mm/tlb.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/adt/hash_table.h
1864 6637 d 3 h jermar /trunk/ sparc64 update.
- Prototype userspace layer implementation that
at least relates to sparc64 and compiles cleanly.
- Fixes for kernel's preemptible_handler and code
related to running userspace.
- Enable userspace. Several dozen instructions
are now run in userspace! We are pretty near
the userspace milestone for sparc64.
 
/trunk/uspace/libc/arch/sparc64/include/stack.h
/trunk/boot/arch/sparc64/loader/Makefile
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/mm/as.h
/trunk/kernel/arch/sparc64/include/mm/tlb.h
/trunk/kernel/arch/sparc64/include/trap/mmu.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/context.S
/trunk/kernel/arch/sparc64/src/mm/tlb.c
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/sparc64.c
/trunk/kernel/arch/sparc64/src/start.S
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/src/proc/task.c
/trunk/uspace/libc/arch/sparc64/_link.ld.in
/trunk/uspace/libc/arch/sparc64/include/atomic.h
/trunk/uspace/libc/arch/sparc64/include/config.h
/trunk/uspace/libc/arch/sparc64/include/context_offset.h
/trunk/uspace/libc/arch/sparc64/include/endian.h
/trunk/uspace/libc/arch/sparc64/include/limits.h
/trunk/uspace/libc/arch/sparc64/include/psthread.h
/trunk/uspace/libc/arch/sparc64/include/stackarg.h
/trunk/uspace/libc/arch/sparc64/include/syscall.h
/trunk/uspace/libc/arch/sparc64/include/thread.h
/trunk/uspace/libc/arch/sparc64/include/types.h
/trunk/uspace/libc/arch/sparc64/src/entry.s
/trunk/uspace/libc/arch/sparc64/src/psthread.S
/trunk/uspace/libc/arch/sparc64/src/thread.c
/trunk/uspace/libc/arch/sparc64/src/thread_entry.s
1863 6639 d 5 h jermar /trunk/ Allow architectures to decide between inlined and not inlined version of syscall wrapper.
Implement inlined syscall wrapper for sparc64.
 
/trunk/uspace/libc/arch/amd64/include/syscall.h
/trunk/uspace/libc/arch/ia32/include/syscall.h
/trunk/uspace/libc/arch/ia64/include/syscall.h
/trunk/uspace/libc/arch/mips32/include/syscall.h
/trunk/uspace/libc/arch/mips32eb/include/syscall.h
/trunk/uspace/libc/arch/ppc32/include/syscall.h
/trunk/uspace/libc/arch/ppc64/include/syscall.h
/trunk/uspace/libc/arch/sparc64/include/syscall.h
/trunk/uspace/libc/include/syscall.h
/trunk/uspace/libc/arch/sparc64/src/syscall.c
/trunk/kernel/arch/sparc64/include/trap/syscall.h
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/syscall/syscall.h
/trunk/uspace/libc/arch/sparc64/Makefile.inc
/trunk/uspace/libc/generic/ddi.c
/trunk/uspace/libc/include/libc.h
/trunk/uspace/libc/include/sys/types.h
1862 6639 d 9 h jermar /trunk/kernel/ sparc64 work.
Kernel syscall support.
Modify the preemptive_handler for the use by syscalls.
 
/trunk/kernel/arch/sparc64/include/syscall.h
/trunk/kernel/arch/sparc64/include/trap/syscall.h
/trunk/kernel/arch/sparc64/src/trap/syscall.c
/trunk/kernel/arch/sparc64/Makefile.inc
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/src/syscall/syscall.c
1861 6639 d 13 h jermar /trunk/kernel/arch/sparc64/ Convert sparc64 traps using SIMPLE_HANDLER to using PREEMPTIBLE_HANDLER.  
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/include/trap/interrupt.h
/trunk/kernel/arch/sparc64/include/trap/mmu.h
/trunk/kernel/arch/sparc64/include/trap/trap_table.h
/trunk/kernel/arch/sparc64/src/trap/exception.c
/trunk/kernel/arch/sparc64/src/trap/interrupt.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1860 6640 d 7 h jermar /trunk/kernel/ A lot of untested sparc64 stuff:
- Write ASID to hardware when a thread is about to run in userspace.
- Add userspace() and switch_to_userspace() functions.
- Handle special cases when the userspace spill/fill handler causes MMU trap.
- Resolve some TODOs in the existing sparc64 code.
- sparc64 has now C99 compliant header guards.
- Formatting and indentation fixes.
 
/trunk/kernel/arch/sparc64/include/arch.h
/trunk/kernel/arch/sparc64/include/arg.h
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/atomic.h
/trunk/kernel/arch/sparc64/include/barrier.h
/trunk/kernel/arch/sparc64/include/byteorder.h
/trunk/kernel/arch/sparc64/include/console.h
/trunk/kernel/arch/sparc64/include/context.h
/trunk/kernel/arch/sparc64/include/cpu.h
/trunk/kernel/arch/sparc64/include/debug.h
/trunk/kernel/arch/sparc64/include/drivers/tick.h
/trunk/kernel/arch/sparc64/include/elf.h
/trunk/kernel/arch/sparc64/include/faddr.h
/trunk/kernel/arch/sparc64/include/fpu_context.h
/trunk/kernel/arch/sparc64/include/interrupt.h
/trunk/kernel/arch/sparc64/include/memstr.h
/trunk/kernel/arch/sparc64/include/mm/as.h
/trunk/kernel/arch/sparc64/include/mm/frame.h
/trunk/kernel/arch/sparc64/include/mm/memory_init.h
/trunk/kernel/arch/sparc64/include/mm/mmu.h
/trunk/kernel/arch/sparc64/include/mm/tlb.h
/trunk/kernel/arch/sparc64/include/mm/tte.h
/trunk/kernel/arch/sparc64/include/proc/task.h
/trunk/kernel/arch/sparc64/include/regdef.h
/trunk/kernel/arch/sparc64/include/trap/exception.h
/trunk/kernel/arch/sparc64/include/trap/interrupt.h
/trunk/kernel/arch/sparc64/include/trap/mmu.h
/trunk/kernel/arch/sparc64/include/trap/regwin.h
/trunk/kernel/arch/sparc64/include/trap/trap.h
/trunk/kernel/arch/sparc64/include/trap/trap_table.h
/trunk/kernel/arch/sparc64/include/types.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/ddi/ddi.c
/trunk/kernel/arch/sparc64/src/dummy.s
/trunk/kernel/arch/sparc64/src/mm/as.c
/trunk/kernel/arch/sparc64/src/mm/tlb.c
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/sparc64.c
/trunk/kernel/arch/sparc64/src/start.S
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/align.h
1858 6640 d 15 h jermar /trunk/kernel/arch/sparc64/src/trap/ sparc64 work.
Handle situation when there are more valid windows than NWINDOW - 2 during
the return to userspace in preemtpible_handler().
 
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1857 6641 d 10 h jermar /trunk/kernel/arch/sparc64/ sparc64 work.
More bits needed to reach the userspace milestone were added.
The preemptible_handler(), still a prototype, now contains all functionality it needs.
Some sanitation was added to functions expecting page-aligned pointers to
userspace window buffer.
 
/trunk/kernel/arch/sparc64/include/mm/frame.h
/trunk/kernel/arch/sparc64/include/mm/page.h
/trunk/kernel/arch/sparc64/include/regdef.h
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/proc/thread.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
1856 6641 d 15 h jermar /trunk/kernel/ sparc64 work.
- Modify before_thread_runs_arch() to store addresses of the kernel stack and
userspace window buffer, resp., to registers %g6 and %g7, resp, in the
alternate and interrupt global sets.
- Modify after_thread_ran_arch() to sample %g7 from the alternate globals.
- Implement trap handler for spilling register windows into userspace window buffer.
- Implement assembly language functions to access %g6 and %g7 registers in the alternate sets.
- Initialize the trap table so that there are now also spill_1_normal, spill_2_normal,
spill_0_other and fill_1_normal handlers. These handlers are used in different situations
and for different purposes.
 
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/context.h
/trunk/kernel/arch/sparc64/include/trap/regwin.h
/trunk/kernel/arch/sparc64/src/asm.S
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/config.h
1855 6642 d 11 h jermar /trunk/kernel/ sparc64 work.

Fix bug introduced in revision 1852. When fixing CWP,
the input registers of the current window (i.e. output
registers of the window belonging to the interrupted
context) must be preserved. Preserve those registers
in memory. Sure there exist more efficient ways how to
copy the inputs.

Simplify before_thread_runs_arch(), resp. after_thread_ran_arch(),
and make them install, resp. uninstall, DTLB locked mapping for
eventual userspace window buffer.
 
/trunk/kernel/arch/sparc64/include/asm.h
/trunk/kernel/arch/sparc64/include/trap/trap_table.h
/trunk/kernel/arch/sparc64/src/proc/scheduler.c
/trunk/kernel/arch/sparc64/src/trap/trap_table.S
/trunk/kernel/generic/include/macros.h
/trunk/kernel/generic/src/main/kinit.c

Show All