summaryrefslogtreecommitdiff
path: root/linux
AgeCommit message (Collapse)Author
2021-04-04Add ioapic support disabled by defaultDamien Zammit
Use --enable-ncpus=x --enable-apic where x > 1 for SMP+APIC support. Use neither for no SMP and old PIC support. Message-Id: <20210404050812.145483-1-damien@zamaudio.com>
2021-03-31linux: Add option to disable Linux groupsSamuel Thibault
* linux/configfrag.ac (--disable-linux-groups): New option. (AC_OPTION_Linux_group): Default to $enable_linux_groups.
2021-03-28linux irq: Avoid hardcoding the number of interrupts.Damien Zammit
* linux/dev/arch/i386/kernel/irq.c: Include <i386/irq.h> instead of <i386/pic.h>. (irq_action): Use NINTR instead of 16, do not bother expliciting the initialization. (install_user_intr_handler, request_irq, free_irq, probe_irq_on, probe_irq_off, reserve_mach_irqs): Use NINTR instead of 16.
2021-03-28configure: Add block groupDamien Zammit
This is the last group needed to easily disable the Linux glue. * linux/configfrag.ac (block): New group. (floppy): Set group to block. (ide): Set group to block. Message-Id: <20210328060320.36194-2-damien@zamaudio.com>
2021-03-27fix EISA check in init_IRQDamien Zammit
Message-Id: <20210326094850.2606-5-damien@zamaudio.com>
2021-02-21ahci: Fix variable nameAndrea G. Monaco
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Rename spd to det.
2020-11-28x86: Add XSAVE supportSamuel Thibault
* i386/i386/fpu.h (CPU_XCR0_X87, CPU_XCR0_SSE, CPU_XCR0_AVX, CPU_XCR0_MPX, CPU_XCR0_AVX512): New macros. (xsave): Pass fp_xsave_support to xsave. (fpu_save_context): When fp_kind is FP_387X, use xsave. (fp_xsave_support): New variable declaration. * i386/i386/proc_reg.h (cpuid): New macro. * linux/src/include/asm-i386/processor.h (cpuid): Disable macro. * i386/include/mach/i386/fp_reg.h: Include <stdint.h> (i386_xfp_xstate_header): New structure. (i386_xfp_save): Add xsave fields. * i386/i386/fpu.c (fp_xsave_support): New variable. (init_fpu): Look for XSAVE feature; if available, get the supported parts and set fp_kind to FP_387X. (fpu_module_init): Set ifps_cache alignment to alignof(struct i386_fpsave_state). (fpu_set_state): Make sure to clear all the ifps structure. Reuse the FP_387FX for the FP_387X case. (fpu_get_state, fpexterrflt, fpastintr, fp_state_alloc): Reuse the FP_387FX for the FP_387X case. (fp_save): When fp_kind is FP_387X, use xsave. (fp_load): When fp_kind is FP_387X, use xrstor. Reuse the FP_387FX for the FP_387X case.
2020-11-15genhd: Fix building without IDE driversSamuel Thibault
* linux/dev/drivers/block/genhd.c [!CONFIG_BLK_DEV_IDE] (device_setup): Do not call ide_setup.
2020-09-19smp: Add --enable-ncpus option and fix buildSamuel Thibault
* configfrag.ac (--enable-ncpus): Add option to set $mach_ncpus. * i386/i386/cpu_number.h (CPU_NUMBER, cpu_number): New macros, set to 0 for now. * i386/i386/db_interface.c (cpu_interrupt_to_db): New function. * i386/i386/db_interface.h (cpu_interrupt_to_db): New declaration. * i386/i386/mp_desc.c (int_stack_base): New array. (intel_startCPU): New function. * i386/i386at/model_dep.c: Include <i386/smp.h> (int_stack_top, int_stack_base): Turn into arrays (i386at_init): Update accesses accordingly. * i386/i386at/model_dep.h (int_stack_top, int_stack_base, ON_INT_STACK): Likewise. * i386/intel/pmap.c (cpus_active, cpus_idle, cpu_update_needed): Add variables. * i386/intel/pmap.h (cpus_active, cpus_idle, cpu_update_needed): Mark extern. * kern/cpu_number.h: Include <machine/cpu_number.h> * linux/dev/arch/i386/kernel/irq.c (local_bh_count, local_irq_count): Hardcode to the address of intr_count. We will not use the Linux code in SMP mode anyway.
2020-07-10Add hardware interrupt notification mechanismSamuel Thibault
This allows privileged userland drivers to get notifications of hardware interrupts. Initial work by Zheng Da, reworked by Damien Zammit and myself. * Makefrag.am (libkernel_a_SOURCES): Add device/intr.c and device/intr.h. (include_device_HEADERS): Add include/device/notify.defs and include/device/notify.h. * device/dev_hdr.h (name_equal): Add declaration. * device/ds_routines.c: Include <device/intr.h> (ds_device_intr_register, ds_device_intr_ack): New functions. * device/intr.c, device/intr.h: New files. * doc/mach.texi (Device Interrupt): New section. * i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386/irq.c and i386/i386/irq.h. * i386/i386/irq.c, i386/i386/irq.h: New files. * i386/i386at/conf.c: Include <device/intr.h>. (irqname): New macro. (dev_name_list): Add irq device. * include/device/device.defs (device_intr_register, device_intr_ack): New RPCs. * include/device/notify.defs, include/device/notify.h: New files. * kern/startup.c: Include <device/intr.h> (start_kernel_threads): Start intr_thread thread. * linux/dev/arch/i386/kernel/irq.c: Include <device/intr.h> (linux_action): Add user_intr field. (linux_intr): Call user_intr action if any. (mask_irq, unmask_irq): Move functions to i386/i386/pic.c (__disable_irq, __enable_irq): Move functions to i386/i386/irq.c. (install_user_intr_handler): New function. (request_irq): Initialize user_intr field. * linux/src/include/asm-i386/irq.h (__disable_irq, __enable_irq): Remove prototypes. * i386/i386/pic.c (mask_irq, unmask_irq): New functions. * i386/i386/pic.h (mask_irq, unmask_irq): New prototypes.
2020-06-01Support GPT disklabels and build them by defaultнаб
Based on UEFI 2.8A spec
2020-05-01Add kmem_vallocSamuel Thibault
Functions like vremap need to allocate some virtual addressing space before making their own mapping. kmem_alloc_wired can be used for that but that wastes memory. * vm/vm_kern.c (kmem_valloc): New function. * vm/vm_kern.h (kmem_valloc): New prototype. * linux/dev/glue/kmem.c (vremap): Call kmem_valloc instead of kmem_alloc_wired. Also check that `offset' is aligned on a page.
2020-03-31Fix build with -fno-commonSamuel Thibault
which will be the default in gcc-10. * device/io_req.h (io_inband_cache): Add extern qualifier. * device/tty.h (tthiwat, ttlowat): Likewise. * i386/i386/db_machdep.h (ddb_regs): Likewise. * kern/cpu_number.h (master_cpu): Likewise. * kern/time_stamp.h (ts_tick_count): Likewise. * linux/src/drivers/scsi/in2000.h (proc_scsi_in2000): Likewise. * device/ds_routines.c (io_inband_cache): New variable. * i386/i386/db_interface.c (ddb_regs): Likewise. * kern/processor.c (master_cpu): Likewise. * kern/time_stamp.c (ts_tick_count): Likewise. * linux/pcmcia-cs/modules/pci_fixup.c (pci_root): Remove variable.
2019-11-12irq: Add disabling counterSamuel Thibault
* linux/dev/arch/i386/kernel/irq.c (ndisabled_irq): New array. (__disable_irq, __enable_irq): New functions, count with ndisabled_irq before really calling mask_irq/unmask_irq. (linux_pic_mask): New variable. (disable_irq, enable_irq): Manage linux_pic_mask and call __disable_irq/__enable_irq instead of calling mask_irq/unmask_irq. * linux/src/include/asm-i386/irq.h (__disable_irq, __enable_irq): New prototypes.
2019-11-10spl: Remove intpri arraySamuel Thibault
And simplify prtnull vs intnull vs linux_bad_intr. * i386/i386/ipl.h (intpri): Remove declaration * i386/i386/pic.c (prtnull_count): Remove variable. (prtnull): Remove function. * i386/i386/pic.h (prtnull): Remove declaration. * i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Use ivect instead of intpri to determine irq availability. Do not set intpri. * i386/i386at/pic_isa.c (ivect): Replace prtnull with intnull. (intpri): Remove array. * linux/dev/arch/i386/kernel/irq.c (linux_intr_pri): Remove variable. (linux_bad_intr): Remove function. (setup_x86_irq): Do not check intpri coherency. Do not set intpri. Set default ivect to intnull instead of linux_bad_intr. (probe_irq_on): Check ivect against intnull instead of linux_bad_intr. Do not set intpri. (probe_irq_off): Likewise. (reserve_mach_irqs): Do not check against prtnull. (old_clock_pri): Remove variable. (init_IRQ): Do not set intpri. Do not set ivect to linux_bad_intr. (restore_IRQ): Do not set ivect. * i386/i386/pit.c (clkstart): Do not set intpri. * i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise. * linux/dev/drivers/block/genhd.c (device_setup): Do not set linux_intr_pri. * linux/dev/glue/block.c (init_partition, device_open): Likewise. * linux/dev/glue/net.c (device_open): Likewise. * linux/dev/glue/glue.h (linux_intr_pri, linux_bad_intr): Remove declarations.
2019-11-10Make default boot less scarySamuel Thibault
* linux/configfrag.ac (AM53C974, aha1542, eata, eata_pio, ppa, wd7000, 3c515, de600, de620): Disable by default drivers for elder hardware, which have scary boot messages. * linux/pcmcia-cs/modules/ds.c (init_pcmcia_ds): Make message about socket not being found less scary.
2019-11-10simplify interrupt handlingDamien Zammit
We have removed spl levels, now remove the machinery to manage different PIC masks according to levels. Only keep machinery to disable interrupts whatever the level. * i386/i386/pic.c (pic_mask): Remove array. (picinit): Do not form PIC mask. Set initial PIC mask to 0. (form_pic_mask): Remove function. * i386/i386/pic.h (form_pic_mask, pic_mask): Remove declarations. * i386/i386/spl.S (SETMASK): Remove macro. (XEN_SETMASK): Add macro, containing the Xen version of SETMASK. (spl0, splx_cli, spl) [MACH_XEN]: Call XEN_SETMASK instead of SETMASK. * i386/i386/pit.c (clkstart): Do not call form_pic_mask. * i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Likewise. * i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise. * linux/dev/arch/i386/kernel/irq.c (mask_irq, unmask_irq): Directly update curr_pic_mask without using pic_mask array. (init_IRQ, restore_IRQ): do not call form_pic_mask. * linux/dev/include/asm-i386/system.h: Include <i386/ipl.h>. (__save_flags, __restore_flags): Use curr_ipl and splx instead of hardware flags. * linux/dev/init/main.c (linux_init): Do not call cli. * linux/dev/kernel/sched.c (linux_timer_intr): Do not use pic_mask. * linux/src/drivers/block/ide.c (try_to_identify): Disable irq probing. * linux/src/drivers/scsi/NCR53c406a.c (NCR53c406a_detect): Disable irq probing.
2019-11-10ide: Use default IRQ by defaultSamuel Thibault
To avoid even trying to probe IRQs. Nowadays' hardware use the default IRQ anyway. * linux/src/drivers/block/ide.c (init_hwif_data): Set hwif->irq to default_irqs[index].
2019-09-06compiler-gcc*.h: Keep on the gcc 5 version for nowSamuel Thibault
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.
2019-08-31Add gcc-9 compatibilitySamuel Thibault
* linux/src/include/linux/compiler-gcc9.h: New file.
2019-08-11Fix printk formatSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_identify, ahci_probe_port): Fix format.
2019-04-27ahci: Ignore multifunction bit in PCI header typeSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Clear bit 7 of hdrtype.
2018-12-30Move -D__ASSEMBLY__ to general AM_CCASFLAGSSamuel Thibault
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__
2018-07-28Add gcc-8 compatibilitySamuel Thibault
* linux/src/include/linux/compiler-gcc8.h: New file.
2018-06-13Keep DMA enabled on QEMU disksSamuel Thibault
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.
2017-11-01linux block: fix outbound access to non-directmap user dataSamuel Thibault
* linux/dev/glue/block.c (rdwr_full): Set BH_Bounce if the physical address of the user data is not in directmap.
2017-10-31linux-block: Fix calling vm_map_copy_discard on uninitialized variableSamuel Thibault
This happens if passed count is 0. Reported by Richard Braun. * linux/dev/glue/block.c (device_write): Set copy variable before vm_map_copy_discard() is called.
2017-10-26linux: Fix warnings.Justus Winter
* linux/dev/glue/net.c (device_write): Remove unused variables.
2017-09-30linux: Fix interrupt glue.Justus Winter
Previously, we used an invalid pointer to mark interrupts as reserved by Mach. This, however, crashes code trying to iterate over the list of interrupt handlers. Use a valid structure instead. * linux/dev/arch/i386/kernel/irq.c (reserved_mach_handler): New function. (reserved_mach): New variable. (reserve_mach_irqs): Use the new variable.
2017-05-07Support GCC 7David Michael
* Makefile.am (clib_routines): Add __udivmoddi4. * linux/src/include/linux/compiler-gcc7.h: New file.
2016-10-12linux: Remove incompatible local prototype.Justus Winter
* linux/dev/glue/kmem.c (vremap): Remove prototype, include the right header instead.
2016-10-01kern: Improve assertions and panics.Justus Winter
* kern/assert.h (Assert): Add function argument. (assert): Supply function argument. * kern/debug.c (Assert): Add function argument. Unify message format. (panic): Rename to 'Panic', add location information. * kern/debug.h (panic): Rename, and add a macro version that supplies the location. * linux/dev/include/linux/kernel.h: Use the new panic macro.
2016-09-21Update device drivers for highmem supportRichard Braun
Unconditionally use bounce buffers for now. * linux/dev/glue/net.c (device_write): Unconditionally use a bounce buffer. * xen/block.c (device_write): Likewise. * xen/net.c: Include <device/ds_routines.h>. (device_write): Unconditionally use a bounce buffer.
2016-09-21Update Linux block layer glue codeRichard Braun
The Linux block layer glue code needs to use page nodes with the appropriate interface since their redefinition as struct list. * linux/dev/glue/block.c: Include <kern/list.h>. (struct temp_data): Define member `pages' as a struct list. (alloc_buffer): Update to use list_xxx functions. (free_buffer, INIT_DATA, device_open, device_read): Likewise.
2016-09-21Redefine what an external page isRichard Braun
Instead of a "page considered external", which apparently takes into account whether a page is dirty or not, redefine this property to reliably mean "is in an external object". This commit mostly deals with the impact of this change on the page allocation interface. * i386/intel/pmap.c (pmap_page_table_page_alloc): Update call to vm_page_grab. * kern/slab.c (kmem_pagealloc_physmem): Use vm_page_grab instead of vm_page_grab_contig. (kmem_pagefree_physmem): Use vm_page_release instead of vm_page_free_contig. * linux/dev/glue/block.c (alloc_buffer, device_read): Update call to vm_page_grab. * vm/vm_fault.c (vm_fault_page): Update calls to vm_page_grab and vm_page_convert. * vm/vm_map.c (vm_map_copy_steal_pages): Update call to vm_page_grab. * vm/vm_page.h (struct vm_page): Remove `extcounted' member. (vm_page_external_limit, vm_page_external_count): Remove extern declarations. (vm_page_convert, vm_page_grab): Update declarations. (vm_page_release, vm_page_grab_phys_addr): New function declarations. * vm/vm_pageout.c (VM_PAGE_EXTERNAL_LIMIT): Remove macro. (VM_PAGE_EXTERNAL_TARGET): Likewise. (vm_page_external_target): Remove variable. (vm_pageout_scan): Remove specific handling of external pages. (vm_pageout): Don't set vm_page_external_limit and vm_page_external_target. * vm/vm_resident.c (vm_page_external_limit): Remove variable. (vm_page_insert, vm_page_replace, vm_page_remove): Update external page tracking. (vm_page_convert): Remove `external' parameter. (vm_page_grab): Likewise. Remove specific handling of external pages. (vm_page_grab_phys_addr): Update call to vm_page_grab. (vm_page_release): Remove `external' parameter and remove specific handling of external pages. (vm_page_wait): Remove specific handling of external pages. (vm_page_alloc): Update call to vm_page_grab. (vm_page_free): Update call to vm_page_release. * xen/block.c (device_read): Update call to vm_page_grab. * xen/net.c (device_write): Likewise.
2016-09-21Remove phys_first_addr and phys_last_addr global variablesRichard Braun
The old assumption that all physical memory is directly mapped in kernel space is about to go away. Those variables are directly linked to that assumption. * i386/i386/model_dep.h (phys_first_addr): Remove extern declaration. (phys_last_addr): Likewise. * i386/i386/phys.c (pmap_zero_page): Use VM_PAGE_DIRECTMAP_LIMIT instead of phys_last_addr. (pmap_copy_page, copy_to_phys, copy_from_phys): Likewise. * i386/i386/trap.c (user_trap): Remove check against phys_last_addr. * i386/i386at/biosmem.c (biosmem_bootstrap_common): Don't set phys_last_addr. * i386/i386at/mem.c (memmmap): Use vm_page_lookup_pa to determine if a physical address references physical memory. * i386/i386at/model_dep.c (phys_first_addr): Remove variable. (phys_last_addr): Likewise. (pmap_free_pages, pmap_valid_page): Remove functions. * i386/intel/pmap.c: Include i386at/biosmem.h. (pa_index): Turn into an alias for vm_page_table_index. (pmap_bootstrap): Replace uses of phys_first_addr and phys_last_addr as appropriate. (pmap_virtual_space): Use vm_page_table_size instead of phys_first_addr and phys_last_addr to obtain the number of physical pages. (pmap_verify_free): Remove function. (valid_page): Turn this macro into an inline function and rewrite using vm_page_lookup_pa. (pmap_page_table_page_alloc): Build the pmap VM object using vm_page_table_size to determine its size. (pmap_remove_range, pmap_page_protect, phys_attribute_clear, phys_attribute_test): Turn page indexes into unsigned long integers. (pmap_enter): Likewise. In addition, use either vm_page_lookup_pa or biosmem_directmap_end to determine if a physical address references physical memory. * i386/xen/xen.c (hyp_p2m_init): Use vm_page_table_size instead of phys_last_addr to obtain the number of physical pages. * kern/startup.c (phys_first_addr): Remove extern declaration. (phys_last_addr): Likewise. * linux/dev/init/main.c (linux_init): Use vm_page_seg_end with the appropriate segment selector instead of phys_last_addr to determine where high memory starts. * vm/pmap.h: Update requirements description. (pmap_free_pages, pmap_valid_page): Remove declarations. * vm/vm_page.c (vm_page_seg_end, vm_page_boot_table_size, vm_page_table_size, vm_page_table_index): New functions. * vm/vm_page.h (vm_page_seg_end, vm_page_table_size, vm_page_table_index): New function declarations. * vm/vm_resident.c (vm_page_bucket_count, vm_page_hash_mask): Define as unsigned long integers. (vm_page_bootstrap): Compute VP table size based on the page table size instead of the value returned by pmap_free_pages.
2016-05-26Fix buffer size passed to scsi_do_cmdSamuel Thibault
* linux/src/drivers/scsi/eata_dma_proc.c (eata_proc_info): Increase cmd size to 12. * linux/src/drivers/scsi/sd.c (do_sd_request, sd_init_done): Likewise. * linux/src/drivers/scsi/sr.c (do_sr_request, sr_init_done): Likewise. * linux/src/drivers/scsi/sr_ioctl.c (sr_ioctl): Likewise with sr_cmd.
2016-04-04Use uint32_t instead of unsigned32_t.Flavio Cruz
Implement stdint.h and use it in gnumach. Remove old type definitions such as signed* and unsigned*. * Makefile.am: Add -ffreestanding. * i386/i386/xen.h: Use uint64_t. * i386/include/mach/i386/machine_types.defs: Use uint32_t and int32_t. * i386/include/mach/i386/vm_types.h: Remove definitions of int*, uint*, unsigned* and signed* types. * i386/xen/xen.c: Use uint64_t. * include/device/device_types.defs: Use uint32_t. * include/mach/std_types.defs: Use POSIX types. * include/mach/std_types.h: Include stdint.h. * include/stdint.h: New file with POSIX types. * include/sys/types.h: Include stdint.h. * ipc/ipc_kmsg.c: Use uint64_t. * kern/exception.c: Use uint32_t. * linux/dev/include/linux/types.h: Remove POSIX types. * xen/block.c: Use uint64_t. * xen/net.c: Do not use removed unsigned*_t types. * xen/ring.h: Use uint32_t instead. * xen/store.c: Use uint32_t. * xen/store.h: Use uint32_t. * xen/time.c: Use POSIX types only. * xen/time.h: Use uint64_t.
2016-01-29Disable probing legacy IDE when AHCI driver worksSamuel Thibault
* linux/src/drivers/block/ide.c (default_io_base): Do not qualify const. (ide_disable_base): New function. * linux/dev/include/linux/blk.h (ide_disable_base): New declaration. * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Call ide_disable_base with each I/O BAR of the AHCI PCI card.
2016-01-29Use PCI macrosSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Use PCI_BASE_ADDRESS_SPACE_IO and PCI_BASE_ADDRESS_MEM_MASK macros instead of hardcoded values.
2016-01-29ahci: print PCI bus/dev/fun in hexadecimalSamuel Thibault
* linux/dev/drivers/block/ahci.c: Print PCI bus/dev/fun number in hexadecimal
2016-01-29Fallback on direct PCI access when no BIOS32 is availableSamuel Thibault
Some hardware start shippping with no BIOS32 at all, and we'll have to implement ACPI to get the address of the mmconfig table. In the meanwhile, we can hope that the direct probe works (it does on HP820 for instance). * linux/src/arch/i386/kernel/bios32.c (pcibios_init): Also try check_direct_pci() when bios32 probing failed.
2016-01-23Use vm_page as the physical memory allocatorRichard Braun
This change replaces the historical page allocator with a buddy allocator implemented in vm/vm_page.c. This allocator allows easy contiguous allocations and also manages memory inside segments. In a future change, these segments will be used to service requests with special constraints, such as "usable for 16-bits DMA" or "must be part of the direct physical mapping". * Makefrag.am (libkernel_a_SOURCES): Add vm/vm_page.c. * i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/biosmem.{c,h}. * i386/i386/vm_param.h: Include kern/macros.h. (VM_PAGE_DMA_LIMIT, VM_PAGE_MAX_SEGS, VM_PAGE_DMA32_LIMIT, VM_PAGE_DIRECTMAP_LIMIT, VM_PAGE_HIGHMEM_LIMIT, VM_PAGE_SEG_DMA, VM_PAGE_SEG_DMA32, VM_PAGE_SEG_DIRECTMAP, VM_PAGE_SEG_HIGHMEM): New macros. * i386/i386at/model_dep.c: Include i386at/biosmem.h. (avail_next, avail_remaining): Remove variables. (mem_size_init): Remove function. (i386at_init): Initialize and use the biosmem module for early physical memory management. (pmap_free_pages): Return phys_last_addr instead of avail_remaining. (init_alloc_aligned): Turn into a wrapper for biosmem_bootalloc. (pmap_grab_page): Directly call init_alloc_aligned instead of pmap_next_page. * i386/include/mach/i386/vm_types.h (phys_addr_t): New type. * kern/bootstrap.c (free_bootstrap_pages): New function. (bootstrap_create): Call free_bootstrap_pages instead of vm_page_create. * kern/cpu_number.h (CPU_L1_SIZE): New macro. * kern/slab.h: Include kern/cpu_number.h. (CPU_L1_SIZE): Remove macro, moved to kern/cpu_number.h. * kern/startup.c (setup_main): Change the value of machine_info.memory_size. * linux/dev/glue/glue.h (alloc_contig_mem, free_contig_mem): Update prototypes. * linux/dev/glue/kmem.c (linux_kmem_init): Don't use defunct page queue. * linux/dev/init/main.c (linux_init): Don't free unused memory. (alloc_contig_mem, free_contig_mem): Turn into wrappers for the vm_page allocator. * linux/pcmcia-cs/glue/ds.c (PAGE_SHIFT): Don't undefine. * vm/pmap.h (pmap_startup, pmap_next_page): Remove prototypes. * vm/vm_fault.c (vm_fault_page): Update calls to vm_page_convert. * vm/vm_init.c (vm_mem_init): Call vm_page_info_all. * vm/vm_object.c (vm_object_page_map): Update call to vm_page_init. * vm/vm_page.h (vm_page_queue_free): Remove variable declaration. (vm_page_create, vm_page_release_fictitious, vm_page_release): Remove declarations. (vm_page_convert, vm_page_init): Update prototypes. (vm_page_grab_contig, vm_page_free_contig): New prototypes. * vm/vm_resident.c (vm_page_template, vm_page_queue_free, vm_page_big_pagenum): Remove variables. (vm_page_bootstrap): Update and call vm_page_setup. (pmap_steal_memory): Update and call vm_page_bootalloc. (pmap_startup, vm_page_create, vm_page_grab_contiguous_pages): Remove functions. (vm_page_init_template, vm_page_grab_contig, vm_page_free_contig): New functions. (vm_page_init): Update and call vm_page_init_template. (vm_page_release_fictitious): Make static. (vm_page_more_fictitious): Update call to vm_page_init. (vm_page_convert): Rewrite to comply with vm_page. (vm_page_grab): Update and call vm_page_alloc_pa. (vm_page_release): Update and call vm_page_free_pa.
2016-01-14Fix build with gcc-6Samuel Thibault
* linux/src/include/linux/compiler-gcc6.h: New file.
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-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 *.
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 missing format in printkSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing format.
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.