summaryrefslogtreecommitdiff
path: root/i386
AgeCommit message (Collapse)Author
2011-04-22Update constants to nowadays standardsSamuel Thibault
Follow-up to fa6c711d * vm/vm_object.c (DEVICE_IO_MAP_SIZE): Increase to 16MiB. * kern/kalloc.c (kalloc_map_size): Increase to 64MiB. * i386/intel/pmap.c (morevm): Increase to 128MiB.
2011-04-19Close call stack on continuationSamuel Thibault
* i386/i386/locore.S (call_continuation): Push dummy return address instead of letting the callee get a random one.
2011-04-03Fix build with kdb from make dist-generated tarballSamuel Thibault
* Makefrag.am (libkernel_a_SOURCES): Add ddb/db_cond.h, ddb/db_examine.h, ddb/db_input.h, ddb/db_macro.h, ddb/db_trap.h. * i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386/db_interface.h
2011-03-21Fix typoSamuel Thibault
* i386/i386at/kd.c (key_map): Fix K_PERIOD typo.
2011-03-20Clean kd.[ch]Samuel Thibault
* i386/i386at/kd.h (NUMSTATES): Fix comment about NORM_STATE. * i386/i386at/kd.c (key_map): Use K_* macros instead of numeric values.
2011-03-11Fix continuation after keyboard debugger invocationSamuel Thibault
According to stack layout change in 5da1aea7 * i386/i386/locore.S [!MACH_XEN] (RET_OFFSET): Define to 12 instead of 8.
2011-03-06Enable global pages after enabling pagingSamuel Thibault
* i386/i386at/model_dep.c (i386at_init): Enable CR4_PGE after enabling CR0_PG.
2011-03-05Fix temporary direct mapping during page table enablingSamuel Thibault
* i386/i386at/model_dep.c (i386at_init): Count the number of actually needed temporary L1 direct mapping by getting the last used address from init_alloc_aligned(), instead of hardcoding it to 1 or 3, and then use a for loop.
2011-03-03Keep supplementary L1 pages read-onlySamuel Thibault
* i386/intel/pmap.c (pmap_bootstrap): Fix loop which keeps supplementary L1 pages read-only: break as soon as one of the L1 supplementary pages has been recognized, so that its pte does not get rewritten read-write.
2011-02-27Re-enable updating pvlist for kernel_pmapSamuel Thibault
This partially reverts 0744feb6 * i386/intel/pmap.c (pmap_remove_range): Update pvlist for kernel_pmap too.
2011-02-27Acknoledge interrupt after handler callSamuel Thibault
This fixes interrupt overflows when software interrupts processing gets slower than hardware. * i386/i386at/interrupt.S (interrupt): Issue EOI to PICs after having called the interrupt handler and disabled interrupts through cli.
2011-02-27Detect interrupt overflowSamuel Thibault
* i386/i386/locore.S (int_from_instack): Check %esp against _intstack, issue ud2 on stack overflow.
2011-02-27Add x86 debug register Xen supportSamuel Thibault
* i386/xen/xen_boothdr.S: Add global visibility to __hyp_* symbols. * i386/i386/locore.S [MACH_XEN] (dr6,dr0,dr1,dr2,dr3): Make get_debugreg and set_debugreg hypercalls to manipulate debug registers. (dr0,dr1,dr2,dr3): Fix dr7 field shift. * i386/i386/xen.h (hyp_set_debugreg, hyp_get_debugreg): New prototypes.
2011-02-27Add prototypes for x86 debug registersSamuel Thibault
* i386/i386/db_interface.h (I386_DB_TYPE_X, I386_DB_TYPE_W, I386_DB_TYPE_RW, I386_DB_LEN_1, I386_DB_LEN_2, I386_DB_LEN_4, I386_DB_LOCAL, I386_DB_GLOBAL): New macros. (dr0, dr1, dr2, dr3): New function prototypes.
2011-02-27Fix for kdb watch commandSamuel Thibault
* i386/intel/pmap.c (pmap_remove_range): Do not update pvlist for kernel_map. [MACH_KBD] (pmap_enter): Allow physical memory remapping.
2011-02-26Add console=comN boot option to enable serial consoleSamuel Thibault
* i386/configfrag.ac (RCLINE, RCADDR): Remove defines. * i386/i386at/com.c: Include <string.h> and <util/atoi.h> [!RCLINE] (RCBAUD, comcndev, comcnprobe, comcninit, comcngetc, comcnputc): Declare and define macro, variable, and functions. (rcline): New variable. (kernel_cmdline): New declaration. (comcnprobe): Detect "console=comN" option and set rcline accordingly, use rcline instead of RCLINE for serial console selection. * i386/i386at/cons_conf.c [NCOM>0 && !RCLINE] (comcnprobe, comcninit, comcngetc, comcnputc): Declare functions. [NCOM>0 && !RCLINE] (constab): Enable "com" console. * i386/i386at/kd_event.c (kbdopen): Call kdinit function, for when the VGA+pckbd console was not initialized.
2011-01-31Enable pae_extended_cr3 in pmap_bootstrapSamuel Thibault
* i386/i386/gdt.c (gdt_init): Do not enable VMASST_TYPE_pae_extended_cr3. * i386/intel/pmap.c (pmap_bootstrap): Enable VMASST_TYPE_pae_extended_cr3.
2011-01-31Enable Xen >4GiB physical memory supportSamuel Thibault
* i386/i386/gdt.c (gdt_init): Enable VMASST_TYPE_pae_extended_cr3. * i386/i386/xen.h: Drop actually-unneeded comment. * i386/xen/xen_boothdr.S (FEATURES) [MACH_PSEUDO_PHYS]: Add pae_pgdir_above_4gb. (XEN_ELFNOTE_FEATURES) [MACH_PSEUDO_PHYS]: Add pae_pgdir_above_4gb.
2011-01-31Drop kbd device on xenSamuel Thibault
* i386/Makefrag.am (libkernel_a_SOURCES): Move i386/i386at/kd_event.[ch] and i386/i386at/kd_queue.[ch] to [PLATFORM_at]. * i386/i386at/conf.c (dev_name_list): Move kbd device to [!MACH_HYP].
2011-01-15Avoid dropping kd_intr when RCLINE is >= 0Samuel Thibault
* i386/i386at/kd.c (kdintr): Return immediately if !kd_initialized. * i386/i386at/pic_isa.c (ivect) [RCLINE >= 0]: Enable kdintr in that case too.
2011-01-15Move -d and -H parse to kern/startup.cSamuel Thibault
The code is arch-independant, and reboot_on_panic, used by kern/debug.c would be undefined on non-i386. * i386/i386at/model_dep.c (reboot_on_panic, c_boot_entry): Move -d and -H parse to... * kern/startup.c (reboot_on_panic,setup_main): ... here. Include <string.h>
2010-12-09memcpy operands are not supposed to overlapSamuel Thibault
* include/string.h (memmove): Add prototype. * i386/i386at/immc.c (immc_cnputc): Replace memcpy with memmove.
2010-10-24Avoid harmless warningSamuel Thibault
* i386/i386at/kd.c (kd_setleds1): Only display unexpected state warning when debugging is enabled.
2010-10-23Add prototype for discover_x86_cpu_typeSamuel Thibault
* i386/i386at/model_dep.c (discover_x86_cpu_type): Add prototype.
2010-10-23Warn on unknown CPU familySamuel Thibault
* i386/i386at/model_dep.c (c_boot_entry): Warn in the default case for cpu_type.
2010-10-23Recognize P4 and Opteron-like as pentium proSamuel Thibault
* i386/i386at/model_dep.c (c_boot_entry): Treat cpu_type 15 as Pentium pro.
2010-09-14Merge branch 'typo-print'Thomas Schwinge
2010-09-14Typo fix.Thomas Schwinge
* i386/i386/trap.c (user_trap): Call printf, not print.
2010-09-14Fix ifunc entriesSamuel Thibault
* i386/ldscript: Update to the version from binutils 2.20.51.20100617. Remove SEARCH_DIR calls. * Makefile.am (clib_routines): Accept undefined __rel_iplt_start and __rel_iplt_end as these come from the ldscript. * i386/i386at/boothdr.S (boot_entry): Call ifunc hooks at boot. * i386/xen/xen_boothdr.S (start): Likewise.
2010-08-27Fix "make dist"Guillem Jover
* Makefile.am (EXTRA_DIST): Remove ChangeLog.0, ChangeLog.00 and Makefile.correct_output_files_for_.S_files.patch. * Makefrag.am (libkernel_a_SOURCES): Add ipc/mach_port.h, kern/ipc_mig.h, kern/machine.h, util/putchar.h, util/atoi.h, vm/vm_resident.h, vm/vm_types.h and device/subrs.h. Remove kern/time_out.h. * i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/autoconf.h, i386/i386at/com.h, i386/i386at/int_init.h, i386/i386/loose_ends.h, i386/i386/model_dep.h, i386/intel/read_fault.h and i386/i386/xen.h. Remove i386/i386/timer.h. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/src/drivers/net/sis900.h. * xen/Makefrag.am (libkernel_a_SOURCES): Add xen/public/arch-x86_32.h xen/public/arch-x86_64.h, xen/public/arch-x86/xen.h, xen/public/arch-x86/xen-mca.h, xen/public/arch-x86/xen-x86_32.h, xen/public/arch-x86/xen-x86_64.h, xen/public/callback.h, xen/public/COPYING, xen/public/dom0_ops.h, xen/public/domctl.h, xen/public/elfnote.h, xen/public/elfstructs.h, xen/public/event_channel.h, xen/public/features.h, xen/public/grant_table.h, xen/public/io/blkif.h, xen/public/io/console.h, xen/public/io/fbif.h, xen/public/io/fsif.h, xen/public/io/kbdif.h, xen/public/io/netif.h, xen/public/io/pciif.h, xen/public/io/protocols.h, xen/public/io/ring.h, xen/public/io/tpmif.h, xen/public/io/xenbus.h, xen/public/io/xs_wire.h, xen/public/kexec.h, xen/public/libelf.h, xen/public/memory.h, xen/public/nmi.h, xen/public/physdev.h, xen/public/platform.h, xen/public/sched.h, xen/public/sysctl.h, xen/public/trace.h, xen/public/vcpu.h, xen/public/version.h, xen/public/xencomm.h, xen/public/xen-compat.h, xen/public/xen.h, xen/public/xenoprof.h, xen/block.h, xen/console.h, xen/evt.h, xen/grant.h, xen/net.h, xen/ring.h, xen/store.h, xen/time.h and xen/xen.h.
2010-08-26Do not advice to install libc0.3-xen on 4gb_segment trapSamuel Thibault
ext2fs.static will trigger some anyway. Instead, provide an easy way to track how many traps happen. * i386/i386/gdt.c [MACH_XEN] (gdt_init): Disable enabling VMASST_TYPE_4gb_segments_notify. * i386/i386/trap.c [MACH_XEN] (user_trap): Remove printing libc0.3-xen installation advice on 4gb_segments trap. Instead, print a count every 10000 traps, and disable them on the 1000000th.
2010-08-22Disable 4gb segment emulation notification on first notificationSamuel Thibault
i386/i386/trap.c [MACH_XEN] (user_trap): Disable VMASST_TYPE_4gb_segments_notify on trap 15.
2010-08-22Report Xen 4gb segment emulationSamuel Thibault
* i386/i386/gdt.c [MACH_XEN] (gdt_init): Enable VMASST_TYPE_4gb_segments_notify. * i386/i386/idt_inittab.S [MACH_XEN]: Set trap 15 as pushing an error code. * i386/i386/trap.c [MACH_XEN]: Print trap 15 first occurrence.
2010-08-01Move read-only sections to after text sectionSamuel Thibault
2010-04-16Add memory clobbers to segment selector loadersSamuel Thibault
* i386/i386/seg.h (lldt): Add memory clobber to lldt asm snippet. * i386/i386/tss.h (ltr): Add memory clobber to ltr asm snippet.
2010-04-08Fix bootstrap additional mappingSamuel Thibault
* i386/intel/pmap.c (pmap_bootstrap): Use pt_entry_t type instead of vm_offset_t to map additional kernel space.
2010-04-08Extend machine addresses to 64bit for PAESamuel Thibault
* i386/i386/pcb.c (switch_ktss): Use uint64_t for descriptor type instead of unsigned long long. * i386/i386/seg.h (fill_descriptor): Use uint64_t for descriptor type instead of unsigned long long. Cast result of kv_to_ma() into vm_offset_t before printing. * i386/i386/xen.h (hyp_mmu_update_pte): Use pt_entry_t type instead of unsigned long long, make pte parameter a pt_entry_t too. (hyp_mmu_update_pte): Compute pte address just using pt_entry_t integers. (hyp_high): New macro to fix 32bit right shifting. (hyp_do_update_descriptor): Use pt_entry_t type for machine address instead of unsigned long. Split it in 32bit parts. Use uint64_t for descriptor type instead of unsigned long long. (update_va_mapping): Use pt_entry_t type instead of unsigned long long. Use hyp_high macro. (hyp_invlpg): Use uint64_t for time type instead of unsigned long long. * i386/intel/pmap.c (pmap_bootstrap): Use ptetokv instead of pte_to_pa + phystokv. Cast machine addresses into vm_offset_t before printing. (pmap_set_page_readwrite): Likewise. (pmap_set_page_readonly): Likewise (pmap_set_page_readonly_init): Likewise (pmap_clear_bootstrap_pagetable): Likewise (pmap_destroy): Likewise (pmap_map_mfn): Use pt_entry_t type for machine addresses. Cast machine addresses into vm_offset_t before printing. * i386/intel/pmap.h [PAE] (INTEL_PTE_PFN): Set macro to 0xfffffffffffff000ULL. * include/mach/xen.h [PAE] (pa_to_ma, ma_to_pa): Use pt_entry_t type for machine addresses. [!PAE] (pa_to_ma): Remove cast to vm_offset_t. (mfn_to_kv): Use mfn_to_pfn + ptoa instead of ptoa + ma_to_pa. * xen/xen.c (hyp_invalidate_pte): Cast machine addresses into vm_offset_t before printing.
2010-03-14Add mem deviceSamuel Thibault
* i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/iopl.c. * i386/i386at/conf.c [!MACH_HYP] (memmmap): Declare function. (memname): Add macro. (dev_name_list): Add mem device. * i386/i386at/mem.c: New file.
2009-12-22Fix debugger triggerroot
* i386/i386/locore.S [MACH_XEN] (RET_OFFSET): Define to 8 * xen/console.c (hypcnintr): On pound sign, call kdb_kintr instead of panicing.
2009-12-21Add a SoftDebugger functionSamuel Thibault
* kern/debug.h (SoftDebugger): Add prototype. * kern/debug.c (Debugger): Move code invoking debugging trap to... (SoftDebugger): ... new function. Print the passed message. * kern/lock_mon.c (decl_simple_lock_data, retry_bit_lock): Call SoftDebugger instead of Debugger. * device/ds_routines.c (ds_device_open, device_read, device_read_inband): Call SoftDebugger instead of Debugger. * i386/i386at/model_dep.c (c_boot_entry): Call SoftDebugger instead of Debugger. * kern/syscall_sw.c (null_port, kern_invalid): Call SoftDebugger instead of Debugger. * vm/vm_object.c (vm_object_collapse): Call SoftDebugger instead of Debugger.
2009-12-19Document kdb_kintr stack manipulationSamuel Thibault
* i386/i386/locore.S: Document kdb_kintr stack manipulation.
2009-12-18Add missing function prototypesGuillem Jover
* i386/i386/pcb.c (Load_context): New prototype. * i386/i386at/lpr.c (lprpr_addr): Likewise.
2009-12-18Mark macro arguments as usedGuillem Jover
* i386/intel/pmap.c [!NCPUS > 1] (INVALIDATE_TLB): Mark `pmap', `s' and `e' arguments as used. * i386/intel/pmap.h [!NCPUS > 1] (PMAP_ACTIVATE_KERNEL): Mark `my_cpu' argument as used. (PMAP_DEACTIVATE_KERNEL): Likewise. (PMAP_ACTIVATE_USER): Likewise. Mark `th' argument as used. (PMAP_DEACTIVATE_USER): Mark `thread' and `cpu' arguments as used.
2009-12-18Interrupt handlers do not return any valueGuillem Jover
* i386/i386at/kd_mouse.c (kd_mouse_open): Change kdintr return type to `void'. (oldvect): Change return type to `void'. * linux/dev/arch/i386/kernel/irq.c (linux_timer_intr): Likewise. (intnull, prtnull, linux_intr, linux_bad_intr): Likewise. (old_clock_handler): Likewise.
2009-12-18Match function types with `struct tty' member functionsGuillem Jover
* i386/i386at/com.c (comstart): Change return type to `void'. * i386/i386at/lpr.c (lprstop): Likewise.
2009-12-16Add Xen supportSamuel Thibault
2009-03-11 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS) [MACH_XEN]: Set to 0x20000000. * i386/i386/i386asm.sym (pfn_list) [VM_MIN_KERNEL_ADDRESS == LINEAR_MIN_KERNEL_ADDRESS]: Define to constant PFN_LIST. 2009-02-27 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/intel/pmap.c [MACH_HYP] (INVALIDATE_TLB): Call hyp_invlpg instead of flush_tlb when e - s is compile-time known to be PAGE_SIZE. 2008-11-27 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/configfrag.ac (enable_pae): Enable by default on the Xen platform. 2007-11-14 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/i386at/model_dep.c (machine_relax): New function. (c_boot_entry): Refuse to boot as dom0. 2007-10-17 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/i386/fpu.c [MACH_XEN]: Disable unused fpintr(). 2007-08-12 Samuel Thibault <samuel.thibault@ens-lyon.org> * Makefile.am (clib_routines): Add _START. * i386/xen/xen_boothdr: Use _START for VIRT_BASE and PADDR_OFFSET. Add GUEST_VERSION and XEN_ELFNOTE_FEATURES. 2007-06-13 Samuel Thibault <samuel.thibault@ens-lyon.org> * i386/i386/user_ldt.h (user_ldt) [MACH_XEN]: Add alloc field. * i386/i386/user_ldt.c (i386_set_ldt) [MACH_XEN]: Round allocation of LDT to a page, set back LDT pages read/write before freeing them. (user_ldt_free) [MACH_XEN]: Likewise. 2007-04-18 Samuel Thibault <samuel.thibault@ens-lyon.org> * device/ds_routines.c [MACH_HYP]: Add hypervisor block and net devices. 2007-02-19 Thomas Schwinge <tschwinge@gnu.org> * i386/xen/Makefrag.am [PLATFORM_xen] (gnumach_LINKFLAGS): Define. * Makefrag.am: Include `xen/Makefrag.am'. * configure.ac: Include `xen/configfrag.ac'. (--enable-platform): Support the `xen' platform. * i386/configfrag.ac: Likewise. * i386/Makefrag.am [PLATFORM_xen]: Include `i386/xen/Makefrag.am'. 2007-02-19 Samuel Thibault <samuel.thibault@ens-lyon.org> Thomas Schwinge <tschwinge@gnu.org> * i386/xen/Makefrag.am: New file. * xen/Makefrag.am: Likewise. * xen/configfrag.ac: Likewise. 2007-02-11 (and later dates) Samuel Thibault <samuel.thibault@ens-lyon.org> Xen support * Makefile.am (clib_routines): Add _start. * Makefrag.am (include_mach_HEADERS): Add include/mach/xen.h. * device/cons.c (cnputc): Call hyp_console_write. * i386/Makefrag.am (libkernel_a_SOURCES): Move non-Xen source to [PLATFORM_at]. * i386/i386/debug_trace.S: Include <i386/xen.h> * i386/i386/fpu.c [MACH_HYP] (init_fpu): Call set_ts() and clear_ts(), do not enable CR0_EM. * i386/i386/gdt.c: Include <mach/xen.h> and <intel/pmap.h>. [MACH_XEN]: Make gdt array extern. [MACH_XEN] (gdt_init): Register gdt with hypervisor. Request 4gb segments assist. Shift la_shift. [MACH_PSEUDO_PHYS] (gdt_init): Shift pfn_list. * i386/i386/gdt.h [MACH_XEN]: Don't define KERNEL_LDT and LINEAR_DS. * i386/i386/i386asm.sym: Include <i386/xen.h>. [MACH_XEN]: Remove KERNEL_LDT, Add shared_info's CPU_CLI, CPU_PENDING, CPU_PENDING_SEL, PENDING, EVTMASK and CR2. * i386/i386/idt.c [MACH_HYP] (idt_init): Register trap table with hypervisor. * i386/i386/idt_inittab.S: Include <i386/i386asm.h>. [MACH_XEN]: Set IDT_ENTRY() for hypervisor. Set trap table terminator. * i386/i386/ktss.c [MACH_XEN] (ktss_init): Request exception task switch from hypervisor. * i386/i386/ldt.c: Include <mach/xen.h> and <intel/pmap.h> [MACH_XEN]: Make ldt array extern. [MACH_XEN] (ldt_init): Set ldt readwrite. [MACH_HYP] (ldt_init): Register ldt with hypervisor. * i386/i386/locore.S: Include <i386/xen.h>. Handle KERNEL_RING == 1 case. [MACH_XEN]: Read hyp_shared_info's CR2 instead of %cr2. [MACH_PSEUDO_PHYS]: Add mfn_to_pfn computation. [MACH_HYP]: Drop Cyrix I/O-based detection. Read cr3 instead of %cr3. Make hypervisor call for pte invalidation. * i386/i386/mp_desc.c: Include <mach/xen.h>. [MACH_HYP] (mp_desc_init): Panic. * i386/i386/pcb.c: Include <mach/xen.h>. [MACH_XEN] (switch_ktss): Request stack switch from hypervisor. [MACH_HYP] (switch_ktss): Request ldt and gdt switch from hypervisor. * i386/i386/phys.c: Include <mach/xen.h> [MACH_PSEUDO_PHYS] (kvtophys): Do page translation. * i386/i386/proc_reg.h [MACH_HYP] (cr3): New declaration. (set_cr3, get_cr3, set_ts, clear_ts): Implement macros. * i386/i386/seg.h [MACH_HYP]: Define KERNEL_RING macro. Include <mach/xen.h> [MACH_XEN] (fill_descriptor): Register descriptor with hypervisor. * i386/i386/spl.S: Include <i386/xen.h> and <i386/i386/asm.h> [MACH_XEN] (pic_mask): #define to int_mask. [MACH_XEN] (SETMASK): Implement. * i386/i386/vm_param.h [MACH_XEN] (HYP_VIRT_START): New macro. [MACH_XEN]: Set VM_MAX_KERNEL_ADDRESS to HYP_VIRT_START- LINEAR_MIN_KERNEL_ADDRESS + VM_MIN_KERNEL_ADDRESS. Increase KERNEL_STACK_SIZE and INTSTACK_SIZE to 4 pages. * i386/i386at/conf.c [MACH_HYP]: Remove hardware devices, add hypervisor console device. * i386/i386at/cons_conf.c [MACH_HYP]: Add hypervisor console device. * i386/i386at/model_dep.c: Include <sys/types.h>, <mach/xen.h>. [MACH_XEN] Include <xen/console.h>, <xen/store.h>, <xen/evt.h>, <xen/xen.h>. [MACH_PSEUDO_PHYS]: New boot_info, mfn_list, pfn_list variables. [MACH_XEN]: New la_shift variable. [MACH_HYP] (avail_next, mem_size_init): Drop BIOS skipping mecanism. [MACH_HYP] (machine_init): Call hyp_init(), drop hardware initialization. [MACH_HYP] (machine_idle): Call hyp_idle(). [MACH_HYP] (halt_cpu): Call hyp_halt(). [MACH_HYP] (halt_all_cpus): Call hyp_reboot() or hyp_halt(). [MACH_HYP] (i386at_init): Initialize with hypervisor. [MACH_XEN] (c_boot_entry): Add Xen-specific initialization. [MACH_HYP] (init_alloc_aligned, pmap_valid_page): Drop zones skipping mecanism. * i386/intel/pmap.c: Include <mach/xen.h>. [MACH_PSEUDO_PHYS] (WRITE_PTE): Do page translation. [MACH_HYP] (INVALIDATE_TLB): Request invalidation from hypervisor. [MACH_XEN] (pmap_map_bd, pmap_create, pmap_destroy, pmap_remove_range) (pmap_page_protect, pmap_protect, pmap_enter, pmap_change_wiring) (pmap_attribute_clear, pmap_unmap_page_zero, pmap_collect): Request MMU update from hypervisor. [MACH_XEN] (pmap_bootstrap): Request pagetable initialization from hypervisor. [MACH_XEN] (pmap_set_page_readwrite, pmap_set_page_readonly) (pmap_set_page_readonly_init, pmap_clear_bootstrap_pagetable) (pmap_map_mfn): New functions. * i386/intel/pmap.h [MACH_XEN] (INTEL_PTE_GLOBAL): Disable global page support. [MACH_PSEUDO_PHYS] (pte_to_pa): Do page translation. [MACH_XEN] (pmap_set_page_readwrite, pmap_set_page_readonly) (pmap_set_page_readonly_init, pmap_clear_bootstrap_pagetable) (pmap_map_mfn): Declare functions. * i386/i386/xen.h: New file. * i386/xen/xen.c: New file. * i386/xen/xen_boothdr.S: New file. * i386/xen/xen_locore.S: New file. * include/mach/xen.h: New file. * kern/bootstrap.c [MACH_XEN] (boot_info): Declare variable. [MACH_XEN] (bootstrap_create): Rebase multiboot header. * kern/debug.c: Include <mach/xen.h>. [MACH_HYP] (panic): Call hyp_crash() without delay. * linux/dev/include/asm-i386/segment.h [MACH_HYP] (KERNEL_CS) (KERNEL_DS): Use ring 1. * xen/block.c: New file. * xen/block.h: Likewise. * xen/console.c: Likewise. * xen/console.h: Likewise. * xen/evt.c: Likewise. * xen/evt.h: Likewise. * xen/grant.c: Likewise. * xen/grant.h: Likewise. * xen/net.c: Likewise. * xen/net.h: Likewise. * xen/ring.c: Likewise. * xen/ring.h: Likewise. * xen/store.c: Likewise. * xen/store.h: Likewise. * xen/time.c: Likewise. * xen/time.h: Likewise. * xen/xen.c: Likewise. * xen/xen.h: Likewise. * xen/public/COPYING: Import file from Xen. * xen/public/callback.h: Likewise. * xen/public/dom0_ops.h: Likewise. * xen/public/domctl.h: Likewise. * xen/public/elfnote.h: Likewise. * xen/public/elfstructs.h: Likewise. * xen/public/event_channel.h: Likewise. * xen/public/features.h: Likewise. * xen/public/grant_table.h: Likewise. * xen/public/kexec.h: Likewise. * xen/public/libelf.h: Likewise. * xen/public/memory.h: Likewise. * xen/public/nmi.h: Likewise. * xen/public/physdev.h: Likewise. * xen/public/platform.h: Likewise. * xen/public/sched.h: Likewise. * xen/public/sysctl.h: Likewise. * xen/public/trace.h: Likewise. * xen/public/vcpu.h: Likewise. * xen/public/version.h: Likewise. * xen/public/xen-compat.h: Likewise. * xen/public/xen.h: Likewise. * xen/public/xencomm.h: Likewise. * xen/public/xenoprof.h: Likewise. * xen/public/arch-x86/xen-mca.h: Likewise. * xen/public/arch-x86/xen-x86_32.h: Likewise. * xen/public/arch-x86/xen-x86_64.h: Likewise. * xen/public/arch-x86/xen.h: Likewise. * xen/public/arch-x86_32.h: Likewise. * xen/public/arch-x86_64.h: Likewise. * xen/public/io/blkif.h: Likewise. * xen/public/io/console.h: Likewise. * xen/public/io/fbif.h: Likewise. * xen/public/io/fsif.h: Likewise. * xen/public/io/kbdif.h: Likewise. * xen/public/io/netif.h: Likewise. * xen/public/io/pciif.h: Likewise. * xen/public/io/protocols.h: Likewise. * xen/public/io/ring.h: Likewise. * xen/public/io/tpmif.h: Likewise. * xen/public/io/xenbus.h: Likewise. * xen/public/io/xs_wire.h: Likewise.
2009-11-30Use gcc builtins for stdarg.h when availableSamuel Thibault
* i386/include/mach/sa/stdarg.h [__GNUC__ >= 3] (va_list): Typedef to __builtin_va_list. (va_start): define to __builtin_va_start. (va_end): define to __builtin_va_end. (va_arg): define to __builtin_va_arg.
2009-11-28Add memory object proxiesSamuel Thibault
Memory object proxies permit to replicate objects with different parameters, like reduced privileged, different offset, etc. They are e.g. essential for properly managing memory access permissions. 2005-06-06 Marcus Brinkmann <marcus@gnu.org> * include/mach/mach4.defs: Add memory_object_create_proxy interface. * Makefile.in (vm-cfiles): Add memory_object_proxy.c. * i386/include/mach/i386/vm_types.h (vm_offset_array_t): New type. * include/mach/memory_object.h (memory_object_array_t): New type. * vm/memory_object_proxy.c: New file. * kern/ipc_kobject.h: New macro IKOT_PAGER_PROXY. Bump up macros IKOT_UNKNOWN and IKOT_MAX_TYPE. * kern/ipc_kobject.c (ipc_kobject_notify): Call memory_object_proxy_notify for IKOT_PAGER_PROXY. * vm/vm_init.c (vm_mem_init): Call memory_object_proxy_init. * vm/vm_user.c (vm_map): Implement support for proxy memory objects.
2009-11-28Add -H option to halt on panicSamuel Thibault
2005-12-29 Soeren D. Schulze <soeren.d.schulze@gmx.de> * i386/i386at/model_dep.c (reboot_on_panic) [!MACH_KBD]: New variable. (c_boot_entry) [!MACH_KBD]: Set reboot_on_panic to 0 if kernel_cmdline contains '-H'. * kern/debug.c (panic): Call halt_all_cpus with reboot_on_panic as argument.
2009-11-28Add XMM FPU registers save/restore support.Samuel Thibault
* i386/include/mach/i386/fp_reg.h (struct i386_fp_regs): Invert array indices. (struct i386_xfp_save): New structure. (FP_387X): New macro. * i386/i386/thread.h (struct i386_fpsave_state): Add xfp_save_state member, keep existing fp_save_state and fp_regs members in an unnamed union member. Move fp_valid member to the end of the structure. * i386/i386/fpu.h (fxsave, fxrstor): New macros. (fpu_save_context): Use fxsave() when FPU is FXSR-capable. * i386/i386/fpu.c: Include <i386/locore.h> (mxcsr_feature_mask): New variable. (fp_save, fp_load): Add declaration. (init_fpu): Add FXSR-capable FPU detection. (fpu_module_init): Request 16-byte alignment to zinit() for i386_fpsave_state structures. (twd_i387_to_fxsr, twd_fxsr_to_i387): New functions. (fpu_set_state): Convert FPU state when FPU is FXSR-capable. (fpu_get_state): Convert FPU state when FPU is FXSR-capable. (fpexterrflt): Pass to i386_exception either xfp_save_state or fp_save_state according to FPU type. (fpastintr): Likewise. (fp_load): Likewise. Use fxrstor() when FPU is FXSR-capable. (fp_save): Use fxsave() when FPU is FXSR-capable. (fp_state_alloc): Add FXSR-aware initialization.