summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-10Merge branch 'master-user_level_drivers2' into master-user_level_drivers2-debianmaster-user_level_drivers-debianSamuel Thibault
2020-07-10Merge branch 'master' into master-user_level_drivers2Samuel Thibault
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-07-10typoSamuel Thibault
2020-07-10Merge branch 'master-user_level_drivers2' into master-user_level_drivers2-debianSamuel Thibault
2020-07-10uninitialized variablesSamuel Thibault
2020-07-10Fix duplicate initial unack for compatibilitySamuel Thibault
2020-07-10Merge branch 'master-user_level_drivers2-debian' of ↵Samuel Thibault
git.savannah.gnu.org:/srv/git/hurd/gnumach into master-user_level_drivers2-debian
2020-07-10Merge branch 'master-user_level_drivers2' into master-user_level_drivers2-debianSamuel Thibault
2020-07-10Merge branch 'master-user_level_drivers2' into master-user_level_drivers2-debianSamuel Thibault
2020-07-10Drop spurious fileSamuel Thibault
2020-07-09Merge branch 'master-user_level_drivers2' into master-user_level_drivers2-debianSamuel Thibault
2020-07-09Merge branch 'master-user_level_drivers-debian' into ↵Samuel Thibault
master-user_level_drivers2-debian
2020-07-09Fix RPC interfaceDamien Zammit
2020-07-09Fix RPC interfaceDamien Zammit
2020-07-09Merge branch 'master-user_level_drivers' into master-user_level_drivers-debianSamuel Thibault
2020-07-09Merge branch 'master' into master-user_level_driversSamuel Thibault
2020-07-09Add vm_allocate_contiguous RPCSamuel Thibault
This allows privileged userland drivers to allocate buffers for e.g. DMA, and thus need them to be physically contiguous and get their physical address. Initial work by Zheng Da, reworked by Richard Braun, Damien Zammit, and myself. * doc/mach.texi (vm_allocate_contiguous): New RPC. * i386/include/mach/i386/machine_types.defs (rpc_phys_addr_t): New type. * i386/include/mach/i386/vm_types.h [!MACH_KERNEL] (phys_addr_t): Set type to 64bits. (rpc_phys_addr_t): New type, always 64bits. * include/mach/gnumach.defs (vm_allocate_contiguous):New RPC. * vm/vm_user.c (vm_allocate_contiguous): New function.
2020-07-09Add experimental RPC infrastructureSamuel Thibault
This is free for experimenting RPCs, with no backward compatibility guarantees. * Makefrag.am (EXTRA_DIST): Add kern/experimental.srv. (include_mach_HEADERS): Add include/mach/experimental.defs. (nodist_lib_dep_tr_for_defs_a_SOURCES): Add kern/experimental.server.defs.c. (nodist_libkernel_a_SOURCES): Add kern/experimental.server.h, kern/experimental.server.c, kern/experimental.server.msgids. (nodist_libkernel_a_SOURCES): Add kern/experimental.server.defs. * include/mach/experimental.defs: New file. * kern/experimental.srv: New file. * kern/ipc_kobject.c: Include <kern/experimental.server.h>. (ipc_kobject_server): Call experimental_server_routine.
2020-07-09Add missing license statementsSamuel Thibault
2020-07-05Making vm_allocate_contiguous return a memory object is not really a prioritySamuel Thibault
2020-06-20vm_map: Allow passing the name of a memory objectSamuel Thibault
as is returned by vm_info. * vm/vm_user.c (vm_map): Before trying to vm_object_enter, try to simply lookup the name.
2020-06-01Support GPT disklabels and build them by defaultнаб
Based on UEFI 2.8A spec
2020-05-01kmem_alloc_wired: factorize with kmem_vallocSamuel Thibault
* vm/vm_kern.c (kmem_alloc_wired): Factorize with kmem_valloc.
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-04-16doc: Add missing word.Ricardo Wurmus
* doc/mach.texi (Features): Add missing word. Message-Id: <20200416202143.16804-1-rekado@elephly.net>
2020-04-06mach_trap_table: Fix 64bit versionSamuel Thibault
The addition of the mach_trap_name field made the 64bit unused field spurious. * kern/syscall_sw.h (mach_trap_t): Remove `unused' field.
2020-04-06Add warning about one of the next 64bit fixes to makeSamuel Thibault
2020-04-06ddb: Add 64bit support to memory examinationSamuel Thibault
* ddb/db_examine.c(db_examine): Add q modifier to examine 64bit values. * doc/mach.texi (examine): Document q modifier.
2020-04-06bootstrap: Add missing reference to send port between tasksSamuel Thibault
When giving the port to a bootstrap task to another bootstrap task, we need to add a reference. This shows up on error-cleanup (e.g. when forgetting to define the root). * kern/bootstrap.c (boot_script_insert_task_port): Call ipc_port_make_send on `task''s itk_sself.
2020-04-06boot_script: Explicit missing symbol nameSamuel Thibault
* kern/boot_script.c: Include <kern/printf.h>. (boot_script_exec): Print missing symbol name on symbol lookup error.
2020-04-06x86_64: Fix userland max addressSamuel Thibault
* i386/include/mach/i386/vm_param.h (VM_MAX_ADDRESS) [__x86_64__]: Set to 0x40000000UL.
2020-04-05x86_64: Fix passing argumentSamuel Thibault
* kern/boot_script.c (add_arg): Make val parameter long.
2020-04-05xen: Fix vm_page layout for x86_64Samuel Thibault
* i386/i386/vm_param.h [MACH_XEN && __LP64__] (VM_PAGE_MAX_SEGS): Set to 4. (VM_PAGE_DMA32_LIMIT): Define. (VM_PAGE_DIRECTMAP_LIMIT): Set to 0x400000000000. (VM_PAGE_HIGHMEM_LIMIT): Set to 0x10000000000000.
2020-04-05xen: Fix rdtsc call for x86_64Samuel Thibault
* i386/i386/xen.h (hyp_cpu_clock): Replace "=A" register constraint with separate "=a" and "=d".
2020-04-05Xen x86_64: Fix getting page table baseSamuel Thibault
* i386/intel/pmap.c (pmap_bootstrap): Reload base from boot_info at each loop.
2020-04-05Fix warningSamuel Thibault
* xen/net.c (hyp_net_intr): Cast WINDOW to long.
2020-04-05Fix xen buildSamuel Thibault
* xen/grant.c: Include <machine/model_dep.h> instead of <model_dep.h>.
2020-04-04pmap: Fix boot with kvm+PAE on some systemsSamuel Thibault
It seems some systems refuse the W bit in the pdp. Only enable it for Xen PV tables which do require it. * i386/intel/pmap.c (pmap_bootstrap, pmap_create) [!MACH_PV_PAGETABLES]: Do not set INTEL_PTE_WRITE in pdpbase entries.
2020-04-03pmap.h: Fix PDPMASK in 32bit PAESamuel Thibault
This was erroneously set to 0x1ff in 0b3504b6 ('pmap.h: Add 64bit variant') * i386/intel/pmap.h (PDPMASK) [PAE && !__x86_64__]: Set to 3.
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.
2020-03-31xen: fix const warningSamuel Thibault
* xen/public/io/ring.h (__CONST_RING_SIZE): Add macro from upstream * xen/net.c (WINDOW): Use __CONST_RING_SIZE instead of __RING_SIZE.
2020-03-31Restore vm_size_t to natural_tSamuel Thibault
Plenty of places such as glibc RPC uses currently assume that vm_size_t is a natural_t (thus int on 32bit), not an unsigned long. * i386/include/mach/i386/vm_types.h (vm_size_t) [!__x86_64__]: Set type to natural_t. * device/dev_page.c (device_pager_data_request): Cast vm_size_t to unsigned long. * i386/i386at/model_dep.c (c_boot_entry): Likewise.
2020-03-31seg: Fix fill_gate offsetSamuel Thibault
* i386/i386/seg.h (fill_gate): Make offset an unsigned long.
2020-03-29Fix 64bit TSS/LDT system descriptorsSamuel Thibault
* i386/i386/seg.h (real_descriptor64): New structure. (fill_descriptor64): New function. * i386/i386/gdt.h [__x86_64__] (KERNEL_TSS): Set to 0x40 instead of 0x20. [__x86_64__] (USER_TSS): Set to 0x58 instead of 0x30. [__x86_64__] (GDTSZ): Set to 12 instead of 11. (_fill_gdt_descriptor): New macro. (_fill_gdt_descriptor64, fill_gdt_descriptor64): New macros. (_fill_gdt_sys_descriptor, fill_gdt_sys_descriptor): New macros. * i386/i386/ktss.c (ktss_init): Use fill_gdt_sys_descriptor instead of fill_gdt_descriptor to set KERNEL_TSS GDT entry. * i386/i386/ldt.c (ldt_init): Likewise for KERNEL_LDT GDT entry. * i386/i386/ldt.h (fill_ldt_descriptor, fill_ldt_gate): Use sel_idx instead of reimplementing it. * i386/i386/mp_desc.c (mp_desc_init): Use _fill_gdt_sys_descriptor instead of reimplementing it.
2020-03-29Fix gate definition for 64bit.Samuel Thibault
* i386/i386/seg.h (real_gate): Add offset_ext and reserved fields. (fill_gate): Fill offset_ext and reserved fields.
2020-03-29ldt: do not reload kernel LDT if we are already using itSamuel Thibault
* i386/i386/pcb.c (switch_ktss): Do not call set_ldt(KERNEL_LDT) if get_ldt() is already KERNEL_LDT.
2020-03-29Share ncom, lpr, PAE definitions between i386 and x86_64Samuel Thibault
Otherwise the x86_64 configfrag would overwrite i386's. * i386/configfrag.ac: Remove ncom, nlpr, pae, NCOM, NLPR, PAE definitions. * i386/configfrag.ac: Remove ncom, nlpr, NCOM, NLPR, PAE definitions. Enable PAE. * configfrag-first.ac: New file, defines ncom, nlpr, pae. * configure.ac: Include configfrag-first.ac * configfrag.ac: Define NCOM, NLPR, PAE.
2020-03-29Fix warningSamuel Thibault
* i386/intel/pmap.c (pmap_enter): Fix print format.
2020-03-2964bit: fix warningsSamuel Thibault
* device/net_io.h (net_set_filter, ethernet_priority): Add prototypes. * device/subrs.h: Include <device/if_hdr.h>. (if_init_queues): Add prototype. * i386/i386/model_dep.h (machine_relax): Add prototype. * i386/i386/trap.c (i386_astintr): Move mycpu variable definition to where it is used. * i386/i386at/model_dep.c (i386at_init): Likewise for nb_direct, addr, delta. * i386/xen/xen.c (return_to_iret): Change type to char[]. * xen/console.c: Include <i386at/kd.h>. * xen/evt.c (hyp_evt_handler): Cast NEVNT to int. * xen/grant.c: Include <model_dep.h>. (hyp_grant_takeback, hyp_grant_init): Fix print format. * xen/net.c: Include <device/subrs.h>. (paranoia): Remove variable. (hyp_net_init, device_close, device_open): Cast nd - vif_data to int. Fix print format. * xen/store.c (store_put): Cast sizeof to int. * xen/time.c: Include "xen.h". * xen/xen.h (hypclock_machine_intr): Add prototype.