summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-13Increase kernel map sizeSamuel Thibault
To avoid running out of memory due to the increased consumption by radix trees which replaced arrays. * kern/slab.c (KMEM_MAP_SIZE): Bump from 96MiB to 128MiB. * i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE): Add 32MiB accordingly.
2016-01-02Completely disable strict aliasingRichard Braun
* Makefile.am (AM_CFLAGS): Add -fno-strict-aliasing.
2016-01-02Fix object page list typeRichard Braun
* vm/vm_object.h (struct vm_object): Use queue_head_t instead of queue_chain_t as the page list type.
2016-01-02replace extern with static in some linux codeFlavio Cruz
* linux/dev/include/linux/fs.h: Replace extern with static. * linux/dev/include/linux/locks.h: Likewise. * linux/dev/include/linux/mm.h: Likewise. * linux/src/drivers/net/e2100.c: Likewise * linux/src/include/asm-i386/termios.h: Likewise. * linux/src/include/linux/interrupt.h: Likewise. * linux/src/include/net/route.h: Likewise. * linux/src/include/net/sock.h: Likewise.
2016-01-02fix t_addr assignment in lpropenFlavio Cruz
* i386/i386at/lpr.c (lpropen): Fix assignment to t_addr.
2016-01-01remove unnused disk code and headersFlavio Cruz
* i386/Makefrag.am: Remove disk.h. * i386/i386at/disk.h: Remove unnused definitions. * i386/include/mach/i386/disk.h: Remove. * linux/dev/glue/block.c (device_get_status): Remove V_GETPARMS case.
2016-01-01fix some compiler warnings in gnumachFlavio Cruz
* linux/dev/glue/block.c (out): Cast to device_t. * linux/dev/init/main.c (alloc_contig_mem): Initialize addr and cast return value to void *. * i386/i386/phys.c (pmap_copy_page): Initialize src_map. * i386/intel/pmap.c: Include i386at/model_dep.h. * kern/mach_clock.c (mapable_time_init): Cast to void *.
2016-01-01Slightly improve map debugging readabilityRichard Braun
* vm/vm_object.c (vm_object_print): Break line so all debugging output fits in a page.
2015-12-29Improve map debugging readabilityRichard Braun
* vm/vm_map.c (vm_map_print): Reduce indentation, break lines earlier. (vm_map_copy_print): Likewise. * vm/vm_object.c (vm_object_print): Likewise.
2015-12-29Improve VM map debuggingRichard Braun
* vm/vm_map.c (vm_map_print): Update arguments to conform to ddb protocol. * vm/vm_print.h (vm_map_print): Likewise for prototype.
2015-12-29Fix vm_map_copyoutRichard Braun
* vm/vm_map.c (vm_map_copyout): Reinitialize copy map red-black tree.
2015-12-11Fix boot under kvm in linux 4.3Samuel Thibault
* i386/i386/locore.S (discover_x86_cpu_type): Disable Cyrix CPU discovery.
2015-11-29Nicer out of memory condition reportingSamuel Thibault
* vm/vm_object.c (_vm_object_allocate): Return 0 immediately when kmem_cache_alloc returned 0. (vm_object_allocate): Panic when _vm_object_allocate returns 0.
2015-11-27Fix wired accountingSamuel Thibault
* vm/vm_map.c (vm_map_pageable_common): Put back wired_count decrementation into user_wired_count test.
2015-11-27Fix ahci unit MAX_PORTS checkSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_do_request): Fix checking unit against MAX_PORTS.
2015-11-27Fix boundSamuel Thibault
* i386/i386at/lpr.c (lprprobe): Fix checking unit against NLPR.
2015-11-27Fix missing format in printkSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing format.
2015-10-31GNU Mach 1.6Thomas Schwinge
* version.m4 (AC_PACKAGE_VERSION): Set to 1.6. * NEWS: Finalize for 1.6.
2015-10-31Rework *.msgids handling when neither client nor server stubs are requiredThomas Schwinge
Originally added in commit 255c47e669819f153c722c98a230f6fe4e6ece08, but "make distcheck" didn't like that: [...] ERROR: files left in build directory after distclean: ./ipc/notify.msgids Makefile:7489: recipe for target 'distcleancheck' failed make[1]: *** [distcleancheck] Error 1 make[1]: Leaving directory '[...]/gnumach/release.build/gnumach-1.5/_build/sub' Makefile:7416: recipe for target 'distcheck' failed make: *** [distcheck] Error 1 Instead of special-casing that, generalize the Makefile rules. * Makefrag.am (nodist_lib_dep_tr_for_defs_a_SOURCES): Add ipc/notify.none.defs.c. (nodist_libkernel_a_SOURCES): Add ipc/notify.none.msgids. (gnumach.msgids): Remove ipc/notify.msgids prerequisite. * Makerules.mig.am (%.msgids): Remove rule, and instead... (%.none.defs.c, %.none.msgids): ... add these rules.
2015-10-05Update NEWS fileJustus Winter
2015-10-05Fix time going back in Xen caseSamuel Thibault
when backward time correction happens to get bigger than the tick duration. * kern/mach_clock.c (clock_interrupt): When `tickdelta' is bigger than `usec', truncate it to `usec-1'.
2015-10-05Add generated mach documentation files to gitignoreJoshua Branson
* .gitignore: Add doc/mach.aux doc/mach.cp doc/mach.cps doc/mach.fn doc/mach.fns doc/mach.ky doc/mach.log doc/mach.pdf doc/mach.pg doc/mach.toc doc/mach.tp doc/mach.vr.
2015-09-29kern/slab: print total used and reclaimable memoryJustus Winter
* kern/slab.c (_slab_info): Print total used and reclaimable memory.
2015-09-29kern/slab: include flags in the slab informationJustus Winter
* kern/slab.c (_slab_info): Include flags in the slab information.
2015-09-29ddb: fix line formattingJustus Winter
* ddb/db_output.c (db_putchar): Fix off-by-one, allowing one more character to be printed before the newline is inserted.
2015-09-29ddb: add new command `show slabinfo'Justus Winter
* ddb/db_command.c (db_show_cmds): Add `slabinfo'. * kern/slab.c (slab_info): Generalize so that it can be used with different printf-like functions, and turn it into a static function. (slab_info): New wrapper retaining the old behaviour. (db_show_slab_info): New wrapper that uses `db_printf' instead. * kern/slab.h (db_show_slab_info): New declaration.
2015-09-27i386: trace syscalls of a single taskJustus Winter
* i386/i386/debug_i386.c (syscall_trace_task): New variable. (syscall_trace_print): If set, trace only syscalls from this task.
2015-09-27i386: improve syscall tracingJustus Winter
* kern/syscall_sw.h (mach_trap_t): Turn unused field into `mach_trap_name'. (MACH_TRAP, MACH_TRAP_STACK): Record name. * i386/i386/debug_i386.c (syscall_trace_print): Use the name and format the arguments to look like c.
2015-09-27Fix build with -DDEBUGJustus Winter
* device/cirbuf.c: Add missing include. * i386/i386/debug.h (dump_ss): Hide declaration from assembler. * i386/i386/debug_i386.c: Fix include. * kern/sched_prim.h: Add missing include, fix declaration.
2015-09-27kern/bootstrap: drop into the debuggerJustus Winter
* kern/bootstrap.c (boot_script_prompt_task_resume): Drop into the debugger instead of merely waiting for return using `safe_gets', which disables interrupts, making it impossible to break into the debugger using the magic keys.
2015-09-19Add macros to convert between time_value_t and timespecFlávio Cruz
* include/mach/time_value.h (TIME_VALUE_TO_TIMESPEC, TIMESPEC_TO_TIME_VALUE): New macros
2015-09-07kern: use proper memory fences when handling the mapped timeJustus Winter
* include/mach/time_value.h (struct mapped_time_value): Adjust comment. * kern/mach_clock.c (mtime): Likewise. Also make it volatile. (update_mapped_time): Use full hardware barriers. (read_mapped_time): New macro with proper fences. (record_time_stamp, host_get_time): Use the new macro.
2015-09-07kern: fix loop reading the time valueJustus Winter
Previously, recent versions of gcc would hoist the loads out of the loop reading the time value. * kern/macros.h (access_once): New macro. * kern/mach_clock.c (host_get_time): Use the new macro to prevent the loads from being hoisted out of the loop.
2015-09-07commit fce798016c4bd2be89b86b0d343ab54505409412Rik van Riel
[PATCH] advansys.c buffer overflow The Stanford checker found an error in advansys.c, the driver is accessing field 6 in an array[6]. Since this is the only place where this field is accessed it should be safe to simply remove this line.
2015-08-31Reserve 64k at beginning of memory, not just 4kSamuel Thibault
Linux does this to be extra careful with some BIOSes which apparently spuriously write between 4k and 64k. * i386/i386at/model_dep.c (RESERVED_BIOS): New macro. (avail_next, mem_size_init, init_alloc_aligned): Use RESERVED_BIOS instead of hardcoded 0x1000.
2015-08-30Fix printk not handling ANSI escape codesJames Clarke
* i386/i386at/kd.c (kdstart): Moved escape sequence handling to new kd_putc_esc function. (kd_putc_esc): New function with logic from kdstart. (kdcnputc): Call kd_putc_esc rather than kd_putc to allow for ANSI escape codes. * i386/i386at/kd.h (kd_putc_esc): New function.
2015-08-28Make sure the reply port's reference is released when the thread needs to be ↵Flávio Cruz
halted. * kern/thread.h (thread_halt_self): Add continuation_t parameter. * kern/thread.c (thread_halt_self): Pass continuation_t parameter to thread_block instead of thread_exception_return. * kern/ast.c (ast_taken): Pass thread_exception_return to thread_halt_self. * kern/profile.c (profile_thread): Likewise. * kern/exception.c (exception_no_server): Likewise. (thread_release_and_exception_return): New function. (exception_raise_continue_slow): Pass thread_release_and_exception_return to thread_halt_self.
2015-08-28Add a thread_no_continuation definitionFlávio Cruz
to replace the use of the NULL pointer. * kern/sched_prim.h (thread_no_continuation): New macro. * kern/machine.c (processor_assign, processor_doaction): Use thread_no_continuation instead of 0. * kern/profile.c (send_last_sample_buf): Likewise * kern/sched_prim.c (thread_sleep, thread_invoke, thread_dispatch): Likewise. * kern/task.c (task_terminate, task_assign): Likewise. * kern/thread.c (thread_suspend): Likewise. * kern/thread.h (struct thread): Change type of swap_func field to continuation_t.
2015-08-20kern/bootstrap: tune lockingJustus Winter
* kern/bootstrap.c (boot_script_exec_cmd): Avoid holding the lock across the call to `thread_create'.
2015-08-20i386: enable assertionsJustus Winter
* i386/intel/pmap.c (pmap_page_protect): Enable assertions. (phys_attribute_clear, phys_attribute_test): Likewise.
2015-08-20kern: really zero-out unused simple lock info entriesJustus Winter
* kern/lock.c (simple_unlock): Really zero-out unused simple lock info entries.
2015-08-18i386: fix panic messageJustus Winter
* i386/intel/pmap.c (pmap_page_protect): Fix function name in panic message.
2015-08-18vm: collapse unreachable branch into assertionJustus Winter
* vm/vm_object.c (vm_object_collapse): Collapse unreachable branch into assertion.
2015-08-17kern: keep track of the writer when debugging locksJustus Winter
* configfrag.ac (MACH_LDEBUG): Adjust comment, we use it to sanity check all locks now. * kern/lock.c (lock_write): Keep track of the writer thread. (lock_done): Clear writer. (lock_read_to_write): Keep track of the writer thread. (lock_write_to_read): Assert that the current thread holds the lock. Clear writer. (lock_try_write): Keep track of the writer thread. (lock_try_read_to_write): Likewise. (lock_set_recursive): Assert that the current thread holds the lock. * kern/lock.h (struct lock): New field `writer'. (have_read_lock, have_write_lock, have_lock): New macros that can be used to assert that the current thread holds the given lock. If MACH_LDEBUG is not set, they evaluate to true.
2015-08-17kern: improve simple lock debuggingJustus Winter
Do not bother saving the return address when acquire a simple lock. Save the location as provided by the compiler as string instead. Also save the lock parameter. * kern/lock.c (struct simple_locks_info): Drop `ra', add `expr', `loc'. (simple_lock): Rename to `_simple_lock', add expression and location parameters and save them. (simple_lock_try): Likewise. (simple_unlock): Zero-out the now unused slot in the list of taken locks. (db_show_all_slocks): Use the new information. * kern/lock.h (simple_lock, simple_lock_try): Provide macro versions passing the location and expression as string.
2015-08-17kern: disable the simple lock checks while debuggingJustus Winter
* kern/lock.c (do_check_simple_locks): New variable. (check_simple_locks): Make check conditional. (check_simple_locks_{en,dis}able): New functions. * kern/lock.h (check_simple_locks_{en,dis}able): New declarations. * ddb/db_trap.c (db_task_trap): Disable simple lock checks.
2015-08-15vm: fix compiler warningJustus Winter
* vm/vm_user.c (vm_wire): Drop unused but set variable `host'.
2015-08-15vm: enable extra assertionsJustus Winter
* vm/vm_fault.c (vm_fault_page): Enable extra assertions.
2015-08-15Avoid re-defining macrosJustus Winter
* kern/macros.h: Avoid re-defining macros. * linux/src/include/linux/compiler-gcc.h: Likewise. * linux/src/include/linux/compiler.h: Likewise.
2015-07-25kern: add boot-time clock, use it for time stampsHEADmasterJustus Winter
The kernel keeps track of task and thread creation times by saving a time stamp. Previously, the real-time clock was used for this. When the real-time clock is changed, however, the reference frame for the time stamps is lost. This surfaced in Hurd systems reporting spuriously long uptimes. Fix this by creating a boot-time clock and use it as reference frame for the time stamps. * kern/mach_clock.c (clock_boottime_offset): Create clock by keeping track of the offset from the real-time. (clock_boottime_update): New function. (record_time_stamp): Use the boot-time clock for time stamps. (read_time_stamp): New function to convert it back to real-time. (host_set_time): Call `clock_boottime_update'. * kern/mach_clock.h (record_time_stamp): Amend comment. (read_time_stamp): New declaration. * kern/task.c (task_info): Use `read_time_stamp'. * kern/thread.c (thread_info): Likewise.