summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-06-10Add non-contiguous mmap supportSamuel Thibault
* i386/include/mach/i386/multiboot.h (multiboot_mmap): New structure * i386/i386at/model_dep.c (mem_size_init): Parse boot_info.mmap_addr if available. (init_alloc_aligned): Likewise.
2013-06-09Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-06-09Do not skip AHCI controller without HOST_CAP_ONLYSamuel Thibault
We rather rely on the announced PCI type to determine whether to use IDE or AHCI. * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Do not skip AHCI controller without HOST_CAP_ONLY.
2013-06-09Add timeout to ahci IDENTIFYSamuel Thibault
* linux/dev/drivers/block/ahci.c (identify_timeout): New function. (identify_timer): New variable. (ahci_probe_port): Add timer to abandon identify command.
2013-06-09Fix printf formatSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_do_request): Cast capacity into unsigned long and use %lu format. (ahci_probe_port): Cast size into unsigned and use %u format.
2013-06-09Fix formatSamuel Thibault
2013-06-09Fix object construction in the slab allocatorRichard Braun
There is currently no actual use of constructors, which is why this bug has been long overlooked. * kern/slab.c (kmem_cpu_pool_fill): Call constructor on buffers unless verification is enabled for the cache, or the constructor is NULL.
2013-06-04Comment unused variableMarin Ramesa
* kern/ipc_mig.c (syscall_device_write_request): Comment unused variable.
2013-06-04Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-06-04Fix format warningsMiguel Figueiredo
* vm/vm_resident.c (pmap_startup): Fix printf format. * xen/block.c (hyp_block_init, device_write): Likewise. * xen/net.c (hyp_net_init): Likewise.
2013-06-02Remove unused variableMiguel Figueiredo
* kern/act.c (act_create): Remove unused variable.
2013-06-02Fix yet another locking error in the slab allocatorRichard Braun
* kern/slab.c (kmem_cache_free): Relock cache before retrying releasing an object to the CPU pool layer.
2013-06-02Remove unused variableMiguel Figueiredo
* ipc/mach_port.c (mach_port_set_syscall_right): Remove unused variable.
2013-05-30Add LBA48 support to AHCI driverSamuel Thibault
* linux/dev/drivers/block/ahci.c (port): Extend `capacity' field type to unsigned long long. Add `lba48' field. Make `identify' field unsigned. (ahci_do_port_request): When `lba48' is true, use WIN_READDMA_EXT and WIN_WRITEDMA_EXT commands. (ahci_probe_port): Test lba48 flag, read capacity and set `lba48' accordingly. Display size in GiB above 10GiB. * linux/src/include/linux/hdreg.h (WIN_READDMA_EXT, WIN_WRITEDMA_EXT): New macros (hd_driveid): Add `command_set_2' and lba_capacity_2' fields.
2013-05-27Remove old elevator algorithm functionMiguel Figueiredo
* device/blkio.c (disksort): remove unused function
2013-05-19Remove unneeded variable initializationMiguel Figueiredo
* kern/thread.c (thread_force_terminate): Remove unneeded variable initialization.
2013-05-19Remove duplicate lineSamuel Thibault
Reported by Miguel Figueiredo * kern/thread.c (thread_create): Remove duplicate reset of new_thread->pc_sample.buffer to 0.
2013-05-16Reduce fragmentation in the slab allocatorRichard Braun
This reverts a change brought when reworking slab lists handling that made the allocator store slabs in LIFO order, whatever their reference count. While it's fine for free slabs, it actually increased fragmentation for partial slabs. * kern/slab.c (kmem_cache_alloc_from_slab): Insert slabs that become partial at the end of the partial slabs list.
2013-05-16Rename list_insert to list_insert_headRichard Braun
This change increases clarity. * kern/list.h (list_insert): Rename to ... (list_insert_head): ... this. * kern/slab.c: Update calls to list_insert.
2013-05-15Fix itemization errors in the texinfo documentationRichard Braun
* doc/mach.texi: Replace @itemx with @item for --enable-tulip and --enable-epic100.
2013-05-13Drop unused variablesMiguel Figueiredo
* kern/slab.c (kalloc_init): Remove unused variables.
2013-05-11Add missing parameters to printfSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing parameters to printf.
2013-05-10Fix ahci.h pathSamuel Thibault
* linux/Makefrag.am (liblinux_a_SOURCES): Fix path to ahci.h
2013-05-10Add AHCI driverSamuel Thibault
* linux/dev/glue/kmem.c (vmtophys): New function. * linux/dev/include/linux/mm.h (vmtophys): New prototype. * linux/src/include/linux/pci.h (PCI_CLASS_STORAGE_SATA, PCI_CLASS_STORAGE_SATA_AHCI): New macros. * linux/dev/drivers/block/ahci.c: New file. * linux/dev/include/ahci.h: New file. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/dev/drivers/block/ahci.c and linux/dev/drivers/block/ahci.h. * linux/src/drivers/block/ide.c: Include <ahci.h>. (probe_for_hwifs): Call ahci_probe_pci.
2013-05-02Fix non-block-aligned-offset readsSamuel Thibault
This fixes grave issues when device_read is called with non-block-aligned offset, e.g. when using grub-probe with a non-block-aligned partition table. * linux/dev/glue/block.c (rdwr_full): Use current position instead of base buffer position to check for alignment.
2013-05-01Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-05-01Fix macro nameSamuel Thibault
* linux/dev/glue/block.c (device_get_status): Use DEV_GET_RECORDS_RECORD_SIZE for DEV_GET_RECORDS instead of DEV_GET_SIZE_RECORD_SIZE.
2013-04-21Optimize slab reapingRichard Braun
Instead of walking the list of free slabs while holding the cache lock, detach the list from the cache and directly compute the final count values, and destroy slabs after releasing the cache lock. * kern/slab.c (kmem_cache_reap): Optimize.
2013-04-21Rework slab lists handlingRichard Braun
Don't enforce strong ordering of partial slabs. Separating partial slabs from free slabs is already effective against fragmentation, and sorting would sometimes cause pathological scalability issues. In addition, store new slabs (whether free or partial) in LIFO order for better cache usage. * kern/slab.c (kmem_cache_grow): Insert new slab at the head of the slabs list. (kmem_cache_alloc_from_slab): Likewise. In addition, don't sort partial slabs. (kmem_cache_free_to_slab): Likewise. * kern/slab.h: Remove comment about partial slabs sorting.
2013-04-21Fix locking error in the slab allocatorRichard Braun
* kern/slab.c (kmem_cache_free): Lock cache before releasing an object to the slab layer.
2013-04-08Add -fno-optimize-sibling-calls option for better kdb tracesSamuel Thibault
* Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-optimize-sibling-calls option.
2013-03-11Update BASEPRI_USERSamuel Thibault
* kern/sched.h (BASEPRI_USER): Increase to 25.
2013-03-11Fix build without kdbSamuel Thibault
* i386/i386/db_interface.h [! MACH_KBD] (db_set_hw_watchpoint, db_clear_hw_watchpoint, db_dr): Do not declare functions.
2013-03-06Increase number of prioritiesSamuel Thibault
* kern/sched.h (NRQS): Increase to 50.
2013-03-05Do not hardcode maximum priority valueSamuel Thibault
* kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1. idle_thread: Likewise.
2013-02-04Include machine/db_interface instead of hardcoding function prototypesSamuel Thibault
* ddb/db_access.c: Include <machine/db_interface.h>. (db_read_bytes, db_write_bytes): Remove functions prototypes. (db_get_task_value): Fix calling db_read_bytes. (db_put_task_value): Fix calling db_write_bytes. * ddb/db_watch.c: Include <machine/db_interface.h>. (db_set_hw_watchpoint, db_clear_hw_watchpoint): Remove functions prototypes.
2013-02-04Plug hw debug register support into kdbSamuel Thibault
Make the `watch' command use hw debug registers whenever possible. * ddb/db_watch.c (db_set_hw_watchpoint, db_clear_hw_watchpoint): Add functions prototypes. (db_set_watchpoints): Try to call db_set_hw_watchpoint. (db_clear_watchpoints): Call db_clear_hw_watchpoint. * i386/i386/db_interface.c: Include <ddb/db_watch.h> (db_set_hw_watchpoint): Take a db_watchpoint_t WATCH parameter instead of its content. Remove support for clearing a debug register. (db_clear_hw_watchpoint): Add function. * i386/i386/db_interface.h: Include <ddb/db_watch.h>. (db_set_hw_watchpoint): Fix function prototype. (db_clear_hw_watchpoint): Add function prototype. * i386/i386/db_machdep.h: Do not include <machine/db_interface.h>
2013-02-04Document dwatchSamuel Thibault
* doc/mach.texi: Add dwatch documentation.
2013-02-04Add x86 hardware debugging register supportSamuel Thibault
This adds using the x86 hardware debugging registers, either from the kernel through db_set_hw_watchpoint, or from userland through i386_DEBUG_STATE. While the kernel is using the registers, the userland values are ignored. * i386/i386/db_interface.c (kernel_dr, ids): New variables. (db_load_context, db_get_debug_state, db_set_debug_state, db_dr, db_set_hw_watchpoint): New functions. (kdb_trap): Use get_dr* instead of dr_addr[]. * i386/i386/db_interface.h (db_user_to_kernel_address, db_set_hw_watchpoint) (db_dr, db_get_debug_state, db_set_debug_state, db_load_context): Add functions prototypes. (dr0, dr1, dr2, dr3): Remove functions prototypes. * i386/i386/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions. (dr_msk, dr_addr): Remove variables. * i386/include/mach/i386/thread_status.h (i386_DEBUG_STATE): Add macro. (i386_debug_state): Add structure. (i386_DEBUG_STATE_COUNT): Add macro. * i386/i386/thread.h: Include <mach/machine/thread_status.h>. (i386_machine_state): Add `struct i386_debug_state ids' field. * i386/i386/pcb.c: Include <i386/db_interface.h>. (switch_ktss): Call db_load_context. (thread_setstatus, thread_getstatus): Add I386_DEBUG_STATE case. * i386/i386/proc_reg.h (get_dr0, set_dr0, get_dr1, set_dr1, get_dr2, set_dr2, get_dr3, set_dr3, get_dr6, set_dr6, get_dr7, set_dr7): Add macros.
2013-02-03Prevent the kernel from making any FPU useSamuel Thibault
* i386/Makefrag.am (AM_CFLAGS): Add -mno-3dnow -mno-mmx -mno-sse -mno-sse2.
2013-01-31Implement pmap_map_mfn for the PVH caseSamuel Thibault
* i386/intel/pmap.c (pmap_map_mfn) [MACH_XEN && !MACH_PV_PAGETABLES]: Implement.
2013-01-31Make the PVH variant get sure that the support is available in the hypervisorSamuel Thibault
* i386/xen/xen_boothdr.S (FEATURES): Mark PVH features as required.
2013-01-30Add comment for TODOSamuel Thibault
2013-01-30Do not use 4gb segment assistance in PVHSamuel Thibault
* i386/i386/gdt.c (gdt_init) [MACH_PV_DESCRIPTORS && !MACH_PV_PAGETABLES]: Do not enable VMASST_TYPE_4gb_segments. * i386/i386/trap.c (user_trap): Do not handle trap 15, 4gb segment assist notification.
2013-01-30Drop spurious inclusionSamuel Thibault
* i386/i386/vm_param.h [MACH_XEN && !MACH_PV_PAGETABLES]: Do not include <xen/public/xen.h>.
2013-01-30Increase VM_MAX_KERNEL_ADDRESS for PVH caseSamuel Thibault
* i386/i386/vm_param.h (VM_MAX_KERNEL_ADDRESS) [MACH_XEN && !MACH_PV_PAGETABLES]: Remove hypervisor area from VM_MAX_KERNEL_ADDRESS restriction.
2013-01-28More ifdef fixes for ring1 support and pv descriptors supportSamuel Thibault
* i386/i386/idt_inittab.S: Turn MACH_XEN test into MACH_PV_DESCRIPTORS test. * i386/i386/fpu.c: Turn appropriate MACH_HYP/XEN tests into MACH_RING1 tests. * i386/i386/ktss.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/proc_reg.h: Likewise. * i386/i386/trap.c: Likewise.
2013-01-28Add initial code for disabling PV pagetablesSamuel Thibault
* xen/configfrag.ac (--disable-pv-pagetables): Add option. * i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_PAGETABLES]: Add writable_page_tables. * i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into MACH_PV_PAGETABLES tests. * i386/i386/i386asm.sym: Likewise * i386/i386/ldt.c: Likewise * i386/i386/locore.S: Likewise * i386/i386/proc_reg.h: Likewise * i386/i386/user_ldt.c: Likewise * i386/i386/vm_param.h: Likewise * i386/i386/xen.h: Likewise * i386/i386at/model_dep.c: Likewise * i386/intel/pmap.h: Likewise * include/mach/xen.h: Likewise * xen/console.c: Likewise * xen/store.c: Likewise * i386/intel/pmap.c: Likewise. Define pmap_map_mfn as TODO stub.
2013-01-28Fix commentsSamuel Thibault
2013-01-28Fix build with --disable-pseudo-physSamuel Thibault
* i386/i386/i386asm.sym (PFN_LIST) [!MACH_PSEUDO_PHYS]: Do not define.