summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-06Print RPC messages for debuggingmaster-x86_64Samuel Thibault
2020-04-06Print mach system callsSamuel Thibault
To see the initial calls from userland.
2020-04-06Enable Xen emergency outputSamuel Thibault
2020-04-06Merge branch 'master' into master-x86_64Samuel Thibault
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-03Merge branch 'master' into master-x86_64Samuel Thibault
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-31Merge branch 'master' into master-x86_64Samuel Thibault
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-29Merge branch 'master' into master-x86_64Samuel Thibault
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-29Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-29Fix warningSamuel Thibault
* i386/intel/pmap.c (pmap_enter): Fix print format.
2020-03-29Merge branch 'master' into master-x86_64Samuel Thibault
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.
2020-03-29Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-2964bit: Fix vm_size_t sizeSamuel Thibault
It needs to be able to hold > 4G size. * i386/include/mach/i386/vm_types.h (vm_size_t): Set type to unsigned long. * vm/vm_user.c (vm_read, vm_write): Fix type according to RPC. * i386/i386at/model_dep.c (c_boot_entry): Fix format. * device/dev_pager.c (device_pager_data_request): Fix format.
2020-03-29mach_port: Fix 64bit warningsSamuel Thibault
* ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Cast sizeof to int.
2020-03-2964bit: Fix segment definitionsSamuel Thibault
* i386/i386/gdt.c: Include <kern/assert.h> (gdt_init) [__x86_64__]: Assert base is 0, pass 0 limit and 64bit size. * i386/i386/ktss.c: Warn that it needs to be fixed. * i386/i386/ldt.c: Warn that it needs to be fixed. * i386/i386/mp_desc.c: Warn that it needs to be fixed.
2020-03-29db_interface: Fix 64bit warningsSamuel Thibault
* i386/i386/db_interface.c (i386_last_kdb_sp): Set type to uintptr_t. (kdb_trap): Cast &type and &regs->uesp to uintptr_t. (kdb_kentry): Cast interrupt state with uintptr_t.
2020-03-29com: Fix 64bit warningsSamuel Thibault
* i386/i386at/com.c (comopen, comclose, comparam, comstart, comtimer): Cast tp->t_addr to uinptr_t instead of int.
2020-03-2964bit: Fix format warningsSamuel Thibault
* i386/i386at/biosmem.c: Include <inttypes.h> (biosmem_map_show, biosmem_load_segment): Use PRIx64.
2020-03-29Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-29x86_64: drop unused functionsSamuel Thibault
* x86_64/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions. (dr_msk, dr_addr): Remove variables.
2020-03-29x86_64: drop unused functionsSamuel Thibault
* x86_64/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions. (dr_msk, dr_addr): Remove variables.
2020-03-29Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-29x86_64: Fix map address given to linkerSamuel Thibault
See VM_MIN_KERNEL_ADDRESS. * x86_64/Makefrag.am (gnumach_LINKFLAGS): Set _START to _START_MAP+0x40000000 instead of +0xC0000000.
2020-03-29Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-29Enable x86_64 build for atEtienne Brateau
* x86_64/Makefrag.am: Add instructions to build
2020-03-29spl: Fix assembly filesEtienne Brateau
* x86_64/spl.S: fix instruction length
2020-03-28Merge branch 'master' into master-x86_64Samuel Thibault
2020-03-28Enable at x86_64 buildSamuel Thibault
* x86_64/configfrag.ac (ncom, nplr) [!at:x86_64]: Set to 0. (ncom) [at:x86_64]: Set to 4. (nlpr) [at:x86_64]: Set to 1. (ATX86_64): Define to 1. (NCOM): Define. (NLPR): Define. * configure.ac [at:x86_64]: Accept combination.