aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* patch: add last_processor to thread info structuresAlmudena Garcia2019-10-273-3/+13
| | | | | | | * include/mach/thread_info.h (thread info structures): Add new member "last_processor" in thread_sched_info. * kern/thread.c (thread management): Fill new member "last_processor" in thread_info() function.
* Fix build with texinfo 6.7Luca Weiss2019-10-241-0/+1
| | | | doc/mach.texi: Specify document encoding as ISO-8859-1.
* compiler-gcc*.h: Keep on the gcc 5 version for nowSamuel Thibault2019-09-065-268/+4
| | | | | | | | | | We can introduce other versions if we ever need to (which is unlikely since we plan to get rid of the Linux drivers). * compiler-gcc.h: Include compiler-gcc5.h for all compiler versions starting from gcc 5. * compiler-gcc6.h, compiler-gcc7.h, compiler-gcc8.h, compiler-gcc9.h: Remove.
* satisfy 'werror=parantheses'.guy fleury iteriteka2019-08-311-1/+1
| | | | * vm/vm_map.c(vm_map_msync): explit group of first condition.
* Fix the pointer comparison of different type.guy fleury iteriteka2019-08-311-1/+1
| | | | | * vm/vm_map.c(vm_map_fork): use VM_MAP_NULL instead of PMAP_NULL when compare with new_map.
* Add gcc-9 compatibilitySamuel Thibault2019-08-311-0/+67
| | | | * linux/src/include/linux/compiler-gcc9.h: New file.
* fix return KERN_INVALID_ARGUMENT when the map is NULL.guy fleury iteriteka2019-08-301-2/+2
| | | | * vm/vm_map.c(vm_map_msync): Add missing return keyword.
* Fix formatSamuel Thibault2019-08-111-1/+1
| | | | * ipc/mach_port.c (mach_port_mod_refs): Fix passing string size.
* Fix formatSamuel Thibault2019-08-111-1/+1
| | | | * kern/task.c (task_create_kernel): Fix passing string size.
* Fix allocation testSamuel Thibault2019-08-111-1/+1
| | | | | * vm/vm_map.c (vm_map_fork): Check for `new_map` being non-NULL, and not for `new_pmap` a second time.
* Fix printk formatSamuel Thibault2019-08-111-5/+5
| | | | | * linux/dev/drivers/block/ahci.c (ahci_identify, ahci_probe_port): Fix format.
* Fix printf formatSamuel Thibault2019-08-111-2/+2
| | | | * ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Fix format.
* Fix uninitialized valueSamuel Thibault2019-08-111-1/+1
| | | | | * kern/gsync.c (temp_mapping): Initialize start address to VM_MIN_KERNEL_ADDRESS.
* Avoid calling biosmem with size 0Samuel Thibault2019-04-281-3/+6
| | | | | * i386/i386at/model_dep.c (register_boot_data): Register reserved biosmem areas only when they have a non-zero size.
* Avoid calling biosmem with size 0Samuel Thibault2019-04-281-2/+2
| | | | | | * i386/configfrag.ac (register_boot_data): Process modules only when their count is non-zero. (i386at_init): Likewise.
* ahci: Ignore multifunction bit in PCI header typeSamuel Thibault2019-04-271-0/+2
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Clear bit 7 of hdrtype.
* Move -D__ASSEMBLY__ to general AM_CCASFLAGSSamuel Thibault2018-12-302-1/+4
| | | | | | | Since it is used not only by linux bits. * linux/Makefrag.am (liblinux_a_CCASFLAGS): Remove -D__ASSEMBLY__ * Makefile.am (AM_CCASFLAGS): Add -D__ASSEMBLY__
* io_perm: Rename macro to better nameSamuel Thibault2018-12-051-4/+4
| | | | | * i386/i386/io_perm.c (IS_IN_PROTECTED_RANGE): Rename to CONTAINS_PCI_CFG.
* Restrict access to PCI cfg io ports to one processDamien Zammit2018-12-053-9/+22
| | | | | | | | | | | | | * i386/i386/io_perm.c (PCI_CFG1_START, PCI_CFG1_END, PCI_CFG2_START, PCI_CFG2_END, IS_IN_PROTECTED_RANGE): New macros. (taken_pci_cfg): New variable. (io_perm_deallocate): New function. (i386_io_perm_create): Return KERN_PROTECTION_FAILURE if requested port range contains PCI config registers and that is already taken. Set taken_pci_cfg to true when taking them. * i386/i386/io_perm.h (io_perm_deallocate): New declaration. * i386/include/mach/i386/mach_i386.defs (io_perm_t): Add io_perm_deallocate destructor.
* Add GPLv3 license textKalle Olavi Niemitalo2018-11-261-0/+674
| | | | | | | | | | | To help people satisfy the license when they convey clones of the gnumach Git repository, in which gitlog-to-changelog and some deleted files are licensed under GPLv3-or-later. A normal build does not use the GPLv3-or-later files. "make dist" runs gitlog-to-changelog but does not copy it to gnumach-*.tar. Bug: https://savannah.gnu.org/bugs/?49024
* Fix interactivity of inactive threadsSamuel Thibault2018-11-191-0/+11
| | | | | | | | | | | A new thread will mosty probably start working, assume it will take its share of CPU, to avoid having to find it out slowly. Decaying will however fix that quickly if it actually does not work. This fixes stalling issues when a program keeps creating threads. * kern/thread.c (thread_create): Set new_thread's cpu_usage and sched_usage to a fair share of the current load.
* Fix task and thread collection frequencySamuel Thibault2018-11-192-2/+4
| | | | | | | | | sched_tick is incremented only once per second, not once per tick. * kern/task.c (consider_task_collect): Divide task_collect_max_rate by (hz / 1) to get a number of scheduler ticks. * kern/thread.c (consider_thread_collect): Divide thread_collect_max_rate by (hz / 1) to get a number of scheduler ticks.
* Drop SIMPLE_CLOCK supportSamuel Thibault2018-11-194-39/+0
| | | | | | | | | | | | | This wasn't building and is not useful with nowaday's hardware. * configfrag.ac (SIMPLE_CLOCK): Do not define. * kern/sched.h [SIMPLE_CLOCK] (sched_usec): Remove variable declaration. * kern/sched_prim.c [SIMPLE_CLOCK] (sched_usec): Remove variable. [SIMPLE_CLOCK] (sched_init): Do not initialize sched_usec variable. [SIMPLE_CLOCK] (recompute_priorities): Do not tinker sched_usec variable. * kern/thread.c [SIMPLE_CLOCK] (thread_info): Do not ajust for clock drift.
* Make scheduling more reactiveSamuel Thibault2018-11-192-1/+2
| | | | | | | | Give smaller quantums to processes, to get more frequent context switches. This fixes some reactivity for concurrent processes. * kern/sched.h (MIN_QUANTUM): Define to hz / 33. * kern/sched_prim.c (sched_init): Use MIN_QUANTUM instead of hz / 10.
* build: Distribute tarball compressed with xz instead of bzip2Guillem Jover2018-11-061-1/+1
| | | | * configure.ac (AM_INIT_AUTOMAKE): Change dist-bzip2 to dist-xz.
* Fix using all dynamic prioritiesSamuel Thibault2018-11-042-5/+5
| | | | | | | | | | | 6a2342010811 ("Increase number of priorities") increased NRQS but didn't increase PRI_SHIFT to extend the use of the additional queues by the scheduler. This does it. While at it, extend to NRQS to 64, the double of the original 32, to keep all values coherent. * i386/i386/sched_param.h (PRI_SHIFT): Set from 18 to 17. * kern/sched.h (PRI_SHIFT): Set from 18 to 17. (NRQS): Set to 64.
* Add missing patch fileSamuel Thibault2018-11-031-1/+2
| | | | * Makefile.am (EXTRA_DIST): Add Makefile.in.dep.patch.
* Add vm_object_sync supportSamuel Thibault2018-11-038-0/+149
| | | | | | | | | | | | | * include/mach/vm_sync.h: New file. * include/mach/mach_types.h: Include <mach/vm_sync.h> * Makefrag.am (include_mach_HEADERS): Add include/mach/vm_sync.h. * include/mach/mach_types.defs (vm_sync_t): Add type. * include/mach/gnumach.defs (vm_object_sync, vm_msync): Add RPCs. * vm/vm_map.h: Include <mach/vm_sync.h>. (vm_map_msync): New declaration. * vm/vm_map.c (vm_map_msync): New function. * vm/vm_user.c: Include <mach/vm_sync.h> and <kern/mach.server.h>. (vm_object_sync, vm_msync): New functions.
* Fix typoSamuel Thibault2018-11-031-1/+1
|
* Drop spurious changesSamuel Thibault2018-08-133-3/+3
|
* Fix building out of sourceSamuel Thibault2018-08-134-5/+5
| | | | * configure.ac: Fix patching Makefile.in in $srcdir.
* Fix bootstrap hack for automake 1.16Samuel Thibault2018-08-132-1/+22
| | | | | | * Makefile.in.dep.patch: New file. * configure.ac: Try to apply Makefile.in.dep.patch if config.status.dep.patch failed to apply.
* device: Fix d_mmap typeSamuel Thibault2018-07-2811-13/+12
| | | | | | | | | | | | | | | * device/conf.h (dev_ops): Make d_mmap return vm_offset_t instead of int. (nomap): Update accordingly. * device/blkio.c (block_io_mmap): Likewise. * device/blkio.h (block_io_mmap): Likewise. * device/dev_name.c (nomap): Likewise. * i386/i386at/kd.c (kdmmap): Likewise. * i386/i386at/kd.h (kdmmap): Likewise. * i386/i386at/mem.c (memmmap): Likewise. * i386/i386at/mem.h (memmmap): Likewise. * i386/i386at/model_dep.c (timemmap): Likewise. * i386/i386at/model_dep.h (timemmap): Likewise.
* Fix dev_ops typesSamuel Thibault2018-07-2823-73/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * device/conf.h: Include <device/device_types.h>. (dev_ops): Make d_getstat and d_setstat fields use dev_flavor_t, dev_status_t, and mach_msg_type_number_t types. * device/tty.h: (t_getstat, t_setstat): Likewise. * device/conf.h (nulldev_getstat, nulldev_setstat): Fix parameter types accordingly. * device/dev_name.c (nulldev_getstat, nulldev_setstat): Likewise. * device/kmsg.c (kmsggetstat): Likewise. * device/kmsg.h (kmsggetstat): Likewise. * device/net_io.c (net_getstat): Likewise. * device/net_io.h (net_getstat): Likewise. * i386/i386at/com.c (comgetstat, comsetstat): Likewise. * i386/i386at/com.h (comgetstat, comsetstat): Likewise. * i386/i386at/kd.c (kdgetstat, kdsetstat): Likewise. * i386/i386at/kd.h (kdgetstat, kdsetstat): Likewise. * i386/i386at/kd_event.c (kbdgetstat, kbdsetstat): Likewise. * i386/i386at/kd_event.h (kbdgetstat, kbdsetstat): Likewise. * i386/i386at/kd_mouse.c (mousegetstat): Likewise. * i386/i386at/kd_mouse.h (mousegetstat): Likewise. * i386/i386at/lpr.c (lprgetstat, lprsetstat): Likewise. * i386/i386at/lpr.h (lprgetstat, lprsetstat): Likewise. * xen/console.c (hypcngetstat, hypcnsetstat): Likewise. * xen/console.h (hypcngetstat, hypcnsetstat): Likewise. * device/dev_hdr.h: Forward-declare struct dev_ops and dev_ops_t type instead of including <device/conf.h>. * device/dev_pager.c: Include <device/conf.h> * i386/i386/pcb.h: Include <machine/io_perm.h> * i386/i386/thread.h: Do not include <i386/tss.h>
* Fix warningSamuel Thibault2018-07-281-1/+1
| | | | * i386/intel/pmap.c (pmap_enter): Fix panic format.
* Add gcc-8 compatibilitySamuel Thibault2018-07-281-0/+67
| | | | * linux/src/include/linux/compiler-gcc8.h: New file.
* Add ffs to clib_routinesSamuel Thibault2018-07-031-1/+1
| | | | | | Since pmap.c uses it in SMP mode. * Makefile.am (clib_routines): Add ffs.
* Fix interrupt_processor prototypeSamuel Thibault2018-06-272-0/+7
| | | | | | * i386/i386/mp_desc.h [MULTIPROCESSOR] (interrupt_processor): Add prototype. * i386/intel/pmap.c [NCPUS > 1]: Include <i386/mp_desc.h>
* Add missing includeSamuel Thibault2018-06-271-0/+1
| | | | * i386/intel/pmap.c: Include <i386/spl.h>.
* Fix pmap nameSamuel Thibault2018-06-271-2/+2
| | | | | * i386/intel/pmap.c (pmap_map_bd): Lock kernel_pmap, not just the inexistent pmap.
* Add splvm prototypeSamuel Thibault2018-06-271-0/+1
| | | | * i386/i386/spl.h (splvm): Add prototype.
* Add cause_ast_check prototypeSamuel Thibault2018-06-271-0/+5
| | | | | | As reported by Almudena Garcia <liberamenso10000@gmail.com> * kern/ast.h [NCPUS > 1] (cause_ast_check): Add prototype.
* Define CPU_L1_SIZE even when NCPUS != 1Samuel Thibault2018-06-271-1/+2
| | | | | | As reported by Almudena Garcia <liberamenso10000@gmail.com> * kern/cpu_number.h [NCPUS != 1] (CPU_L1_SIZE): Define macro.
* Disable position-independant compilationSamuel Thibault2018-06-271-0/+4
| | | | | | | | as now enabled automatically by some distributions... Reported and tested by Almudena Garcia <liberamenso10000@gmail.com> * Makefile.am (AM_CFLAGS): Add -no-pie -fno-pic.
* Add missing prototypeSamuel Thibault2018-06-171-0/+1
| | | | * kern/machine.h (action_thread): Add prototype.
* Re-fix typoSamuel Thibault2018-06-171-1/+1
| | | | * machine/lock.h (_simple_lock_xchg_): Remove spurious parenthesis.
* Fix typoSamuel Thibault2018-06-171-1/+1
| | | | * machine/lock.h (_simple_lock_xchg_): Add missing parenthesis.
* Keep DMA enabled on QEMU disksSamuel Thibault2018-06-131-0/+8
| | | | | | | | When the host is very loaded, some requests might time out, but that is not a reason for disabling DMA, so keep it enabled. * linux/src/drivers/block/triton.c (config_drive_for_dma): When disk is QEMU, set using_dma and keep_settings to 1.
* vm_map: Fix bugs on huge masks parametersSamuel Thibault2018-04-222-3/+5
| | | | | * vm/vm_map.c (vm_map_find_entry_anywhere): Also check that (min + mask) & ~mask remains bigger than min.
* Avoid old typeSamuel Thibault2018-03-031-4/+2
| | | | | * include/device/bpf.h: Do not include <sys/types.h> (struct bpf_version): Use unsigned short type instead of u_short.