2026-08-05  Damien Zammit  <damien@zamaudio.com>

	HPET: Make this hardware an optional component
	If the HPET is not detected, it no longer needs to fail an assert,
	as there is nothing inside the kernel that strictly relies on it.
	Message-ID: <20260804040804.36759-2-damien@zamaudio.com>

2026-08-05  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	pit, smp: Fix i8254 one shot delay and replace hpet_udelay in smp
	The one-shot pit delay was not calibrated properly.
	This fixes the pit_udelay() function so it can be used for
	tiny delays within the kernel.  Removes dependence on HPET for smp.
	Message-ID: <20260804040804.36759-1-damien@zamaudio.com>

2026-08-03  Damien Zammit  <damien@zamaudio.com>

	CI: Email failures to commit-hurd
	This will email gzipped error logs to commit-hurd AT gnu.org from any
	forgejo instance set up as a mirror.  This is facilitated by
	not specifying any domain or user specific configuration, but to
	execute the mailing code path, the repository must be called "gnumach"
	and the branch that was synced be "master".
	If the mail command is not configured in the CI, it will simply fail
	to send mail and the failing test will not be reported.
	Since there is only one instance currently set up, we won't get
	duplicated reports.

	Message-ID: <20260803114245.28234-1-damien@zamaudio.com>

2026-07-28  Alperen Erkan  <erkanalperen54@gmail.com>

	ipc_kmsg: assert non-NULL kmsg in ipc_kmsg_free
	ipc_kmsg_free() dereferenced kmsg->ikm_size without any check that
	kmsg was non-NULL. Any caller passing IKM_NULL would crash on that
	dereference.

	Rather than silently returning on a NULL kmsg -- which would hide a
	real bug in the caller -- follow the convention already used
	throughout this file (see ipc_kmsg_rmqueue, ipc_kmsg_copyout_dest,
	etc.) and assert() the precondition, so a misbehaving caller is
	caught loudly in debug/MACH_ASSERT builds instead of being papered
	over.

	No other behavioral changes.

2026-07-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: warn a bit more about running as dom0

2026-07-10  Damien Zammit  <damien@zamaudio.com>

	xen: Don't panic in dom0 so unit tests can still try
	Relax the panic to a warning when attempting to run gnumach as dom0.
	This can allow someone to further debug gnumach as dom0 using the test
	framework.
	Message-ID: <20260704035814.109936-5-damien@zamaudio.com>

2026-07-09  Damien Zammit  <damien@zamaudio.com>

	cons: Print to hypervisor console for debugging
	We should not disable this option behind an "if 0" because
	xen platform enabled gnumach needs to print somewhere for unit tests.
	Seeing a blank screen is too confusing and unnecessary when there is an
	emergency console available.
	Message-ID: <20260704035814.109936-3-damien@zamaudio.com>

2026-07-09  Damien Zammit  <damien@zamaudio.com>

	tests: Enable optional qemu unit tests for xen platform
	This enables qemu unit tests to run on gnumach as xen dom0.
	However, it will skip running the tests if xen binary is missing.
	Therefore, the test suite will not fail if not intending to test xen.
	This is useful, for example on CI where we want to see a pass status
	for most of the tests without fully testing xen which is difficult to
	execute.

	This should make debugging easier for anyone interested in progressing
	the xen dom0 port of gnumach.
	Message-ID: <20260704035814.109936-2-damien@zamaudio.com>

2026-07-09  Damien Zammit  <damien@zamaudio.com>

	ci: Use correct i386 headers to build mig 32 bit
	Message-ID: <20260630023158.59697-2-damien@zamaudio.com>

2026-06-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ahci: Avoid running two flushes in parallel on the same port
	Otherwise the timer gets mangled.

	ahci: Separate out command timers
	Otherwise if we flush on several ports in parallel the timer gets
	mangled.

2026-06-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ahci: Name the slots used for different commands

	vm_allocate_contiguous: Do not check for highmem limit
	When running on 32b without PAE, it is a bit less than 4G, and userland
	would ask for 4G, so we would fail this and actually fallback to the DMA
	segment!

2026-06-26  Damien Zammit  <damien@zamaudio.com>

	ci: Remove dependence on i686 toolchain
	This allows cross compilation of i386 version using a x86_64 compiler.

	TESTED: Passed CI (still with 1 failed test on x86_64 user32 builds as before)

	Message-ID: <20260626044827.9558-1-damien@zamaudio.com>

2026-06-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add string.h and sys/types.h for tests
	The string functions are indeed included in the libc provided to tests
	(strings.c is in $(SRC_TESTLIB)), so we should expose the corresponding
	headers.

2026-06-20  Damien Zammit  <damien@zamaudio.com>

	tests/user-qemu.mk: Allow overriding command for grub-mkrescue
	This allows cross built test suite to be able to be executed
	in qemu by overriding the grub modules to a path containing i386-pc mods.
	Message-ID: <20260620081045.56934-1-damien@zamaudio.com>

2026-05-31  Paulo Duarte  <paulofernandobd@gmail.com>

	tests: add aarch64 arm to start.S
	The userland test stubs run as freestanding multiboot modules: the
	kernel exec path hands them control at _start with argc/argv/envp
	laid out sysv-style on the stack, and they call c_start(sp) to find
	their arguments.  The i386 and x86_64 arms already implement this;
	add the aarch64 equivalent (mov x0, sp; bl c_start) so test modules
	can be cross-compiled with aarch64-unknown-none-elf-gcc and entered
	by Bugaev's pcb/exec path.

	bl rather than a tail-call b keeps the saved-LR contract intact in
	case anything unwinds out of the userland prelude.
	Message-ID: <20260524014322.70166-15-paulofernandobd@gmail.com>

2026-05-31  Paulo Duarte  <paulofernandobd@gmail.com>

	ipc: declare copyinmsg / copyoutmsg in <ipc/copy_user.h>
	The copyinmsg() and copyoutmsg() routines are defined per-arch (in
	i386/i386/locore.S and friends) but have never had cross-arch
	declarations.  Each kern/ caller has historically picked them up
	through an arch-specific header, or via implicit declaration.

	Declare them in <ipc/copy_user.h> alongside the other copy_user
	helpers, with copyoutmsg becoming an alias for copyout when not
	building a 64-bit kernel with a 32-bit userland (the only case
	where the two diverge today).  Add the missing include to
	kern/exception.c which uses both.
	Message-ID: <20260524014322.70166-7-paulofernandobd@gmail.com>

2026-05-31  Paulo Duarte  <paulofernandobd@gmail.com>

	mach: add EM_AARCH64 to the ELF machine constant list
	The Mach exec/elf.h pseudo-header already enumerates a handful of
	machine types (PARISC, PPC, x86_64, …) but not aarch64.  Add it so
	exec-format code can recognise aarch64 ELF binaries by EM number.
	Defined per the ARM-supplied ELF supplement (the same value Linux,
	glibc, and FreeBSD have used since 2014).
	Message-ID: <20260524014322.70166-6-paulofernandobd@gmail.com>

2026-05-31  Paulo Duarte  <paulofernandobd@gmail.com>

	aarch64: add per-arch lock.h shim for kern/lock.h's machine include
	kern/lock.h on current master unconditionally does

	#include <machine/lock.h>

	at line 61 (with a /*XXX*/ marker), even though the body only
	references its definitions when NCPUS > 1.  Bugaev's wip-aarch64
	worked around this by editing kern/lock.h itself — wrapping the
	include in `#if NCPUS > 1` — which would touch a shared file
	upstream maintains.

	Provide the include as a per-arch shim instead: an empty
	aarch64/aarch64/lock.h.  machine/ resolves to the active TARGET's
	arch directory at build time, so kern/lock.h's include picks this
	up on aarch64 without any shared-file change.  Today aarch64 is
	built with NCPUS = 1, so an empty header is sufficient; a future
	SMP-capable aarch64 port should fill this in with the low-level
	_simple_lock_data_t and _simple_lock / _simple_unlock primitives,
	mirroring i386/i386/lock.h.

	Without this shim the imported port fails to compile the first
	file that pulls in kern/lock.h.
	Message-ID: <20260524014322.70166-3-paulofernandobd@gmail.com>

2026-05-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ahci: Support cache flush

	ide: Support cache flush

	linux: Pass DEV_FLUSH_CACHE set_status to drivers

2026-05-26  gfleury  <gfleury@disroot.org>

	fix kernel crash on NULL processor dereference
	This fix a kernel crash building hurd under smp
	Message-ID: <20260511124509.1011-1-gfleury@disroot.org>

2026-05-25  Diego Nieto Cid  <dnietoc@gmail.com>

	tests-task: add test for task/thread priority RPCs
	Message-ID: <56b30e793bd65c3ad54623162c90996cf0163a4f.1778992827.git.dnietoc@gmail.com>

2026-05-25  Diego Nieto Cid  <dnietoc@gmail.com>

	initialise max_priority to BASEPRI_SYSTEM
	Set the default thread and processor set max priority to
	that of system threads to allow privileged task to raise
	its own priority.

	  * kern/processor.c: modify pset_init to set the initial
	                      max_priority to BASEPRI_SYSTE.
	  * kern/thread.c: set the thread template max_priority to
	                   BASEPRI_SYSTEM.

	lower priority of bootstrap tasks to BASEPRI_USER

	  * kern/task.h: add task_max_priority prototype
	  * kern/bootstrap.c: call task_max_priority in
	    boot_script_task_create to lower the task
	    priority to BASEPRI_USER.

2026-05-25  Diego Nieto Cid  <dnietoc@gmail.com>

	check task's max_priority when setting priority
	  * kern/task.c (task_priority): check new priority against the
	    tasks max_priority. Reject with KERN_NO_ACCES when going
	    higher than it.
	Message-ID: <1150e14ebf3aaa1f6141748d41b32bcd00099120.1778992827.git.dnietoc@gmail.com>

	add max_priority to task object
	  * inlcude/man/mach_host.def: add task_max_prioity RPC.
	  * kern/task.h: add max_priority to task struct.
	  * kern/task.c: implement task_max_priority RPC and inherit
	                 max_priority from parent task (or default
	                 processor set).
	  * kern/thread.c: initialize new threads' max_priority from
	                   the task creating the thread.
	Message-ID: <f6f07da171bca6a24761f4bd3abfaf5494415d34.1778992827.git.dnietoc@gmail.com>

2026-04-27  Diego Nieto Cid  <dnietoc@gmail.com>

	prevent removal of intermediate module-%
	When a test ISO file is built by make, the intermediate modules
	built as a dependency (module-%) are deleted at the end of the
	build.

	Marking as "precious" prevents this behaviour and allows to keep
	the module that the ISO runs. This is useful if the tests are going
	to be debugged using QEMU and GDB.
	Message-ID: <20260426225120.1653-1-dnietoc@gmail.com>

2026-04-15  Michael Kelly  <mike@weatherwax.co.uk>

	host_adjust_time64() to return outstanding time adjustment without altering it.
	It's awkward to support an interface that returns 'old_adjustment'
	without modifying 'new_adjustment' because the latter is not an
	optional parameter. This solution disregards 'new_adjustment'
	specifically when the nanoseconds component has the value
	MACH_ADJTIME_NSECS_OMIT (which is beyond the normally permissible
	range).
	Message-ID: <20260415180318.109742-2-mike@weatherwax.co.uk>

2026-04-15  Mike Kelly  <mike@weatherwax.co.uk>

	host_adjust_time64: Fix negative big adjustments
	We also need a 10-factor when a big negative adjustment is requested.

2026-04-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Make page eviction use the global LRU list
	Otherwise, as long as the highest segment has evictable pages, we will be
	focusing on it, and not benefitting from other segments.

	This is notably very problematic when the highest segment is small, smaller
	than the application working set, but big enough for finding evictable
	pages.

2026-04-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Add global LRU list
	This unfortunately takes room in the vm_page structure, thus reducing
	manageable memory.

	vm_page: Add some comments

2026-04-11  Diego Nieto Cid  <dnietoc@gmail.com>

	panic_init: match lock type to its init function
	Message-ID: <20260411181052.17499-1-dnietoc@gmail.com>

2026-04-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gsync: Note why we don't release an object reference

2026-04-09  Maximus Minter  <fiddlebert2020@gmail.com>

	Initialize spin locks in panic_init

2026-04-08  Manolo de Medici  <manolodemedici@gmail.com>

	typo

2026-04-06  Manolo de Medici  <manolodemedici@gmail.com>

	ipc: fix LP64 zero-length OOL port array descriptor size
	ipc_kmsg_copyin_body() updated OOL port arrays from 32-bit
	mach_port_name_t elements to 64-bit mach_port_t elements only in the
	non-empty path. For zero-length arrays, the code skipped that
	normalization and left msgtl_size at 32.

	On LP64 this causes MIG type checking to reject empty OOL port arrays,
	because the kernel delivers MACH_MSG_TYPE_PORT_SEND with msgtl_size == 32
	instead of 64. Apparently, those kind of messages are never delivered on
	the current Hurd, as such, the bug went unnoticed.

	Normalize the descriptor size for OOL port arrays before the length == 0
	branch so empty and non-empty arrays are handled consistently.
	Message-ID: <20260406210453.837-1-manolodemedici@gmail.com>

2026-04-06  Leonardo Lopes Pereira  <leonardolopespereira@outlook.com>

	chore: remove dead MIGRATING_THREADS code
	Experimental migrating-thread RPC from Utah CSL (1993) never fully
	implemented. MIGRATING_THREADS was hardwired to 0.
	Message-ID: <CPUPR80MB6540445C1E02A3BAFD1A0A04D15DA@CPUPR80MB6540.lamprd80.prod.outlook.com>

	chore: remove dead MACH_TTD code
	TTD (Target Transport Debugger) was hardwired to 0 in configfrag.ac.
	Remove kttd_interface.c and all MACH_TTD blocks from trap.c, locore.S,
	spl.S, net_io.c and autoconf.c.
	Message-ID: <CPUPR80MB65402402D8EEFA20FC9D0CE7D15DA@CPUPR80MB6540.lamprd80.prod.outlook.com>

2026-03-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Fix buffer allocation for PAE
	Asking for DMA32 is not enough, we also need directmap, notably for
	read_bsd_label.

	linux: Make vmalloc allocate from DMA32
	Otherwise ahci cannot use it with PAE kernels.

	ahci: Check that the command buffer is within DMA32
	This may not be the case with PAE.

	linux: Fix vmtophys return type
	On PAE we need to be able to return 64b

	kmem_map_aligned_table: Avoid warning in PAE build

2026-03-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	biosmem: Add MAX_PHYS_END to limit physical memory use
	to what was actually tested as working considering the limited amount of
	available virtual memory.

	x86_64: Increase kernel virtual memory to handle 30GB memory

	kmsg: Increase KMSGBUFSIZE to 16K
	Boot has become more verbose

	pmap_bootstrap: Show the kernel virtual allocation area

	pmap_steal_memory: explicitly abort if VM space is filled

	i386: Increase kernel virtual memory to handle 8GB memory

2026-03-27  Manolo de Medici  <manolodemedici@gmail.com>

	Add processor_set_name_processors RPC
	This call allows to get the list of unprivileged processor ports
	belonging to a processor set.
	Message-ID: <20260326224643.724-1-manolodemedici@gmail.com>

2026-03-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm rebalance: better move active internal pages first
	Since they will not be preferred for paging out, better move them, and
	inactive external pages will probably get paged out directly from this
	segment.

	pageout: evict inactive pages from various segments before active ones
	Otherwise we can be keeping evicting active pages from the highmem
	segment, while we may have a lot of inactive pages in other segments.

2026-03-24  Manolo de Medici  <manolodemedici@gmail.com>

	Can processor_info unprivileged ports
	No harm in that.
	Message-ID: <20260318212914.1566-5-manolodemedici@gmail.com>

	Make processor set creation privileged
	Creating a processor set reserve physical limited resources,
	only root should be allowed to do that.

	Fix bug allowing unprivileged users to modify system time
	This change of API should cause no breakage in glibc compilation
	since that already uses the host privileged port.
	Message-ID: <20260324205820.808-1-manolodemedici@gmail.com>

2026-03-22  Manolo de Medici  <manolodemedici@gmail.com>

	Add unprivileged processor_name_t type
	We don't expect unprivileged users to be able to start and stop
	processors. As such, we need the unprivileged version of the
	processor_t mach type.
	Message-ID: <20260318212914.1566-3-manolodemedici@gmail.com>

2026-03-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix indentation

2026-03-13  Mike Kelly  <mike@weatherwax.co.uk>

	Rebalance segments for privileged page allocation
	It's possible to allocate all pages in a segment (and higher priority
	ones) to privileged threads. This can result in a panic even though
	memory is available in lower priority segments which haven't yet been
	rebalanced by the pageout daemon. Rebalancing is now done actively
	during privileged page allocation.
	Message-ID: <20260310212847.153812-2-mike@weatherwax.co.uk>

2026-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "periodic intrs: Change the clock source to be lapic timer on all cpus"
	This reverts commit f41f8801fbbfc794f63bdee293552d7ec8f74847.

	The lapic is not a reliable source of time on VMs notably, while PIT
	really is.

2026-03-02  Milos Nikic  <nikic.milos@gmail.com>

	gnumach: kern/ipc_host: add branch prediction hints to port conversions
	The convert_port_to_* functions are heavily utilized fast paths.
	Add `likely(IP_VALID(port))` hints to optimize the instruction
	cache for the standard happy path where the provided IPC port
	is valid.

	Also added a few targeted branch hints to the active/null checks
	in processor_set_default and ipc_pset_enable.

	Tested by recompiling and booting inside QEMU on x86_64.

	* kern/ipc_host.c (ipc_pset_enable, processor_set_default,
	  convert_port_to_host, convert_port_to_host_priv,
	  convert_port_to_processor, convert_port_to_pset,
	  convert_port_to_pset_name): Use likely and unlikely macros.
	Message-ID: <20260302062312.289678-1-nikic.milos@gmail.com>

2026-03-02  Milos Nikic  <nikic.milos@gmail.com>

	gnumach: kern/ipc_kobject: add likely/unlikely hints
	This is an extremely hot path. Add branch prediction hints to the
	error handling and exceptional states to try and squeeze out any
	i-cache benefits that GCC can provide.

	Tested by recompiling and booting inside QEMU on x86_64.

	* kern/ipc_kobject.c (ipc_kobject_server): Use likely and unlikely macros.
	Message-ID: <20260302053827.239992-1-nikic.milos@gmail.com>

2026-03-02  Milos Nikic  <nikic.milos@gmail.com>

	kern/rbtree.c use macros.h
	And stop redefining macros.
	Test:
	Inside qemu on x86_64 build works without issues.
	Message-ID: <20260302050451.200379-1-nikic.milos@gmail.com>

2026-03-02  Milos Nikic  <nikic.milos@gmail.com>

	gnumach: kern/slab: Remove redundant macro definitions
	All of these utility macros are already provided by <kern/macros.h>,
	which is included just a few lines above.

	Tested by recompiling and booting inside QEMU on x86_64 without issues.

	* kern/slab.c (P2ALIGNED, ISP2, P2ALIGN, P2ROUND, P2END, likely, unlikely):
	  Remove redundant macro definitions.
	Message-ID: <20260302044943.178834-1-nikic.milos@gmail.com>

2026-03-01  Damien Zammit  <damien@zamaudio.com>

	periodic intrs: Change the clock source to be lapic timer on all cpus
	There were problems resuming the lapic timer, causing lockups on -smp 2.
	We used to use the PIT on cpu0 for clock interrupts and lapic timer
	for periodic interrupts on other cpus.  Now the PIT is only used to
	calibrate the lapic timer to unify the clock sources to be lapic based.
	Re-enable the lapic timer on all cpus for clock sources of periodic intrs.

	TESTED:
	 - Passes i386 CI
	 - Passes x86_64 CI (except user32)
	 - Boots to debian login using -smp 2 or 6
	 - Interrupts are received periodically on all cpus
	   - (printed all cpu numbers in hardclock)

	Reported by Brent Baccala (and -smp 2 issue also known for a while)

	Message-ID: <20260228061355.3207119-1-damien@zamaudio.com>

2026-03-01  Mike Kelly  <mike@weatherwax.co.uk>

	Page allocation from a CPU pool does not consider vm_page_alloc_paused.
	A non-empty CPU page pool always allocates pages even when
	vm_page_alloc_paused is set. An unprivileged thread can therefore
	acquire a signicant number of pages until the pool is empty. The cycle
	can continue for a longer period if the pool is replenished by a VM
	privileged thread before the unprivileged thread requests more pages
	and in extreme cases can result in complete system memory exhaustion.
	Message-ID: <20260228205443.67047-2-mike@weatherwax.co.uk>

2026-02-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	feep: Fix build condition

	Add missing symlink

	Ignore more files
	Either generated, or commonly used in a work checkout.

2026-02-24  Damien Zammit  <damien@zamaudio.com>

	asm: Add CX8() macro for wider types
	curr_spl is actually 4 bytes, but the CX() macro
	was expanding to 8 byte stride on x86_64.
	Add a new macro specifically for 8 byte widths and
	use the correct stride macro for every asm instruction.

	Reported by Brent Baccala
	Message-ID: <20260224015922.3018422-1-damien@zamaudio.com>

2026-02-23  Damien Zammit  <damien@zamaudio.com>

	i386at/ioapic: Initialise timeouts correctly
	This fixes uninitialised timeout structures
	leading to the .set field being non-zero thus reset_timeout
	is attempted to be called on a timeout not yet in the wheel.

	Reported by Brent Baccala
	Message-ID: <20260223105524.2984249-2-damien@zamaudio.com>

2026-02-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Fix xrstor* after setting i386_FLOAT_STATE
	Even if we only load x87 state, xrstor* loads MXCSR when we have SSE enabled.

	Reported by Brent Baccala

2026-02-22  Damien Zammit  <damien@zamaudio.com>

	x86_64/locore.S: Fix SWAPGS state clobbered in ast_from_interrupt
	When ast_from_interrupt fires on a user-mode interrupt,
	POP_AREGS_ISR restores the user's r12, clobbering the SWAPGS state
	that was set by SWAPGS_ENTRY_IF_NEEDED_R12 on interrupt entry.
	Since the user's r12 value is preserved on the stack by pusha,
	we set the state back to RETURN_TO_USER before calling _return_from_trap.

	Reported by Brent Baccala
	Message-ID: <20260222071720.2933158-5-damien@zamaudio.com>

2026-02-22  Damien Zammit  <damien@zamaudio.com>

	x86_64/locore: Add missing INTERRUPT() entries
	This was overlooked for APIC.  It fixes a bug where the handler
	addresses were being loaded as garbage values into the IDT,
	therefore, when BSP sends a CALL_PMAP_UPDATE_IPI to an AP,
	the AP jumps to a garbage address, eg 0x4000000036.

	Reported by Brent Baccala
	Message-ID: <20260222071720.2933158-3-damien@zamaudio.com>

2026-02-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Fix xrstor* after setting i386_FLOAT_STATE
	When using xrstor, we also need to explicitly set CPU_XCR0_X87 otherwise
	xrstor would not restore it.

	When using xrstors, we have to have XSAVE_XCOMP_BV_COMPACT set.

	Reported by Brent Baccala

2026-02-15  Damien Zammit  <damien@zamaudio.com>

	kern/mach_clock: Update last_hpc_read only by cpu0 in clk interrupt
	This was likely an oversight, that the last_hpc_read is only supposed
	to be updated by cpu0 during its clock interrupt.
	This will ensure only one cpu can update the value but any other cpu
	can read it.

	This does *not* make the hp clock smp safe yet.

	TESTED:
	 - The clocktest script from earlier commit msg still passes on UP.
	 - The clocktest script from earlier commit msg now passes on SMP
	   when run on master processor only (fixed).
	 - The clocktest script from earlier commit msg *fails* on SMP
	   when run on slave processor set using /sbin/smp ./clocktest
	 - Passes all i386 CI.
	Message-ID: <20260215043559.2560151-1-damien@zamaudio.com>

2026-02-14  Damien Zammit  <damien@zamaudio.com>

	locore: Remove all instances of CPU_NUMBER_NO_*
	This relies on gs segment percpu pointer always being
	available in critical contexts in smp builds.

	TESTED:
	 - i386+SMP boots to shell with -smp 6
	 - Passes all i386 CI.

	Message-ID: <20260214040102.2503708-1-damien@zamaudio.com>

2026-02-11  Mike Kelly  <mike@weatherwax.co.uk>

	task_terminate() relies on threads terminating in list order
	Calling task_terminate() (on other than current_task()) risks deadlocking if the task being terminated has multiple threads. Currently, the head of the thread list must terminate successfully before terminating the next in the list. This is not always possible, for example a thread which is not the list head might hold a thread_reference to the thread at the list head. In that case, the list head cannot be terminated until the other thread releases that reference which won't happen if that other thread is TH_SUSP as it is not rescheduled. Instead, task terminate() now attempts thread terminatation in list sequence (rather than just the list head) and keeps doing so until none remain.
	Message-ID: <20260210075303.96840-2-mike@weatherwax.co.uk>

2026-02-08  Damien Zammit  <damien@zamaudio.com>

	ci: Test xen platform as well
	TESTED: Additionally compiles all xen UP builds successfully

	TODO:
	 - Run the qemu suite on xen platform
	 - Port xen SMP, then enable the CI

	Message-ID: <20260208065830.2171265-1-damien@zamaudio.com>

2026-02-01  Damien Zammit  <damien@zamaudio.com>

	xen: Fix UP build
	CI exposed some compile failures with xen build.
	Fix provided allows compilation for any combination involving:

	--enable-ncpus=1 --enable-platform=xen

	SMP on xen is not yet implemented.
	Message-ID: <20260131230820.1759069-3-damien@zamaudio.com>

2026-01-29  Milos Nikic  <nikic.milos@gmail.com>

	ipc: supress warning on cast of ipc_port_t to name
	This patch fixes a warning when building on 64-bit architectures where
	sizeof(void *) > sizeof(mach_port_name_t).

	The double cast (via uintptr_t) explicitly tells the compiler that the
	truncation of the pointer value into the 32-bit port name is intentional,
	preserving the existing behavior while silencing the warning.

2026-01-27  Damien Zammit  <damien@zamaudio.com>

	CI: Add forgejo build/test script
	TESTED: All CI jobs execute and run the test suite.
	Passes all tests on i386, some x86_64 tests are exposed as failing.

	Message-ID: <20260123063207.1293258-3-damien@zamaudio.com>

2026-01-27  Milos Nikic  <nikic.milos@gmail.com>

	device: Define DEV_FLUSH_CACHE status flavor
	define DEV_FLUSH_CACHE as 2.
	This allows userspace translators to request a physical write barrier from the device driver.

2026-01-23  Damien Zammit  <damien@zamaudio.com>

	tests: Use -ftrivial-auto-var-init=pattern only with compiler support
	Message-ID: <20260122035922.1241383-1-damien@zamaudio.com>

2026-01-21  Damien Zammit  <damien@zamaudio.com>

	x86_64/cpuboot: Add missing AP early asm bringup
	Message-ID: <20260121214327.1227582-1-damien@zamaudio.com>

2026-01-21  Damien Zammit  <damien@zamaudio.com>

	tests: Use -smp 2 when NCPUS > 1 in qemu test harness
	Runs test suite using multiple cpus on SMP kernels.

	TESTED: Passes all tests except 64b SMP currently.

	Message-ID: <20260121214455.1227709-1-damien@zamaudio.com>

2026-01-21  Damien Zammit  <damien@zamaudio.com>

	pcb: Fix label can only be part of a statement
	Fixes compilation on gcc-10.

	Message-ID: <20260121214411.1227646-1-damien@zamaudio.com>

2026-01-21  Damien Zammit  <damien@zamaudio.com>

	i386at/model_dep: Make apboot 64b compatible
	Message-ID: <20260121214238.1227466-1-damien@zamaudio.com>

2026-01-18  Mike Kelly  <mike@weatherwax.co.uk>

	fix mach_port_set_ktype deadlock in SMP kernels
	mach_port_set_ktype attempts to lock the referenced port twice. This is
	resolved by adding ipc_kobject_set_locked() that permits altering the
	kernel type of a port which has already been locked by the caller.
	Message-ID: <20260118192506.97831-2-mike@weatherwax.co.uk>

2026-01-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	cpuboot: align code on 64b version

2026-01-18  Damien Zammit  <damien@zamaudio.com>

	x86_64: Implement swapgs logic
	This is difficult to get correct: we add r12 register to interrupt state
	restore so that every interrupt context knows which mode to return to
	for swapgs.  Testing if gs base is negative is enough to know which mode
	to enter from, since user cannot set gs base negative currently.
	(That would require FSGSBASE cpu feature enabled, but for now we leave
	it disabled).
	syscall64 enters with interrupts disabled and requires swapgs at
	beginning and end, as it is known to be called only from userspace.

	Message-ID: <20260118034614.1044181-8-damien@zamaudio.com>

2026-01-18  Damien Zammit  <damien@zamaudio.com>

	cpu_number: Fixes for 32/64
	Message-ID: <20260118034614.1044181-5-damien@zamaudio.com>

2026-01-18  Damien Zammit  <damien@zamaudio.com>

	i386/mp_desc: Reduce alignment to size of stack
	This fixes compilation when NCPUS is not a power of two

	Message-ID: <20260118034614.1044181-4-damien@zamaudio.com>

2026-01-18  Damien Zammit  <damien@zamaudio.com>

	x86_64: Flush all selectors properly
	Message-ID: <20260118034614.1044181-2-damien@zamaudio.com>

2026-01-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386: use BOOT_CS/DS

2026-01-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make it clear what ISR is

2026-01-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Do not set PERCPU_DS segment
	We do not need it on x86_64, it is the gs base which is used anyway.

	Do not ship/install ioccom.h
	It was removed in 2e503c3bad86b667c89223001958da4e8835add4

2026-01-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop ioccom.h
	We are not actually using it, and its definition not not actually match
	what is expected (provided by sys/ioctl.h).

2026-01-10  Damien Zammit  <damien@zamaudio.com>

	x86_64: Add GS segment configuration to early gdt
	Message-ID: <20260109045003.675647-5-damien@zamaudio.com>

2026-01-10  Damien Zammit  <damien@zamaudio.com>

	x86_64/boothdr: Flush segments after ljmp
	Because the point of flushing segments is to
	reload them after the pipeline flow is disrupted.

	Message-ID: <20260109045003.675647-4-damien@zamaudio.com>

2026-01-10  Damien Zammit  <damien@zamaudio.com>

	x86_64/boothdr: Replace hardcoded msr with macro
	Because self documenting macros are better than hardcoded constants with
	comments next to them.

	Message-ID: <20260109045003.675647-3-damien@zamaudio.com>

2026-01-10  Damien Zammit  <damien@zamaudio.com>

	boothdr: Add apic setup only when APIC is set
	This was overlooked in i386 when apic support was added.
	Correct the i386 version and add x86_64 support correctly.

	Message-ID: <20260109045003.675647-2-damien@zamaudio.com>

2026-01-08  Damien Zammit  <damien@zamaudio.com>

	x86_64/cswitch: Don't clobber %rax with cpu number
	Since a thread is supposed to be returned from Switch_context,
	this fixes a bug where the thread is always returned as 0x0 on 64b UP,
	hence the idle thread was being called too often instead of a chosen thread.
	Also, this fixes a potential future bug with 64b SMP where the non-zero
	cpu number is returned as a valid thread and causes a crash.

	TESTED: By compiling gnumach on hurd-amd64 with

	  --enable-ncpus=1 --disable-linux-groups --enable-kdb --enable-apic

	  and booting hurd-amd64 in UP on qemu.

	Message-ID: <20260108083726.642003-1-damien@zamaudio.com>

2026-01-07  Damien Zammit  <damien@zamaudio.com>

	smp: Use uintptr_t on apboot pointers
	Make smp 64b compatible.

	Message-ID: <20260107030711.582699-7-damien@zamaudio.com>

2026-01-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: drop spurious change in previous commit

2026-01-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: use BOOT_CS/DS

2026-01-04  Damien Zammit  <damien@zamaudio.com>

	gdt: Fix tangled ifdefs missing PERCPU_DS for x86_64
	Message-ID: <20260102041445.376042-2-damien@zamaudio.com>

2026-01-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: raise default memory limit to the physical memory size
	It was reported that half the size is relatively low with rumpdisk.

2026-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	smp: Fix setting last_processor of first thread run of a cpu
	Thus fixing last_processor of AP idle threads, thus fixing /proc/stat

	ddb: Show last processor number in show thread/us

	smp: Simplify relocated far jump

	Add noreturn attributes to startup routines

	Fix accessing the stack

2026-01-02  Damien Zammit  <damien@zamaudio.com>

	x86_64/locore: Fix bad width of mov instruction
	Message-ID: <20260102041445.376042-7-damien@zamaudio.com>

	Fix CPU_NUMBER_* register widths
	Message-ID: <20260102041445.376042-4-damien@zamaudio.com>

	spl_init: Cannot read CPU_NUMBER via gs without percpu
	Move the spl_init flag lower down after the percpu area is set up,
	so that gs segment is not attempted to be read until after
	percpu area is set up.
	Message-ID: <20260102041445.376042-3-damien@zamaudio.com>

2026-01-01  Mike Kelly  <mike@weatherwax.co.uk>

	vm_page: page eviction now operates correctly without a default pager.
	This functionality was unintentionally removed with recent alterations to the page eviction policy.
	Message-ID: <20251231201723.19381-2-mike@weatherwax.co.uk>

2025-12-30  Mike Kelly  <mike@weatherwax.co.uk>

	vm_page: db_show_vmstat now shows external and internal parts of page activity totals
	Message-ID: <20251229133222.11968-3-mike@weatherwax.co.uk>

	vm_page: eviction policy now prioritises page activity over page backing storage type.
	The eviction policy now looks firstly for a page in the inactive lists of a segment before searching the active ones. In both cases, external pages are sought before internal ones. This is a departure from the previous policy where external pages (regardless of page activity) were prioritised. Elapsed execution times for processes requiring use of swap space is now substantially reduced.
	Message-ID: <20251229133222.11968-2-mike@weatherwax.co.uk>

2025-12-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: drop spurious change

2025-12-28  Yelninei  <yelninei@tutamail.com>

	kmsg: Don't truncate messages when overflowing.
	Instead of discarding a character drop the first unread one.

2025-12-27  Mike Kelly via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	vm_page: Separate out external/internal pages counts
	Keep separate counts of external and internal pages within each of the active and inactive queues. This will allow future modifications to assess the relative proportion of internal and external pages.
	Message-ID: <20251220183035.51848-4-mike@weatherwax.co.uk>

	vm_page: Simplify code
	Removed redundant vm_page_next_page_list and tidy up within vm_page_seg_pull_active_page and vm_page_seg_pull_inactive_page that is now simpler as a consequence of examining only a single list.
	Message-ID: <20251220183035.51848-3-mike@weatherwax.co.uk>

2025-12-27  Mike Kelly via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	vm_page: Rework external vs internal page-out management
	Make choice of external or internal pages for vm_page_seg_pull_inactive_page and vm_page_seg_pull_active_page explicit rather than preferential. This will allow future modifications to be more specific about exactly which type of pages should be chosen for eviction.

	There is only 1 change in behaviour with this modification. Previously pageout would search external pages first, then external pages again before searching internal pages. Now external pages are searched once only before internal pages. This should make no practical difference.
	Message-ID: <20251220183035.51848-2-mike@weatherwax.co.uk>

2025-12-18  Damien Zammit  <damien@zamaudio.com>

	mach_clock: Use a callwheel as per Costello & Varghese '95
	Timeouts are now very fast to look up, at the expense of more memory,
	a much shorter list is traversed rather than all of them.  See [1].
	Timeouts that are stopped before expiry are now faster to remove,
	and inserting a timeout is faster.
	Already set timeouts may be set again, resulting in their removal first,
	then are reinserted.  Indeed this happens routinely.

	The thread timers are stored within the thread structures themselves,
	so there is no arbitrary limit on their number, however for
	legacy timeouts there are NTIMERS == 20 currently allocated statically
	for things like comtimer (serial driver) which are in a reusable array.

	TESTED: On Hurd i386 UP+apic

	[1] Costello & Varghese 1995: https://doi.org/10.7936/K7VM49H5
	Message-ID: <20251211081331.1790393-1-damien@zamaudio.com>

2025-11-27  Mike Kelly  <mike@weatherwax.co.uk>

	Interrupt delivery requires vm_privilege
	Interrupts are not being delivered by intr_thread() (to for example rumpdisk) at times of very low free memory and blocks in call to kmem_cache_alloc(). This prevents swapout and results in a locked kernel. A simple solution is to make 'intr_thread()' vm_privileged.
	Message-ID: <20251126131118.13028-2-mike@weatherwax.co.uk>

2025-11-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increase NRQS to 65
	So userspace can have nice values from 0 to 39 included.

2025-10-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_check: check allocation

	HOST_LOAD_INFO: Fix long/int conversion

	Fix duplicate assignment

	Fix dubious int/unsigned int cast

2025-10-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	lock: Allow to try to take lock in interrupt handler
	Since this will not deadlock.

2025-10-14  Damien Zammit  <damien@zamaudio.com>

	irq: Add irqgetstat device status IRQGETPICMODE flavor
	This allows reading irq device status 0 for the mode of the interrupt
	controller, pic or apic.

	TESTED using:

	```
	\#include <stdio.h>
	\#include <device/device.h>
	\#include <hurd.h>
	\#include <mach.h>

	int main()
	{
	  mach_port_t devices, irq;
	  int pic_mode, cnt = 1;
	  int err;

	  err = get_privileged_ports(NULL, &devices);
	  if (err)
	    return 1;

	  err = device_open(devices, D_READ, "irq", &irq);
	  if (err)
	    return 2;

	  err = device_get_status(irq, 0, &pic_mode, &cnt);
	  if (err)
	    return 3;

	  printf("pic_mode = %d\n", pic_mode);
	  return 0;
	}

	```

	amd64-apic $ sudo ./test
	pic_mode = 1

	i386-pic $ sudo ./test
	pic_mode = 0

	i386-apic $ sudo ./test
	pic_mode = 1

	--enable-platform=xen compiles

	Message-ID: <20251014075420.3213978-1-damien@zamaudio.com>

2025-10-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	nulldev_get/setstat: Return invalid operation error
	This avoids seeing drivers without a get/setstat just accept anything
	without any error.

2025-09-22  Diego Nieto Cid  <dnietoc@gmail.com>

	Implement per-task virtual memory limit
	  * doc/mach.texi: add a "Memory Limitations" section to document the new interfaces.
	  * include/mach/gnumach.defs: (vm_set_size_limit) new routine
	    (vm_get_size_limit) likewise
	  * kern/task.c: (task_create_kernel) if parent_task is not null copy virtual memory limit
	  * tests/test-vm.c: (test_vm_limit) add test for the new routines
	  * vm/vm_map.h: (struct vm_map) new fields size_none, size_cur_limit and size_max_limit
	    (vm_map_find_entry) add new parameters cur_protection and max_protection
	  * vm/vm_map.c: (vm_map_setup) initialize new fields
	    (vm_map_enforce_limit) new function
	    (vm_map_copy_limits) new function
	    (vm_map_find_entry) add protection and max_protection parameters.
	    call limit enforcer function
	    (vm_map_enter) likewise
	    (vm_map_copyout) likewise
	    (vm_map_copyout_page_list) likewise
	    (vm_map_fork) copy parent limit to the new map and compute and set size_none of the new map
	  * vm/vm_user.c: (vm_set_size_limit) new function
	    (vm_get_size_limit) likewise
	  * xen/grant.c: update call to vm_map_find_entry to pass protection parameters
	Message-ID: <0b71f4f89b7cc2b159893a805480d7493d522d60.1758485757.git.dnietoc@gmail.com>

2025-09-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	clock: Note that the hpc support is not smp safe yet

2025-09-21  Damien Zammit  <damien@zamaudio.com>

	mach_clock: Fix monotonic clock sometimes going backwards
	Between reading mtime and reading hpclock_read_counter,
	there may be an interrupt that updates mtime, therefore
	we need a check to perform the clock read process again
	in this case.

	TESTED: on UP using:

	```
	\#include <stdio.h>
	\#include <time.h>

	int main()
	{
	  struct timespec ts, now;
	  int i;
	  int cnt = 0;

	  clock_gettime(CLOCK_MONOTONIC, &ts);

	  for (i = 0; i < 10000000; i++) {
	    clock_gettime(CLOCK_MONOTONIC, &now);
	    if ((now.tv_nsec < ts.tv_nsec) && (now.tv_sec <= ts.tv_sec)) {
	      printf("BACKWARDS\n");
	      cnt++;
	      printf("  %u %09lu\n  %u %09lu\n\n",
	        ts.tv_sec, ts.tv_nsec,
	        now.tv_sec, now.tv_nsec
	      );
	    }
	    ts = now;
	  }
	  printf("went backwards %d out of %d times\n", cnt, i);
	  return 0;
	}
	```

	Before the change, some backward transitions were detected.
	After this change, none were detected.
	Message-ID: <20250921091345.2183347-1-damien@zamaudio.com>

2025-09-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_clock (set_timeout): Start counting after next tick
	to avoid partial ticks.

2025-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document mach_port_set_ktype

2025-08-31  Michael Kelly  <mike@weatherwax.co.uk>

	Add mach_port_set_ktype RPC to set ktype of a user port
	For now, we only allow a newly-introduced MACH_PORT_KTYPE_USER_DEVICE type
	that makes ipc_kmsg_copyin_body use page lists, which keep them in a busy
	state that prevents them from being paged out.

2025-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	idt_inittab: Fix terminator entry
	Better fill a complete entry, which is always two pointers, both in
	MACH_PV_DESCRIPTORS and !MACH_PV_DESCRIPTORS case.

	For the x86_64 case, only half a pointer was actually recorded, leaving
	to garbage getting registered in the idt. This was noticed by division
	by zero getting double-faults.

	Thanks Pellescours for the initial investigation!

2025-08-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: Disable apic

	x86_64: disable linux groups early
	So we enable APIC by default.

	smp: Fix build with default parameters
	We need to automatically disable linux groups before automatically
	enabling apic.

2025-07-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	interrupt: simplify offsetting with irq number

2025-07-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Fix interrupt build
	Otherwise we get

	(.text+0x4014c): relocation truncated to fit: R_X86_64_32 against symbol `irqinfo' defined in .bss section in gnumach.o

2025-07-19  Damien Zammit  <damien@zamaudio.com>

	interrupt.S: Change interrupt EOI strategy
	We now have a different strategy for EOI depending on trigger mode:
	For edge triggered, the behaviour is unchanged; the eoi comes
	before the handler so we don't miss interrupts.
	For level triggered, the eoi comes after the handler since the high
	interrupt line will trigger the interrupt again and stack up, before we mask
	it in queue_intr (and we don't risk missing interrupts).
	Message-ID: <20250719074547.288203-1-damien@zamaudio.com>

	ioapic: Introduce irqinfo helper struct
	Avoid reading the ioapic registers for vector and trigger mode,
	by introducing an O(1) memory lookup for these properties.
	Message-ID: <20250719064116.285288-2-damien@zamaudio.com>

2025-07-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	irq: Print process name on irq handler setup

2025-07-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386/configfrag: Make --enable-apic the default when linux groups are not enabled
	In practice this enables APIC by default for x86_64.

2025-07-12  Damien Zammit  <damien@zamaudio.com>

	ioapic: Add conditional TMR bit in EOI (no-op)
	This code may be needed in the future, so add it in now
	but keep it disabled.  The special EOI handling for
	interrupts may only need to be done for one kind of trigger mode.

	ioapic: Make it clear that multiple ioapics don't quite work yet
	Message-ID: <20250712123404.20826-1-damien@zamaudio.com>

2025-07-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	irq: make it clear what irq_lock protects

2025-07-12  Damien Zammit  <damien@zamaudio.com>

	i386/irq.c: Make irq nesting smp safe
	This avoids race condition with multiple devices raising interrupts
	simultaneously on the same IRQ and causing mask to fail.

	TESTED: on SMP and UP+apic gnumach, boots to console and receives
	a large file over rumpnet on debian hurd-i386.

	Message-ID: <20250711065607.208734-1-damien@zamaudio.com>

2025-07-10  Damien Zammit  <damien@zamaudio.com>

	i386/smp.c: Change order of waiting for pending ICR
	We need to wait first for pending to clear before sending
	the IPI assert signal.  Likewise, if we always do it this
	way, we don't need to wait for pending to clear afterward
	because next time we will wait again anyway.  Deassert does
	not seem necessary according to Intel SDM Vol 3, which
	says an IPI is sent when ICR low is written.

	NB: This is not the same code as for STARTUP or INIT IPIs.

	Message-ID: <20250710101341.178343-2-damien@zamaudio.com>

2025-06-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	trap: Fix printf format

2025-06-27  Milos Nikic  <nikic.milos@gmail.com>

	i386 intel read fault fix
	include the missing header, fix the warning.
	Message-ID: <20250625014727.40695-1-nikic.milos@gmail.com>

2025-06-24  Milos Nikic  <nikic.milos@google.com>

	i386 kern: fix overflow in vm_object_print_part call
	The call to vm_object_print_part was passing 0ULL and ~0ULL
	for offset and size, respectively. These values are 64-bit
	(unsigned long long), which causes compiler warnings when
	building for 32-bit platforms where vm_offset_t and vm_size_t
	are typedefs of uintptr_t (i.e., unsigned int).

	This patch replaces those constants with 0 and UINTPTR_MAX,
	which match the expected types and avoid implicit conversion
	or overflow warnings.

	No functional change.
	Message-ID: <20250623235844.763-1-nikic.milos@gmail.com>

2025-06-24  Milos Nikic  <nikic.milos@gmail.com>

	kdb: Fix printf format warning for phys_addr_t
	When building without PAE support, phys_addr_t is defined as unsigned long,
	but the kdb printf call uses %llx, which expects an unsigned long long.
	This triggers a -Wformat warning due to a type mismatch.

	Fix this by explicitly casting the phys_addr_t value to unsigned long long,
	ensuring the format string and argument type always match.

	This avoids build warnings while preserving existing type definitions.
	Message-ID: <20250624013544.842-1-nikic.milos@gmail.com>

2025-06-23  Milos Nikic  <nikic.milos@gmail.com>

	i386: trap.c add prototype for handle_double_fault
	The handle_double_fault function is defined in trap.c and called
	from x86_64/locore.S, but lacked a prototype, triggering a compiler
	warning: 'no previous prototype for handle_double_fault'.

	This change adds a forward declaration at the top of trap.c to
	satisfy the compiler and clarify the function's external linkage.

	No functional changes.

2025-06-23  Milos Nikic  <nikic.milos@gmail.com>

	i386 ldt.c make ldt_fill static
	Compiler warns about it, and its only invoked from this file.
	Message-ID: <20250623190708.742-1-nikic.milos@gmail.com>

2025-06-22  Damien Zammit  <damien@zamaudio.com>

	ioapic.c: Fix default polarity and trigger mode for irqs
	0-13 are on rising edge (legacy)
	14-N are active-low level triggered.

	This allows for PIIX3 chipset to have working IDE,
	if we patch hurd/acpi to ignore buggy irq 9 response.

	Message-ID: <20250622073329.188167-1-damien@zamaudio.com>

2025-06-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	tests: also disable stack protector
	Similarly to Makefile.am, otherwise when the host compiler enables it by
	default, we get undefined reference to `__stack_chk_fail_local'

	Fix syntax

	tests: Also try to use mig as USER_MIG when not cross-building

2025-06-21  Milos Nikic  <nikic.milos@gmail.com>

	smp: fix warning
	Reading lapic->error_status.r may have side effects, and we must preserve it. To avoid a compiler warning about err being unused, cast it to (void).

	This keeps the behavior intact while eliminating the warning.
	Message-ID: <20250619155105.8940-1-nikic.milos@gmail.com>

2025-06-21  Milos Nikic  <nikic.milos@gmail.com>

	ktss: fix compiler warnings
	Fixing compiler warnings on ktss c-file. Some that only appear when building on 32 bit arch, some that happen regardless of architecture. Changes tested on the 32 bit build.

	Message-ID: <20250620212343.9385-1-nikic.milos@gmail.com>

2025-06-21  Milos Nikic  <nikic.milos@gmail.com>

	lock_mon: clean lip/lis functions
	The function lock_info_sort was defined as static and aliased via a macro to lis, requiring a forward declaration to be callable from lip(). This indirection served no functional purpose and made the code less readable and emitting a compiler (declared 'static' but never defined) warning.

	This change:
	- Removes the macro aliasing lock_info_sort to lis
	- Moves lock_info_sort before lip() to eliminate the need for a forward declaration
	- Updates the call in lip() to refer to lock_info_sort directly

	The result is a cleaner and more straightforward structure without changing behavior which also fixes a compiler warning.
	Message-ID: <20250620171458.8394-1-nikic.milos@gmail.com>

2025-06-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	tests: Fix missing file clean

	tests: Fix make clean
	It was dropping the .c file when building inside the source tree

2025-06-16  Michael Kelly  <mike@weatherwax.co.uk>

	vm_page: Make sure to inspect internal page list
	notably when the external page list is not empty but vm_page_can_move
	returns false.

2025-06-12  Michael Kelly  <mike@weatherwax.co.uk>

	Make the swapin thread vm-privileged too
	So it can be swapped in.

2025-06-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	user32: Extend userland address space to 4G
	glibc and hurd servers cope fine, and this allows to have more userland
	memory for very large builds.

	db: Discard unsupported ansi sequences
	Similarly to 360d54234f76 ("kd: Discard unsupported ansi sequences"), we
	should discard unsupported ansi sequences in db input, notably the
	bracketed paste sequences.

	kd: Discard more ansi sequences
	The full range between @ and ~ is defined to be potential ANSI
	sequences, so ignore them all.

	test-mach_host.c: Add time tests

	vm_allocate_contiguous: Avoid 64bit addresses for 32bit userland

2025-06-08  Michael Kelly  <mike@weatherwax.co.uk>

	vm_object_pmap_remove: Also remove in the shadow object
	Otherwise, when e.g. terminating tasks with shared mappings, some references
	remain within the pv_head_table to pmap_t objects that had already been
	destroyed.

2025-06-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	thread_create: Inherit vm_privilege between threads of the same task
	So that e.g. all rumpdisk threads get vm_privilege

	ddb: Print vm_privilege in thread state

2025-05-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_seg_evict: Fix creating a pager for internal objects with DMM
	fd63a4bbf6f2 ("vm_page: Avoid creating a pager in DMM when not
	double-paging") avoided crashes when we do not have a DMM and wish to evict
	an internal opbject. But the double_paging condition was too restrictive and
	prevented normal internal objects from paging out when we do have a DMM.

	This re-enables creating a pager when we do have a DMM, so internal
	objects can be paged out.

2025-05-29  Michael Kelly  <mike@weatherwax.co.uk>

	vm_page_seg_evict: Fix object pointer on restart
	The code further down depends on object being NULL if we goto out.

2025-05-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Explain which we clear modify on migration of a non-dirty page

2025-05-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm: Add missing lock

2025-05-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix IRC network name

2025-05-01  Zhaoming Luo  <zhmingluo@163.com>

	Fix comment
	We can have better resolution now so this comment can be removed.

	Message-ID: <20250501101346.537447-1-zhmingluo@163.com>

2025-04-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	typo

2025-04-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	test-thread-state-fp: Print mxcsr

	tests: Fix copying files

	tests: Also support test kernel not being called gnumach

	tests: make test-multiboot.in also take GNUMACH into account

	tests: Let user specify a kernel to test

2025-04-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kd: Discard unsupported ansi sequences
	"modern" software seem to like spitting sequences without checking for
	their support in terminfo, leading to various spurious output, see e.g.
	https://github.com/takluyver/bash_kernel/issues/107

	Just drop anything we don't support, to avoid getting hit.

2025-04-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: Add hpclock

2025-04-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Fix fp_xsave_size meaning confusion
	It was meant to be the size of the whole ifps, but then it was mistaken as
	the xsave size. Switch to that meaning, and add to it the offset as
	appropriate.

	fpu_get/set_state: Do not convert tag between fxsr and i387
	i386_XFLOAT_STATE does expect fxsr tag.

	fpu_get_state: Fail if requested xfloat state while we have saved 387 state
	Userland will fall back to 387 support, which is what it should.

2025-04-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Fix saving/restoring SSE MXCSR state

2025-04-07  Etienne Brateau  <etienne.brateau@gmail.com>

	x86_64: update ifdef to exclude the x86_64 for i386 only specific conditions
	Message-ID: <20250407201126.1553736-1-etienne.brateau@gmail.com>

2025-03-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_free: Do not check mem->object lock when mem->absent is false
	It may be NULL in that case.

2025-03-25  Zhaoming Luo  <zhmingluo@163.com>

	Integrate HPET so the functions used for getting time can have a higher accuracy
	Integrate HPET so host_get_time, host_get_time64, and host_get_uptime64
	are more precise. The highest precision can be 10ns when this patch is
	applied.

	* i386/i386/apic.c: Implement the two high-precision clock interface functions
	  added in this patch for i386.
	* i386/i386at/model_dep.c: Initialize HPET if APIC is defined
	* kern/mach_clock.c: Integrate the high-precision clocks to have the
	  10ns precise time values.
	* kern/mach_clock.h: Add two new interface functions for accessing the
	  high-precision clocks.

	Message-ID: <20250324042551.4752-2-zhmingluo@163.com>

2025-02-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map_print: show the number of wired pages

2025-02-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_object: Drop old now-unused counter

2025-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid MACRO_BEGIN/END for installed files

2025-02-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use MACRO_BEGIN/END
	This notably fixes at least a SAVE_HINT call.

	lock: Also enable non-SMP slock checking code on MACH_LDEBUG

	lock: Fix build with MACH_LDEBUG but no SMP

	vm: Add and use vm_object_lock_taken, vm_object_cache_locked, vm_page_locked_queues
	to check locking

	vm: Fix checking lock

	vm: Add missing locking

	db_show_all_slocks: Fix build on amd64

	i386 lock: Fix building with MACH_SLOCKS and no SMP
	We need the slock initializer in that case.

2025-02-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "vm_page: Keep evicting out pages with external pager"
	This reverts commit 07f78f7000400bd9d2b3a9f665e7cdfea0cd3df9.

	Using double_paging is not only about insisting on triggering more
	evictions, but also about page being non-NULL and thus following a
	different codepath.

2025-02-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Keep evicting out pages with external pager
	`double_paging` used to be used to detect when we have not really flushed
	a page yet (we have just pushed it to the external pager for now) and we
	really want to flush something because allocations are paused. But when we
	do not have a default pager, we are not double-paging but we should still
	continue evicting pages.

2025-02-10  Flavio Cruz  <flaviocruz@gmail.com>

	mig_strncpy: ensure destination string is null terminated
	Message-ID: <aasqh5rjtuuf6uwvczxtn2k6eyg3mdnkmcsmw6bkzbjitcatrk@tovv247rvlnh>

2025-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Avoid double-paging when we do not have a DMM

	vm_page: Avoid creating a pager in DMM when not double-paging

	vm_page: Also detect default memory manager being dead

	fix build

2025-02-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	set startup thread name to pageout after setup

	Add names to kernel tasks and threads

2025-02-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_print: Fix typo

2025-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build against automake 1.17

2025-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page: Avoid trying to evict internal pages until defpager is up
	Otherwise we will get stuck inside vm_object_pager_create's call to
	vm_object_enter trying to reference it.

	This avoids getting stuck when there is no swap and we don't start a
	defpager.

2025-01-14  Diego Nieto Cid  <dnietoc@gmail.com>

	make hwcaps_t a pointer to uint64_t
	  * aarch64/include/mach/aarch64/mach_aarch64.defs: (hwcaps_t) make type an
	    array of uint64_t.
	  * aarch64/include/mach/aarch64/mach_aarch64_types.h (hwcaps_t) make type a
	    pointer to uint64_t

	Acked-by: Sergey Bugaev <bugaevc@gmail.com>

	Message-ID: <20250109224057.1652-1-dnietoc@gmail.com>

2025-01-11  gfleury  <gfleury@disroot.org>

	Fix boot with smp 1
	Message-ID: <20250111083330.26863-1-gfleury@disroot.org>

2024-12-29  Zhaoming Luo  <zhmingluo@163.com>

	kern: Add a mach host operation which returns elapsed time since bootup
	Add host_get_uptime64() mach interface operation. It can be used to get
	the time passed since the boot up.

	* doc/mach.texi: Add the documentation for the operation
	* include/mach/mach_host.defs: Add the interface
	* include/mach/time_value.h: Extend the mappable time variable
	* kern/mach_clock.c: Operation implementation
	* kern/mach_clock.h: Add a new variable for storing uptime

	Message-ID: <20241224015751.1282-1-zhmingluo@163.com>

2024-12-29  Damien Zammit  <damien@zamaudio.com>

	i386/irq: Add missing enumeration for high interrupts
	Because we support up to 64 irqs with 2 IOAPICs.

	Message-ID: <20241228042008.704671-1-damien@zamaudio.com>

2024-12-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	tests: Fix out-of-order generation of mig files
	Make is allowed to run the tests/module-% prereqs out-of-order, so
	explicit the dependency between installing .defs files and generating
	.user/server.c.

	tests: Fix parallel build of iso files
	We need to use a separate iso tree directory.

	xen: Fix build

2024-12-24  Zhaoming Luo  <zhmingluo@163.com>

	kern: Comment fixed
	Read also:
	https://mail.gnu.org/archive/html/bug-hurd/2024-12/msg00219.html

	Message-ID: <20241224024417.1403-1-zhmingluo@163.com>

2024-12-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	irq: make device_intr_register reject bogus intr id

2024-12-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr: Note which interrupt is being refused to userland

2024-12-22  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	apic: Add extended feature registers for local apic unit
	Add workaround for broken systems that advertise 8 bit APIC ids
	but only match IPIs on 4 bits of the APIC id.
	Message-ID: <20241222014306.430098-4-damien@zamaudio.com>

2024-12-22  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	smp: Use deassert for startup IPI not assert
	Fixes ESR==0x8 error on AMD fam15h. Fixed timings.

	Cannot locate documentation on correct mode for STARTUP IPI,
	but this patch works on AMD hw and qemu.
	Message-ID: <20241222014306.430098-3-damien@zamaudio.com>

2024-12-22  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	smp: Parallel SMP init
	Now that things are in place, we switch to parallel init.
	The key to this change is that the INIT/STARTUP sequence
	is done in one step, and all cpus wake up at the same time.
	Synchronisation is done via waiting for individual flags stored
	in separate memory locations.
	Message-ID: <20241222014306.430098-2-damien@zamaudio.com>

2024-12-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	cpuboot: Use x86 array indexing to make code more readable

	cpuboot: Make sure we copy forward

2024-12-22  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	cpuboot: Fix percpu apboot_gdt for early gs
	This allocates a constant space for percpu gdts
	and copies the first entry to the nth entry on each cpu,
	then patches its own copy of the gdt so it can function
	independently.
	Message-ID: <20241221235456.423860-2-damien@zamaudio.com>

2024-12-21  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	acpi_parse_apic: Check CAPABLE bit field on lapic MADT flag
	Previously, we were ignoring cpus that were not enabled
	but online-capable.
	Message-ID: <20241221023937.384420-1-damien@zamaudio.com>

2024-12-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	task_info: Fix resident_size overflow

2024-12-10  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	smp: Make sure BSP is cpu 0 when starting other cpus
	This is basically a no-op but ensures we are doing smp
	bringup correctly.

	Message-ID: <20241210072926.911061-5-damien@zamaudio.com>

2024-12-10  Damien Zammit  <damien@zamaudio.com>

	i386/apic: Fix logical id numbering
	The number is actually a mask bit per cpu.
	Message-ID: <20241210072926.911061-2-damien@zamaudio.com>

2024-12-10  Sergey Bugaev  <bugaevc@gmail.com>

	intr: Protect internals with a lock
	On SMP builds with 2 CPU cores, we've seen whole-system lock-ups caused
	by irqdev.tot_num_intr getting set to -1, even though it's supposed to
	always stay non-negative. Indeed, it was modified without the
	appropriate synchronization. Fix this by protecting it, as well as
	various other internals of device/intr with a simple_lock_irq.

	Reported-by: Damien Zammit <damien@zamaudio.com>
	Message-ID: <20241210115705.710555-3-bugaevc@gmail.com>

2024-12-10  Sergey Bugaev  <bugaevc@gmail.com>

	linux: Fix building with C23
	'true' and 'false' are keywords in C23. This will equally be an issue on
	older standards if something pulls in stdbool.h, which make these into
	macros. In either of these two cases, just typedef 'boolean' from
	'bool' (avoiding the enum), and rely on 'true' and 'false' being valid
	values of the type.

	Message-ID: <20241210115705.710555-2-bugaevc@gmail.com>

2024-12-10  Sergey Bugaev  <bugaevc@gmail.com>

	Fix various function pointer types
	Fixes Wincompatible-pointer-types errors on GCC 15.

	Message-ID: <20241210115705.710555-1-bugaevc@gmail.com>

2024-12-09  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	i386/apic: Fix condition on non-BSP
	The condition was intended for non-BSP processors to
	disable timer, but apic_id != 0 means it could affect BSP
	if its apic id is non-zero.  Fixes this bug.

	Message-ID: <20241209121706.879984-7-damien@zamaudio.com>

2024-12-09  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	smp: Use logical destination not physical apic id
	Since modern x86 cpus only support 4 bits of destination field
	in ICR, we could only address up to 16 processors, assuming
	their physical APIC ID was < 0x10.  Some processors eg AMD fam15h
	have physical apic ids starting at 0x10 but only support 4 bits.
	So these lapics are unaddressable using physical destination mode.

	Therefore, we switch to using logical destinations for IPIs which
	gives us 8 bits of unique mask for addressing up to 8 groups of processors.

	INIT and STARTUP is not changed here.

	Message-ID: <20241209121706.879984-6-damien@zamaudio.com>

2024-12-09  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	pmap: Separate temporary_mapping from set_page_dir
	Prepare for smp parallel init where we want to call these
	two functions on different cpus at different times.

	Message-ID: <20241209121706.879984-5-damien@zamaudio.com>

2024-12-09  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	i386/cpuboot: Dont use CPU_NUMBER_NO_STACK() early
	Since we just set up the gs segment, we can use
	CPU_NUMBER instead of CPU_NUMBER_NO_STACK.
	Message-ID: <20241209121706.879984-3-damien@zamaudio.com>

2024-12-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Comment on the reason for the different CPU_NUMBER versions

2024-12-09  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	i386/cpuboot: Simplify for legibility
	The current segmentation already adds -KERNELBASE.
	But only when accessing the memory.

	Message-ID: <20241209121706.879984-2-damien@zamaudio.com>

2024-12-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix ipc_mqueue_receive locking documentation

2024-12-07  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	mp_desc: Add assert for AP having non-zero cpu number
	Non-master processors cannot have cpu_number() == 0.
	The synchronisation fails hard if the cpu number is wrong.
	Alert the condition if this is the case.

	(On AMD fam15h, this assert currently fails, but I haven't
	been able to boot it with smp yet either).

	Message-ID: <20241207101222.800350-1-damien@zamaudio.com>

2024-12-06  Etienne Brateau  <etienne.brateau@gmail.com>

	ipc_kmsg: fix print of size of mach_msg_header
	msgh_size is a mach_msg_size_t which represent an unsigned int, so %u
	must me used there instead of %d
	Message-ID: <20241206134419.6609-1-etienne.brateau@gmail.com>

2024-12-05  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	fpu: Fix for cpus that have no fxsave instruction
	Fallthrough was incorrectly using fxsave() instead of
	xsave() or xsaveopt().

	TESTED: on AMD fam15h: no longer throws "No coprocessor" exception.
	Message-ID: <20241205074929.704111-1-damien@zamaudio.com>

2024-12-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	warn about incompatibility between linux disk driver and PAE

2024-12-02  Etienne Brateau  <etienne.brateau@gmail.com>

	vm_page.c: fix a deadlock when running with smp enabled
	the call vm_page_seg_pull_cache_page() return an vm_page (src) with his
	object being locked, as we don’t unlock before doing the vm_page_insert,
	it is still lock there, and so trying to relock it cause a deadlock.
	Replace this lock by an assert.
	This case was not seen as for non-smp locking is a no-op.
	Message-ID: <20241202182721.27920-2-etienne.brateau@gmail.com>

2024-11-24  Damien Zammit via Bug reports for the GNU Hurd  <bug-hurd@gnu.org>

	device/intr: Account for interrupts that could not be delivered
	When an irq handler dies, we are decrementing the n_unacked count
	and calling __enable_irq() the right number of times, but we need
	to decrement the total interrupt count by the number that were lost
	and also clear that number.

	This fixes a hang when a shared irq handler quits and leaves some
	unacked interrupts.

	Message-ID: <20241123222020.245519-1-damien@zamaudio.com>

2024-11-20  Etienne Brateau  <etienne.brateau@gmail.com>

	configfrag: fix usage of mach_ncpus before his definition
	Message-ID: <20241119191048.43597-1-etienne.brateau@gmail.com>

2024-10-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix x86_64 build

2024-10-27  Damien Zammit  <damien@zamaudio.com>

	Expose device(mbinfo) with read access to multiboot raw info
	Message-ID: <20241027092828.3162279-1-damien@zamaudio.com>

2024-10-26  Damien Zammit  <damien@zamaudio.com>

	multiboot: Support graphic mode preferences
	This change forces multiboot loader to provide video mode info
	and also sets the preferred video mode to EGA text to ensure
	existing console behaviour still works.

	When support for graphical consoles is provided, we can change
	the preferred mode to linear framebuffer.

	Message-ID: <20241024001047.3033826-2-damien@zamaudio.com>

2024-10-26  Damien Zammit  <damien@zamaudio.com>

	multiboot v1: Add video framebuffer info
	Message-ID: <20241024001047.3033826-1-damien@zamaudio.com>

2024-10-22  jbranso@dismail.de  <jbranso@dismail.de>

	fix a compile warning.
	* i386/i386at/acpi_parse_apci.c (acpi_print_info):  %lx -> %llx

	i386/i386at/acpi_parse_apic.c: In function 'acpi_print_info':
	i386/i386at/acpi_parse_apic.c:51:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} [-Wformat=]
	   51 |     printf(" rsdp = 0x%lx\n", rsdp);
	      |                       ~~^     ~~~~
	      |                         |     |
	      |                         |     phys_addr_t {aka long long unsigned int}
	      |                         long unsigned int
	      |                       %llx
	Message-ID: <20241022173641.2774-2-jbranso@dismail.de>

2024-10-22  jbranso@dismail.de  <jbranso@dismail.de>

	fix some compiler warnings.
	I compiled with ./configure --enable-xen --enable-acpi.

	* i386/intel/pmap.c (pmap_bootstrap_xen, pmap_bootstrap,
	pmap_set_page_readwrite, pmap_clear_bootstrap_pagetable, pmap_map_mfn,
	pmap_expand_level, pmap_collect): Lots of tiny changes.  I've copied
	in some of the error messages.

	cast many variables to (long unsigned int), (vm_offset_t) -> (unsigned
	long), %llx  <-- (uint64_t) variable,

	In file included from i386/intel/pmap.c:63:
	i386/intel/pmap.c: In function 'pmap_bootstrap_xen':
	i386/intel/pmap.c:703:39: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Wformat=]
	  703 |                                 panic("couldn't pin page %p(%lx)", l1_map[n_l1map], (vm_offset_t) kv_to_ma (l1_map[n_l1map]));
	      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~

	i386/intel/pmap.c: In function 'pmap_set_page_readwrite':
	i386/intel/pmap.c:897:23: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'vm_offset_t' {aka 'unsigned int'} [-Wformat=]
	  897 |                 panic("couldn't set hiMMU readwrite for addr %lx(%lx)\n", vaddr, (vm_offset_t) pa_to_ma (paddr));
	      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~
	      |                                                                           |
	      |                                                                           vm_offset_t {aka unsigned int}
	./kern/debug.h:67:50: note: in definition of macro 'panic'
	   67 |         Panic (__FILE__, __LINE__, __FUNCTION__, s, ##__VA_ARGS__)
	      |                                                  ^
	i386/intel/pmap.c:897:64: note: format string is defined here
	  897 |                 panic("couldn't set hiMMU readwrite for addr %lx(%lx)\n", vaddr, (vm_offset_t) pa_to_ma (paddr));
	      |                                                              ~~^
	      |                                                                |
	      |                                                                long unsigned int
	      |                                                              %x
	i386/intel/pmap.c:897:23: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Wformat=]
	  897 |                 panic("couldn't set hiMMU readwrite for addr %lx(%lx)\n", vaddr, (vm_offset_t) pa_to_ma (paddr));
	      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	./kern/debug.h:67:50: note: in definition of macro 'panic'
	   67 |         Panic (__FILE__, __LINE__, __FUNCTION__, s, ##__VA_ARGS__)
	      |                                                  ^
	i386/intel/pmap.c:897:68: note: format string is defined here
	  897 |                 panic("couldn't set hiMMU readwrite for addr %lx(%lx)\n", vaddr, (vm_offset_t) pa_to_ma (paddr));
	      |                                                                  ~~^
	      |                                                                    |
	      |                                                                    long unsigned int
	      |                                                                  %x
	Message-ID: <20241022173641.2774-1-jbranso@dismail.de>

2024-10-22  Damien Zammit  <damien@zamaudio.com>

	ioapic: Initially mask all IRQs individually
	This fixes a spurious intnull(9) from occurring on real hardware
	during ACPI startup when compiled with --enable-apic

	Message-ID: <20241021032217.2915842-1-damien@zamaudio.com>

2024-10-21  jbranso@dismail.de  <jbranso@dismail.de>

	fix a compiler warning.
	* i386/intel/pmap.c (pmap_page_table_page_dealloc): define it only on
	the Xen platform.  Best not to delete page_alloc, so we know how to do
	so if need be.

	i386/intel/pmap.c:1265:1: warning: 'pmap_page_table_page_dealloc' defined but not used [-Wunused-function]
	 1265 | pmap_page_table_page_dealloc(vm_offset_t pa)
	      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
	i386/intel/pmap.c:1171:1: warning: 'pmap_page_table_page_alloc' defined but not used [-Wunused-function]
	 1171 | pmap_page_table_page_alloc(void)
	      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
	Message-ID: <20241020190744.2522-3-jbranso@dismail.de>

2024-10-21  jbranso@dismail.de  <jbranso@dismail.de>

	fix a compiler warning.
	* kern/slab.c(kalloc_init): %lu -> %zu

	kern/slab.c: In function 'kalloc_init':
	kern/slab.c:1349:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
	 1349 |         sprintf(name, "kalloc_%lu", size);
	      |                               ~~^   ~~~~
	      |                                 |   |
	      |                                 |   size_t {aka unsigned int}
	      |                                 long unsigned int
	      |                               %u
	Message-ID: <20241020190744.2522-2-jbranso@dismail.de>

2024-10-21  jbranso@dismail.de  <jbranso@dismail.de>

	fix a compile warning.
	* vm/vm_page.c(vm_page_setup): %lu -> %zu

	vm/vm_page.c: In function 'vm_page_setup':
	vm/vm_page.c:1425:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
	 1425 |     printf("vm_page: page table size: %lu entries (%luk)\n", nr_pages,
	      |                                       ~~^                    ~~~~~~~~
	      |                                         |                    |
	      |                                         long unsigned int    size_t {aka unsigned int}
	      |                                       %u
	vm/vm_page.c:1425:54: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
	 1425 |     printf("vm_page: page table size: %lu entries (%luk)\n", nr_pages,
	      |                                                    ~~^
	      |                                                      |
	      |                                                      long unsigned int
	      |                                                    %u
	 1426 |            table_size >> 10);
	      |            ~~~~~~~~~~~~~~~~
	      |                       |
	      |                       size_t {aka unsigned int}
	Message-ID: <20241020190744.2522-1-jbranso@dismail.de>

2024-10-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing caddr_t type
	Now that gnumach does not define it any more.

2024-09-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu_set_state: accept fp_save_kind being incoherent if initialized is not set

2024-09-08  Luca Dariz  <luca@orpolo.org>

	add tests for FLOAT/XFLOAT state
	Message-ID: <20240904201806.510082-2-luca@orpolo.org>

2024-09-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu_set_state: return an error on incoherent fp_save_kind

2024-09-08  Luca Dariz  <luca@orpolo.org>

	add xfloat thread state interface
	* i386/i386/fpu.c: extend current getter and setter to support the
	  extended state; move the struct casting here to reuse the locking
	  and allocation logic for the thread state; make sure the new state
	  is set as valid, otherwise it won't be applied; add
	  i386_get_xstate_size() to dynamically retrieve the FPU state size.
	* i386/i386/fpu.h: update prototypes to accept generic thread state
	* i386/i386/pcb.c: forward raw thread state to getter and setter, only
	  checking for minimum size and use the new i386_get_xstate_size()
	  helper.
	* i386/include/mach/i386/mach_i386.defs: expose the new helper
	  i386_get_xstate_size().
	* i386/include/mach/i386/thread_status.h: add interface definition for
	  I386_XFLOAT_STATE and the corresponding data structure.
	Message-ID: <20240904201806.510082-1-luca@orpolo.org>

	x86_64: fix double fault handler
	* x86_64/locore.S: adjust to the changes in the thread state
	  structure (segment registers), and add the missing opcode.
	Message-ID: <20240904201806.510082-3-luca@orpolo.org>

2024-08-22  Luca Dariz  <luca@orpolo.org>

	add rpc interrupted test
	* tests/test-machmsg.c: add two use cases used by glibc during signal
	  handling
	* tests/include/testlib.h
	* tests/testlib.c: add new wait_thread_terminated() helper
	Message-ID: <20240821163616.189307-3-luca@orpolo.org>

2024-07-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Drop conflicting alignment
	struct i386_xfp_xstate_header header is at offset 440 of struct
	i386_xfp_save, so not a multiple of 64 anyway.

2024-07-14  Flavio Cruz  <flaviocruz@gmail.com>

	Add thread_get_name RPC to get the name of a thread.
	Message-ID: <6qm4fdtthi5nrmmleum7z2xemxz77adohed454eaeuzlmvfx4d@l3pyff4tqwry>

2024-07-10  Flavio Cruz  <flaviocruz@gmail.com>

	Include stddef.h in sys/types.h to get size_t and NULL.
	Remove unnecessary definitions from sys/types.h.
	Message-ID: <oitneneybjishhqq7bgedkasrqqd6nq7vselruaacw27sbe47e@6rt3xbi7fnie>

	Ensure we always pass -ffreestanding -nostdlib even if CFLAGS are overridden.
	Message-ID: <4cea36qrjeo7tkklmqcwgkrxstxiqykdofha65zxmpni2o6lp3@2offokab6fvn>

2024-07-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix bogus format

2024-07-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix xen build
	with -Werror=incompatible-pointer-types and
	-Werror=implicit-function-declaration.

2024-06-24  Flavio Cruz  <flaviocruz@gmail.com>

	Disable specific warnings that are now errors in GCC 14
	Message-ID: <376mwj4qtzxqgg2p4teqefxep7qz2kxll25synb3sulgof24j5@wxhqtaf7ei32>

2024-06-12  Luca Dariz  <luca@orpolo.org>

	tests/machmsg: check rx message size on different code paths
	* tests/test-machmsg.c: add more combinations to existing cases:
	  - make tx and rx ports independent in the send/receive tests
	  - add two more variants for send/receive tests, using two separate
	    system calls, using different code paths in mach_msg().
	Message-ID: <20240612062755.116308-2-luca@orpolo.org>

	x86_64: fix msg size forwarding in case it's not set by userspace
	* ipc/copy_user.c: recent MIG stubs should always fill the size
	  correctly in the msg header, but we shouldn't rely on that. Instead,
	  we use the size that was correctly copied-in, overwriting the value
	  in the header. This is already done by the 32-bit copyinmsg(), and
	  was missing in the 64-bit version.
	  Furthermore, the assertion about user/kernel size make sense with
	  and without USER32, so take it out if the #ifdef.
	Message-ID: <20240612062755.116308-1-luca@orpolo.org>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	Add a test for thread state
	This tests generating and handling exceptions, thread_get_state(),
	thread_set_state(), and newly added thread_set_self_state().  It does
	many of the same things that glibc does when handling a signal.
	Message-ID: <20240416071013.85596-1-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	Add thread_set_self_state() trap
	This is a new Mach trap that sets the calling thread's state to the
	passed value, as if with a call to the thread_set_state() RPC.  If the
	flavor of state being set is the one that contains the register used for
	syscall return value (i386_THREAD_STATE or i386_REGS_SEGS_STATE on x86,
	AARCH64_THREAD_STATE on AArch64), the set register value is *not*
	overwritten with KERN_SUCCESS when the state gets set successfully, yet
	errors do get reported if the syscall fails.

	Although the trap is intended to enable userland to implement sigreturn
	functionality in the AArch64 port (more on which below), the trap itself
	is architecture-independent, and fully implemented in terms of the
	existing kernel routines (thread_setstatus & thread_set_syscall_return).

	This trap's functionality is similar to sigreturn() on Unix or
	NtContinue() on NT.  The use case for these all is restoring the local
	state of an interrupted thread in the following set-up:

	1. A thread is running some arbitrary code.
	2. An event happens that deserves the thread's immediate attention,
	   analogous to a hardware interrupt request.  This might be caused by
	   the thread itself (e.g. running into a Mach exception that was
	   arranged to be handled by the same thread), or by external events
	   (e.g. receiving a Unix SIGCHLD).
	3. Another thread (or perhaps the kernel, although this is not the case
	   on Mach) suspends the thread, saves its state at the point of
	   interruption, alters its state to execute some sort of handler for
	   the event, and resumes the thread again, now running the handler.
	4. Once the thread is done running the handler, it wants to return to
	   what it was doing at the time it was interrupted.  To do this, it
	   needs to restore the state as saved at the moment of interruption.

	Unlike with setjmp()/longjmp(), we cannot rely on the interrupted logic
	collaborating in any way, as it's not aware that it's being interrupted.
	This means that we have to fully restore the state, including values of
	all the general-purpose registers, as well as the stack pointer, program
	counter, and any state flags.

	Depending on the instruction set, this may or may not be possible to do
	fully in userland, simply by loading all the registers with their saved
	values.  It should be more or less easy to load the saved values into
	general-purpose registers, but state flags and the program counter can
	be more of a challenge.  Loading the program counter value (in other
	words, performing an indirect jump to the interrupted instruction) has
	to be the very last thing we do, since we don't control the program flow
	after that.  The only real place program counter can be loaded from is
	popped off the stack, since all general-purpose registers would already
	contain their restored values by that point, and using global storage is
	incompatible with another interruption of the same kind happening at the
	time we were about to return.  For the same reason, the saved program
	counter cannot be really stored outside of the "active" stack area (such
	as below the stack pointer), since otherwise it can get clobbered by
	another interruption.

	This means that to support fully-userland returns, the instruction set
	must provide a single instruction that loads an address from the stack,
	adjusts the stack pointer, and performs an indirect jump to the loaded
	address.  The instruction must also either preserve (previously
	restored) state flags, or additionally load state flags from the stack
	in addition to the jump address.

	On x86, 'ret' is such an instruction: it pops an address from the stack,
	adjusting the stack pointer without modifying flags, and performs an
	indirect jump to the address.  On x86_64, where the ABI mandates a red
	zone, one can use the 'ret imm16' variant to additionally adjust the
	stack pointer by the size of the red zone, atomically restoring the
	value of the stack pointer at the time of the interruption while loading
	the return address from outside the red zone.  This is how sigreturn is
	implemented in glibc for the Hurd on x86.

	On ARM AArch32, 'pop {pc}' (alternatively written 'ldr pc, [sp], #4') is
	such an instruction: since SP and PC are just general-purpose, directly
	accessible registers (r13 and r15), it is possible to perform a load
	from the address pointed to by SP into PC, with a post-increment of SP.
	It is, in fact, possible to restore all the other general-purpose
	registers too in a single instruction this way: 'pop {r0-r12, r14, r15}'
	will do that; here r13, the stack pointer, gets incremented after all
	the other registers get loaded from the stack.  This also preserves the
	CPSR flags, which would need to be restored just prior to the 'pop'.

	On ARM AArch64 however, PC is no longer a directly accessible general-
	purpose register (and SP is only accessible that way by some of the
	instructions); so it is no longer possible to load PC from memory in a
	single instruction.  The only way to perform an indirect jump is by
	using one of the dedicated branching instructions ('br', 'blr', or
	'ret').  All of them accept the address to branch to in a general-
	purpose register, which is incompatible with our use case.

	Moreover, with the BTI extension, there is a BTYPE field in PSTATE that
	tracks which type (if any) of an indirect branch was the last executed
	instruction; this is then used to raise an exception if the instruction
	the indirect branch lands on was not intended to be a target of an
	indirect branch (of a matching type).  It is important to restore the
	BTYPE (among the other state) when returning to an interrupted context;
	failing to do that will either cause an unexpected BTI failure exception
	(if the last executed instruction before the interruption was not an
	indirect branch, but the last instruction of the restoration logic is),
	or open up a window for exploitation (if the last executed instruction
	before the interruption was an indirect branch, but the last instruction
	of the restoration logic is not -- note that 'ret' is not considered an
	indirect branch for the purposes of BTI).

	So, it is not possible to fully restore the state of an interrupted
	context in userland on AArch64.  The kernel can do that however (and is
	in fact doing just that every time it handles a fault or an IRQ): the
	'eret' instruction for returning from an exception is accessible to EL1
	(the kernel), but not EL0 (the user).  'eret' atomically restores PC
	from the ELR_EL1 system register, and PSTATE from the SPSR_EL1 system
	register (and does other things); both of these system registers are
	inaccessible from userland, and so couldn't have been used by the
	interrupted context for any purpose, meaning their values doesn't need
	to be restored.  (They can be used by the kernel code, which presents an
	additional complication when it's the kernel context that gets
	interrupted and has to be returned to.  To make this work, the kernel
	masks interrupt requests and avoids doing anything that could cause a
	fault when using those registers.)

	The above justifies the need for a kernel API to atomically restore
	saved userland state on AArch64 (and possibly other platforms that
	aren't x86).  Mach already has an API to set state of a thread, namely
	the thread_set_state() RPC; however, a thread calling thread_set_state()
	on itself is explicitly disallowed.  We have previously relaxed this
	restriction to allow setting i386_DEBUG_STATE and i386_FSGS_BASE_STATE
	on the current thread, so one way to address the need for such an API on
	AArch64 would be to also allow setting AARCH64_THREAD_STATE on the
	current thread.  That is what I have originally proposed and
	implemented.  Like the thread_set_self_state() trap implemented by this
	patch, the implementation of setting AARCH64_THREAD_STATE on the current
	thread needs to ensure that the set value of the x0 register does not
	get immediately overwritten with the return value of the mach_msg()
	trap.

	However, it's not only the return value of the mach_msg() trap that is
	important, but also the RPC reply message.  The thread_set_state() RPC
	should not generate a reply message when used for returning to an
	interrupted context, since there'd be nobody expecting the message.
	This could be achieved by special-casing that in the kernel as well, or
	(simpler) by userland not passing a valid reply port in the first place.
	Note that the implementation of sigreturn in glibc already uses the
	strategy of passing an invalid reply port for the last RPC is does
	before returning to the interrupted context (which is deallocating the
	reply port used by the signal handler).

	Not passing a valid reply port and consequently not blocking on awaiting
	the reply message works, since the way Mach is implemented, kernel RPCs
	are always executed synchronously when userland sends the request
	message (unless the routine implementation includes explicit asynchrony,
	as device RPCs do, and gsync_wait() should do, but currently doesn't),
	meaning the RPC caller never has to *wait* for the reply message, as one
	is produced immediately.  In other words, the mere act of invoking a
	kernel RPC (that does not involve explicit asynchrony) is enough to
	ensure it completes when mach_msg() returns, even if a reply message is
	not received (whether because an invalid reply port has been specified,
	or because MACH_RCV_MSG wasn't passed to mach_msg(), or because a
	message other than the kernel RPC's reply was received by the call).

	However, the same is not true when interposing is involved, and the
	thread's self port does not in fact point directly to the kernel, but to
	a userspace proxy of some sort.  The two primary examples of this are
	Hurd's rpctrace tool, which interposes all the task's ports and proxies
	all RPCs after tracing them, and Mach's old netmsg/netname server, which
	proxies ports and messages over network.  In this case, the actual
	implementation only runs once the request reaches the actual kernel, and
	not once the request message has been sent by the original caller, so it
	*is* necessary for the caller to await the reply message if it wants to
	make sure that the requested action has been completed.  This does not
	cause much issues for deallocation of a reply port on the sigreturn code
	path in glibc, since that only delays when the port is deallocated, but
	does not otherwise change the program behavior.  With
	thread_set_state(mach_thread_self()), however, this would be quite
	catastrophic, since the message-send would return back to the caller
	without changing its state, and the actual change of state would only
	happen at some later point.

	This issue is avoided nicely by turning the functionality into an
	explicit Mach trap rather than an RPC.  As it's not an RPC, it doesn't
	involve messaging, and doesn't need a reply port or a reply message.  It
	is always a direct call to the kernel (and not to any interposer), and
	it's always guaranteed to have completed synchronously once the trap
	returns.  That also means that the thread_set_self_state() call won't be
	visible to rpctrace or forwarded over network for netmsg, but this is
	fine, since all it does is sets thread state (i.e. register values); the
	thread could do the same on its own by issuing relevant machine
	instruction without involving any Mach abstractions (traps or RPCs) at
	all if it weren't for the need of atomicity.

	Finally, this new trap is unfortunately somewhat of a security concern
	(as any sigreturn-like functionality is in general), since it would
	potentially allow an attacker who already has a way to invoke a function
	with 3 controlled argument values to set the values of all registers to
	any desired values (sigreturn-oriented programming).  There is currently
	no mitigation for this other than the generic ones such as PAC and stack
	check guards.

	The limit of 150 used in the implementation has been chosen to be large
	enough to fit the largest thread state flavor so far, namely
	AARCH64_FLOAT_STATE, but small enough to not overflow the 4K stack.  If
	a new thread state flavor is added that is too big to fit on the stack,
	the implementation should be switched to use kalloc instead of on-stack
	storage.
	Message-ID: <20240415090149.38358-9-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add thread state types
	Notes:
	* TPIDR_EL0, the TLS pointer, is included in the generic state directly.
	* TPIDR2_EL0, part of the SME extension, is not included in the generic
	  state.  If we add SME support, it will be a part of something like
	  aarch64_sme_state.
	* CPSR is not a real register in AArch64 (unlike in AArch32), but a
	  collection of individually accessible bits and pieces from PSTATE.
	  Due to how the kernel accesses user mode's PSTATE (via SPSR), it's
	  convenient to represent PSTATE as a pseudo-register in the same
	  format as SPSR.  This is also what QEMU and XNU do.
	* There is no hardware-enforced 'natural' order to place the registers
	  in, since no registers get pushed onto the stack on exception entry.
	  Saving and restoring registers from an instance of struct
	  aarch64_thread_state is implemented entirely in software, and the
	  format is essentially arbitrary.
	* aarch64_float_state includes registers of a 128-bit type; this may
	  create issues for compilers other than GCC.
	* fp_reserved is not a register, but a placeholder.  If and when Arm
	  adds another floating-point meta-register, this will be changed to
	  represent it, and that would not be considered a compatibility break,
	  so don't access fp_reserved by name, or its value, from userland.
	  Instead, memset the whole structure to 0 if starting from scratch, or
	  memcpy an existing structure.

	More thread state types could be added in the future, such as
	aarch64_debug_state, aarch64_virt_state (for hardware-accelerated
	virtualization), potentially ones for PAC, SVE/SME, etc.
	Message-ID: <20240415090149.38358-8-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add exception type definitions
	A few yet-unimplemented codes are also sketched out; these are included
	so you know roughly what to expect once the missing functionality gets
	implemented, but are not in any way stable or usable.
	Message-ID: <20240415090149.38358-7-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add mach_aarch64 API
	This currently contains a single RPC to get Linux-compatible hwcaps,
	as well as the values of MIDR_EL1 and REVIDR_EL1 system registers.

	In the future, this is expected to host the APIs to manage PAC keys,
	and possibly some sort of AArch64-specific APIs for userland IRQ
	handlers.
	Message-ID: <20240415090149.38358-6-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add vm_param.h
	And make it so that the generic vm_param.h doesn't require the machine-
	specific one to define PAGE_SIZE etc.  We *don't* want a PAGE_SIZE
	constant to be statically exported to userland; instead userland should
	initialize vm_page_size by querying vm_statistics(), and then use
	vm_page_size.

	We'd also like to eventually avoid exporting VM_MAX_ADDRESS, but this is
	not feasible at the moment.  To make it feasible in the future, userland
	should try to avoid relying on the definition where possible.
	Message-ID: <20240415090149.38358-5-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add public syscall ABI
	We use largely the same ABI as Linux: a syscall is invoked with the
	"svc #0" instruction, passing arguments the same way as for a regular
	function call.  Specifically, up to 8 arguments are passed in the x0-x7
	registers, and the rest are placed on the stack (this is only necessary
	for the vm_map() syscall).  w8 should contain the (negative) Mach trap
	number.  A syscall preserves all registers except for x0, which upon
	returning contains the return value.
	Message-ID: <20240415090149.38358-4-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	aarch64: Add the basics
	This adds "aarch64" host support to the build system, along with some
	uninteresting installed headers. The empty aarch64/aarch64/ast.h header
	is also added to create the aarch64/aarch64/ directory (due to Git
	peculiarity).

	With this, it should be possible to run 'configure --host=aarch64-gnu'
	and 'make install-data' successfully.
	Message-ID: <20240415090149.38358-3-bugaevc@gmail.com>

2024-04-16  Sergey Bugaev  <bugaevc@gmail.com>

	Add CPU_TYPE_ARM64
	This is distinct from CPU_TYPE_ARM, since we're going to exclusively use
	AArch64 / A64, which CPU_TYPE_ARM was never meant to support, and to
	match EM_AARCH64, which is also separate from EM_ARM.  CPU_TYPE_X86_64
	was similarly made distinct from CPU_TYPE_I386.

	This is named CPU_TYPE_ARM64 rather than CPU_TYPE_AARCH64, since AArch64
	is an "execution state" (analogous to long mode on x86_64) rather than a
	CPU type.  "ARM64" here is not a name of the architecture, but simply
	means an ARM CPU that is capable of (and for our case, will only really
	be) running in the 64-bit mode (AArch64).

	There are no subtypes defined, and none are expected to be defined in
	the future.  Support for individual features/extensions should be
	discovered by other means, i.e. the aarch64_get_hwcaps() RPC.
	Message-ID: <20240415090149.38358-2-bugaevc@gmail.com>

2024-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	tests: give more time
	If the host is loaded it may take some time to boot.

	tests: Reboot the VM after the test
	So it does not have to timeout.

	tests: Disable parallelism
	The makefile pieces are not ready for this.

	Xen: Fix missing include
	For thread_wakeup.

	tests: Fix running on 32bit host
	qemu-system-i386 says at most 2047 MB RAM can be simulated

	tests: Fix include path

	tests: Add missing test files shipping

2024-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	SMP: force APIC
	We need it to properly driver interrupts etc. of APs

	linux: Do not enable in SMP, it is not MP-safe

2024-04-05  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Mark entries as in-transition while wiring down
	When operating on the kernel map, vm_map_pageable_scan() does what
	the code itself describes as "HACK HACK HACK HACK": it unlocks the map,
	and calls vm_fault_wire() with the map unlocked. This hack is required
	to avoid a deadlock in case vm_fault or one of its callees (perhaps, a
	pager) needs to allocate memory in the kernel map. The hack relies on
	other kernel code being "well-behaved", in particular on that nothing
	will do any serious changes to this region of memory while the map is
	unlocked, since this region of memory is "owned" by the caller.

	Even if the kernel code is "well-behaved" and doesn't alter VM regions
	that it doesn't "own", it can still access adjacent regions. While this
	doesn't affect the region being wired down as such, it can still end up
	causing trouble due to extension & coalescence (merging) of VM entries.

	VM entry coalescence is an optimization where two adjacent VM entries
	with identical properties are merged into a single one that spans the
	combined region of the two original entries. VM entry extension is a
	similar an optimization where an existing VM entry is extended to cover
	an adjacent region, instead of a new VM entry being created to describe
	the region.

	These optimizations are a private implementation detail of vm_map, and
	(while they can be observed through e.g. vm_region) they are not
	supposed to cause any visible effects to how the described regions of
	memory behave; coalescence/extension and clipping happen automatically
	as needed when adding or removing mappings, or changing their
	properties. This is why it's fine for "well-behaved" kernel code to
	unknowingly cause extension or coalescence of VM entries describing a
	region by operating on adjacent VM regions.

	The "HACK HACK HACK HACK" code path relies on the VM entries in the
	region staying intact while it keeps the map unlocked, as it passes
	direct pointers to the entries into vm_fault_wire(), and also walks the
	list of entries in the region by following the vme_next pointers in the
	entries. Yet, this assumption is violated by the entries getting
	concurrently modified by other kernel code operating on adjacent VM
	regions, as described above. This is not only undefined behavior in the
	sense of the C language standard, but can also cause very real issues.

	Specifically, we've been seeing the VM subsystem deadlock when building
	Mach with SMP support and running a test program that calls
	mach_port_names() concurrently and repearedly. mach_port_names()
	implementation allocates and wires down memory, and when called from
	multiple threads, it was likely to allocate, and wire, several adjacent
	regions of memory, which would then cause entry coalescence/extension
	and clipping to kick in. The specific sequence of events that led to a
	deadlock appear to have been:

	1. Multiple threads execute mach_port_names() concurrently.
	2. One of the threads is wiring down a memory region, another is
	   unwiring an adjacent memory region.
	3. The wiring thread has unlocked the ipc_kernel_map, and called into
	   vm_fault_wire().
	4. Due to entry coalescence/extension, the entry the wiring thread was
	   going to wire down now describes a broader region of memory, namely
	   it includes an adjustent region of memory that has previously been
	   wired down by the other thread that is about to unwire it.
	5. The wiring thread sets the busy bit on a wired-down page that the
	   unwiring thread is about to unwire, and is waiting to take the map
	   lock for reading in vm_map_verify().
	6. The unwiring thread holds the map lock for writing, and is waiting
	   for the page to lose its busy bit.
	7. Deadlock!

	To prevent this from happening, we have to ensure that the VM entries,
	at least as passed into vm_fault_wire() and as used for walking the list
	of such entries, stay intact while we have the map unlocked. One simple
	way to achieve that that I have proposed previously is to make a
	temporary copy of the VM entries in the region, and pass the copies into
	vm_fault_wire(). The entry copies would not be affected by coalescence/
	extension, even if the original entries in the map are. This is however
	only straigtforward to do when there's just a single entry describing
	the while region, and there are further concerns with e.g. whether the
	underlying memory objects could, too, get coalesced.

	Arguably, making copies of the memory entries is making the hack even
	bigger. This patch instead implements a relatively clean solution that,
	arguably, makes the whole thing less of a hack: namely, making use of
	the in-transition bit on VM entries to prevent coalescence and any other
	unwanted effects. The entry in-transition bit was introduced for a very
	similar use case: the VM map copyout logic has to temporarily unlock the
	map to run its continuation, so it marks the VM entries it copied out
	into the map up to that point as being "in transition", asking other
	code to hold off making any serious changes to those entries. There's a
	companion "needs wakeup" bit that other code can set to block on the VM
	entry exiting this in-transition state; the code that puts an entry into
	the in-transition state is expected to, when unsetting the in-transition
	bit back, check for needs_wakeup being set, and wake any waiters up in
	that case, so they can retry whatever operation they wanted to do. There
	is no need to check for needs_wakeup in case of vm_map_pageable_scan(),
	however, exactly because we expect kernel code to be "well-behaved" and
	not make any attempts to modify the VM region.

	This relies on the in-transition bit inhibiting coalescence/extension,
	as implemented in the previous commit.

	Also, fix a tiny sad misaligned comment line.

	Reported-by: Damien Zammit <damien@zamaudio.com>
	Helped-by: Damien Zammit <damien@zamaudio.com>
	Message-ID: <20240405151850.41633-3-bugaevc@gmail.com>

2024-04-05  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Don't attempt to extend in-transition entries
	The in-transition mechanism exists to make it possible to unlock a map
	while still making sure some VM entries won't disappear from under you.
	This is currently used by the VM copyin mechanics.

	Entries in this state are better left alone, and extending/coalescing is
	only an optimization, so it makes sense to skip it if the entry to be
	extended is in transition. vm_map_coalesce_entry() already checks for
	this; check for it in other similar places too.

	This is in preparation for using the in-transition mechanism for wiring,
	where it's much more important that the entries are not extended while
	in transition.
	Message-ID: <20240405151850.41633-2-bugaevc@gmail.com>

2024-04-05  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Fix use-after-free in vm_map_pageable_scan()
	When operating on the kernel map, vm_map_pageable_scan() does what
	the code itself describes as "HACK HACK HACK HACK": it unlocks the map,
	and calls vm_fault_wire() with the map unlocked. This hack is required
	to avoid a deadlock in case vm_fault or one of its callees (perhaps, a
	pager) needs to allocate memory in the kernel map. The hack relies on
	other kernel code being "well-behaved", in particular on that nothing
	will do any serious changes to this region of memory while the map is
	unlocked, since this region of memory is "owned" by the caller.

	This reasoning doesn't apply to the validity of the 'end' entry (the
	first entry after the region to be wired), since it's not a part of the
	region, and is "owned" by someone else. Once the map is unlocked, the
	'end' entry could get deallocated. Alternatively, a different entry
	could get inserted after the VM region in front of 'end', which would
	break the 'for (entry = start; entry != end; entry = entry->vme_next)'
	loop condition.

	This was not an issue in the original Mach 3 kernel, since it used an
	address range check for the loop condition, but got broken in commit
	023401c5b97023670a44059a60eb2a3a11c8a929 "VM: rework map entry wiring".
	Fix this by switching the iteration back to use an address check.

	This partly fixes a deadlock with concurrent mach_port_names() calls on
	SMP, which was

	Reported-by: Damien Zammit <damien@zamaudio.com>
	Message-ID: <20240405151850.41633-1-bugaevc@gmail.com>

2024-03-29  Sergey Bugaev  <bugaevc@gmail.com>

	elf-load: Respect PT_GNU_STACK
	If a bootstrap ELF contains a PT_GNU_STACK phdr, take stack protection
	from there.  Otherwise, default to VM_PROT_ALL.

2024-03-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kd: Include i386/irq.h
	to get unmask_irq declaration

2024-03-27  Sergey Bugaev  <bugaevc@gmail.com>

	tests: Create tests/ in the build tree before trying to use it
	Message-ID: <20240327161841.95685-18-bugaevc@gmail.com>

	tests: Don't ask for executable stack
	Message-ID: <20240327161841.95685-17-bugaevc@gmail.com>

	tests: Make exception subcode a long
	Message-ID: <20240327161841.95685-16-bugaevc@gmail.com>

	tests: Use vm_page_size
	Message-ID: <20240327161841.95685-15-bugaevc@gmail.com>

	tests: Add vm_page_size
	Message-ID: <20240327161841.95685-14-bugaevc@gmail.com>

	tests: Add a more serious mach_msg_server() routine
	Message-ID: <20240327161841.95685-13-bugaevc@gmail.com>

	tests: Fix halt()
	Mark it as noreturn, and make sure to halt, not reboot.
	Message-ID: <20240327161841.95685-12-bugaevc@gmail.com>

	Make -fno-PIE etc. architecture-dependent
	There might be good reasons why Mach on x86 shouldn't be built as PIC/
	PIE, but there are also very good reasons to support PIE on other
	architectures. Potentially implementing KASLR is one such reason; but
	also the Linux AArch64 boot protocol (that the AArch64 port will use for
	booting) lets the bootloader load the kernel image at any address,
	which makes PIC pretty much required.
	Message-ID: <20240327161841.95685-11-bugaevc@gmail.com>

	ipc: Turn ipc_entry_lookup_failed() into a macro
	ipc_entry_lookup_failed() is used with both mach_msg_user_header_t and
	mach_msg_header_t arguments, which are different types. Make it into a
	macro, so it works with both.
	Message-ID: <20240327161841.95685-9-bugaevc@gmail.com>

	kern/rdxtree: Fix undefined behavior
	Initializing a variable with itself is undefined, and GCC 14 rightfully
	produces a warning about the variable being used (to initialize itself)
	prior to initialization. X15 sets the variables to 0 instead, so do the
	same in Mach.
	Message-ID: <20240327161841.95685-8-bugaevc@gmail.com>

	gsync: Use copyin()/copyout() to access user memory
	Depending on the architecture and setup, it may not be possible to
	access user memory directly, for example, due to user mode mappings not
	being accessible from kernel mode (x86 SMAP, AArch64 PAN). There are
	dedicated machine-specific copyin()/copyout() routines that know how to
	access user memory from the kernel; use them.
	Message-ID: <20240327161841.95685-6-bugaevc@gmail.com>

	Load 64-bit ELFs on all 64-bit ports
	Not only on x86_64.
	Message-ID: <20240327161841.95685-5-bugaevc@gmail.com>

	Use the x86_64 message ABI on all 64-bit ports
	Message-ID: <20240327161841.95685-4-bugaevc@gmail.com>

	Disable host_kernel_version() everywhere but on i386
	It's not only x86_64, none of new architectures are going to have it.
	Message-ID: <20240327161841.95685-3-bugaevc@gmail.com>

2024-03-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not install device/input.h
	Is _IO{,R,W,WR} macros conflict with the glibc-provided macros and bring
	confusion as to what is supposed to be the right definition.

	There is currently no user of it anyway, the Hurd console driver has its
	own copy.

2024-03-11  Flavio Cruz  <flaviocruz@gmail.com>

	x86_64: avoid iterating over the message twice in copyoutmsg/copyinmsg for faster RPCs.
	This is a follow up to
	https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=69620634858b2992e1a362e33c95d9a8ee57bce7
	where we made inlined ports 8 bytes long to avoid resizing.

	The last thing that copy{in,out}msg were doing was just updating
	msgt_size field since that's required for kernel stub code and implicitly
	assumed by IPC code. This was moved into ipc_kmsg_copy{in,out}_body.

	For a 32 bit userland, the code also stops updating
	msgt_size for out of line ports, same as the 64 bit userland.
	Message-ID: <ZdQxWNSieTHcpM1b@jupiter.tail36e24.ts.net>

2024-03-09  LD  <luca@orpolo.org>

	move x86 copy_user.[ch] to ipc/ and make it arch-indipendent
	Message-ID: <20240309140244.347835-3-luca@orpolo.org>

	remove machine/machspl.h as it duplicates machine/spl.h
	Message-ID: <20240309140244.347835-2-luca@orpolo.org>

2024-03-09  Luca Dariz  <luca@orpolo.org>

	x86_64: split SET_KERNEL_SEGMENTS() for NCPU > 1
	This allows 32on64 to work again. Also, it's a clearer indication of a
	missing part.
	Message-ID: <20240309140244.347835-1-luca@orpolo.org>

2024-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Add missing include
	Otherwise the types in linux/dev/include/linux/skbuff.h are unknown.

2024-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_allocate_contiguous: Add missing page unwiring after making the area non-pageable
	Otherwise, if the allocated memory is passed over for returning data such as
	in device_read, we end up with

	../vm/vm_map.c:4245: vm_map_copyin_page_list: Assertion `src_entry->wired_count > 0' failed.Debugger invoked: assertion failure

2024-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64 locore: Check segmentation by hand
	x86_64 ignores the segmentation limit, so we have to check it by hand
	when accessing userland pointers.

	Reported-by: Sergey Bugaev <bugaevc@gmail.com>

2024-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Avoid leaking USER bit in page tables
	We should only set USER
	- for user processes maps
	- for 32bit Xen support

	This was not actually posing problem since in 32bit segmentation
	protects us, and in 64bit the l4 entry for the kernel is already set.
	But better be safe than sorry.

2024-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kernel traps: also catch general protection faults
	If userland passes a kernel pointer, it's not a page fault that we get,
	but a general protection fault.  We also want to go through the recovery
	in that case, to make e.g. copyin/out return an error.

2024-02-28  Flavio Cruz  <flaviocruz@gmail.com>

	Check for null ports in task_set_essential, task_set_name and thread_set_name.
	Otherwise, it is easy to crash the kernel if userland passes arbitrary port
	names.
	Message-ID: <ZdriTgNhPsfu7c2M@jupiter.tail36e24.ts.net>

2024-02-23  Damien Zammit  <damien@zamaudio.com>

	vm_map: Add comment and assert for vm_map_delete
	This will prevent calling vm_map_delete without the map locked
	unless ref_count is zero.
	Message-ID: <20240223081505.458240-1-damien@zamaudio.com>

2024-02-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	spl: Introduce assert_splvm and use it in process_pmap_updates
	Suggested-by: Damien Zammit <damien@zamaudio.com>

	kern: move pset_idle_lock/unlock to header
	so that kern/machine.c can use it

2024-02-23  Damien Zammit  <damien@zamaudio.com>

	kern: Use _nocheck variants of locks taken at splsched()
	Fixes assertion errors when LDEBUG is compiled in.
	Message-ID: <20240223081404.458062-1-damien@zamaudio.com>

	kern: Use _irq variant of lock and disable interrupts
	During quantum adjustment, disable interrupts and call appropriate lock.
	Message-ID: <20240223080948.457792-1-damien@zamaudio.com>

	kern/processor: Do not set default_pset.empty on bootstrap
	This is not needed because cpu_up does this when it comes online,
	it calls pset_add_processor().
	Message-ID: <20240223080357.457465-1-damien@zamaudio.com>

2024-02-22  Damien Zammit  <damien@zamaudio.com>

	kern/gsync: Use vm_map_lookup with keep_map_locked
	This prevents a deadlock in smp where a read lock on the map
	is taken in gsync and then the map is locked again inside
	vm_map_lookup() but another thread had a pre-existing write lock,
	therefore the second read lock blocks.

	This is fixed by removing the initial gsync read lock on the map
	but keeping the read lock held upon returning from vm_map_lookup().

	Co-Authored-By: Sergey Bugaev <bugaevc@gmail.com>
	Message-ID: <20240222082410.422869-4-damien@zamaudio.com>

2024-02-22  Damien Zammit  <damien@zamaudio.com>

	vm_map_lookup: Add parameter for keeping map locked
	This adds a parameter called keep_map_locked to vm_map_lookup()
	that allows the function to return with the map locked.

	This is to prepare for fixing a bug with gsync where the map
	is locked twice by mistake.

	Co-Authored-By: Sergey Bugaev <bugaevc@gmail.com>
	Message-ID: <20240222082410.422869-3-damien@zamaudio.com>

2024-02-19  Damien Zammit  <damien@zamaudio.com>

	Fix compile with MACH_LOCK_MON

	ddb: Use _irq variants of locks to satisfy LDEBUG asserts

2024-02-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Introduce and use assert_splsched()

2024-02-19  Damien Zammit  <damien@zamaudio.com>

	process_pmap_updates: Use _nocheck form of lock, already at splvm

	kern: Fix parenthesis around assignment used as value

2024-02-18  Damien Zammit  <damien@zamaudio.com>

	locore: Remove unnecessary call to CPU_NUMBER
	The cpu number is already in edx register, so use that.

2024-02-12  Damien Zammit  <damien@zamaudio.com>

	smp: Set processor set to non-empty when adding a processor
	This allows the slave_pset to be used for actual tasks
	with the processor_set RPCs.
	Message-ID: <20240212053817.1919056-1-damien@zamaudio.com>

2024-02-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add documentation for thread_set_name

2024-02-12  Flavio Cruz  <flaviocruz@gmail.com>

	Add thread_set_name RPC.
	Like task_set_name, we use the same size as the task name and will
	inherit the task name, whenever it exists. This will be used to
	implement pthread_setname_np.
	Message-ID: <20240212062634.1082207-2-flaviocruz@gmail.com>

2024-02-12  Flavio Cruz  <flaviocruz@gmail.com>

	Replace kernel header includes in include/mach/mach_types.h with forward declarations.
	I was trying to reuse TASK_NAME_SIZE in kern/thread.h but it was
	impossible because files included from kern/task.h end up requiring
	kern/thread.h (through percpu.h), creating a recursive dependency.

	With this change, mach_types.h only defines forward declarations and
	modules have to explicitly include the appropriate header file if they
	want to be able touch those structures. Most of the other includes are
	required because we no longer grab many different includes through
	mach_types.h.
	Message-ID: <20240212062634.1082207-1-flaviocruz@gmail.com>

2024-02-11  Damien Zammit  <damien@zamaudio.com>

	Enable MACH_HOST
	This is only enabled when NCPUS > 1.

	Enables some code paths that allows userspace to manage cpu resources via
	processor set RPCs.

	Message-ID: <20240211120023.1889731-1-damien@zamaudio.com>

2024-02-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	task: fix addressability of assign_active field
	It is used for thread_wakeup and alike.

2024-02-11  Damien Zammit  <damien@zamaudio.com>

	smp: Create AP processor set and put all APs inside it
	This has the effect of running with one cpu only with smp,
	but has the ability to enable APs in userspace with the right
	processor set RPCs.
	Message-ID: <20240211120051.1889789-1-damien@zamaudio.com>

	ddb: Make show all runqs iterate over psets.

	smp: Fix unable to enter kdb during boot
	Message-ID: <20240211115958.1889648-1-damien@zamaudio.com>

	smp: Fix parenthesis around logic expression value
	Message-ID: <20240211070915.1879676-1-damien@zamaudio.com>

2024-02-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with APIC without SMP

2024-02-09  Damien Zammit  <damien@zamaudio.com>

	smp: Fix compile error with missing apboot_addr
	Message-ID: <20240209021108.1715770-1-damien@zamaudio.com>

	smp: Fix INIT/STARTUP IPI sequence
	TESTED: works in qemu
	TESTED: works hardware with AMD cpu
	Message-ID: <20240207050158.1640853-5-damien@zamaudio.com>

2024-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	SMP: Fix allocating the apboot page
	vm_page_grab_contig does not necessarily allocate at the beginning of
	the DMA segment, so rather allocate by hand very early.

2024-02-08  Olivier Valentin  <valentio@free.fr>

	fpu: Fix cpuid feature detection
	Make sure to fetch capabilities from cpuid(0xd,0x1)
	Message-ID: <20240208165015.4700-3-valentio@free.fr>

	Revert "fpu: Fix cpuid feature detection"
	This reverts commit f8d0f98e80b3d7d9b24fa077818113fb0f4b3970.
	Message-ID: <20240208165015.4700-2-valentio@free.fr>

2024-02-08  Damien Zammit  <damien@zamaudio.com>

	smp: Use HPET instead of pit one-shot that is unreliable
	NB: Every x86 board that uses ACPI most likely has a HPET since 2005.
	We can roll back to PIT in the cases where its not present,
	but the PIT one shot code is definitely currently broken.
	Message-ID: <20240207050158.1640853-4-damien@zamaudio.com>

2024-02-08  Damien Zammit  <damien@zamaudio.com>

	Add HPET timer for small accurate delays
	TESTED: This works in qemu correctly
	TESTED: This works on an AMD board with ACPI v2.0 correctly

	Message-ID: <20240207050158.1640853-3-damien@zamaudio.com>

2024-02-08  Damien Zammit  <damien@zamaudio.com>

	separate lapic_enable from lapic_setup
	This initializes the lapic without
	turning on the IOAPIC interrupts during SMP init.

	Message-ID: <20240207050158.1640853-2-damien@zamaudio.com>

2024-02-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	apboot: avoid self-modifying code
	self-modifying code is generally frowned upon, Intel largely says the
	support is model-dependent.  We can as well just relocate from the C
	code like we did for the temporary gdt.

2024-02-05  Damien Zammit  <damien@zamaudio.com>

	smp: Remove hardcoded AP_BOOT_ADDR
	This took some time to figure out.
	Involves a hand-crafted 16 bit assembly instruction [1]
	because it requires an immediate for the memory address
	of far jump.  This required self-modifying code
	to inject the next instruction, therefore I added a near
	jump to clear the instruction cache queue in case the pipeline
	cached the unmodified jump location.

	[1] Intel Architecture Software Developer's Manual,
	    Volume 2: Instruction Set Reference Manual

2024-02-05  Damien Zammit  <damien@zamaudio.com>

	Fix apic_send_ipi function clobbering read only fields
	This was the root cause of failing to INIT.
	We were clobbering remote_read_status.
	And also, we need to reference the .r register
	when writing the ICR regs otherwise I think
	it writes all of the block.
	Message-ID: <20240205113327.1568218-2-damien@zamaudio.com>

2024-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_pages_phys: Avoid faults while we keep vm locks
	In principle we are actually writing to the allocated area outside of
	the vm lock, but better be safe in case somebody changes things.

2024-02-01  Damien Zammit  <damien@zamaudio.com>

	ACPI: Support XSDT (ACPI >= v2.0)
	This enables gnumach to additionally parse the XSDT table
	if the revision of ACPI is 2.

	TESTED: Still works on qemu (ACPI v1.0)
	TESTED: Works on a x86 board with XSDT (ACPI v2.0)
	Message-ID: <20240131021218.1335821-1-damien@zamaudio.com>

2024-02-01  Damien Zammit  <damien@zamaudio.com>

	model_dep: Fix serial console with APIC enabled
	Move cninit() further down so that IOAPIC has a chance
	to initialize before the com port interrupt is unmasked
	in the IOAPIC, fixing a fault and reboot.
	Message-ID: <20240131100210.1354522-1-damien@zamaudio.com>

2024-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fix doc build

2024-01-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add vm_pages_phys
	For rumpdisk to efficiently determine the physical address, both
	for checking whether it is below 4GiB, and for giving it to the disk
	driver, we need a gnumach primitive (and that is not conditioned by
	MACH_VM_DEBUG like mach_vm_region_info and mach_vm_object_pages_phys
	are).

2024-01-30  Damien Zammit  <damien@zamaudio.com>

	apic: Set up LAPICs in xAPIC mode
	Clear flag in msr for xAPIC mode.

	Message-ID: <20240130080405.1304381-1-damien@zamaudio.com>

2024-01-29  Damien Zammit  <damien@zamaudio.com>

	Support up to two IOAPICs with up to 32 GSIs on each
	Previously, only IOAPIC[0] was supported.
	Now this supports up to two IOAPICs.

	Message-ID: <20240129100652.1262126-1-damien@zamaudio.com>

2024-01-27  Olivier Valentin  <valentio@free.fr>

	fpu: Fix cpuid feature detection
	Make sure to fetch capabilities from cpuid(0xd,0x1)
	and max structure sizes from cpuid(0xd,0x0).
	Message-ID: <20240124080019.8136-1-valentio@free.fr>

2024-01-27  Damien Zammit  <damien@zamaudio.com>

	ioapic: Remove IMCR toggle
	Since we are not using legacy MP tables but intending to use ACPI
	to configure interrupt routing, we can assume all boards have
	virtual wire mode, thus do not require setting of IMCR register.
	(This may fix crashes on machines that do not have IMCR registers).
	Message-ID: <20240124035138.1044855-2-damien@zamaudio.com>

2024-01-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Add noide and noahci kernel options
	They were meant to be temporary, but that got longer, and people seem to
	expect them to be there now.

2024-01-23  Janneke Nieuwenhuizen  <janneke@gnu.org>

	Resurrect x86-linux build.
	This avoids using system headers, which may result in

	    kern/strings.c: In function 'strchr':
	    kern/strings.c:188:32: error: 'NULL' undeclared (first use in this function)

	    In file included from util/atoi.c:77:
	    ./util/atoi.h:65:29: error: unknown type name 'u_char'

	    device/net_io.c: In function 'bpf_do_filter':
	    device/net_io.c:1636:34: error: 'u_int' undeclared (first use in this function); did you mean 'int'?

	    In file included from device/subrs.c:36:
	    ./device/if_ether.h:43:9: error: unknown type name 'u_char'
	       43 |         u_char  ether_dhost[6];

	    ./linux/dev/include/linux/fs.h:304:5: error: unknown type name 'loff_t'
	      304 |     loff_t f_pos;

	This is a follow-up to commit
	    d5e5dd3401ea0d0475aa830c2171be5b8a72f4fa
	    Update configure.ac so that we don't need glibc when running ./configure.
	Message-ID: <20240122075549.26207-1-janneke@gnu.org>

2024-01-20  Damien Zammit  <damien@zamaudio.com>

	console: Fix baud rate on com ports, use 115200 default baud, 8 data bits
	TESTED: By booting gnumach off an HP T620 with console=com0 and receiving 115200 8N1 console
	on another machine connected via the serial port in minicom.
	Without this patch, part of the console is garbled by mismatching com params (9600 7N1).

	Message-ID: <20240119031214.691086-1-damien@zamaudio.com>

2024-01-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	tests: clean test-installed mach headers
	We are for now lacking proper dependencies between the source headers and
	the test-installed headers, but we can at least clean them out.

2024-01-13  Luca Dariz  <luca@orpolo.org>

	add basic thread tests
	Message-ID: <20240111210907.419689-11-luca@orpolo.org>

	add basic task tests
	Message-ID: <20240111210907.419689-10-luca@orpolo.org>

	add raw mach_msg tests
	Message-ID: <20240111210907.419689-9-luca@orpolo.org>

	add syscall tests
	Message-ID: <20240111210907.419689-8-luca@orpolo.org>

	add thread creation helper to tests
	Message-ID: <20240111210907.419689-7-luca@orpolo.org>

	add basic vm tests
	Message-ID: <20240111210907.419689-6-luca@orpolo.org>

2024-01-13  Luca Dariz  <luca@orpolo.org>

	adjust range when changing memory pageability
	* vm/vm_map.c: use actual limits instead of min/max boundaries to
	  change pageability of the currently mapped memory.

	This caused the initial vm_wire_all(host, task VM_WIRE_ALL) in glibc
	startup to fail with KERN_NO_SPACE.
	Message-ID: <20240111210907.419689-5-luca@orpolo.org>

2024-01-13  Luca Dariz  <luca@orpolo.org>

	add mach_port tests
	Message-ID: <20240111210907.419689-4-luca@orpolo.org>

	add gsync tests
	Message-ID: <20240111210907.419689-3-luca@orpolo.org>

	add mach_host tests
	Message-ID: <20240111210907.419689-2-luca@orpolo.org>

	add basic user-space tests with qemu
	* configure.ac: move test fragment to have USER32
	* tests/Makefrag.am: add user tests
	* tests/README: add basic info on how to run and debug user tests
	* tests/configfrag.ac: allow the test compiler/flags to be
	  autoconfigured or customized
	* tests/grub.cfg.single.template: add minimal grub config to boot a
	  module
	* tests/include/device/cons.h: add a simplified version of
	  device/cons.h usable for tests
	* tests/include/kern/printf.h: symlink to kern/printf.h
	* tests/include/mach/mig_support.h: add basic version for user-space
	  tests
	* tests/include/syscalls.h: add prototypes for syscalls used in tests.
	* tests/include/testlib.h: add definitions for common test
	  functionalities
	* tests/include/util/atoi.h: symlink to util/atoi.h
	* tests/run-qemu.sh.template: add a simple qemu test runner
	* tests/start.S: add arch-specific entry point
	* tests/syscalls.S: generate syscalls entry points
	* tests/test-hello.c: add basic smoke test
	* tests/testlib.c: add the minimal functionality to run a user-space
	  executable and reboot the system, and some test helpers.
	* tests/user-qemu.mk: add rules to build simple user-space test
	  modules, including generating mig stubs. The tests reuse some kernel
	  code (like printf(), mach_atoi(), mem*(), str*() functions) so we can
	  use the freestanding environment and not depend on glibc.
	Message-ID: <20240111210907.419689-1-luca@orpolo.org>

2023-12-29  Luca Dariz  <luca@orpolo.org>

	expose MACH_MSG_USER_ALIGNMENT for manually-built messages
	Message-ID: <20231228194301.745811-11-luca@orpolo.org>

	USER32: change default to disabled and make it a general option
	* configfrag.ac: add the global option USER32; although it makes sense
	  for 64-bit versions only, it can be used by future 64-bit
	  architectiures and not only x86_64.
	  Also, change the default setting to be disabled; now that we have a
	  working full 64-bit system, it makes sense to consider it the common
	  choice.
	* x86_64/configfrag.ac: define the correct 32-bit cpu if USER32 is
	  enabled.
	Message-ID: <20231228194301.745811-2-luca@orpolo.org>

2023-12-17  Flavio Cruz  <flaviocruz@gmail.com>

	Reorder mach_msg_type_t fields to ensure msgt_name and msgt_size are byte aligned
	msgt_unused appears right after msgt_size since msgt_size can be reduced
	to only 8 bits in the future, so we leave the door opened to make
	msgt_unused 13 bits long.

2023-12-17  Flavio Cruz  <flaviocruz@gmail.com>

	x86_64: Support 8 byte inlined port rights to avoid message resizing.
	If a port is inlined in a message, the user has to use
	mach_port_name_inlined_t to define each port. Out of line memory
	continues to use mach_port_name_t since that memory has to be copied to
	the kernel anyway.

	Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
	USER32) as a follow up but kept this patch simple for ease of review.

2023-12-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "Reorder mach_msg_type_t fields to ensure msgt_name and msgt_size are byte aligned"
	This reverts commit 2db6b9b7b23b3bab944665b3b6012d24dd425d97.

	Revert "x86_64: Support 8 byte inlined port rights to avoid message resizing."
	This reverts commit 29d4bcaafc4c2040df27a6247603c68e7757205c.

	Xen: fix build

	Fix 32-on-64: Fix missing es push
	push %es actually cannot be compiled

2023-12-03  Flavio Cruz  <flaviocruz@gmail.com>

	x86_64: Support 8 byte inlined port rights to avoid message resizing.
	If a port is inlined in a message, the user has to use
	mach_port_name_inlined_t to define each port. Out of line memory
	continues to use mach_port_name_t since that memory has to be copied to
	the kernel anyway.

	Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
	USER32) as a follow up but kept this patch simple for ease of review.
	Message-ID: <ZWg00XzFPqqL1yF-@jupiter.tail36e24.ts.net>

2023-12-03  Flavio Cruz  <flaviocruz@gmail.com>

	Reorder mach_msg_type_t fields to ensure msgt_name and msgt_size are byte aligned
	msgt_unused appears right after msgt_size since msgt_size can be reduced
	to only 8 bits in the future, so we leave the door opened to make
	msgt_unused 13 bits long.
	Message-ID: <ZWGT6a6GeqFAtOUn@jupiter.tail36e24.ts.net>

2023-11-29  Flavio Cruz  <flaviocruz@gmail.com>

	Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when checking for null or dead rights
	Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against
	MACH_PORT_DEAD will always return false.
	Message-ID: <ZWbMBrk7qrl15sKL@jupiter.tail36e24.ts.net>

2023-11-27  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Coalesce map entries
	When
	- extending an existing entry,
	- changing protection or inheritance of a range of entries,
	we can get several entries that could be coalesced. Attempt to do that.
	Message-ID: <20230705141639.85792-4-bugaevc@gmail.com>

	vm: Add vm_map_coalesce_entry
	This function attempts to coalesce a VM map entry with its preceeding
	entry. It wraps vm_object_coalesce.
	Message-ID: <20230705141639.85792-3-bugaevc@gmail.com>

2023-11-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ipc_entry_lookup_failed: Also write message id in bogus port warning
	It may be enough to get an idea of the origin of the port without having
	to produce a stack trace.

2023-11-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ipc_entry_lookup: Generalize warnings about bogus port names
	Looking up a bogus port name is generally a sign of a real bug, such as a
	spurious mach port deallocation.

2023-11-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix indent

2023-11-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach/message.h: Fix C++98 build
	static_assert was introduced in C++11.

2023-11-07  Flavio Cruz  <flaviocruz@gmail.com>

	Fix assertion for i686 since mach_port_name_t and mach_port_t have the same size
	Message-ID: <ZUlwWGgc2kXNH5dN@jupiter.tail36e24.ts.net>

2023-11-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach/message.h: Fix C++ build

2023-11-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	64bit: Fix user memory leaks on non-inline port arrays
	The userland allocation is for port names, not ports (as translated
	below), so we need to allocate less.

2023-10-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	locore: Homogeneize 32bit and 64bit

2023-10-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	64bit: Fix locore build
	To allow references to int_stack_base to be quite unconstrained, we need
	to use 64bit register indexing.

	CPU_NUMBER_NO_GS was missing a 64bit variant.

	CPU_NUMBER_NO_STACK assumes being passed a 32bit register.

2023-10-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	64bit: Fix types in lock.h
	simple locks use natural_t, and indexes for bt/bts/btr have to be 32bit.

2023-10-28  Damien Zammit  <damien@zamaudio.com>

	x86_64/locore.S: Fix int stack checks when NCPUS > 1
	Message-ID: <20231028001347.448826-1-damien@zamaudio.com>

2023-10-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Factorize more push/pop code

2023-10-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	locore: Also factorize segment management on i386
	and harmonize i386/x86_64.

	This btw fixes not using dx in 32-on-64's alltraps.

2023-10-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	32-on-64: Fix missing es push

2023-10-03  Damien Zammit  <damien@zamaudio.com>

	Fix interrupt handling
	Logic for interrupts:

	- interrupt.S raises spl (thus IF cleared)
	- interrupt.S EOI
	- interrupt.S calls the handler
	   - for pure in-kernel handlers, they do whatever they want with IF
	     cleared.
	   - when a userland handler is registers, queue_intr masks the irq.
	- interrupt.S lowers spl with splx_cli, thus IF still cleared
	- iret, that sets IF

	- later on, userland acks the IRQ, that unmasks the irq

	The key to this change is that all interrupts, including IPIs, are
	treated the same way. Eg. the spl level is now raised before an IPI and
	restored after. Also, EOI is not needed inside irq_acknowledge.

	With this change and the experimental change not to dispatch threads
	direct to idle processors in the scheduler, I no longer observe kernel
	faults, but an occasional hang does occur.

	Message-Id: <20231002033906.124427-1-damien@zamaudio.com>

2023-10-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Xen: do not check for multiboot format
	The xen build is not multiboot.

2023-10-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix non-PAE build

2023-10-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	copyinmsg: Check that we have not overflown
	This if of course too late in case of a failure, but better assert than get
	awful bugs, and it's really not supposed to happen.

	ipc: Fix allocating kernel buffer for storing user message
	Otherwise ipc_kmsg_copyin_body will overflow.

2023-10-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_msg: Fix checking reception size
	We need to check against the actual user size that will be used, not the
	current kernel size.

	Usually userland uses amply-large reception buffer, but better be exact.

2023-10-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add and use ikm_cache_alloc/free/_try

	ddb: Make whatis print copy/pastable text

	slab: Make whatis look further
	Without a tree, we can still look up by hand in the buffers. This
	also allows to find freed objects.

2023-10-01  Damien Zammit  <damien@zamaudio.com>

	com/lpr: Handle masking of interrupts in the driver
	Message-Id: <20231001045755.95707-1-damien@zamaudio.com>

	kd: Handle masking of keyboard interrupt in the driver
	Message-Id: <20231001045731.95682-1-damien@zamaudio.com>

2023-10-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_port_names: Make sure we did not overflow the allocated area

	pmap: Factorize l4 base access
	This also makes the code more coherent with other levels.

	copyout_unpack_msg_type: Avoid changing the kernel header

	ddb: Add whatis command
	This is convenient when tracking buffer overflows

2023-09-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Re-enable MACH_PCSAMPLE for non-smp

2023-09-30  Damien Zammit  <damien@zamaudio.com>

	Allow disabling of MACH_PCSAMPLE and disable by default
	This fixes a page fault when the sampling occurs in MP.
	Perhaps it is not MP safe yet.
	Message-Id: <20230930063032.75232-4-damien@zamaudio.com>

	ioapic: Add simple locking for non-atomic accesses
	Message-Id: <20230930063032.75232-3-damien@zamaudio.com>

	ioapic: Detect version of IOAPIC for correct EOI handling
	Message-Id: <20230930063032.75232-2-damien@zamaudio.com>

2023-09-29  Damien Zammit  <damien@zamaudio.com>

	kdb: Add "show all runqs" debug command
	Message-Id: <20230929045936.31535-1-damien@zamaudio.com>

2023-09-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Drop segments from thread status
	They are useless on x86_64.

	x86_64: remove more unneeded segment selectors handling on full 64bit
	This follows aaa33bd1ef300380279d9e2875b61a7abaf2c88d

2023-09-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	percpu: simplify access in NCPUS==1 case

2023-09-25  Flavio Cruz  <flaviocruz@gmail.com>

	Update the 64bit RPC ABI to be simpler
	* Make full use of the 8 bytes available in mach_msg_type_t by moving
	  into the unused 4 bytes. This allows us to use 32bits for
	  mach_msg_type_number_t whether we use the longform or not.
	* Make mach_msg_type_long_t exactly the same as mach_msg_type_t.
	  Updating MiG is strongly encouraged since it will generate better code
	  to handle this new format.

	After this change, any compatibility with compiled binaries for Hurd x86_64
	will break since the message format is different. However, the new
	schema simplifies the overall ABI, without having "holes" and also
	avoids the need to have a 16 byte mach_msg_type_long_t.

	Was able to boot a basic system up to a bash shell.
	Message-Id: <ZIfqFe5bPNPeH4xg@jupiter.lan>

2023-09-25  Damien Zammit  <damien@zamaudio.com>

	percpu: active_stack with gs
	Message-Id: <20230925002417.467022-1-damien@zamaudio.com>

	x86_64: Change active_threads to use gs like i386
	Message-Id: <20230925002353.466997-1-damien@zamaudio.com>

2023-09-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	SMP: Fix setting up initial gdt
	We cannot access cpu_id_lut from the initial AP state, so update the
	percpu segment after loading gdt.

	boothdr: Fix initial gdt

	cpuboot: Also set up %gs for AP
	So they can use it very early.

	boothdr: Do not bother computing precise limit
	Computing it would be complex, and this is a temporary descriptor
	anyway.

	boothdr: Drop spurious limit field

	Use fewer cpu_number_slow calls
	Now that gs is initialized early.

2023-09-24  Damien Zammit  <damien@zamaudio.com>

	percpu active_thread using gs segment
	TESTED: As per previous commit
	Message-Id: <20230924052824.449219-4-damien@zamaudio.com>

2023-09-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	spl: Use gs to access CPU number
	Now that it can be used early.

	boothdr: Also set up %gs for percpu access
	So we can use it very early.

	start/switch_timer: Use CPU_NUMBER
	They are called from context that has gs initialized.

2023-09-24  Damien Zammit  <damien@zamaudio.com>

	percpu area using gs segment
	This speeds up smp again, by storing the struct processor
	in a percpu area and avoiding an expensive cpu_number every call
	of current_processor(), as well as getting the cpu_number by
	an offset into the percpu area.  Untested on 64 bit
	and work remains to use other percpu arrays.

	TESTED: (NCPUS=8) -smp 1 boots to login shell ~2x slower than uniprocessor
	TESTED: (NCPUS=8) -smp 2 boots to INIT but hangs there
	TESTED: (NCPUS=8) -smp 4 gets stuck seemingly within rumpdisk and hangs
	TESTED: (NCPUS=1) uniprocessor is a bit faster than normal

	Message-Id: <20230924103428.455966-3-damien@zamaudio.com>

2023-09-24  Damien Zammit  <damien@zamaudio.com>

	cpu_number: Inline widely used simple function
	TESTED: on uniprocessor and smp, both behaved as normal.

	Message-Id: <20230924103428.455966-2-damien@zamaudio.com>

2023-09-24  Damien Zammit  <damien@zamaudio.com>

	gdt: Cleanup gdt.h included in asm
	Message-Id: <20230924052824.449219-2-damien@zamaudio.com>

2023-09-23  Damien Zammit  <damien@zamaudio.com>

	cpuboot: Use CPU_NUMBER_NO_STACK before stack is set up
	Message-Id: <20230923105449.425849-1-damien@zamaudio.com>

2023-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix 64bit xen build

	linux: DMA32 is now correctly handled

2023-08-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_bootalloc: Return a phys_addr_t

	vm_page: Fix setting higher bits in physical addresses

2023-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_vm_object_pages: Extend for PAE

	vm_allocate_contiguous: Accept returning end of allowed memory
	*result_paddr + size is exactly pass the allocated memory, so it can be
	equal to the requested bound.

	typo

	i386_btop/ptob/trunc/round_page: Fix PAE case
	We need to extend to 64bit (or keep the 64bits) before shifting.

	pmap_phys_address: Fix casting
	We need to extend the frame number to 64bit before converting to
	address.

	Fix crash at boot
	spl cannot be called before the clock is set up.

	pmap: Fix spurious pte release on 64bit and PAE

2023-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix non-SMP build

2023-08-22  Damien Zammit  <damien@zamaudio.com>

	sched_prim.c: Check all run queues not just master processor
	Message-Id: <20230816014835.2322718-6-damien@zamaudio.com>

2023-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	eventcount: Fix locking thread while calling thread_setrun

2023-08-22  Damien Zammit  <damien@zamaudio.com>

	sched_prim.c: Lock thread when calling thread_setrun
	Message-Id: <20230816014835.2322718-5-damien@zamaudio.com>

	apic: Use cpuid to read the apic id for speed
	Message-Id: <20230816014440.2322705-1-damien@zamaudio.com>

2023-08-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	slab: Optimize non-slab PAGE_SIZE allocations
	In case there is no slab for PAGE_SIZE allocations, we can use direct
	physical allocation rather than consuming the kernel virtual space.

	kernel traps: Also print code and cr2

	vm_allocate_contiguous: better handle pmax
	In case pmax is inside a segment, we should avoid using it, and stay
	with the previous segment, thus being sure to respect the caller's
	constraints.

	page segments: Fix more dma32/directmap inversions
	We need to make sure segments are in addresses order, and avoid returning
	dma32 memory when it's not actually within directmap memory.

2023-08-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm: Also check for virtual addresses in vm_map_delete

	pmap: Add missing declaration

	pmap+slab: Add more smoketests
	Checking the range of addresses for operations on the kernel_pmap is
	quite cheap, and allows to catch oddities quite early enough.

	pmap: Fix mayhem when releasing near the end of virtual memory
	l is used to skip over the area mapped by a whole pde. It was clipped to
	e, but if e is already near the end of virtual memory, l will
	wrap-around to 0, and mayhem entails.

	pmap: Add MAPWINDOW_SIZE macro

	pmap: reserve last virtual page
	So as to catch trying to dereference -1

	pmap: Add more debugging information when getting a null pv_list

	vm: Fix ordering of addresses between DMA32 and DIRECTMAP

	pmap: Fix x32 PAE builds

	pmap: Fix coping with VM_MAX_USER_ADDRESS not being aligned on l4 limit
	It is however usually aligned on l3 limit.

	x86_64: Fix memory leak on pmap destruction
	We do need to go through the whole page table, to release the pdpt-s and
	pdet-s that map the kernel. Only the ptpt-s that map the kernel are shared
	between tasks.

	slab [SLAB_VERIFY]: Fix not enabling KMEM_CF_VERIFY on 4K slabs

2023-08-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	slab [SLAB_VERIFY]: Do not enable KMEM_CF_VERIFY on large slabs
	That would be refused by kmem_cache_compute_properties later on anyway,
	and prevent the kernel from booting at all.

	immc: Add support for \r and \t

	x86_64: Do not disassemble instructions
	The instruction set decoding needs an update, avoid showing bogus output.

	lock: Fix SMP build

	IPI: Do not include support when NCPUS=1

	IPI: Rework irq names and fix x86_64 build

2023-08-13  Damien Zammit  <damien@zamaudio.com>

	i386/x86_64: Add remote AST via IPI mechanism

	kern/sched_prim: Cause ast on cpu coming out of idle
	Message-Id: <20230811083424.2154350-3-damien@zamaudio.com>

2023-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	simple lock: check that the non-_irq variants are not called from IRQ

	assert: fix concurrency against irqs
	by using simple_lock_irq.

	clock: Convert timer_lock to using simple_lock_irq

	sched: Add waitq_lock helpers which check they are called at spl7

	sched: Add runq_lock helpers which check they are called at spl7

	kern: Check that locking thread is done at spl7

	xen: Convert console to using simple_lock_irq

	kmsg: Fix concurrency against irqs
	by using simple_lock_irq.

	device: Convert io_done_list_lock to simple_lock_irq

	tty: Convert t_lock to using simple_lock_irq

2023-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	lock: Add _irq variants
	And pave the way for making the non-_irq variants check that they are
	never used within interrupts.

	We do have a few places which were missing it, as the following commits will
	show.

2023-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Make pmap_protect sparse-pde aware
	222020cff440 ("pmap: dynamically allocate the whole user page tree map")
	made the pde array sparse, but missed updating pmap_protect accordingly:
	we have to re-lookup for the pde on each PDE_MAPPED_SIZE section.

	x86_64: don't bother printing function arguments
	They are in registers, and most probably very quickly overwritten.

	kdb: Show page fault details in traces

	x86_64: Fix catching kernel NULL deferences
	On x86_64 we have no segmentation, and thus kernel's NULL is at linear
	address zero, while LINEAR_MIN_KERNEL_ADDRESS is not zero. We thus have
	to special-case it in otder to catch NULL dereferences.

	x86_64: Fix loading ELF symbols

2023-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	elf64: Update names
	Apparently the ELF world changed their mind on the naming of integers,
	let's get coherent with it.

	Elf64_Quarter (16b) disappeared, replaced by Elf64_Half (now 16b instead of
	Elf64_32b). And previous Elf64_Half (16b) thus now need to be Elf64_Word
	(16b).

2023-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	lock: Add more sanity checks

	model_dep: drop duplicate declaration

	lock: Reset l->writer also for read-write upgradees which are done

	lock: Fix building with MACH_LDEBUG but NCPUS==1

	x86_64: fix NCPUS > 1 build of CX() macro
	With the kernel gone to -2GB, the base+index addressing needs to use a 64bit
	register index.

	lock: Rename simple_unlock version with information to _simple_unlock
	For coherency with the rest of the implementations

	x86_64: Fix printing kernel trap number and error

2023-08-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Acknowledge IRQ *before* calling the handler
	5da1aea7ab3c ("Acknoledge interrupt after handler call") moved the IRQ ack
	to after calling the handler because of overflows. But that was because the
	interrupts were getting enabled at some point. Now that all spl levels
	above 0 just disable interrupts, once we have called spl7 we are safe
	until splx_cli is called (and even that doesn't release interrupts, only
	the eventual iret will).

	And if the handler triggers another IRQ, it will be lost, so we do want
	to ack the IRQ before handling it.

2023-08-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: homogeneize with i386 about _call_single

	x86_64: fix recursive disabling of interrupts
	In case interrupts were already disabled before TIME_TRAP_[US]ENTRY are
	called, we don't want to execute sti.

2023-08-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix missing DMA32 limit
	Rumpdisk needs to allocate dma32 memory areas, so we do always need this
	limit.

	The non-Xen x86_64 case had a typo, and the 32bit PAE case didn't have
	the DMA32 limit.

	Also, we have to cope with VM_PAGE_DMA32_LIMIT being either above or below
	VM_PAGE_DIRECTMAP_LIMIT depending on the cases.

2023-08-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	net_io: Fix long / int confusion
	In network terms, long is 32bit, i.e. an int for us.

2023-08-06  Damien Zammit  <damien@zamaudio.com>

	pmap: Add missing PMAP_READ_LOCK fixes uninitialized spl
	Message-Id: <20230805154913.2003121-1-damien@zamaudio.com>

	kern/thread: Only loop over cpus that exist
	Message-Id: <20230805154859.2003109-1-damien@zamaudio.com>

	interrupt.S: No nested interrupts during IPIs && more x86_64 smp support
	Message-Id: <20230805154843.2003098-1-damien@zamaudio.com>

2023-08-05  Damien Zammit  <damien@zamaudio.com>

	cpu_number: Look up cpu kernel_id via lookup table
	This speeds up smp slightly by reducing the cpu_number()
	complexity to have no branching, just a look up table.
	It also addresses the problem that CPU_NUMBER was only using
	raw apic_id as an approximation of the kernel_id.
	Other improvements were to remove unnecessary checks now that
	the lookup table always resolves to a valid value.
	Message-Id: <20230805074945.1983707-1-damien@zamaudio.com>

2023-08-05  Damien Zammit  <damien@zamaudio.com>

	Add timing info to MACH_LOCK_MON lock monitoring
	Booting to beginning of bootstrap with different number of cpus
	and checking the lock statistics where TIME is in milliseconds:

	Set MACH_LOCK_MON to 1 in configfrag.ac, then

	Configure options
	 --enable-ncpus=8 --enable-kdb --enable-apic --disable-linux-groups

	-smp 1

	db{0}> show all slocks

	SUCCESS FAIL    MASKED  STACK   TIME    LOCK/CALLER
	4208    0/0     4208/100        2/0     7890/1  0xc1098f54(c11847c8)
	1       0/0     1/100   0/0     7890/7890       0x315(c11966e0)
	30742   0/0     0/0     2106/0  160/0   0xf52a9e2c(f5a07958)
	30742   0/0     0/0     0/0     140/0   0xf52a5e2c(f5a07b10)
	149649  0/0     3372/2  1/0     120/0   0xc118a590(c118a9d4)
	16428   0/0     0/0     1/0     90/0    0xf52a5dd0(f5a07ab8)
	14345   0/0     0/0     18/0    80/0    0xf64afe2c(f64aa488)
	1791    0/0     0/0     1/0     80/0    0xf52a3e70(f5e57f70)

	17331 total locks, 0 empty buckets
	2320150 0/0     455490/19       11570533/4      17860/0 0xc10a4580(c10a4580)

	-smp 2

	(could not wait until booted)

	db{0}> show all slocks

	SUCCESS FAIL    MASKED  STACK   TIME    LOCK/CALLER
	47082   0/0     47082/100       0/0     413940/8        0xc1098f54(c11847c8)
	2       0/0     2/100   0/0     413940/206970   0x6ede(c11966e0)
	47139   0/0     0/0     2106/0  4670/0  0xc119edec(f5e409b0)
	132895  3/0     3372/2  1/0     4580/0  0xc118a590(c118a9d4)
	118313  0/0     2/0     0/0     3660/0  0xc1098ec4(c1189f80)
	183233  1/0     1714/0  2/0     2290/0  0xc1098e54(c118aa8c)
	14357   0/0     0/0     1878/0  1200/0  0xf52a4de0(f5e40a60)
	14345   0/0     0/0     18/0    1200/0  0xf52a4dec(f528f488)

	16910 total locks, 0 empty buckets
	2220850 455/0   485391/21       11549793/5      879030/0        0xc10a4580(c10a4580)
	Message-Id: <20230722045043.1579134-1-damien@zamaudio.com>

2023-08-05  Damien Zammit  <damien@zamaudio.com>

	db_interface: Don't call db_on if MACH_KDB is off
	Allows building of gnumach with --disable-kdb and --enable-ncpus > 1
	Message-Id: <20230722045019.1579102-1-damien@zamaudio.com>

2023-08-04  Luca Dariz  <luca@orpolo.org>

	x86_64: remove unneeded segment selectors handling on full 64 bit
	* i386/i386/db_interface.c: don't set unused segment selectors on full
	  64-bit
	* i386/i386/db_trace.c: likewise.
	* i386/i386/i386asm.sym: likewise.
	* i386/i386/pcb.c:: likewise.
	* i386/i386/thread.h: remove ES/DS/FS/GS from thread state on !USER32,
	  as they are unused in this configuration. Only SS and CS are kept.
	* x86_64/locore.S: convert segment handling macros to no-op on full
	  64-bit
	Message-Id: <20230729174753.1145878-5-luca@orpolo.org>

2023-08-04  Luca Dariz  <luca@orpolo.org>

	x86_64: refactor segment register handling
	The actual values are not saved together with the rest of the thread
	state, both because it would be quite espensive (reading MSR, unless
	rdfsbase instructions are supported, but that's optional) and not
	really needed. The only way the user has to change its value is with a
	specific RPC, so we can intercept the change easily.  Furthermore,
	Leaving the values there exposes them to being corrupted in case of a
	double interruption, e.g. an irq is handled just before iretq but
	after starting to restore the thread state.  This solution was
	suggested by Sergey Bugaev.

	* i386/i386/db_trace.c: remove fsbase/gsbase from the registers
	  available
	* i386/i386/debug_i386.c: remove fsbase/gsbase from the printed thread
	  state
	* i386/i386/i386asm.sym: remove fsbase/gsbase as it's not needed in
	  asm anymore
	* i386/i386/pcb.c: point fsbase/gsbase to the new location
	* i386/i386/thread.h: move fsbase/gsbase to the machine state
	* x86_64/locore.S: generalize segment-handling including es/ds/gs/fs
	  and remove fsbase/gsbase handling. Also, factor out kernel segment
	  selector setting to a macro.
	Message-Id: <20230729174753.1145878-4-luca@orpolo.org>

2023-08-04  Luca Dariz  <luca@orpolo.org>

	x86_64: format pusha/popa macros for readability
	Message-Id: <20230729174753.1145878-3-luca@orpolo.org>

	x86_64: disable V86 mode on full 64-bit configuration
	* i386/i386/pcb.c: simplify exception stack location and adapt thread
	  gettrs/setters
	* i386/i386/thread.h: don't include V86 fields on full 64-bit
	* x86_64/locore.S: don't include checks for V86 mode on full 64-bit
	Message-Id: <20230729174753.1145878-2-luca@orpolo.org>

	x86_64: fix stack handling on recursive interrupts for USER32
	* x86_64/locore.S: ensure the thread state is filled completely even
	  on recursive interrups. The value of the segment selectors is not
	  very important in this case, but we still need to align the stack to
	  the bottom of i386_interrupt_state.
	Message-Id: <20230729174753.1145878-1-luca@orpolo.org>

	x86_64: install emergency handler for double fault
	* i386/i386/idt.c: add selector for the interrupt-specific stack
	* i386/i386/ktss.c: configure ist1 to use a dedicated stack
	* i386/i386/trap.c: add double fault handler, which just prints the
	  state and panics. There is not much else to do in this case but it's
	  useful for troubleshooting
	* x86_64/idt_inittab.S: allow to specify an interrupt stack for custom
	  handlers
	* x86_64/locore.S: add double fault handler
	Message-Id: <20230729174514.1145656-1-luca@orpolo.org>

2023-07-05  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Make vm_object_coalesce return new object and offset
	vm_object_coalesce() callers used to rely on the fact that it always
	merged the next_object into prev_object, potentially destroying
	next_object and leaving prev_object the result of the whole operation.

	After ee65849bec5da261be90f565bee096abb4117bdd
	"vm: Allow coalescing null object with an internal object", this is no
	longer true, since in case of prev_object == VM_OBJECT_NULL and
	next_object != VM_OBJECT_NULL, the overall result is next_object, not
	prev_object. The current callers are prepared to deal with this since
	they handle this case seprately anyway, but the following commit will
	introduce another caller that handles both cases in the same code path.

	So, declare the way vm_object_coalesce() coalesces the two objects its
	implementation detail, and make it return the resulting object and the
	offset into it explicitly. This simplifies the callers, too.
	Message-Id: <20230705141639.85792-2-bugaevc@gmail.com>

2023-07-03  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Eagerly release deallocated pages
	If a deallocated VM map entry refers to an object that only has a single
	reference and doesn't have a pager port, we can eagerly release any
	physical pages that were contained in the deallocated range.

	This is not a 100% solution: it is still possible to "leak" physical
	pages that can never appear in virtual memory again by creating several
	references to a memory object (perhaps by forking a VM map with
	VM_INHERIT_SHARE) and deallocating the pages from all the maps referring
	to the object. That being said, it should help to release the pages in
	the common case sooner.
	Message-Id: <20230626112656.435622-6-bugaevc@gmail.com>

2023-07-03  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Allow coalescing entries forward
	When entering an object into a map, try to extend the next entry
	backward, in addition to the previously existing attempt to extend the
	previous entry forward.
	Message-Id: <20230626112656.435622-5-bugaevc@gmail.com>

2023-07-03  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Allow coalescing null object with an internal object
	Previously, vm_object_coalesce would only succeed with next_object being
	VM_OBJECT_NULL (and with the previous patch, with the two object
	references pointing to the same object). This patch additionally allows
	the inverse: prev_object being VM_OBJECT_NULL and next_object being some
	internal VM object that we have not created a pager port for, provided
	the offset of the existing mapping in the object allows for placing the
	new mapping before it.

	This is not used anywhere at the moment (the only caller, vm_map_enter,
	ensures that next_object is either VM_OBJECT_NULL or an object that has
	a pager port), but it will get used with the next patch.
	Message-Id: <20230626112656.435622-4-bugaevc@gmail.com>

2023-07-03  Sergey Bugaev  <bugaevc@gmail.com>

	vm: Allow coalescing a VM object with itself
	If a mapping of an object is made right next to another mapping of the
	same object have the same properties (protection, inheritance, etc.),
	Mach will now expand the previous VM map entry to cover the new address
	range instead of creating a new entry.
	Message-Id: <20230626112656.435622-3-bugaevc@gmail.com>

2023-07-03  Sergey Bugaev  <bugaevc@gmail.com>

	Shrink struct vm_page size
	struct vm_page is supposed to be a "small structure", but it takes up 96
	bytes on x86_64 (to represent a 4k page). By utilizing bitfields and
	strategically reordering members to avoid excessive padding, it can be
	shrunk to 80 bytes.

	- page_lock and unlock_request only need to store a bitmask of
	  VM_PROT_READ, VM_PROT_WRITE, and VM_PROT_EXECUTE. Even though the
	  special values VM_PROT_NO_CHANGE and VM_PROT_NOTIFY are defined, they
	  are not used for the two struct vm_page members.

	- type and seg_index both need to store one of the four possible values
	  in the range from 0 to 3. Two bits are sufficient for this.

	- order needs to store a number from 0 to VM_PAGE_NR_FREE_LISTS (which
	  is 11), or a special value VM_PAGE_ORDER_UNLISTED. Four bits are
	  sufficient for this.

	No functional change.
	Message-Id: <20230626112656.435622-2-bugaevc@gmail.com>

2023-06-20  Damien Zammit  <damien@zamaudio.com>

	i386/apic.c: Pre-initialize the lapic pointer with a dummy structure
	Fixes an early crash when APIC is defined, NCPUS > 1 and LINUX_DEV is not defined.

	CPU_NUMBER can now be called before the local apic pointer is properly
	initialized.
	Message-Id: <20230620102925.551321-1-damien@zamaudio.com>

2023-06-18  Sergey Bugaev  <bugaevc@gmail.com>

	Fix copying in MACH_PORT_DEAD on x86_64
	We need to properly convert MACH_PORT_NAME_DEAD (which is 32-bit -1)
	into IO_DEAD, which is 64-bit -1.

	To reproduce:

	$ portinfo -va 1
	(see the Mach crash trying to access a port at 0xffffffff)
	Message-Id: <20230615181731.119328-1-bugaevc@gmail.com>

2023-06-17  Luca Dariz  <luca@orpolo.org>

	x86_64: add a critical section on entry and exit from syscall/sysret
	When entering a syscall we're still using the user stack, so we can't
	reliably handle exceptions or interrupts, otherwise a user thread can
	easily crash the machine with an invalid stack. Instead, disable
	interrupts and (hopefullly) avoid traps in the fragments where we need
	to have the user stack in RSP.

	* i386/i386/ldt.c: mask interrupts and IOPL on syscall entry
	* x86_64/locore.S: keep interrupts disabled when we use the user stack

2023-06-17  Luca Dariz  <luca@orpolo.org>

	x86_64: use solid intstack already during bootstrap
	* x86_64/boothdr.S: there is no reason to not use it right away
	Message-Id: <20230615214931.189270-1-luca@orpolo.org>

2023-06-12  Flavio Cruz  <flaviocruz@gmail.com>

	copyinmsg: allow for the last message element to have msgt_number = 0.
	When copying messages from user space, some messages may have
	mach_msg_type_t with msgt_number = 0 and no data after. This is a valid
	message and we want to allow that.

	I found this bug when testing "[PATCH gnumach] Update the
	64bit RPC ABI to be simpler" and attempting to run a basic Hurd x86_64 that can start a
	bash shell. When mach_msg_type_long_t is the same size as
	mach_msg_type_t this bug happens quite frequently and prevents the
	system from starting properly.
	Message-Id: <ZIaiHnfrv6Y9hEel@jupiter.lan>

2023-06-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr: Fix crash on irq notification port destruction
	When the Linux IRQ driver is used we don't really control the list, so
	we end up with a small leak.

2023-05-26  Luca Dariz  <luca@orpolo.org>

	x86_64: add 64-bit registers when dumping thread state
	* i386/i386/debug_i386.c: when using a 64-bit userspace we need to use
	  RAX and so on, and we can ignore most segments except FS/GS, but
	  only the base address is useful.
	Message-Id: <20230526184801.753581-4-luca@orpolo.org>

	x86_64: enable code for managing interrupts
	* device/ds_routines.c: enable interrupt registration and acknowledge
	  for x86_64. We can reuse the 32-bit mechanisms.
	Message-Id: <20230526184801.753581-3-luca@orpolo.org>

	pmap: only map lower BIOS memory 1:1 when using Linux drivers
	* i386/intel/pmap.c: add the check for LINUX_DEV; we could also check
	  for !__x86_64__, as this config would break ther kernel map by
	  removing the BIOS mem map, needed by the console and keyboard
	  drivers, but hopefully we won't need to enable Linux drivers on
	  x86_64.
	Message-Id: <20230526184801.753581-2-luca@orpolo.org>

2023-05-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kdb: Add showing new 64bit registers

	Xen 64bit: Also put kernel at end of addressing space

	xen: Fix 64bit build

2023-05-21  Luca Dariz  <luca@orpolo.org>

	x86_64: fix APIC initialization
	* i386/i386at/acpi_parse_apic.c: use vm_offset_t instead of uint32_t
	  for vm addresses
	* x86_64/Makefrag.am: support --enable-apic
	Message-Id: <20230521204918.492957-1-luca@orpolo.org>

	x86_64: push user's VM_MAX_ADDRESS
	* i386/include/mach/i386/vm_param.h: check for both KERNEL and USER32
	  to differentiate between user/kernel on x86_64, and push the upper
	  limit of user address space to 128 TB.
	Message-Id: <20230521204524.492700-1-luca@orpolo.org>

2023-05-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Simplify code
	Notably, ptes_per_vm_page is meaninful for the pte level anyway.

2023-05-21  Luca Dariz  <luca@orpolo.org>

	pmap: dynamically allocate the whole user page tree map
	* i386/intel/pmap.c: switch to dynamic allocation of all the page tree
	  map levels for the user-space address range, using a separate kmem
	  cache for each level. This allows to extend the usable memory space
	  on x86_64 to use more than one L3 page for user space. The kernel
	  address map is left untouched for now as it needs a different
	  initialization.
	* i386/intel/pmap.h: remove hardcoded user pages and add macro to
	  recontruct the page-to-virtual mapping
	Message-Id: <20230521085758.365640-1-luca@orpolo.org>

	x86_64: fix descriptor loading for 64-bit addresses
	* i386/i386/seg.h: use proper type for segment addresses. This is not
	  impacting any functionality on 64-bit, as segments limits are
	  ignored, but at least we silence a warning.
	Message-Id: <20230521085758.365640-3-luca@orpolo.org>

2023-05-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Ship missing msr.h file

2023-05-18  Luca Dariz  <luca@orpolo.org>

	fix fs/gs save/restore and USER32
	* x86_64/locore.S: fix PUSH_FSGS -> _ISR and always make room for
	  fsgsbase on a 64-bit kernel.
	Message-Id: <20230518210839.655403-1-luca@orpolo.org>

2023-05-17  Sergey Bugaev  <bugaevc@gmail.com>

	x86_64: Attempt to fix ast_from_interrupt
	Message-Id: <20230517181150.65810-1-bugaevc@gmail.com>

2023-05-17  Flavio Cruz  <flaviocruz@gmail.com>

	Fix task_info for TASK_THREAD_TIMES_INFO.
	We are checking for the existence of time_value64_t but we didn't add
	that to the task_thread_times_info structure.
	Message-Id: <ZGRDbS0XIm1fJwkG@jupiter.tail36e24.ts.net>

2023-05-15  Sergey Bugaev  <bugaevc@gmail.com>

	x86_64: Fix reporting fsgs base in thread_get_state ()
	Fixes 31dd30a94a682955c3c9e2f42252b4a07687067a "add setting gs/fsbase".
	Message-Id: <20230515074434.1351060-1-bugaevc@gmail.com>

2023-05-12  Sergey Bugaev  <bugaevc@gmail.com>

	x86_64: Check for AST when exiting a syscall
	...like it's already done when exiting a trap. This is required, since
	handing a syscall can result in an AST; in particular this happens when
	the current thread is being terminated, which sets AST_TERMINATE and
	expects the thread to never return to userspace.

	Fixes a kernel crash upon calling exit () or pthread_exit () in glibc.
	Message-Id: <20230511192859.890693-1-bugaevc@gmail.com>

2023-05-12  Sergey Bugaev  <bugaevc@gmail.com>

	x86_64: Fix updating fsgs base on context switch
	Commit 31dd30a94a682955c3c9e2f42252b4a07687067a "add setting gs/fsbase"
	added the code to set fs and gs bases on context_switch. However, this
	was only being done when switching context via the explicit
	switch_context() method, but not in other cases where the context is
	switched, such as with call_continuation().

	Instead, put setting fsgs base into switch_ktss(), where it will be
	called in all cases.
	Message-Id: <20230511135844.837338-1-bugaevc@gmail.com>

2023-05-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not expose CPU_TYPE_X86_64 when running 32bit userland
	So that userland's uname -m still reports i686-AT386.

	Keep host_get_kernel_version for USER32-on-x86_64 case

2023-05-11  Flavio Cruz  <flaviocruz@gmail.com>

	Remove host_kernel_version RPC for x86_64
	We can fast track the simplification of the RPC ABI for x86_64 if we don't have
	MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8
	bits.
	Message-Id: <ZFht+/9cVPHuV90D@jupiter.tail36e24.ts.net>

2023-05-06  Flavio Cruz  <flaviocruz@gmail.com>

	Delete include/mach/rpc.h
	File is unused.
	Message-Id: <ZFSSbAzZ+7KYKtOF@jupiter.tail36e24.ts.net>

2023-05-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Add CPU_TYPE_X86_64 CPU type

2023-05-05  Flavio Cruz  <flaviocruz@gmail.com>

	Use designated initializers in kern/ipc_kobject.c
	msgt_deallocate was not initialized explicitly, this fixes that too.
	Message-Id: <ZFM2cLr1Ms/B3v8U@jupiter.tail36e24.ts.net>

	Improve portability for device/net_io.c and use designated initializers
	Message-Id: <ZFMz+B3dsMAWl3hM@jupiter.tail36e24.ts.net>

2023-05-04  Flavio Cruz  <flaviocruz@gmail.com>

	Use designated initializers in kern/exception.c
	Message-Id: <ZFLq5/a9zzRHOlSf@jupiter.tail36e24.ts.net>

2023-05-02  Flavio Cruz  <flaviocruz@gmail.com>

	Implement mig_deallocate to free memory when kernel server RPC succeeds
	In case the kernel interfaces use dynamically sized strings, we will
	end up calling mig_deallocate to free the out of line string that was copied
	into the kernel. As a matter of contract such type of data is freed
	automatically either in kernel code when the RPC fails or in the MiG
	stub if it succeeds.

	This was tested by changing task_set_name to use dynamic strings and making
	sure out of line data is passed when strlen(name) > 4.
	Message-Id: <ZFB64/0vOJ3x15ub@jupiter.tail36e24.ts.net>

2023-05-02  Flavio Cruz  <flaviocruz@gmail.com>

	Use mig_support.h prototypes instead of duplicating them.
	* include/mach/mig_support.h: Drop the ifndef because this file is only
	  used internally to compile gnumach. We export mig_support.h from glibc
	  already.
	* kern/ipc_mig.c: len should be vm_size_t.
	* kern/ipc_mig.h: Drop duplicate prototypes.
	Message-Id: <ZFBjEk07CaQgx9Ru@jupiter.tail36e24.ts.net>

2023-05-01  Luca Dariz  <luca@orpolo.org>

	add setting gs/fsbase
	* i386/i386/i386asm.sym: add offsets for asm
	* i386/i386/pcb.c: switch FSBASE/GSBASE on context switch and
	  implement accessors in thread setstatus/getstatus
	* i386/i386/thread.h: add new state to thread saved state
	* kern/thread.c: add i386_FSGS_BASE_STATE handler
	* x86_64/locore.S: fix fs/gs handling, skipping the base address and
	  avoid resetting it by manually re-loading fs/gs
	Message-Id: <20230419194703.410575-5-luca@orpolo.org>

2023-05-01  Luca Dariz  <luca@orpolo.org>

	x86_64: add 64-bit syscall entry point
	While theoretically we could still use the same call gate as for
	32-bit userspace, it doesn't seem very common, and gcc seems to not
	encode properly the instruction. Instead we use syscall/sysret as
	other kernels (e.g. XNU,Linux). This version still has some
	limitations, but should be enough to start working on the 64-bit user
	space.

	* i386/i386/i386asm.sym: add more constants to fill pcb->iss
	* i386/i386/ldt.c: configure 64-bit syscall entry point. We can just
	  check for the SEP bit as MSR are always available on x86_64.
	* i386/i386/ldt.h: swap CS/DS segments order if !USER32 as required by
	  sysret
	* i386/i386/locore.h: add syscall64 prototype
	* i386/i386/msr.h: add MSR definitions and C read/write helpers
	* i386/include/mach/i386/syscall_sw.h: remove old BSD_TRAP
	* x86_64/Makefrag.am: selectively install syscall_sw.h depending on
	  USER32
	* x86_64/include/syscall_sw.h: add entry point template from user
	  space
	* x86_64/locore.S: implement syscall64 entry point and use it when a
	  64-bit user-space is configured
	Message-Id: <20230419194703.410575-4-luca@orpolo.org>

2023-04-29  Flavio Cruz  <flaviocruz@gmail.com>

	Use c_string for dev_name_t in the device subsystem.
	Added device_open_new and device_open_new_request and reused the old MiG
	ID for xxx_device_set_status which has not been in used in the past
	decade.

	Note that device_open_new is gated on defining
	DEVICE_ENABLE_DEVICE_OPEN_NEW because otherwise some hurd servers
	wouldn't compile anymore unless patched. This macro allows us to control
	the rollout.
	Message-Id: <ZEi1LV+9ShuXqtcr@jupiter.tail36e24.ts.net>

2023-04-27  Flavio Cruz  <flaviocruz@gmail.com>

	Update task_basic_info and thread_basic_info to include time_value64_t data.
	RPCs remain compatible with existing clients but if they know about the
	new size then we will populate the new fields.
	Message-Id: <ZDzPLCJccKeRB5Pd@mars.tail36e24.ts.net>

2023-04-20  Luca Dariz  <luca@orpolo.org>

	fix copyoutmsg for 64-bit userspace
	* x86_64/copy_user.c: use the correct user/kernel msg structure
	Message-Id: <20230419194703.410575-2-luca@orpolo.org>

	fix address fault for 32-on-64-bit syscall
	* x86_64/locore.S: the faulty address is found in %rbp and not in
	  %rsi, so copy that in CR2
	Message-Id: <20230419194703.410575-1-luca@orpolo.org>

2023-04-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix Xen build

2023-04-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix missing shipping required header

2023-04-10  Flavio Cruz  <flaviocruz@gmail.com>

	Delete include/mach/default_pager_helper.defs
	Not used.
	Message-Id: <ZDN13tll1jYc1jYh@jupiter.tail36e24.ts.net>

2023-04-07  Flavio Cruz  <flaviocruz@gmail.com>

	Remove host_get_boot_info and host_get_kernel_boot_info since they are not used.
	host_get_kernel_boot_info was added recently to fix the use of
	MACH_MSG_TYPE_STRING.
	Message-Id: <ZC5Sz8a4FCT6IjCY@jupiter.tail36e24.ts.net>

2023-04-04  Flavio Cruz  <flaviocruz@gmail.com>

	Align the user stack correctly for 64 bit programs.
	* i386/i386/thread.h: Define USER_STACK_ALIGN which is 16-byte for 64 bit
	  programs as recommended by the System V AMD64 guidelines. Also define
	  KERNEL_STACK_ALIGN which can differ from user land.
	* i386/i386/pcb.c: Use USER_STACK_ALIGN to align the bootstrap arguments and
	  ultimately the stack where the program starts on.
	* kern/bootstrap.c: Do not align arg_len here since it will be aligned
	  in set_user_regs.
	Message-Id: <ZCpOb6vNEfPclKPr@jupiter.tail36e24.ts.net>

2023-04-03  Sergey Bugaev  <bugaevc@gmail.com>

	Make exception subcode a long
	On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
	address, so it needs to be (at least) pointer-sized. Thus, make it into
	a long.

	This requires matching changes in glibc and the Hurd.
	Message-Id: <20230319151017.531737-4-bugaevc@gmail.com>

2023-04-03  Sergey Bugaev  <bugaevc@gmail.com>

	Remove bootstrap.defs
	As far as I can see, this file was imported in the very beginning of GNU Mach
	history, and unused since then. Nobody implements or uses this interface. GNU
	Mach uses a different way to pass the privileged ports to the bootstrap tasks:
	instead of the task(s) actively asking for the ports in an RPC, the ports are
	preemptively inserted into the IPC space(s) of the task(s), as configured by
	the boot script.

	Remove bootstrap.defs so as to not confuse anyone into thinking it works.
	Message-Id: <20230319151017.531737-3-bugaevc@gmail.com>

2023-04-03  Sergey Bugaev  <bugaevc@gmail.com>

	Add i386_fsgs_base_state
	Message-Id: <20230319151017.531737-2-bugaevc@gmail.com>

2023-04-03  Flavio Cruz  <flaviocruz@gmail.com>

	Use c_string to define symtab_name_t.
	As mentioned in 5447f965, the c_string type correctly uses
	msgt_size/msgt_number, resulting in a more compact ABI that doesn't
	require mach_msg_type_long_t.

	I redefined host_load_symbol_table with a new Id since this is just a
	debug RPC and is not used anywhere.
	Message-Id: <ZBFgyJp+Pcb7zFhf@mars.tail36e24.ts.net>

2023-03-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop spurious tabs

2023-03-13  Flavio Cruz  <flaviocruz@gmail.com>

	Track task and thread time using time_value64_t.
	Changed kern/timer.c to use the higher precision time_value64_t.
	Of course, this won't suffer from the 2038 overflow but it does provide
	nanosecond precision (if gnumach ever uses a better timer) and
	moves us closer to only having time_value64_t.
	Message-Id: <ZA63tGcv3bETUJFJ@jupiter.tail36e24.ts.net>

	Use host_get_time64 in glue code
	Message-Id: <ZA64CbpYEz+BgiEw@jupiter.tail36e24.ts.net>

2023-03-13  Flavio Cruz  <flaviocruz@gmail.com>

	Use c_string to define host_get_kernel_version and host_get_kernel_boot_info.
	The existing definitions for kernel_version_t and kernel_boot_info_t use
	(MACH_MSG_TYPE_STRING, length*8) which result in message types that have
	a single element of 512 or 4096 bytes (set as msgt_size). This results
	in MiG generating mach_msg_type_long_t. Using c_string has the benefit
	of moving this size to be defined as msgt_number which doesn't overflow.
	This will allow us to simplify the 64 bit RPC ABI since all msgt_size can
	be defined with just 8 bits (as it should be expected).

	The resulting implementation is the same but we still need to define new
	RPCs since server and user expect different mach_msg_type_t.
	Message-Id: <ZA63pS8j9J6NwuXY@jupiter.tail36e24.ts.net>

2023-03-12  Flavio Cruz  <flaviocruz@gmail.com>

	Update thread and task creation time to use time_value64_t
	Message-Id: <ZAzYoE7+ugFsH5JA@jupiter.tail36e24.ts.net>

2023-03-11  Damien Zammit  <damien@zamaudio.com>

	ioapic: Timer calibrated in 10 mach ticks
	hz variable is the number of mach ticks in 1 second.
	We want to know how many lapic ticks in 1 mach tick.
	Therefore, we set a timer for 10 mach ticks and divide
	the lapic stopwatch counter value by 10.
	Message-Id: <20230311072937.450161-1-damien@zamaudio.com>

2023-03-08  Flavio Cruz  <flaviocruz@gmail.com>

	Align mach_msg_type_t and mach_msg_type_long_t with the same alignment as uintptr_t.
	With this change, any 64 bit code using the IPC subsystem without relying on
	MiG will work without any changes. We have a few examples of this inside gnumach but
	also in the Hurd servers. For example, in hurd/console/display.c

	  typedef struct
	  {
	    mach_msg_header_t Head;
	    mach_msg_type_t ticknoType;
	    natural_t tickno;
	    mach_msg_type_t changeType;
	    file_changed_type_t change;
	    mach_msg_type_t startType;
	    loff_t start;
	    mach_msg_type_t endType;
	    loff_t end;
	  } Request;

	This will now work correctly in 64 bits, without requiring any explicit padding.

	As a follow up, we can simplify mach_msg_type_long_t so that we
	only need an 8 byte structure where the second field will include the
	number of elements for the long form. This is already included in
	mach_msg_type_t as unused_msgtl_number.
	Message-Id: <ZAbhOfOzsb8qPFs6@jupiter.tail36e24.ts.net>

2023-03-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	lock_mon: Fix warnings

2023-03-07  Damien Zammit  <damien@zamaudio.com>

	kern: Fix MACH_LOCK_MON lock monitoring debug
	TESTED:
	 - by setting MACH_LOCK_MON to 1 in configfrag.ac
	   and running "show all slocks" in kdb
	 - does not break default configured kernel
	Message-Id: <20230306070512.292715-1-damien@zamaudio.com>

2023-03-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	apic: Drop declaration of inexisting function

2023-03-07  Damien Zammit  <damien@zamaudio.com>

	lapic timer: Calibrate via mach timer not PIT
	Previously the lapic timer was calibrated by one-shot PIT timer2.
	This method can be buggy and generally unused in emulation environments.
	This patch reworks the timer calibration to use a mach timer based
	on regular PIT interrupts to remapped IOAPIC pin.
	This also changes the primary clock source to use PIT timer0 remapped
	to an IOAPIC pin when APIC mode is enabled, instead of a periodic lapic
	timer.
	Message-Id: <20230306070452.292697-1-damien@zamaudio.com>

2023-02-27  Flavio Cruz  <flaviocruz@gmail.com>

	Support alignment requirements for a 64 bit kernel.
	We introduce both a user alignment and a kernel alignment. These are
	separate requirements since for 64 bit with a 32 bit kernel we need to
	ensure the kernel can consume messages that are 8-byte aligned. This
	change removes any possibility of undefined behavior and also allows the
	kernel to support 64 bit RPCs for the userland.

	A lot of the code that performs alignment was simplified under the
	assumption that the message headers are well aligned. To enforce that
	going forward, a few static assertions were added.
	Message-Id: <Y/KrixiC9Njmu7ef@jupiter.tail36e24.ts.net>

2023-02-27  Luca Dariz  <luca@orpolo.org>

	x86_64: fix user trap during syscall with an invalid user stack
	* i386/i386/locore.h: user vm_offset_t in the recovery_table
	* x86_64/locore.S: fix RECOVERY() location and keep user regs in %rbx,
	  as it seems the convention. This only applies to 32-bit userspace.
	Message-Id: <20230227204501.2492152-5-luca@orpolo.org>

	fix port name copyin
	* x86_64/copy_user.c: in mach_msg_user_header_t there are some holes
	  that need to be cleared, to adapt to the different layout of
	  mach_msg_header_t.
	Message-Id: <20230227204501.2492152-4-luca@orpolo.org>

	fix copyin/outmsg header for ! USER32
	* x86_64/copy_user.c: fix copyin/out, we already have a pointer to
	  user/kernel buffers
	Message-Id: <20230227204501.2492152-3-luca@orpolo.org>

	x86_64: allow compilation if ! USER32
	* i386/intel/pmap.c: remove #error and allow compilation, keeping a
	  reminder to fix the pmap module.
	Message-Id: <20230227204501.2492152-2-luca@orpolo.org>

2023-02-26  Damien Zammit  <damien@zamaudio.com>

	lapic timer: Calibrate based on 10 PIT sleeps for 10ms
	NB: This relies on a fix for QEMU as one-shot PIT mode
	is currently broken in qemu.
	Message-Id: <20230226013110.50606-1-damien@zamaudio.com>

2023-02-26  Damien Zammit  <damien@zamaudio.com>

	pit: Use corrected clock frequency
	All PC compatibles operate the PIT at a clock rate of (105/88) MHz

	Message-Id: <20230226063555.66284-1-damien@zamaudio.com>

2023-02-26  Damien Zammit  <damien@zamaudio.com>

	pit: Fix shadowed hz variable && define modes correctly
	Message-Id: <20230226013052.50577-1-damien@zamaudio.com>

2023-02-25  Damien Zammit  <damien@zamaudio.com>

	kd_mouse: Fix IBM mouse irq getting stuck and blocking console
	TESTED: With and without apic/smp

	Message-Id: <20230225061420.16985-1-damien@zamaudio.com>

2023-02-23  Flavio Cruz  <flaviocruz@gmail.com>

	Add TIME_VALUE64_TO_TIMESPEC and TIMESPEC_TO_TIME_VALUE64
	We can use these in userland with the new time_value64_t struct.
	Message-Id: <Y/RRck2JffqNenif@jupiter.tail36e24.ts.net>

2023-02-20  Flavio Cruz  <flaviocruz@gmail.com>

	Delete include/mach/msg_type.h
	File is not included anywhere.
	Message-Id: <Y/K1haNulJ63eDBd@jupiter.tail36e24.ts.net>

2023-02-19  Damien Zammit  <damien@zamaudio.com>

	model_dep: Call acpi_apic_init if APIC defined
	Fixes boot --enable-ncpus=1 with --enable-apic configuration
	albeit the keyboard is stuck and network cannot be accessed.

	Error messages:

	Timeout reached while wating for return value
	/bin/console: Could not receive return value from daemon process: Connection timed out
	Message-Id: <20230219022351.25767-1-damien@zamaudio.com>

2023-02-16  Luca Dariz  <luca@orpolo.org>

	x86_64: set user segments as 64-bit if ! USER32
	* i386/i386/ldt.c: set the L bit if user-space is 64-bit
	Message-Id: <20230216213318.2048699-4-luca@orpolo.org>

	x86_64: fix argument passing to bootstrap modules if ! USER32
	* kern/bootstrap.c: replace integers with long/vm_offset_t
	Message-Id: <20230216213318.2048699-3-luca@orpolo.org>

	x86_64: load Elf64 bootstrap modules if ! USER32
	* i386/include/mach/i386/exec/elf.h: add Elf64 definitions and define
	  common Elf structures, corresponding to 32/64 bit variants at
	  compile time.
	* include/mach/exec/elf.h: add Elf64 definitions
	* kern/elf-load.c: use common Elf structures
	Message-Id: <20230216213318.2048699-2-luca@orpolo.org>

	x86_64: fix some compiler warnings
	* i386/include/mach/i386/vm_param.h: extend the vm constants to ULL on
	  x86_64 to avoid a shift overflow warning
	* i386/intel/pmap.c: fix cast and unused variables
	Message-Id: <20230216213318.2048699-1-luca@orpolo.org>

2023-02-16  Damien Zammit  <damien@zamaudio.com>

	trap: Fix Wformat issues
	Message-Id: <20230216070205.1243532-1-damien@zamaudio.com>

2023-02-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr: Simplify clearing after intr port deallocation
	This notably avoids calling ipc_port_release from the interrupt handler,
	which was completely unsafe.

2023-02-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document spl levels of locks taken during interrupts

2023-02-15  Flavio Cruz  <flaviocruz@gmail.com>

	Define prototype for bogus in gensym.awk
	Otherwise gcc will complain that bogus does not have a prototype.
	Message-Id: <Y+x94PG9qeCnZEpc@jupiter.tail36e24.ts.net>

	Rename efl to rfl for x86_64 in struct i386_thread_state
	Message-Id: <Y+xwZ63X1PHDJwTX@jupiter.tail36e24.ts.net>

2023-02-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Make mapwindow per CPU
	They are used temporarily without CPU exchanges, and may need to be used
	concurrently so 2 slots only would not be enough anyway. This also saves
	having to lock for them.

	timer: Fix atomicity of timer reads
	Similarly to update_mapped_time/read_mapped_time, one need to
	synchronize the writes and read to make sure they are performed in the
	expected order.

2023-02-15  Damien Zammit  <damien@zamaudio.com>

	Add missing init_fpu() for APs
	Message-Id: <20230215095706.1213703-2-damien@zamaudio.com>

2023-02-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	smp: Fix more busy loops
	We need to avoid the kernel optimizing away the reads from
	memory. Use a standard relaxing instruction for that.

	pmap: Do not TLB shootdown IPI for mapwindow updates
	These are used only temporarily by the current processor only, so we don't
	need to notify other processors about them. We however then should flush TLB
	at allocation, to make sure we don't have some remnant.

	pmap: Fix busy loop waiting for pmap users
	We need to avoid the kernel optimizing away the read from
	pmap->cpus_using. Use a standard relaxing instruction for that.

2023-02-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Do not send TLB flush IPI when a cpu is idle
	MARK_CPU_ACTIVE already knows to flush TLB when a cpu comes out of idle.

	However, add memory barriers to be sure that setting cpu_update_needed is
	seen before testing for cpus_idle.

2023-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Fix non-SMP build

	Fix warning

2023-02-14  Damien Zammit  <damien@zamaudio.com>

	Remove verbose debug printfs
	Message-Id: <20230213084919.1157074-5-damien@zamaudio.com>

	Make curr_ipl[] per cpu

2023-02-13  Damien Zammit  <damien@zamaudio.com>

	pmap: Signal cpu for TLB update if kernel_pmap
	Message-Id: <20230213084919.1157074-3-damien@zamaudio.com>

	interrupt.S: Dont change ipl for pmap_update_interrupt
	Message-Id: <20230213084919.1157074-2-damien@zamaudio.com>

	x86_64: Fix broken int_stack_base
	Message-Id: <20230213084919.1157074-6-damien@zamaudio.com>

2023-02-13  Damien Zammit  <damien@zamaudio.com>

	cpu_number: Short circuit if smp init not done
	This depends on serialised AP init patch.

	Fixes warnings spewing at boot with APIC and SMP
	Message-Id: <20230204101529.877846-1-damien@zamaudio.com>

2023-02-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mp_desc: Add missing setting PAE mode on AP

2023-02-13  Damien Zammit  <damien@zamaudio.com>

	i386: Refactor int stacks to be per cpu for SMP
	This also serialises the AP bringup, so paging can be enabled per cpu
	one by one.

	Also-by: Almudena Garcia <liberamenso10000@gmail.com>

2023-02-13  Flavio Cruz  <flaviocruz@gmail.com>

	Make mach_msg_header_t have the same size for both 64 bit kernel and userland.
	This has several advantages:
	1) We don't need to resize mach_msg_header_t, it is just a copy.
	2) Mig won't require any changes because it statically computes the size
	   of mach_msg_header_t, otherwise we would need two sizes (28 vs 32 bytes).
	Message-Id: <Y+l8UhXXX9Qo9tVA@jupiter.tail36e24.ts.net>

2023-02-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	time_value: Fix rpc_time_value_t compatibility.
	5fdc928d3d29 ("fix rpc time value for 64 bit") broke hurd build because
	structures are never compatible in C. For userland we however know
	that rpc_time_value is the same as time_value, so we can just typedef
	rpc_time_value_t to struct time_value as userland is used to.

2023-02-12  Flavio Cruz  <flaviocruz@gmail.com>

	Add x86_64 registers to i386_thread_state
	This is required to implement ptrace.
	Message-Id: <Y+kvVSoC+5bvsazl@jupiter.tail36e24.ts.net>

2023-02-12  Flavio Cruz  <flaviocruz@gmail.com>

	Consider protected payloads in mach_msg_header_t when resizing messages.
	Protected payloads will be 8-byte longs which are the same size as
	kernel ports.

	Also aligned all the structures to be 4-byte aligned since it makes it
	easier to parse them as padding won't be added to mach_msg_user_header_t
	before the protected payload.
	Message-Id: <Y+krwRFIUeyRszl9@jupiter.tail36e24.ts.net>

2023-02-12  Luca Dariz  <luca@orpolo.org>

	move kernel virtual address space to upper addresses
	* i386/i386/vm_param.h: adjust constants to the new kernel map
	  - the boothdr.S code already sets up a temporary map to higher
	    addresses, so we can use INIT_VM_MIN_KERNEL_ADDRESS as in xen
	  - increase the kernel map size to accomodate for bigger structures
	    and more memory
	  - adjust kernel max address and directmap limit
	* i386/i386at/biosmem.c: enable directmap check also on x86_64
	* i386/include/mach/i386/vm_param.h: increase user virtual memory
	  limit as it's not conflicting with the kernel's anymore
	* i386/intel/pmap.h: adjust lin2pdenum_cont() and INTEL_PTE_PFN to the
	  new kernel map
	* x86_64/Makefrag.am: change KERNEL_MAP_BASE to be above 4G, and
	  according to mcmodel=kernel. This will allow to use the full memory
	  address space.
	Message-Id: <20230212172818.1511405-10-luca@orpolo.org>

	separate initialization of kernel and user PTP tables
	* i386/i386/vm_param.h: temporariliy fix kernel upper address
	* i386/intel/pmap.c: split kernel and user L3 map initialization. For
	  simplicity in handling the different configurations, on 32-bit
	  (+PAE) the name PDPNUM_KERNEL is used in place of PDPNUM, while only
	  on x86_64 the PDPNUM_USER and PDPNUM_KERNEL are treated differently.
	  Also, change iterating over PTP tables in case the kernel map is not
	  right after the user map.
	* i386/intel/pmap.h: define PDPNUM_USER and PDPNUM_KERNEL and move
	  PDPSHIFT to simplify ifdefs.
	Message-Id: <20230212172818.1511405-9-luca@orpolo.org>

	extend data types to hold a 64-bit address
	* i386/i386/trap.c: change from int to a proper type to hold a
	  register value
	* x86_64/locore.S: use 64-bit register to avoid address truncation
	Message-Id: <20230212172818.1511405-8-luca@orpolo.org>

	add more explicit names for user space virtual space limits
	* i386/i386/vm_param.h: add VM_MAX/MIN_USER_ADDRESS to kernel headers.
	* i386/i386/db_interface.c
	* i386/i386/ldt.c
	* i386/i386/pcb.c
	* i386/intel/pmap.c
	* kern/task.c: replace VM_MAX/MIN_ADDRESS with VM_MAX/MIN_USER_ADDRESS
	Message-Id: <20230212172818.1511405-7-luca@orpolo.org>

2023-02-12  Luca Dariz  <luca@orpolo.org>

	use L4 page table directly on x86_64 instead of short-circuiting to pdpbase
	This is a preparation to run the kernel on high addresses, where the
	user vm region and the kernel vm region will use different L3 page
	tables.

	* i386/intel/pmap.c: on x86_64, retrieve the value of pdpbase from the
	  L4 table, and add the pmap_pdp() helper (useful also for PAE).
	* i386/intel/pmap.h: remove pdpbase on x86_64.
	Message-Id: <20230212172818.1511405-6-luca@orpolo.org>

2023-02-12  Luca Dariz  <luca@orpolo.org>

	factor out PAE-specific bootstrap
	* i386/intel/pmap.c: move it to pmap_bootstrap_pae()
	Message-Id: <20230212172818.1511405-5-luca@orpolo.org>

	factor out xen-specific bootstrap
	* i386/intel/pmap.c: move it to pmap_bootstrap_xen()
	Message-Id: <20230212172818.1511405-4-luca@orpolo.org>

2023-02-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Fix warning

2023-02-12  Luca Dariz  <luca@orpolo.org>

	fix x86_64 asm for higher kernel addresses
	* x86_64/interrupt.S: use 64-bit registers as variables could be
	  stored at high addresses
	* x86_64/locore.S: Likewise
	Message-Id: <20230212172818.1511405-3-luca@orpolo.org>

	prepare pmap helpers for full 64 bit memory map
	* i386/intel/pmap.c: start walking the page table tree from the L4
	  table instead of the PDP table in pmap_pte() and pmap_pde(),
	  preparing for the kernel to run on high addresses.
	Message-Id: <20230212172818.1511405-2-luca@orpolo.org>

	enable syscalls on x86_64
	Message-Id: <20230212170313.1501404-7-luca@orpolo.org>

	fix port name size in notifications
	* ipc/ipc_machdep.h: define PORT_NAME_T_SIZE_IN_BITS
	* ipc/ipc_notify.c: fix port name size in notification message
	  templates
	Message-Id: <20230212170313.1501404-6-luca@orpolo.org>

	fix rpc time value for 64 bit
	* include/mach/task_info.h: use rpc variant of time_value_t
	* include/mach/thread_info.h: Likewise
	* kern/mach_clock.c: use rpc variant of time_value_t in
	  read_time_stamp()
	* kern/mach_clock.h: Likewise
	* kern/thread.c: use rpc variant of thread_read_times()
	* kern/timer.h_ add thread_read_times_rpc() by converting time_value_t
	  to the corresponding rpc structures inline.
	Message-Id: <20230212170313.1501404-5-luca@orpolo.org>

	add L4 kmem cache for x86_64
	* i386/intel/pmap.c: allocate the L4 page table from a dedicate kmem
	  cache instead of the generic kernel map.
	  Also improve readability of nested ifdef's.
	Message-Id: <20230212170313.1501404-4-luca@orpolo.org>

	fix hardcoded physical address
	* i386/i386at/com.c use proper helper to convert physical to virtual
	  address.
	Message-Id: <20230212170313.1501404-3-luca@orpolo.org>

	thread_getstatus: set unused members of thread state to 0
	* i386/i386/pcb.c: always set esp to 0, it seems unused.
	Message-Id: <20230212170313.1501404-2-luca@orpolo.org>

2023-02-09  Flavio Cruz  <flaviocruz@gmail.com>

	Remove a.out support for ddb
	We haven't built gnumach using a.out for a very long time.

	Message-Id: <Y+SgsQ3y8pPqfxRV@jupiter.tail36e24.ts.net>

2023-02-09  Flavio Cruz  <flaviocruz@gmail.com>

	memory_object_create_proxy: avoid casting parameters to 32 bits since the types are correct now
	Message-Id: <Y+SfNtIRuwj0Zap1@jupiter.tail36e24.ts.net>

2023-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	lock: Add missing def_simple_lock_data definition for ncpus=1

2023-02-09  Etienne Brateau  <etienne.brateau@gmail.com>

	vm_page.c: add missing object lock
	The documentation of vm_page_insert says that the object must be locked.
	Moreover, the unlock call is here but no call was present.
	Message-Id: <20230208225436.23365-1-etienne.brateau@gmail.com>

2023-02-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	slock: Fix initialization of statically-allocated slocks
	(this is actually a no-op for i386)

	i386: relax CPU within spinlock loop

2023-02-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Lock get_mapwindow infrastructure

2023-02-04  Damien Zammit  <damien@zamaudio.com>

	cpu_number: Fix missing return
	Message-Id: <20230204101352.877755-1-damien@zamaudio.com>

2023-02-03  Damien Zammit  <damien@zamaudio.com>

	linux: Keep existing timer interrupt handler for APIC
	Message-Id: <20230203100133.835589-2-damien@zamaudio.com>

	pmap: Refactor temporary mapping functions
	Message-Id: <20230203100133.835589-1-damien@zamaudio.com>

2023-02-01  Damien Zammit  <damien@zamaudio.com>

	linux: Skip probing IDE when 255 phys heads detected
	This allows qemu -M q35 to boot without 30 second timeout
	failing on hd0, when disk is actually attached via ahci.

	kdb: Fix ON_INT_STACK() macro to be cpu_number aware
	Message-Id: <20230201100519.784297-5-damien@zamaudio.com>

	pmap: Debug printf when pmap_update_interrupt runs
	Message-Id: <20230201100519.784297-2-damien@zamaudio.com>

2023-01-31  Flavio Cruz  <flaviocruz@gmail.com>

	Define rpc_vm_size_array_t and rpc_vm_offset_array_t
	When generating stubs, Mig will will take the vm_size_array_t and define the
	input request struct using rpc_vm_size_t since the size is variable. This will turn cause a mismatch
	between types (vm_size_t* vs rpc_vm_size_t*). We could also ask Mig to produce
	a prototype by using rpc_vm_size_t*, however we would need to change the implementation
	of the RPC to use rpc_* types anyway since we want to avoid another allocation
	of the array.
	Message-Id: <Y9iwScHpmsgY3V0N@jupiter.tail36e24.ts.net>

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	fix accessing per-cpu data

2023-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix other confusions between KERNEL_STACK_SIZE and INTSTACK_SIZE

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	locore: Fix int stack check
	TODO: Return kernel_id via lookup table, not apic_id

	Message-Id: <20230131093428.756906-5-damien@zamaudio.com>

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	Debug printf when sending TLB IPI
	Message-Id: <20230131093428.756906-13-damien@zamaudio.com>

	Fix makefrags
	Message-Id: <20230131093428.756906-11-damien@zamaudio.com>

	smp: Deassert IPI 251 as part of sequence
	Message-Id: <20230131093428.756906-9-damien@zamaudio.com>

	Always use directed EOI and disable focus
	Message-Id: <20230131093428.756906-8-damien@zamaudio.com>

	linux: Skip updating jiffies on AP timer
	Message-Id: <20230131093428.756906-7-damien@zamaudio.com>

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	interrupt: Send EOI before handling update interrupt
	To make sure we don't miss any pmap update.

	Message-Id: <20230131093428.756906-6-damien@zamaudio.com>

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	Print warning on bad cpu numbering and assume BSP
	Message-Id: <20230131093428.756906-4-damien@zamaudio.com>

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	Add cpu_number and cpuboot
	I addressed most of the previous review.
	MSRs are easier to set in asm so I have left it in.

	Message-Id: <20230131093428.756906-3-damien@zamaudio.com>

2023-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fix warnings

2023-01-31  Damien Zammit  <damien@zamaudio.com>

	i386: Fix lapic and ioapic for smp
	Also-by: Almudena Garcia <liberamenso10000@gmail.com>
	Message-Id: <20230131093428.756906-2-damien@zamaudio.com>

2023-01-30  Flavio Cruz  <flaviocruz@gmail.com>

	Use $(CC) instead of gcc to avoid relying on the host gcc.
	Message-Id: <Y9dxQ6RqNPZwWBG2@jupiter.tail36e24.ts.net>

	Include i386asm.h using i386/i386/i386.asm.h
	If we 1) build for x86_64 and 2) build in a separate directory, we will not have
	-Ii386 (-Ix86_64 instead) hence this file won't be found since it is autogenerated.
	Message-Id: <Y9dwJjhWt8s+P+b8@jupiter.tail36e24.ts.net>

2023-01-29  Damien Zammit  <damien@zamaudio.com>

	i386: Add AP variants of descriptor tables

2023-01-29  Damien Zammit  <damien@zamaudio.com>

	i386/apic: Add ifdefs for APIC for mask/unmask irqs
	This prepares for --enable-ncpus=2 with --disable-apic option

	Message-Id: <20230121080419.239154-2-damien@zamaudio.com>

2023-01-29  Flavio Cruz  <flaviocruz@gmail.com>

	Enable -Wmissing-prototypes.
	* Makefile.am: enable -Wmissing-prototypes
	* ddb/db_inout.h: Prototype kdb_kintr for entering into DDB.
	* ddb/db_mp.c Include ddb/db_input.h to get kdb_kintr.
	* i386/i386at/kd.h: Include ddb/input.h to get kdb_kintr.
	* linux/Makefrag.am: Disable some of the new warnings for linux drivers,
	  otherwise we will get more and more noise.
	Message-Id: <Y9YNfNaYSsZJFST5@mercury.tail36e24.ts.net>

2023-01-28  Flavio Cruz  <flaviocruz@gmail.com>

	Add host_set_time64 and host_adjust_time64
	Same existing logic, just with 64 bits. Old RPCs are implemented by
	calling into the new RPCs.
	Message-Id: <Y9TJAmL2byOWup5x@jupiter.tail36e24.ts.net>

2023-01-28  Flavio Cruz  <flaviocruz@gmail.com>

	Use standard types in include/device/input.h
	--enable-platform=xen won't compile because u_char is not included from
	sys/types.h. Also, we are forcing users of include/device/input.h to
	include glibc headers that export such types which should not be
	necessary.

	For i386/i386at/kd.h we include input.h to get Scancode.
	Message-Id: <Y9S7oIyVFazVAOqb@jupiter.tail36e24.ts.net>

2023-01-28  Flavio Cruz  <flaviocruz@gmail.com>

	Delete unused header cthreads.h
	Message-Id: <Y9S7YJWUKVEHS5CM@jupiter.tail36e24.ts.net>

	Fix compiler warnings
	* i386/xen/xen.c: Move failsafe_callback_regs to header file and include
	  xen/xen.h
	* xen/block.c: `name` must be const. Fix format string.
	* xen/console.c: Move hyp_console_write and inline it in the header.
	  Use static qualifier whenever possible. Cast to interrupt_handler_fn.
	* xen/console.h: Define hyp_console_write as inline function.
	* xen/evt.c: Avoid old style declaration and use interrupt_handler_fn.
	* xen/evt.h: Use interrupt_handler_fn.
	* xen/net.c: Use static. Use correct format and make `name` const.
	* xen/time.c: Avoid old style declarations by adding void to the
	  parameter list.
	* xen/xen.c: Use static. Use interrupt_handler_fn. Delete `_hyp_halt`
	  and `_hyp_todo`.
	* xen/xen.h: Define hyp_failsafe_c_callback here to make sure we have
	  the prototype.
	Message-Id: <Y9S6cTHziR/edeFu@jupiter.tail36e24.ts.net>

2023-01-27  Flavio Cruz  <flaviocruz@gmail.com>

	Change i386 RPC subsystem to include descriptor instead of real_descriptor
	This should avoid issues with glibc and hurd as introduced in
	https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=b379d5afdf65cce11426ab0349a3778b3fd632f5
	since we are changing the types of the parameters when implementing the RPCs to match the previous
	declaration using `struct descriptor`.

	Message-Id: <Y9Nx/qCRtVruxGwb@jupiter.tail36e24.ts.net>

2023-01-26  Flavio Cruz  <flaviocruz@gmail.com>

	Do not include seg.c when building for x86_64
	File was removed in a previous patch for i386.

	To avoid future problems, include some common files between i386 and
	x86_64 in i386/Makefrag_x86.am. It is also easier to see what is different and
	what lacks support for x86_64 (e.g., SMP).
	Message-Id: <Y9DXOiP+ClYdj68Z@jupiter.tail36e24.ts.net>

2023-01-25  Flavio Cruz  <flaviocruz@gmail.com>

	Fix several warnings for -Wmissing-prototypes (part 2)
	* i386/i386/io_map.c: code is unused.
	* i386/i386/io_perm.c: include mig prototypes.
	* i386/i386/mp_desc.c: Deleted interrupt_stack_alloc since it is not
	  used.
	* i386/i386/seg.h: Moved descriptor structs to i386/include/mach/i386/mach_i386_types.h
	  as that represents the interface types for RPCs.
	  Defined aliases for real_descriptor since those are used by the i386 RPCs. Inlined many
	  functions here too and removed seg.c.
	* i386/i386/seg.c: Removed. All the functions are inline now.
	* i386/i386/trap.c: Use static.
	* i386/i386/trap.h: Define missing prototypes.
	* i386/i386/tss.h: Use static inline for ltr.
	* i386/i386/user_ldt.c: Include mig prototypes.
	* i386/include/mach/i386/mach_i386.defs: Define real_descriptor_t types
	  since those are used in the RPC definition. Now both prototypes and
	definitions will match.
	* i386/include/mach/i386/mach_i386_types.h: Move struct descriptor
	  from seg.h since we need those for the RPC interfaces. Removed include
	  of io_perm.h since it generates circular includes otherwise.
	* i386/intel/pmap.c: pmap_map is unused. Added static qualifier for
	  several functions.
	* i386/intel/pmap.h: pmap_update_interrupt declared for non-SMP and SMP.
	Message-Id: <Y89+R2VekOQK4IUo@jupiter.lan>

2023-01-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ddb/db_mp.c: re-introduce remote_db_enter
	which will be useful for smp

2023-01-25  Flavio Cruz  <flaviocruz@gmail.com>

	Set kr if copy cannot be copied to user space
	Compiler will complain otherwise that kr is not initialized.
	Message-Id: <Y89oVcEnyPIiQ4ef@jupiter.tail36e24.ts.net>

	dev_pager.c: use mach_msg_type_number_t
	Otherwise it will fail to compile due to conflicting types.
	Message-Id: <Y89jA/6y4BgKW2Jb@jupiter.tail36e24.ts.net>

2023-01-24  Flavio Cruz  <flaviocruz@gmail.com>

	Use -O2 -g by default when compiling
	After d5e5dd3401ea0d0475aa830c2171be5b8a72f4fa we can configure and make
	gnumach without glibc, however it no longer used -O2 -g in CFLAGS by default.
	This reverts that behavior.
	Message-Id: <Y8yihABKwOjqi4y3@jupiter.tail36e24.ts.net>

2023-01-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ddb: Add prototype for remote_db_enter
	It will be useful for smp support.

2023-01-24  Flavio Cruz  <flaviocruz@gmail.com>

	Fix several warnings for -Wmissing-prototypes
	* device/ds_routines.c: use static qualifier.
	* device/subrs.c: delete unused functions.
	* i386/i386/ast_check.c: include prototypes in kern/ast.h
	* i386/i386/db_disasm.c: Include prototypes in ddb/db_examine.h
	* i386/i386/db_interface.h: Define prototype for kdb_kentry. Expose
	  debug methods feep and kd_debug_put.
	* i386/i386/db_trace.c: delete left over cthreads support, functions are
	  not used.
	* i386/i386/model_dep.h: Define prototype for c_boot_entry.
	* i386/i386at/acpi_parse_apic.c: Static qualifiers.
	* i386/i386at/autoconf.c: Include header file for prototypes and remove
	  dead code.
	* i386/i386at/autoconf.h: Fix prototype.
	* i386/i386at/com.c: Add static qualifiers, delete dead code.
	* i386/i386at/com.c: ditto.
	* i386/i386at/com.h: Define prototypes for debug functions.
	* i386/i386at/int_init.c: Include header.
	* i386/i386at/kd.c: Include header for debug interface. Remove dead
	  kd_cmdreg_read and make xga_getpos static.
	* i386/i386at/kd_mouse.c: Static qualifiers.
	* i386/i386at/lpr.c: Dead lprpr.
	* i386/i386at/model_dep.c: Remove exit function.
	* kern/mach_clock.c: Include mig prototypes.
	* kern/mach_clock.h: Remove duplicates of mig prototypes.
	* kern/machine.c: Use static.
	* kern/startup.c: slave_main is unused.
	* kern/thread.h: Define thread_stats that is useful for debugging.
	* kern/timer.c: Keep db_thread_times since it can be used for debugging.
	* kern/timer.h: ditto.
	* linux/dev/glue/misc.c: Use mig header for host_get_time.
	Message-Id: <Y8oyiecaflCaYhaW@mercury.tail36e24.ts.net>

2023-01-19  Flavio Cruz  <flaviocruz@gmail.com>

	Remove existing old style definitions and use -Wold-style-definition.
	Message-Id: <Y8mYd/pt/og4Tj5I@mercury.tail36e24.ts.net>

	Include mig generated device headers to avoid missing prototypes
	Some of the existing definitions lacked the const qualifier, which was
	added.
	Message-Id: <Y8mYZEKqWN43n2SA@mercury.tail36e24.ts.net>

2023-01-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Rename msg_is_misaligned and msg_align
	message.h is installed so we need to hide these behind a mach_ prefix

2023-01-19  Flavio Cruz  <flaviocruz@gmail.com>

	Add host_get_time64 RPC to return the time as time_value64_t
	Also updated the mapped time to support the new 64-bit time while
	keeping compatible with the user land programs currently using it so
	they can be migrated in parallel.

2023-01-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix i386 PAE boot

2023-01-19  Flavio Cruz  <flaviocruz@gmail.com>

	Include mig generated headers to avoid warnings with -Wmissing-prototypes.
	This also reverts 566c227636481b246d928772ebeaacbc7c37145b and
	963b1794d7117064cee8ab5638b329db51dad854
	Message-Id: <Y8d75KSqNL4FFInm@mercury.tail36e24.ts.net>

2023-01-18  Luca Dariz  <luca@orpolo.org>

	replace mach_port_t with mach_port_name_t
	This is a cleanup following the introduction of mach_port_name_t.
	The same set of changes is applied to all files:
	- rename mach_port_t to mach_port_name_t where a port name is used,
	- use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD where appropriate,
	- use invalid_port_to_name() and invalid_name_to_port() for conversion
	  where appropriate,
	- use regular copyout() insted of copyout_port() when we deal with
	  mach_port_name_t already before copyout,
	- use the new helper ipc_kmsg_copyout_object_to_port() when we really
	  want to place a port name in the space of a mach_port_t.

	* include/mach/notify.h: Likewise
	* ipc/ipc_entry.c: Likewise
	* ipc/ipc_kmsg.c: Likewise
	* ipc/ipc_kmsg.h: Likewise, and add ipc_kmsg_copyout_object_to_port()
	* ipc/ipc_marequest.c: Likewise
	* ipc/ipc_object.c: Likewise
	* ipc/ipc_port.c: Likewise
	* ipc/ipc_space.h: Likewise
	* ipc/mach_msg.c: Likewise
	* ipc/mach_port.c: Likewise
	* kern/exception.c: Likewise
	* kern/ipc_mig.c: Likewise
	Message-Id: <20230116105857.240210-8-luca@orpolo.org>

2023-01-18  Luca Dariz  <luca@orpolo.org>

	add conversion helpers for invalid mach port names
	* include/mach/port.h: add _NAME_ variants for port NULL and DEAD and
	  add helpers to check for invalid  port names
	* ipc/port.h: add helpers to properly convert to/from invalid mach
	  port names.
	Message-Id: <20230116105857.240210-7-luca@orpolo.org>

	adjust rdxtree key to the correct size
	* Makefile.am: define RDXTREE_KEY_32
	Message-Id: <20230116105857.240210-6-luca@orpolo.org>

	update writev syscall signature with rpc types
	* device/device_emul.h: write/writev: update trap argument types
	* device/ds_routines.c: update argument types and adjust copyin
	* device/ds_routines.h: write/writev: update trap argument type
	* include/device/device_types.h: add rpc_io_buf_vec_t type
	* kern/ipc_mig.c: write/writev: update trap argument type
	* kern/ipc_mig.h: Likewise
	Message-Id: <20230116105857.240210-5-luca@orpolo.org>

2023-01-18  Luca Dariz  <luca@orpolo.org>

	update syscall signature with rpc_vm_* and mach_port_name_t
	* include/mach/mach_types.h: use mach port names
	* kern/ipc_mig.c:  update vm types and use copyin/copyout helpers
	* kern/ipc_mig.h: Likewise

	Message-Id: <20230116105857.240210-4-luca@orpolo.org>

2023-01-18  Luca Dariz  <luca@orpolo.org>

	x86_64: expand and shrink messages in copy{in, out}msg routines
	* i386/i386/copy_user.h: new file to handle 32/64 bit differences
	  - add msg_usize() to recontruct the user-space message size
	  - add copyin/copyout helpers for addresses and ports
	* include/mach/message.h: add msg alignment macros
	* ipc/ipc_kmsg.c:
	  - copyin/out ports names instead of using pointer magic
	* ipc/ipc_mqueue.c: use msg_usize() to check if we can actually
	  receive the message
	* ipc/mach_msg.c: Likewise for continuations in receive path
	* x86_64/Makefrag.am: add x86_64/copy_user.c
	* x86_64/copy_user.c: new file to handle message expansion and
	  shrinking during copyinmsg/copyoutmsg for 64 bit kernels.
	  - port names -> port pointers on all 64-bit builds
	  - 32-bit pointer -> 64 bit pointer when using 32-bit userspace
	* x86_64/locore.S: remove copyinmsg() and copyoutmsg()
	Message-Id: <20230116105857.240210-3-luca@orpolo.org>

	add msg_user_header_t for user-side msg structure
	* include/mach/message.h: use mach_msg_user_header_t only in KERNEL,
	  and define it as mach_msh_header_t for user space
	* ipc/ipc_kmsg.c: use mach_msg_user_header_t where appropriate
	* ipc/ipc_kmsg.h: Likewise
	* ipc/mach_msg.c: Likewise
	* ipc/mach_msg.h: Likewise
	* kern/thread.h: Likewise
	Message-Id: <20230116105857.240210-2-luca@orpolo.org>

2023-01-18  Flavio Cruz  <flaviocruz@gmail.com>

	Add static qualifiers
	stack_statistics, swapin_thread_continue, and memory_object_lock_page are
	not used outside their module.

	Delete x86 string functions
	The i386 functions are not used and the more portable versions in kern/strings.c
	are faster (1-4x faster in synthetic benchmarks compiled with -O2 on my x86_64 box).
	Message-Id: <Y8Yt9FvIagB78uyR@jupiter.tail36e24.ts.net>

	Delete util/putchar.{c,h} and util/puts.c
	Those functions are unused.
	Message-Id: <Y8YtmejHMnhI9CLG@jupiter.tail36e24.ts.net>

2023-01-16  Luca Dariz  <luca@orpolo.org>

	fix warnings
	* ipc/ipc_kmsg.c: drop useless cast.
	* ipc/ipc_port.c: upcast rpc_vm_offset_t to full vm_offset_t
	* kern/pc_sample.c: Likewise
	Message-Id: <20230116130426.246584-4-luca@orpolo.org>

	remove unused file ipc/mach_rpc.c
	* Makefrag.am: remove ipc/mach_rpc.c
	* ipc/mach_rpc.c: remove file, all functions here seem unused.
	Message-Id: <20230116130426.246584-3-luca@orpolo.org>

2023-01-16  Luca Dariz  <luca@orpolo.org>

	add required include
	* kern/syscall_sw.h: add missing include

	Message-Id: <20230116130426.246584-2-luca@orpolo.org>

2023-01-16  Luca Dariz  <luca@orpolo.org>

	add missing argument names
	* ddb/db_break.c: add argument name, compilation fails on Debian/Linux
	  stable with gcc 10.2 otherwise. For some reason on Debian/Hurd a
	  simple test program without argname succeeds, unless I force
	  -std=c11 or similar; I suppose because newer gcc have different
	  defaults. Gnumach seem to still require c89 for some older code,
	  otherwise we could explicitely use gnu99/c99 or gnu11/c11.
	* ddb/db_cond.c: Likewise
	* ddb/db_examine.c: Likewise
	* ddb/db_macro.c: Likewise
	* ddb/db_watch.c: Likewise
	* device/dev_name.c: Likewise
	Message-Id: <20230116130426.246584-1-luca@orpolo.org>

2023-01-15  Flavio Cruz  <flaviocruz@gmail.com>

	Delete ffs and strrchr prototypes.
	We use __builtin_ffs instead of ffs. strrchr is not used.

	Also removed the commented out memset implementation since it is
	implemented in arch-specific code.
	Message-Id: <Y8NOXbVzhBJknR29@mercury.tail36e24.ts.net>

2023-01-13  Etienne Brateau  <etienne.brateau@gmail.com>

	Fix build for smp
	ad51c68171cb6a1cae15c61ca0218bbee2c05485 missed one replacement which
	was not discovered because it’s only when building with smp enabled.
	Message-Id: <20230113144732.49786-1-etienne.brateau@gmail.com>

2023-01-13  Flavio Cruz  <flaviocruz@gmail.com>

	Create kern/mach4.h and kern/mach_host.h and define the RPC prototypes for mach4.defs and mach_host.defs.
	Also move more mach_debug rpcs to kern/mach_debug.h.
	Message-Id: <Y7+LPMLOafUQrNHZ@jupiter.tail36e24.ts.net>

	Use rpc_uintptr_t for protected payloads.
	Not only is uintptr_t more accurate for what protected payloads are but
	we also provide compatibility for 64 + 32 bits. Also the use of
	natural_t in the RPC definition is wrong since it is always 32 bits.
	Message-Id: <Y7+LHVbmYxO/cSKs@jupiter.tail36e24.ts.net>

2023-01-10  Flavio Cruz  <flaviocruz@gmail.com>

	Preemptively fix warnings that will be caused by -Wmissing-prototypes
	Declared RPCs in ipc/mach_port.c and ddb/db_ext_symtab.c in their corresponding headers.
	Ideally these should be used by mig instead of mig declaring its own
	prototypes.
	Message-Id: <Y7z/BQhmsBbRgxhe@jupiter.tail36e24.ts.net>

	Update configure.ac so that we don't need glibc when running ./configure.
	For x86_64-pc-gnu we still do not have a working glibc so ./configure will fail
	under a freestanding environment. We force ./configure to avoid running
	compiled C programs as a test which it is not needed when compiling a kernel.
	Message-Id: <Y7zYm44O0CNayuAe@jupiter.tail36e24.ts.net>

2023-01-09  Flavio Cruz  <flaviocruz@gmail.com>

	Remove unused db_set_variable
	Message-Id: <Y7umiZGUjD3E+Duq@jupiter.tail36e24.ts.net>

	Remove unused db_lookup_port
	Message-Id: <Y7ulwrbHJZqKoBPn@jupiter.tail36e24.ts.net>

	Export input structures used by Hurd in device/input.h.
	Also delete sys/ioctl.h and merge it with device/input.h since it is
	only needed here.
	Message-Id: <Y7uirJzaJeOBzAmq@jupiter.tail36e24.ts.net>

2023-01-09  Flavio Cruz  <flaviocruz@gmail.com>

	Set max-page-size when linking the kernel to 0x1000.
	With the exception of linux, x86_64 ld default's max-page-size
	is 2MB (default for i386 is 4K) and compiling gnumach with x86_64-pc-gnu-ld
	will generate a kernel image where the boot section starts at the file offset
	2MB. This makes it unbootable on grub because the file is no longer multiboot.

	Here's the objdump -h output before the patch:

	Sections:
	Idx Name          Size      VMA               LMA               File off  Algn
	  0 .boot         0000c000  0000000001000000  0000000001000000  00200000  2**12
	                  CONTENTS, ALLOC, LOAD, READONLY, CODE
	  1 .text         0009078f  000000004100c000  000000000100c000  0020c000  2**2
	                  CONTENTS, ALLOC, LOAD, READONLY, CODE
	  2 .rodata       000110fc  000000004109c7a0  000000000109c7a0  0029c7a0  2**5
	                  CONTENTS, ALLOC, LOAD, READONLY, DATA
	  3 .eh_frame     000101f0  00000000410ad8a0  00000000010ad8a0  002ad8a0  2**3
	                  CONTENTS, ALLOC, LOAD, READONLY, DATA
	  4 .data         000070a0  00000000412bdaa0  00000000012bdaa0  002bdaa0  2**5
	                  CONTENTS, ALLOC, LOAD, DATA
	  5 .bss          00023f10  00000000412c5000  00000000012c5000  002c4b40  2**12
	                  ALLOC
	  6 .comment      00000012  0000000000000000  0000000000000000  002c4b40  2**0
	                  CONTENTS, READONLY

	After, when forcing ld's max-page-size to be 4K:

	Sections:
	Idx Name          Size      VMA               LMA               File off  Algn
	  0 .boot         0000c000  0000000001000000  0000000001000000  00001000  2**12
	                  CONTENTS, ALLOC, LOAD, READONLY, CODE
	  1 .text         0009078f  000000004100c000  000000000100c000  0000d000  2**2
	                  CONTENTS, ALLOC, LOAD, READONLY, CODE
	  2 .rodata       000110fc  000000004109c7a0  000000000109c7a0  0009d7a0  2**5
	                  CONTENTS, ALLOC, LOAD, READONLY, DATA
	  3 .eh_frame     000101f0  00000000410ad8a0  00000000010ad8a0  000ae8a0  2**3
	                  CONTENTS, ALLOC, LOAD, READONLY, DATA
	  4 .data         000070a0  00000000410beaa0  00000000010beaa0  000beaa0  2**5
	                  CONTENTS, ALLOC, LOAD, DATA
	  5 .bss          00023f10  00000000410c6000  00000000010c6000  000c5b40  2**12
	                  ALLOC
	  6 .comment      00000012  0000000000000000  0000000000000000  000c5b40  2**0
	                  CONTENTS, READONLY

	It is also possible that something is wrong with the linker script but
	couldn't find anything concrete so far. After this patch the kernel is
	bootable with x86_64-pc-gnu-ld (and far smaller in size).
	Message-Id: <Y7uJYpIsovhShREj@jupiter.tail36e24.ts.net>

2023-01-07  Flavio Cruz  <flaviocruz@gmail.com>

	Fix warning at pic_isa.c
	Message-Id: <Y7exFz3ZkK6hLVdi@jupiter.tail36e24.ts.net>

	Use grub-file instead of mbchk to test multiboot header
	mbchk is not part of grub2 and only available on grub-legacy.
	Message-Id: <Y7ewlry3pRHRAR/9@jupiter.tail36e24.ts.net>

	Move cpu_down and other functions inside SMP ifdef
	cpu_down is shown as not required when disabling SMP so moving it inside
	NCPUS > 1 to eliminate the warning. Note that the diff ended up looking
	a bit different due the way functions are laid out.
	Message-Id: <Y7ZH6aI3fhWNzyrY@jupiter.tail36e24.ts.net>

2023-01-05  Flavio Cruz  <flaviocruz@gmail.com>

	Fix ddb warnings introduced with -Wstrict-prototypes
	Changed some ddb command functions to have the expected signature but
	not all of them due to the being difficult to inter-dependency between
	header files (for those just used cast).
	Message-Id: <Y7UO9HTfpZ8U0Nfy@mars>

2023-01-03  Flavio Cruz  <flaviocruz@gmail.com>

	Introduce time_value64_t to keep track of real time in the kernel
	time_value64_t uses int64_t to track seconds and nanoseconds and hence
	is Y2038 proof. It does not have nano second resolution but it could
	be provided in the future.

	Removed include/sys/time.h as it remaps time_value_t into timeval which
	can create confusion.

	The timestamp from keyboard and mouse events is no longer set and
	replaced with rpc_time_value for better compatibility.

2023-01-01  Guy-Fleury Iteriteka  <gfleury@disroot.org>

	fix warning from -Wstrict-prototypes
	Message-Id: <Y7GEhcafJ+4Wn3ao@falom>

	convert K&R into ansi
	Message-Id: <Y7GBQ5bk6ZQqtfda@falom>

	convert K&R into ansi.
	Message-Id: <Y7GBIF6mBjV6kBM+@falom>

2022-12-27  Flavio Cruz  <flaviocruz@gmail.com>

	Fix inttypes.h format constants for uintptr_t and intptr_t.
	The format constants are not correct for 32 bits and there was
	duplication for PRIx* constants (replaced with octal constants).

	Fixed a few format warnings too.
	Message-Id: <Y6o5KsvtPavCYe8f@mars>

2022-12-27  Flavio Cruz  <flaviocruz@gmail.com>

	Delete kern_timestamp system call since it is not used
	Message-Id: <Y6r72z4cKVCMDSKy@mars>

	Use uintptr_t to define vm_size_t/vm_offset_t/vm_address
	Message-Id: <Y6j9bnHphZp0ZPYC@mars>

2022-12-27  Flavio Cruz  <flaviocruz@gmail.com>

	Fix some warnings with -Wmissing-prototypes.
	Marked some functions as static (private) as needed and added missing
	includes.

	This also revealed some dead code which was removed.

	Note that -Wmissing-prototypes is not enabled here since there is a
	bunch more warnings.
	Message-Id: <Y6j72lWRL9rsYy4j@mars>

2022-12-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix hardclock prototype

2022-12-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr: Drop irq parameter
	This is not actually used.

	Xen: Fix ivect prototype
	448889a4f0c3 ("Use -Wstrict-prototypes and fix warnings") simplified the
	prototype of ivect, so we have to update the Xen version.

	Add missing htons

	Xen: Fix warning

	ld_magic_routines: Restore yet more symbol
	cef6d34aa026 ("Implement our own functions to convert between host and
	network values") dropped the glibc pieces from clib_routines, but
	dropped too many ld symbols.

	ld_magic_routines: Restore more more symbols
	cef6d34aa026 ("Implement our own functions to convert between host and
	network values") dropped the glibc pieces from clib_routines, but
	dropped too many ld symbols.

2022-12-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop spurious changes

	Warn only once about not being able to recycle pages

2022-12-21  Flavio Cruz  <flaviocruz@gmail.com>

	Use -Wstrict-prototypes and fix warnings
	Most of the changes include defining and using proper function type
	declarations (with argument types declared) and avoiding using the
	K&R style of function declarations.
	Message-Id: <Y6Jazsuis1QA0lXI@mars>

2022-12-19  Flavio Cruz  <flaviocruz@gmail.com>

	x86_64: stdint.h no longer exists so don't install it
	Message-Id: <Y6Bw/vU85SK5GrMZ@mars>

2022-12-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	time_value: Fix usage in e.g. c89 programs
	The inline keyword was not defined there, so we need to use __inline__.

	This fixes make check in glibc.

2022-12-19  Flavio Cruz  <flaviocruz@gmail.com>

	Remove custom stdint.h and rely on freestanding headers
	GCC already provides this so we don't need to have our own.
	Message-Id: <Y5+02FVA6jf4GPgA@mars>

2022-12-18  Flavio Cruz  <flaviocruz@gmail.com>

	Use long_natural_t for recnum_t
	For 64 bits, device operations will provide an addressing space of 64
	bits.

	Also define the translation functions if long_natural_t or
	long_integer_t are ever used in RPCs.

	Note that MIG does not implicitly inherit the translation functions from
	types hence the need to redefine them for recnum_t.
	Message-Id: <Y59MFzekEA0YUXIw@mars>

2022-12-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	libgcc_routines: Restore some symbols
	cef6d34aa026 ("Implement our own functions to convert between host and
	network values") dropped the glibc pieces from clib_routines, but missed
	moving all its gcc symbols into libgcc_routines.

	vm_page_evict: avoid crashing
	It seems we hit he "unable to recycle any page" even when there is no
	memory pressure, probably just because the pageout thread somehow to
	kicked but there's nothing to page out left.

2022-12-17  Flavio Cruz  <flaviocruz@gmail.com>

	Use struct for time_value_t and define seconds as long_integer_t.
	On 64 bit kernels, seconds will be 64 bits long and won't suffer from
	the 2038 problem. We also add a new type rpc_time_value_t to handle the
	conversion between 32 bit userland and 64 bit kernel.
	Message-Id: <Y50kIaIgaIdGjDAk@mars>

	Fix compiler warnings due to use of inline for mask_irq/unmask_irq
	Message-Id: <Y5z01C/L+pnSVNIP@mars>

2022-12-17  Flavio Cruz  <flaviocruz@gmail.com>

	Implement our own functions to convert between host and network values
	We add htonl, ntohl and ntohs which were the last symbols we relied on
	from libc.

	The Makefile.am file was updated to reflect the fact that we only require libgcc.
	Message-Id: <Y5zNdOJ/YnyYCOhX@mars>

2022-12-15  Flavio Cruz  <flaviocruz@gmail.com>

	Use __builtin_ffs instead of libc provided ffs in vm_map.c
	We already use this built-in in other places and this will move us closer to
	being able to build the kernel without libc.
	Message-Id: <Y5l80/VUFvJYZTjy@jupiter.tail36e24.ts.net>

2022-12-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	copy_to/from_phys: fix non-page-aligned case
	The vaddr field of the returned map only points to the base address, we
	have to add the offset within the page before reading/writing.

	This fixes accessing tasks different from the current task, and
	the user part of ddb backtraces.

2022-12-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db: Add support for CSI-based arrows

	i386 db: Fix db_read_bytes over multiple pages
	The target pointer was not getting advanced between page chunks.

	i386 db: Add ud2 instruction

2022-12-11  Flavio Cruz  <flaviocruz@gmail.com>

	Delete rpc copyout multiname code
	Message-Id: <Y5V+BovjWo1CCjBc@jupiter.tail36e24.ts.net>

2022-12-11  Flavio Cruz  <flaviocruz@gmail.com>

	Delete thread_get_state_KERNEL and thread_set_state_KERNEL
	These are not used.

	Message-Id: <Y5V95ibk9Z+3OJxN@jupiter.tail36e24.ts.net>

2022-12-07  Flavio Cruz  <flaviocruz@gmail.com>

	Use mach_port_name in db_lookup_port
	Message-Id: <Y5AdTQfSxStjbhsj@reue>

	Update kern/ directory to use mach_port_name_t.
	Make it clear where exactly we use port names vs port addresses.
	Message-Id: <Y5AdJGuzXBMO7YRK@reue>

	Use long_natural_t in kern/task.h and kern/slab.h
	RPC interfaces already use long_natural_t so internally we can also use
	this type.
	Message-Id: <Y5AdPNqg4l5jAZ3n@reue>

2022-12-06  Flavio Cruz  <flaviocruz@gmail.com>

	Define vm_size_t and vm_offset_t as __mach_uintptr_t.
	This allows *printf to use %zd/%zu/%zx to print vm_size_t and
	vm_offset_t. Warnings using the incorrect specifiers were fixed.

	Note that MACH_PORT_NULL became just 0 because GCC thinks that we were
	comparing a pointer to a character (due to it being an unsigned int) so
	I removed the explicit cast.
	Message-Id: <Y47UNdcUF35Ag4Vw@reue>

2022-12-06  Flavio Cruz  <flaviocruz@gmail.com>

	Make task_info.h structs more portable
	Changed vm_size_t to rpc_size_t so that both userland and kernel agree
	on the same size. Also changed the denominator for the maximum struct
	sizes to be integer_t to match the other declarations.

	Introduced long_natural_t and rpc_long_natural_t to represent large
	counters. Replaced rpc_unsigned_long with rpc_long_natural_t.
	Message-Id: <Y47UhaOzKnqhgYq4@reue>

2022-12-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	task: Add task_set_essential
	Whenever a Hurd essential task crashes, startup just reboots the system
	since there's not much that can be done at that point. When we have a
	kernel debugger, however, we could at least get crashing information, so
	let's let Hurd's startup tell the kernel which tasks are essential, and
	trigger the debugger whenever they crash.

2022-12-03  Flavio Cruz  <flaviocruz@gmail.com>

	Use mach_port_name_t in a few more places
	A few places that I missed in 958686efa2175abe3f7044890c2c2370e29147f2.
	Message-Id: <Y4g+4THLC/1NvnkM@viriathus>

2022-11-30  Flavio Cruz  <flaviocruz@gmail.com>

	Update ipc/ directory to use mach_port_name_t
	Make it explicit where we use port names versus actual ports. For the 64
	bit kernel, port names and ports are of different size so this corrects
	the syscall arguments and internal structs to have the right size.

	This patch also uncovered several issues we need to solve to make
	GNUMach work well on 64 bits. First, the mach_msg call will receive 4
	byte port names while the kernel "thinks" they are 8 bytes, which will
	be a problem. Also, when we send a message, the kernel translates the
	port names into port pointers in the message copied from user space.
	This also won't work on 64 bits. In this patch, I added several TODOs to fix
	the issues later.
	Message-Id: <Y4cCzNmc6vC4bjsX@viriathus>

2022-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing gitignore rules

2022-11-28  Flavio Cruz  <flaviocruz@gmail.com>

	Use portable rpc types to define 'struct sample'.
	Message-Id: <Y4QQFkTUR4M60Gx0@viriathus>

	Update mach_port_status_t definition to use the new struct
	Also update C definition to use proper types.
	Message-Id: <Y4QKgh0zHdB8pWhD@viriathus>

	Delete mach_debug/pc_info.h
	mach/pc_sample.h has the definitions that the kernel actually uses.
	Message-Id: <Y4QKGtUdbz+AVO3l@viriathus>

2022-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: fix build

2022-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "x86_64: fix installing x86_64-specific headers"
	This reverts commit 8c58257c4da364ffcb797f9d454c37de939a052b.

	These headers are actually coming from i386. This change was making
	`make dist` try to build the x86_64/include/mach/x86_64 directory in the
	dist tarball.

2022-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_wire_all: Fix vm_map_protect case
	If a "wire_required" process calls vm_map_protect(0), the
	memory gets unwired as expected. But if the process then calls
	vm_map_protect(VM_PROT_READ) again, we need to wire that memory.

	(This happens to be exactly what glibc does for its heap)

	This fixes Hurd hangs on lack of memory, during which mach was swapping
	pieces of mach-defpager out.

2022-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Update kdb_kintr according to new interrupt stack layout
	e2fcf261076b ("interrupt: Fix saving irq/ipl when linux drivers are
	disabled") changed the stack layout for interrupt handlers, but missed
	updating kdb_kintr's code that tries to mangle it.

	This restores the control-alt-d shortcut.

2022-11-25  Flavio Cruz  <flaviocruz@gmail.com>

	Update mach_debug interfaces to use struct.
	The new interfaces will be compatible both with a 64 bits kernel and
	userland and 64 bits kernel and 32 bit userland. Also removed many
	of the uses of natural_t where an unsigned int suffices. Ideally we
	should replace natural_t with something more portable such as uintptr_t
	or a basic int type for counters since for the most part we don't
	need counters to have the same width as the pointer type.

	* i386/include/mach/i386/vm_types.h: Define rpc_unsigned_long.
	* include/mach/mach_types.defs: Define type rpc_vm_offset_t.
	* include/mach_debug/hash_info.h: Use unsigned int instead of natural_t.
	* include/mach_debug/mach_debug_types.defs: Update cache_info_t,
	  hash_info_bucket_t, vm_region_info_t, vm_object_info_t and
	  vm_page_info_t to use struct.
	* include/mach_debug/slab_info.h: Use rpc_vm_size_t and
	  rpc_unsigned_long for compatibility with 32 bits userland.
	* include/mach_debug/vm_info.h: Update struct fields to use the correct
	  types and avoid natural_t whenever we just want to keep a count of
	  something.
	Message-Id: <Y32lp1SuV01ImCx9@viriathus>

2022-11-25  Flavio Cruz  <flaviocruz@gmail.com>

	Delete ipc_info.h since it is not used
	Message-Id: <Y35PHuUNCFb6sQO0@viriathus>

2022-11-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Add missing int_entry_table entries for APIC
	214866d58ac2 ("Add ioapic support disabled by default") missed adding
	them for x86_64.

2022-11-11  Flavio Cruz  <flaviocruz@gmail.com>

	default_pager_types.defs: define existing struct types as true structs
	Message-Id: <Y23fab31RM6HcCyb@viriathus>

2022-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	interrupt: Fix passing parameter to splx_cli and ioapic_irq_eoi
	e2fcf261076b (""interrupt: Fix saving irq/ipl when linux drivers are
	disabled") broke booting under some conditions, because the parameters were
	erroneously written 4 bytes too far for splx_cli and ioapic_irq_eoi to
	read them.

2022-11-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	doc: Add hints on using convenience variables in show commands

2022-11-06  Flavio Cruz  <flaviocruz@gmail.com>

	Remove unused mig type definitions in gnumach
	* include/mach/mach_types.defs: host_basic_info_data_t,
	  host_sched_info_data_t,
	  host_load_info_data_t,
	  processor_basic_info_data_t,
	  processor_set_basic_info_data_t,
	  processor_set_sched_info_data_t,
	  hread_basic_info_data_t,
	  thread_sched_info_data_t,
	  task_basic_info_data_t,
	  task_events_info,
	  task_thread_times_info_data_t,
	  machine_info_data_t,
	  machine_slot_data_t
	* include/mach_debug/mach_debug_types.defs: ipc_info_name_t,
	  ipc_info_name_array_t

	Tested by bootstrapping a Hurd system from scratch.
	Message-Id: <Y2dD7Z60Bwybg4jF@viriathus>

2022-10-26  Damien Zammit  <damien@zamaudio.com>

	i386/pit: Tune delays
	- Add half a clock tick for more accuracy
	- Start the pit countdown during pit_sleep
	- Add pit_mdelay and pit_udelay functions
	Message-Id: <20221025105502.222708-8-damien@zamaudio.com>

	linux drivers: Don't depend on curr_pic_mask for APIC
	Message-Id: <20221025105502.222708-7-damien@zamaudio.com>

2022-10-25  Damien Zammit  <damien@zamaudio.com>
	    Almudena Garcia  <liberamenso10000@gmail.com>

	acpi: Add lapic_addr
	Message-Id: <20221025105502.222708-5-damien@zamaudio.com>

2022-10-25  Damien Zammit  <damien@zamaudio.com>

	bios32: Use phystokv() on low bios addresses
	Message-Id: <20221025105502.222708-4-damien@zamaudio.com>

2022-10-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	proc_reg: Fix pushf/popf

2022-10-25  Damien Zammit  <damien@zamaudio.com>

	kdb: Fix TODO for multiprocessor
	Message-Id: <20221025105502.222708-2-damien@zamaudio.com>

2022-09-26  Etienne Brateau  <etienne.brateau@gmail.com>

	Fix when enabling APIC without SMP
	When we want to enable APIC, we must initialize the structure or
	otherwise, it will try to access to a not initialized memory addresses.
	Message-Id: <20220924163145.39894-1-etienne.brateau@gmail.com>

2022-09-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	std_types: Drop char, short and int type definitions
	These are provided by mig since ecf59842e472 ("Make MIG recognize the
	basic C integral types."), released in snapshot v1.8+git20200618.

	x86_64: ignore warning

2022-09-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	interrupt: Fix saving irq/ipl when linux drivers are disabled
	When Linux drivers are disabled, in hardclock() the linux_timer_intr()
	call is dropped, and gcc can tail-recursion-optimize the call to
	clock_interrupt(). To do so, it overwrites the hardclock() parameters to
	suit the clock_interrupt parameters layout. This however means it thrashes
	the backups that the interrupt() function had made of irq/ipl, leading to
	mayhem.

	interrupt should thus really properly separate its irq/ipl backups from the
	interrupt function parameters.

	Thanks a lot to Etienne Brateau for the tricky investigation!

2022-09-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kd_mouse: Fix warning

	x86_64: fix warning

	x86_64: fix build

2022-08-28  Luca Dariz  <luca@orpolo.org>

	hack vm memory object proxy creation for vm arrays
	* vm/memory_object_proxy.c: truncate vm array types as if they were
	  the rpc_ version because MIG can't handle that. This rpc can't
	  handle more than one element anyway.

	Note that the same issue with vm arrays is present at least with
	syscall emulation, but that functionality seems unused for now.

	A better fix could be to add a vm descriptor type in include/mach/message.h,
	but then probably we don't need to use the rpc_ types in MIG anymore,
	they would be needed only for the syscall definitions.

	Message-Id: <20220628101054.446126-15-luca@orpolo.org>

2022-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	copyinmsg: Set msgh_size inside copyinmsg rather than the caller
	In the 32/64 conversion case it is copyinmsg that will know the
	eventual size.

	kmsg: factorize uint32_t into an alignment type
	and restore the checks for offset alignment in the message, even if
	currently it is trivially always alright.

2022-08-28  Luca Dariz  <luca@orpolo.org>

	kmsg: fix msg body alignment
	* ipc/ipc_kmsg.c: align msg body to 4 bytes as done in mig

	Message-Id: <20220628101054.446126-7-luca@orpolo.org>

2022-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: fix installing x86_64-specific headers

2022-08-28  Luca Dariz  <luca@orpolo.org>

	use port name type in mach_port_names()
	* ipc/mach_port.c: use mach_port_name_t instead of mach_port_t, since
	  they could have different size. Fortunately we can keep the same
	  optimization about allocationg memory, since mach_port_type_t has
	  the same size as a name.

	Message-Id: <20220628101054.446126-9-luca@orpolo.org>

2022-08-28  Luca Dariz  <luca@orpolo.org>

	fix host_info structure definition
	* include/mach/host_info.h: replace vm_size_t with rpc_ version for 64
	  bit compatibility. Ideally it should use phys_addr_t or another unit
	  like KB or MB

	Message-Id: <20220628101054.446126-8-luca@orpolo.org>

2022-08-28  Luca Dariz  <luca@orpolo.org>

	sign-extend mask in vm_map() with 32-bit userspace
	* vm/vm_user.c: sign-extend mask with USER32

	Message-Id: <20220628101054.446126-6-luca@orpolo.org>

2022-08-28  Luca Dariz  <luca@orpolo.org>

	compute mach port size from the corresponding type
	* ipc/ipc_machdep.h: re-define PORT_T_SIZE_IN_BITS to be computed from
	  mach_port_t instead of being hardcoded.

	Message-Id: <20220628101054.446126-5-luca@orpolo.org>

2022-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix 64-to-32 copyout
	We cannot assume that the processor is little-endian.

2022-08-28  Luca Dariz  <luca@orpolo.org>

	fix argument passing to bootstrap modules
	* kern/bootstrap.c: use rpc_ vm types to put the bootstrap module
	  arguments on the stack, make it consistent with user-space types.

	Message-Id: <20220628101054.446126-4-luca@orpolo.org>

2022-08-28  Luca Dariz  <luca@orpolo.org>

	simplify ipc_kmsg_copyout_body() usage
	* ipc/ipc_kmsg.h: change prototype of ipc_kmsg_copyout_body()
	* ipc/ipc_kmsg.c: change prototype and usage of
	  ipc_kmsg_copyout_body() by incorporating common code
	* ipc/mach_msg.c: change usage of ipc_kmsg_copyout_body()

	Message-Id: <20220628101054.446126-3-luca@orpolo.org>

2022-08-28  Luca Dariz  <luca@orpolo.org>

	fix rpc types for KERNEL_USER stubs
	* include/mach/mach_types.defs: use rpc_ vm types for KERNEL_USER stubs.

	This change fixes two use cases:
	* internal rpc, e.g. when a memory object is initialized as a
	  consequence of vm_map(); for example, the bootstrap modules use the
	  "time" kernel device and memory-map it during startup. This
	  triggers a kernel-side rpc to initialize the memory object and
	  install the map, which is completely transparent form user-space.
	* notifications from kernel to user-space

	Message-Id: <20220628101054.446126-2-luca@orpolo.org>

2022-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing const_mach_port_name_array_t type

	Fix inclusability of <mach/mach_types.h>
	Now that mach/machine/vm_types.h uses stdint types, we have to ship a
	header that defines them.

2022-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix building x86_64 xen platform
	On Xen we do not have a separate boot section, we directly start at the
	kernel map address.  We thus do not have a map shift.

2022-08-27  Luca Dariz  <luca@orpolo.org>

	cleanup headers in printf.c
	* kern/printf.c: remove unnecessary #include and reorder

	This allows the file to be reused for minimal user-space tests.

	Message-Id: <20220628101054.446126-14-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca@orpolo.org>

	add rpc_versions for vm types
	* vm_types.h: add new types and conversion functions
	* mach_types.defs: adapt vm types depending on kernel user/server
	* vm_info.h: adapt rpc structure to have uniformly-sized members also
	  on 64-bit
	* x86_64/configfrag.c: add new option to select the user-space variant.

	Note that with this change the user-space interface is somehow fixed,
	i.e. it can't support 32-bit and 64-bit tasks at the same time.
	If this would be needed at some point, this change needs to be reworked.

	Message-Id: <20220403145955.120742-3-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca@orpolo.org>

	add port name types
	* include/mach/mach_port.defs
	  - use C type mach_port_name_array_t
	* include/mach/port.h:
	  - add new types mach_port_name_t and mach_port_name_array_t
	  - refine mach_port_t type for user and kernel space
	  - use port names in mach_port_status to allow compilation of 64-bit
	  - use port name to have uniform sizes and remove the
	    old_mach_port_status_t as it's unused
	* include/mach/std_types.defs
	  - use C type mach_port_name_array_t
	* kern/thread.{h,c}
	  - fix prototype to use port names. So far it seems the only rpc to
	    cause a conflict between the mig-generated header and the regular
	    header, so compilation fails.

	Message-Id: <20220403145955.120742-2-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca@orpolo.org>

	fix warnings for 32 bit builds
	Message-Id: <20220628101054.446126-13-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca@orpolo.org>

	x86_64: fix exception stack alignment
	* i386/i386/pcb.c:
	  - increase alignment of pcb cache to 16
	  - ensure the stack is properly aligned when switching ktss
	* i386/i386/thread.h:
	  - add padding tomake iss field end aligned to 16 bytes
	* i386/i386/trap.c:
	  - ensure the state we get after the trap points to the correct place
	    in the pcb structure

	When handling exceptions from IA-32e compatibility mode in user space,
	on a 64-bit kernel, the exception stack where error info is pushed
	needs to be aligned to 16 bytes (see Intel System Programming guide,
	$6.14.2)

	The exception stack frame is set in the middle of pcb->iss, but it's not always
	16-byte aligned; to make sure it is, we increase the alignment of the
	pcb cache and add a padding field in the pcb structure.

	This issue resulted in a general protection failure due to CS being
	corrupted after a page fault.  The corruption was happening when the
	exception stack frame was not properly aligned and a page fault
	happened; the error info was then pushed after re-aligning the stack,
	so the value of eflags was actually written in CS place and other
	fields were shifted too.

	It also makes sense to ensure this by adding two assertions, although
	these were primarly useful during debug.

	Message-Id: <20220628101054.446126-10-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	fix Task State Segment layout for 64 bit
	Message-Id: <20220205175129.309469-7-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	enable user access
	The pmap module is a bit limited on 64 bit paging, so this should be
	refined when we'll be able to use addresses over 4G.

	Message-Id: <20220205175129.309469-6-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	fix console setting from cmdline
	The leading space prevents it working if console=comX is the only
	argument, so handle this case separately.

	Message-Id: <20220205175129.309469-5-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	fix register corruption in irq on qemu
	rbx was used to compute the irq index in iunit and ivect arrays,
	however it should be preserved by pushing it in to the stack.  As a
	solution, we use rax instead, which is caller-saved.

	Message-Id: <20220205175129.309469-4-luca@orpolo.org>

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	cleanup multiboot
	* use _raw_ structs where we refer to the bootloader-provided data
	* remove unused structures
	* fix 64 bit boot

	Message-Id: <20220205175129.309469-3-luca@orpolo.org>

2022-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64 boothdr: Fix _start symbol for multiboot address overrides
	We shouldn't be needing that since we won't use a.out for 64bit, but using
	address override in the multiboot header could be useful at least for
	testing.

2022-08-27  Luca Dariz  <luca.dariz@gmail.com>

	add support for booting from grub with x86_64
	* configure: compile for native x86_64 by default instead of xen
	* x86_64/Makefrag.am: introduce KERNEL_MAP_BASE to reuse the constant
	  in both code and linker script
	* x86_64/ldscript: use a .boot section for the very first operations,
	  until we reach long mode. This section is not really allocated, so
	  it doesn't need to be freed later. The vm system is later
	  initialized starting from .text and not including .boot
	* link kernel at 0x4000000 as the xen version, higher values causes
	  linker errors
	* we can't use full segmentation in long mode, so we need to create a
	  temporary mapping during early boot to be able to jump to high
	  addresses
	* build direct map for first 4G in boothdr, it seems required by Linux
	  drivers
	* add INTEL_PTE_PS bit definition to enable 2MB pages during bootstrap
	* ensure write bit is set in PDP entry access rights. This only
	  applies to PAE-enabled kernels, mandatory for x86_64. On xen
	  platform it seems to be handled differently

	Message-Id: <20220205175129.309469-2-luca@orpolo.org>

2022-08-23  Damien Zammit  <damien@zamaudio.com>

	gnumach: Remove PCI_CFG2_* as a reserved ioport range
	PCI CONF2 access method was deprecated in PCI v2.0

	Also, the conf2 ioport range is only activated for use
	as pci configuration space when conf1 registers are accessed
	in a particular sequence.

	Since the pci-arbiter does not access the conf1 forwarding register,
	we are safe to remove this completely from gnumach to allow
	normal I/O use of the conf2 range as modern hardware expects.
	Message-Id: <20220823032638.292813-1-damien@zamaudio.com>

2022-08-21  Damien Zammit  <damien@zamaudio.com>

	gnumach: vm_allocate_contiguous: Allow small power 2 alignments
	This allows contiguous allocations aligned to values
	smaller than one page, but still a power of 2,
	by forcing the alignment to be to the nearest page.

	This works because PAGE_SIZE is a power of two.

	Message-Id: <20220821065732.269573-1-damien@zamaudio.com>

2022-08-09  Joan Lledó  <jlledom@member.fsf.org>

	dev_pager.c: fix wrong condition to remove entries
	* device/dev_pager.c:
	  * dev_pager_hash_delete() and dev_device_hash_delete():
	    * Fix condition to call kmem_cache_free(), it was being called always.
	    * https://lists.gnu.org/archive/html/bug-hurd/2022-08/msg00002.html

2022-07-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Complete no-pie flags
	* Makefile.am (AM_CFLAGS): Add -fno-PIE -fno-pie as well.

2022-05-27  Guy-Fleury Iteriteka  <gfleury@disroot.org>

	convert K&R into ansi
	Message-Id: <Yo+lzS7RtW5ZjQHN@debian>

2022-05-02  Guy-Fleury Iteriteka  <gfleury@disroot.org>

	convert k&R to ansi.
	Message-Id: <Ym+Of2H8SFEuUw9K@debian>

2022-04-03  Luca Dariz  <luca@orpolo.org>

	remove the old_mach_port_status_t as it's unused
	* include/mach/port.h:
	  - remove the old_mach_port_status_t as it's unused.

2022-03-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device intr: Return an error on bogus intr port
	Rather than risking dereferencing NULL.

	device intr: Fix hypothetical NULL dererefence

	device: Fix NULL dereference

	device: Avoid NULL dereference

2022-02-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device_map_page: update prototype

	vm_object_page_map: update prototype

2022-02-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_allocate_contiguous: fix checking the end of the allocation

	mach_vm_object_pages: Print a warning if the physical address is beyond 4GiB
	vpi_offset is not currently large enough to store it.

	vm_allocate_contiguous: Make sure we enforce physical addresses contraints

	pmap: Make sure we do not allocate page tables beyond 4GiB
	vm_page_insert would not be able to store the offset.

	projected_buffer_*: Fix storing physical address

2022-02-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: Fix storing physical addresses

	io_map: Fix using physical addresses

	db: Fix db_user_to_phys_address returning physical addresses
	It shall return a phys_addr_t, not vm_offset_t.

	vm_object: Fix vm_object_page_map map function prototype
	The map function is supposed to return physical addresses, thus phys_addr_t.

2022-02-15  Damien Zammit  <damien@zamaudio.com>

	biosmem: Narrow e820 regions as required
	Message-Id: <20220215064133.68593-1-damien@zamaudio.com>

2022-02-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop spurious version suffix

2022-02-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Ship x86_64/x86_64 and x86_64/include/mach/x86_64
	* Makefrag.am (EXTRA_DIST): Ship the x86_64/x86_64 and
	x86_64/include/mach/x86_64 symlinks.

	Makefrag.am: Move architecture condition inside architecture Makefrag.am
	Otherwise we cannot use _DIST there and have them all taken into account.
	As a consequence, we can drop duplicate _DIST between i386 and x86_64.

	Ship x86_64/x86_64
	* x86_64/Makefrag.am (EXTRA_DIST): Ship the x86_64/x86_64 symlink.

2022-01-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	thread_terminate_release: Error out early if thread is NULL
	We do not want to destroy the port and release the stack if thread is
	NULL, i.e. we will fail.

2022-01-21  Etienne Brateau  <etienne.brateau@gmail.com>

	Convert from K&R to ANSI
	  * hardclock.c: convert to ANSI
	  * com.c: ditto
	  * lpr.c: ditto
	  * mem.c: ditto
	Message-Id: <20220120170004.21722-1-etienne.brateau@gmail.com>

2022-01-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	task_set_name: make string parameter const
	This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server
	side")

	device_types: Add more const_ types

	typo

	Add yet more const string types

	mach_debug_types: Add const_dev_name_t
	This will avoid forcing the caller to respect the definite string size.

	device_types: Add const_dev_name_t
	This will avoid forcing the caller to respect the definite string size.

2022-01-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_i386: include MACH_I386_IMPORTS
	Like other defs header do, to allow e.g. including libports/ports.h

2021-12-31  Alicia  <alicia@ion.nu>

	thread: Fix thread_abort clearing of an event wait
	881fe9da8bd1 ("kern/thread.c: some minor style changes") introduced a
	spurious comment.

2021-12-30  Etienne Brateau  <etienne.brateau@gmail.com>

	Convert from K&R to ANSI
	  * device/dev_name.c: Convert function prototypes from K&R to ANSI.
	  * device/subr.c: Convert function prototypes from K&R to ANSI.
	Message-Id: <20211230112249.13682-2-etienne.brateau@gmail.com>

2021-12-30  Adam Kandur  <sys.arch.adam@gmail.com>

	kern/thread.c: some minor style changes
	Greeting, I have changed some stuff in kern/thread.c which makes code
	more readable for me. Maybe it will be usefull.

	Message-Id: <20211230082643.8171-1-sys.arch.adam@gmail.com>

2021-12-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ddb: Fix updating sp while progressing through frames
	Notably trap/interrupt/syscall provide an exact SP value.

	ddb: Unwind over RET
	When we don't have a frame but PC points to a RET instruction (e.g. in the
	userland system call assembly code), we can trivially unwind it.

2021-12-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ddb: Fix accessing high memory
	User processes loaded in high memory are not visible to ddb through the
	direct mapping. We can however read/write data through copy_from/to_phys.

2021-12-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	rtc: drop message on setting RTC time
	We haven't seen the 2032 bug for a long time, f040677be3c0 ("kd: Do not
	read the CMOS ram") probably fixed it at last.

	vm_wire: extend per-task wiring limit to 8MiB
	Like Linux just did.

2021-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memmmap: Use biosmem_addr_available rather than vm_page_lookup_pa
	The segment code actually has vm_page entries for reserved pages, and
	thus memmmap would reject mapping ACPI pages. Taking the information
	from biosmem is much more precise, and indeed knows all hardware quirks
	which can now be dropped from memmmap.

	Fix rejecting the mapping of some pages
	The memmmap method may reject some offsets (because it falls in non-device
	ranges), so device_map_page has to notice this and report the error.
	device_pager_data_request then has to notice as well and report.

2021-11-07  Sergey Bugaev  <bugaevc@gmail.com>

	vm_region_get_proxy: rename to create_proxy
	For coherency with memory_object_create_proxy.

	Memory proxies: Add support for anonymous mappings
	* vm/vm_map.c (vm_region_get_proxy):
	    - Return KERN_INVALID_ARGUMENT when the entry is a submap.
	    - Create a pager for the vm_object when the entry doesn't
	      have any yet, since it's an anonymous mapping.
	Message-Id: <20211106081333.10366-3-jlledom@mailfence.com>

2021-11-07  Joan Lledó  <jlledom@member.fsf.org>

	vm: vm_region_get_proxy
	To get a proxy to the region a given address belongs to,
	with protection and range limited to the region ones.

	* include/mach/mach4.defs: vm_region_get_proxy RPC declaration
	* vm/vm_map.c: vm_region_get_proxy implementation
	Message-Id: <20211106081333.10366-2-jlledom@mailfence.com>

2021-11-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memory_object_create_proxy: Fix and check coherency with RPC
	* vm/memory_object_proxy.c: Include kern/mach4.server.h.
	(memory_object_create_proxy): Drop const qualifiers.

2021-11-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memory_object: Fix memory_object_t type in the kernel
	mach_port_t is for userland, kernel sees the translated ipc_port_t.

	* include/mach/memory_object.h [MACH_KERNEL]: Include ipc/ipc_types.h
	[MACH_KERNEL] (memory_object_t): Typedef to ipc_port_t instead of
	mach_port_t.
	(memory_object_array_t): Typedef to memory_object_t* instead of
	mach_port_t*.

2021-11-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop unused device_pager_release
	* device/dev_pager.c (device_pager_release): Drop unused function.

2021-10-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memory_object_create_proxy: Make len parameter vm_size_array_t
	This is a no-op on i386.

	* i386/include/mach/i386/vm_types.h (vm_size_array_t): New type.
	* include/mach/mach4.defs (vm_size_array_t): New type.
	(memory_object_create_proxy): Turn len parameter from vm_offset_array_t
	to vm_size_array_t.
	* vm/memory_object_proxy.c (memory_object_create_proxy): Turn len
	parameter from const vm_offset_t * to const vm_size_t *.

2021-09-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386/i386/fpu.h: Fix xrstor and xrstors macros
	xrstor and xrstors also take the xsave support bitmask.

	We were otherwise not necessarily properly reloading all the FPU state,
	thus leading to various subtle bugs, notably with glibc 2.33's
	ifunc-optimized memcpy etc.

	* i386/i386/fpu.h (xrstor, xrstors): Pass fp_xsave_support in EDX:EAX.

2021-09-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386/i386/fpu.h: Drop spurious backslashes

2021-09-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Fix installation target of headers
	* x86_64/Makefrag.am (include_mach_i386dir): Rename to include_mach_x86_64dir, set to $(includedir)/mach/x86_64.
	(include_mach_i386_HEADERS): Rename to include_mach_x86_64_HEADERS.

	Reported-by: Andrea Monaco <andrea.monaco@autistici.org>

2021-09-18  Miguel Figueiredo  <elmig@debianpt.org>

	replace obsolete AC_CONFIG_HEADER with AC_CONFIG_HEADERS

2021-09-12  Andrea Monaco  <andrea.monaco@autistici.org>

	ahci: Do not even try AHCI identify when device is ATAPI
	* linux/dev/drivers/block/ahci.c (ahci_probe_port): Avoid trying AHCI
	identify when PxCMD.ATAPI is set.

	ahci: Fix warning content
	* linux/dev/drivers/block/ahci.c (ahci_identify): Fix warning for the
	identify timeout.

2021-08-28  Joan Lledó  <jlledom@member.fsf.org>

	dev_pager: rename hash macros
	Remove the reference to the pager hash since they are used
	both in the pager and the device hashes.

	* device/dev_pager.c:
	* Rename DEV_PAGER_HASH_COUNT to DEV_HASH_COUNT
	* Rename dev_pager_hash to dev_hash
	Message-Id: <20210828100252.18376-3-jlledom@mailfence.com>

2021-08-28  Joan Lledó  <jlledom@member.fsf.org>

	dev_pager: implement offset
	* device/dev_pager.c:
	* struct dev_pager: add offset field
	* new struct dev_device_entry: includes device and offset
	* new hash table dev_device_hashtable
		* index [device + offset]
	* new functions dev_device_hash[init,insert,delete,lookup]
		* do the same as their counterparts for
		  dev_pager_hashtable
	* dev_pager_setup(): record the offset
	* device_map_page(): add the recorded offset on the fly
	Message-Id: <20210828100252.18376-2-jlledom@mailfence.com>

2021-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux block: allow loading data up to 4GiB limit
	Linux drivers are only limited by the DMA32 constraint, not by the directmap
	constraint. But our segment order is currently set to
	DMA < DMA32 < DIRECTMAP < HIGHMEM (since that is what we will have in 64bit
	mode). In PAE mode this makes DMA32 limited to 800MiB.  Ideally we'd have
	DMA < DIRECTMAP < DMA32 < HIGHMEM but that'd make the memory code more
	complex, and we are to remove the Linux drivers anyway.  In the
	meanwhile, In non-PAE mode we can just use HIGHMEM which is already
	limited to 4GiB, that will do the work.

	* linux/dev/glue/block.c (VM_PAGE_LINUX): New macro.
	(device_read): Use VM_PAGE_LINUX instead of VM_PAGE_DMA32.

2021-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Use kvtophys instead of _kvtophys
	_kvtophys only works with direct-mappable memory, which is scarse,
	better use kvtophys that can work with any kind of memory.

	* linux/src/include/asm-i386/io.h: Include <intel/pmap.h>
	(virt_to_phys): Use kvtophys instead of _kvtophys.

2021-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux block: Fix checking block sector.
	* linux/dev/glue/block.c (check_rw_block): Return 0 on no error.

2021-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_page_grab: allow allocating in high memory
	vm_page_grab was systematically using the VM_PAGE_SEL_DIRECTMAP selector
	to play safe with existing code.

	This adds a flags parameter to let callers of vm_page_grab specify their
	constraints.

	Linux drivers need 32bit dmas, Xen drivers use kvtophys to clear some
	data. Callers of kmem_pagealloc_physmem and vm_page_grab_phys_addr also use
	kvtophys. Otherwise allocations can go to highmem.

	This fixes the allocation jam in the directmap segment.

	* vm/vm_page.h (VM_PAGE_DMA, VM_PAGE_DMA32, VM_PAGE_DIRECTMAP,
	VM_PAGE_HIGHMEM): New macros.
	(vm_page_grab): Add flags parameter.
	* vm/vm_resident.c (vm_page_grab): Choose allocation selector according
	to flags parameter.
	(vm_page_convert, vm_page_alloc): Pass VM_PAGE_HIGHMEM to vm_page_grab.
	(vm_page_grab_phys_addr): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
	* vm/vm_fault.c (vm_fault_page): Pass VM_PAGE_HIGHMEM to vm_page_grab.
	* vm/vm_map.c (vm_map_copy_steal_pages): Pass VM_PAGE_HIGHMEM to vm_page_grab.
	* kern/slab.c (kmem_pagealloc_physmem): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
	* i386/intel/pmap.c (pmap_page_table_page_alloc): Pass VM_PAGE_DIRECTMAP to
	vm_page_grab.
	* xen/block.c (device_read): Pass VM_PAGE_DIRECTMAP to vm_page_grab.
	* linux/dev/glue/block.c (alloc_buffer): Pass VM_PAGE_DMA32 to vm_page_grab.

2021-08-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db_show_vmstat: Show segment name rather than its number

2021-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db_show_vmstat: Also show segment size
	* vm/vm_page.c (db_show_vmstat): Add printing the segment size.

	db_show_vmstat: Drop duplicate output
	* vm/vm_page.c (db_show_vmstat): Drop displaying cache numbers a second
	time.

2021-08-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device_read: Add dealloc for data
	It would be very tricky for the server to manage deallocation for
	device_read, and does not seem useful anyway. device_reply.defs already
	has it.

	* include/device/device.defs (device_read): Add dealloc flag for the data
	array.

2021-08-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db show vmstat: also show segments stats
	* vm/vm_page.c (db_show_vmstat)

2021-08-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db: Add show vmstat command
	with an output similar to the userland vmstat command

	* vm/vm_page.c (db_show_vmstat): New function.
	* vm/vm_page.h (db_show_vmstat): New prototype.
	* ddb/db_command.c (db_show_cmds): Add vmstat command.

2021-08-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	block: Look out for disk sector number overflow
	* linux/dev/drivers/block/ahci.c (ahci_do_port_request): Reject sectors
	beyond LBA48 or LBA28.
	* linux/dev/glue/block.c (check_rw_block): New function.
	(rdwr_partial, rdwr_full): Use check_rw_block to reject block number
	overflows.
	* linux/src/drivers/block/ide.c (do_rw_disk): Reject sectors beyond
	LBA28 or CHS.

2021-08-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	assert: Tell the compiler that failures are unlikely

2021-08-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memory_object_proxy: Deliver no-sender notifications on a separate port
	Otherwise userland can send spurious notifications.

	memory_object_proxy: Explicit that creation wants a send right
	This is required anyway, and allows the caller to pass on MAKE_SEND.

	memory_object_proxy: Fix send port right leak
	On success we'd have to clean the port right. Just consume it.

	memory_object_proxy: Fix checking proxy length
	We want to prevent subproxies from requesting larger sizes than what a
	proxy initially allowed.

2021-08-09  Joan Lledó  <jlledom@member.fsf.org>

	Memory object proxy: add support for ranges and nesting

2021-08-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memory_object_proxy: release resources on no-send notification

2021-06-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: Allow exagerated max_prot for now
	glibc's mmap implementation assumes that gnumach will cap the prot for it,
	so for now let's revert back to capping rather than rejecting.

	That fixes mmap(SHARED|READ) for read-only objects.

2021-05-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "vm_map: Allow passing the name of a memory object"
	This reverts commit af9f471b500bcd0c1023259c7577e074fe6d3ee5.

2021-05-24  Sergey Bugaev  <bugaevc@gmail.com>

	vm_map: Fix proxy object protection check
	* If not making a copy, don't cap protection to the limit enforced
	  by the proxy, and only require read access. This fixes mapping
	  parts of read-only files MAP_ANON + PROT_READ|PROT_WRITE.

	* Instead of silently capping protection, return KERN_PROTECTION_FAILURE
	  to the caller like the other vm_*() routines do.

2021-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	rtc: Add read/write messages
	We are still having issues with bogus dates. This adds prints at boot
	and time set, to make sure what we actually read and write.

	* i386/i386at/rtc.c: Include <kern/printf.h>
	(readtodc): Warning about reaching CENTURY_START. Print the time read
	from RTC.
	(writetodc): Record in RTC remainder of division of year by 100 rather
	than subtracting 1900. Print the time written to RTC.

2021-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kd: Do not read the CMOS ram
	This could conflict with read/writing the RTC.

	* i386/i386at/kd.c (kd_xga_init): Do not read the CRAM. We were always
	assuming VGA anyway.

2021-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	apic: Also unmask irq 3 and 4 early
	We unmasked by hand kd's irq 1, but com0/1 also need unmasking. More
	generally we should unmask irqs as appropriate.

	* i386/i386at/model_dep.c (machine_init): Unmask irq 3 and 4.

2021-04-05  Damien Zammit  <damien@zamaudio.com>

	ioapic: Fix arg passing of redirection entry
	Message-Id: <20210405115921.184572-3-damien@zamaudio.com>

	ioapic: Refactor EOI
	Message-Id: <20210405115921.184572-2-damien@zamaudio.com>

2021-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	thread_info: Fix crash when requesting for thread that never ran
	* kern/thread.c (thread_info): Set last_processor to 0 when the thread
	never ran.

2021-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	thread_info: Fix returning last_processor
	thread->last_processor is a processor_t, not a slot number.

	* kern/thread.c (thread_info): Set sched_info->last_processor to
	thread->last_processor->slot_num rather than thread->last_processor.

2021-04-05  Damien Zammit  <damien@zamaudio.com>

	ioapic: Use irq specific EOI properly when detected
	Message-Id: <20210405052916.174771-5-damien@zamaudio.com>

	Don't call EOI on spurious interrupts
	Message-Id: <20210405052916.174771-4-damien@zamaudio.com>

	ioapic: target first processor for interrupts
	Message-Id: <20210405052916.174771-3-damien@zamaudio.com>

	ioapic: Enable processor focus to BSP
	Message-Id: <20210405052916.174771-2-damien@zamaudio.com>

2021-04-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	SMP: Fix warnings

	SMP: fix getting the interrupt stack address and size
	* i386/i386at/boothdr.S (_eintstack): Add missing common.
	* i386/xen/xen_boothdr.S (_eintstack): Add missing common.
	* x86_64/xen/xen_boothdr.S (_eintstack): Add missing common.
	* i386/i386/mp_desc.c (intstack, eintstack): Add missing underscore.

2021-04-04  Damien Zammit  <damien@zamaudio.com>

	Add ioapic support disabled by default
	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-04-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pit: Add more macros
	* i386/i386/pit.h (PITAUX_VAL, PIT_C2): New macros.
	(PIT_RATEMODE): Fix macro value.

2021-03-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux: Add option to disable Linux groups
	* linux/configfrag.ac (--disable-linux-groups): New option.
	(AC_OPTION_Linux_group): Default to $enable_linux_groups.

2021-03-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr: Always share irqs
	We currently already always assume that irqs user handlers can be shared

	* device/intr.c (install_user_intr_handler): Add SA_SHIRQ to flags.

2021-03-31  Damien Zammit  <damien@zamaudio.com>

	intr: Add user interrupt handling code for non-Linux case
	* device/intr.c: Include <kern/assert.h>
	(struct intr_list): New structure.
	(user_intr_handlers): New array.
	(user_irq_handler): New function.
	(install_user_intr_handler): New function.

	Message-Id: <20210330025830.63528-2-damien@zamaudio.com>

2021-03-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Keep BIOS mapped even without Linux
	Not only Linux drivers need BIOS mapped.

	* i386/i386at/model_dep.c (i386at_init) [!LINUX_DEV]: Map the low
	memory.
	* i386/intel/pmap.c (pmap_create) [!LINUX_DEV]: Likewise.

2021-03-29  Damien Zammit  <damien@zamaudio.com>

	apic: Reorder defines

2021-03-28  Damien Zammit  <damien@zamaudio.com>

	linux irq: Avoid hardcoding the number of interrupts.
	* 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.

	pic: Move to interrupts 0x20-0x2f
	* i386/i386/pic.h (PICM_VECTBASE): Set to 0x20.
	* i386/i386at/idt.h (IDTSZ): Set to 0x20 + 0x10.
	(PIC_INT_BASE): Set to 0x20.

2021-03-28  Damien Zammit  <damien@zamaudio.com>

	Existing SMP apic code improvements
	* i386/i386/apic.c (acpi_get_irq_override): New function.
	(apic_get_ioapic): Make it return IoApicData* rather than IoApicData.
	(apic_print_info): Manage IoApicData* rather than IoApicData.
	* i386/i386/apic.h (struct ApicReg): Use uint32_t instead of unsigned.
	(struct ioapic_route_entry): New structure.
	(union ioapic_route_entry_union): New union.
	(ApicLocalUnit): Rename base to gsi_base. Add ioapic field.
	(APIC_IRQ_OVERRIDE_POLARITY_MASK, APIC_IRQ_OVERRIDE_TRIGGER_MASK): New
	macros.
	(acpi_get_irq_override, ): New prototype.
	(apic_get_ioapic): Update prototype.
	(lapic): New declaration.
	(IMCR_SELECT, IMCR_DATA, MODE_IMCR, IMCR_USE_PIC, IMCR_USE_APIC,
	LAPIC_ENABLE, LAPIC_NMI, LAPIC_DISABLE, LAPIC_TIMER_PERIODIC,
	LAPIC_TIMER_DIVIDE_2, LAPIC_TIMER_DIVIDE_4, LAPIC_TIMER_DIVIDE_8,
	LAPIC_TIMER_DIVIDE_16, LAPIC_TIMER_BASEDIV, NINTR, IOAPIC_FIXED,
	IOAPIC_PHYSICAL, IOAPIC_LOGICAL, IOAPIC_NMI, IOAPIC_EXTINT,
	IOAPIC_ACTIVE_HIGH, IOAPIC_ACTIVE_LOW, IOAPIC_EDGE_TRIGGERED,
	IOAPIC_LEVEL_TRIGGERED, IOAPIC_MASK_ENABLED, IOAPIC_MASK_DISABLED): New
	macros.
	* i386/i386at/acpi_parse_apic.h (struct acpi_apic_ioapic): Rename base
	field to gsi_base.
	* i386/i386at/acpi_parse_apic.c (acpi_apic_add_ioapic): Update to
	gsi_base new name. Set ioapic field.
	(acpi_apic_setup): Rename lapic to lapic_unit.

	Message-Id: <20210328060320.36194-5-damien@zamaudio.com>

2021-03-28  Damien Zammit  <damien@zamaudio.com>

	Don't allow writing to acpi table in memory
	* i386/i386at/acpi_parse_apic.c (acpi_get_apic): Map rsdt entries read-only.

	Message-Id: <20210328060320.36194-4-damien@zamaudio.com>

2021-03-28  Damien Zammit  <damien@zamaudio.com>

	fixup acpi base table search
	* i386/i386at/acpi_parse_apic.c (acpi_check_rsdp_align): Make it take a
	void* instead of uint32_t.
	(acpi_get_rsdp): Apply phystokv on the EBDA base and 0xE0000.
	(acpi_apic_setup): Drop spurious negation.

	Message-Id: <20210328060320.36194-3-damien@zamaudio.com>

2021-03-28  Damien Zammit  <damien@zamaudio.com>

	configure: Add block group
	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-27  Damien Zammit  <damien@zamaudio.com>

	fix EISA check in init_IRQ
	Message-Id: <20210326094850.2606-5-damien@zamaudio.com>

	clock: Let timer proceed even before we have set threads
	Message-Id: <20210326094850.2606-4-damien@zamaudio.com>

2021-02-21  Andrea G. Monaco  <andrea.monaco@autistici.org>

	ahci: Fix variable name
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Rename spd to det.

2021-02-11  Andrea G. Monaco  <andrea.monaco@autistici.org>

	i386 fpu: fix bogus check
	Avoid panicing on all CPUs that do not support xsaves.

	* i386/i386/fpu.c (init_fpu): Panic on CPUs that do not support xsaves
	only if the cpu-reported xsave size is smaller than expected.

2021-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Default MIG to mig when not found.
	bash: no: command not found

	seems to be confusing for users. Revert to setting back to mig, but
	after printing the warning.

	* configure.ac (MIG): Default to mig when not found.

2021-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Warn about missing mig
	* configure.ac (MIG): Do not default to mig, and warn when this is
	missing. Advertise the MIG variable.

2021-02-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Advise to simply use a cross-toolchain
	* README: Advise to use i686-linux-gnu-* tools.

2021-02-03  Andrea G. Monaco  <andrea.monaco@autistici.org>

	com: Fix bogus NCOM test
	* i386/i386at/com.c (comprobe_general): Reject unit being equal to NCOM.

2021-01-20  Guy-Fleury Iteriteka  <gfleury@disroot.org>

	doc: Add a missing field for 'struct thread_sched_info'.
	* doc/mach.texi(struct thread_sched_info): Add 'int last_processor' item.
	Message-Id: <20210120185809.2429-1-gfleury@disroot.org>

2021-01-09  guy fleury iteriteka  <gfleury@disroot.org>

	add a missing include header guard.
	* i386/i386at/comreg.h: Add header guard angaist multiple inclusion.
	Message-Id: <20210109180149.11861-1-gfleury@disroot.org>

2021-01-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: Avoid linking gaps for vm_copy_t
	This does not make sense, and produces incorrect results (since
	vme_end is 0, etc.)

	* vm/vm_map.h (_vm_map_clip_start, _vm_map_clip_end): Add link_gap
	parameter.

	* vm/vm_map.c (_vm_map_entry_link): Add link_gap parameter, do not call
	vm_map_gap_insert if it is 0.
	(vm_map_entry_link): Set link_gap to 1 in _vm_map_entry_link call.
	(_vm_map_clip_start): Add link_gap parameter, pass it to
	_vm_map_entry_link call..
	(vm_map_clip_start): Set link_gap_to 1 in _vm_map_clip_start call.

	(vm_map_copy_entry_link): Set link_gap to 0 in _vm_map_entry_link call.
	(vm_map_copy_clip_start): Set link_gap_to 0 in _vm_map_clip_start call.

	(_vm_map_entry_unlink): Add unlink_gap parameter, do not call
	vm_map_gap_remove if it is 0.
	(vm_map_entry_unlink): Set unlink_gap to 1 in _vm_map_entry_unlink call.
	(_vm_map_clip_end): Add link_gap parameter, pass it to
	_vm_map_entry_link call..
	(vm_map_clip_end): Set link_gap_to 1 in _vm_map_clip_end call.

	(vm_map_copy_entry_unlink): Set unlink_gap to 0 in _vm_map_entry_unlink call.
	(vm_map_copy_clip_end): Set link_gap_to 0 in _vm_map_clip_end call.

	* vm/vm_kern.c (projected_buffer_deallocate): set link_gap to 1 in
	_vm_map_clip_start and _vm_map_clip_end calls.

2021-01-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: print warning when max_size gets smaller than size
	* vm/vm_map.c (vm_map_find_entry_anywhere): Print warning when max_size
	gets smaller than size.

2020-12-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix _Static_assert call
	Before C2X, _Static_assert requires a second parameter

	Reported by Andrea G. Monaco <andrea.monaco@autistici.org>

	* i386/i386/fpu.c: Add second parameter to _Static_assert calls.

2020-12-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: Fix taking into account high bits in mask
	glibc's sysdeps/mach/hurd/dl-sysdep.c has been wanting to use this for
	decades.

	* include/string.h (ffs): New declaration.
	* vm/vm_map.c: Include <string.h>.
	(vm_map_find_entry_anywhere): Separate out high bits from mask, to
	compute the maximum offset instead of map->max_offset.
	* doc/mach.texi (vm_map): Update documentation accordingly.

2020-12-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386at: Really disable com and lpr above NCOM and NLPR
	commmodem and lprinfo arrays would otherwise overflow.

	* i386/i386at/com.c (comattach): Return early when unit is beyond NCOM.
	* i386/i386at/lpr.c (lprattach): Return early when unit is beyond NLPR.

2020-12-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Note that we should support PCID

2020-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Move fp_reg.h static assertions to .c file
	Since fp_reg.h is installed on the system, and compilers may not even
	support _Static_assert.

	* i386/include/mach/i386/fp_reg.h: Move _Static_assert to...
	* i386/i386/fpu.c: ... c file.

2020-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gsync: Use vm_address_t instead of vm_offset_t
	vm_offset_t are offsets inside memory objects, not actual addresses.

	* include/mach/gnumach.defs (gsync_wait, gsync_wake, gsync_requeue): Use
	vm_address_t instead of vm_offset_t.

2020-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Keep fp_regs.h standalone
	We cannot include stdint.h in fp_regs.h since this is included by
	mach_types.h for bootstrapping, before we have stdint.h from glibc.

	* i386/include/mach/i386/fp_reg.h: Do not include <stdint.h>
	(XSAVE_XCOMP_BV_COMPACT, struct i386_xfp_xstate_header): Use unsigned
	long long instead of uint64_t.

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Get default state from the CPU itself
	It seems that at least qemu does not like our initial state. We can as
	well just take it from fninit.

	* i386/i386/fpu.c (MXCSR_DEFAULT, CWD_DEFAULT): Remove macros.
	(fpu_module_init): Get default state from CPU.
	(fpinit): Do not call fninit.

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Make sure we allocate as much as our structure should hold
	* i386/i386/fpu.c (init_fpu): Panic if the CPU gives us a size that is
	smaller than it should.

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: clear exceptions etc. on fpinit
	fpu_rstor is not enough, exceptions and such remain behind, so restore
	calling fninit.

	* i386/i386/fpu.c (fpinit): call fninit() before fpu_rstor().

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Fix initial control word
	The value in fp_state_alloc was actually an oldie, the value in fpinit
	was the expected one nowadays.

	* i386/i386/fpu.c (CWD_DEFAULT): Set to 0x37f.

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Fix initialization of new threads
	fninit does not clear MMX/SSE/AVX registers, so we have to use rstor to
	clear them when starting a new thread. Along the way, we can as well
	just have a default state to be loaded in each new thread.

	* i386/include/mach/i386/fp_reg.h (XSAVE_XCOMP_BV_COMPACT): New macro.
	* i386/i386/fpu.h (fp_default_state): New variable declaration.
	* i386/i386/fpu.c (fp_default_state): New variable.
	(MXCSR_DEFAULT, CWD_DEFAULT): New macros.
	(fpu_module_init): Allocate and initialize fp_default_state.
	(fpinit): rstor from fp_default_state instead of setting FPU state by
	hand.
	(fp_load): Copy initial state from fp_default_state instead of setting
	it to 0. This is more future-proof since this is the exact state that we are
	loading in fpinit.
	(fp_state_alloc): fp_state_alloc: Copy initial state from
	fp_default_state.

2020-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Factorize fpu save/restore
	* i386/i386/fpu.h (fpu_save, fpu_rstor): New macros.
	(fpu_save_context): Use fpu_save macro.
	* i386/i386/fpu.c (fp_save): Use fpu_save macro.
	(fp_load): Use fpu_rstor macro.

2020-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Drop XSAVE support limitation
	Now that XSAVEOPT is supported, we are fine with supporting large FPU
	state.

	* i386/i386/fpu.c (init_fpu): Do not limit fp_xsave_support to
	CPU_XCR0_SUPPORTED.
	* i386/i386/fpu.h (CPU_XCR0_SUPPORTED): Remove macro.

2020-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86: Add XSAVEOPT, XSAVEC, XSAVES support
	* i386/i386/fpu.h (CPU_FEATURE_XSAVEOPT, CPU_FEATURE_XSAVEC,
	CPU_FEATURE_XGETBV1, CPU_FEATURE_XSAVES): New macros.
	(xsaveopt, xsavec, xsaves, xrstors): New macros.
	(fpu_save_context): Use xsaveopt, xsavec, or xsaves when available.
	(fp_save_kind): New enum.
	(fp_save_kind): New variable declaration.
	* i386/i386/fpu.c (fp_save_kind): New variable.
	(init_fpu): Set fp_save_kind according to enumeration. When XSAVES is
	supported, use xsave area size from corresponding enumeration.
	(fp_save): Use xsaveopt, xsavec, xsaves when available.
	(fp_load): Use xrstors when available.

	x86: Extend XSAVE support to unbound state
	* i386/i386/fpu.c (fp_xsave_size): New variable.
	(init_fpu): Save XSAVE size to fp_xsave_size.
	(fpu_module_init): Pass fp_xsave_size as size to kmem_cache_init.
	(fpu_set_state, fp_load, fp_state_alloc): Use fp_xsave_size to clear
	ifps.
	* i386/include/mach/i386/fp_reg.h (struct i386_xfp_save): Replace static
	fp_yreg_word with extended field.
	* i386/i386/thread.h (struct i386_fpsave_state): Make fp_valid field
	first in the structure to let the extended finish the structure.

	x86: Add XSAVE support
	* 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-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fpu: Rename FP_387X to FP_387FX
	To leave FP_387X for XSAVE-supporting CPU (as opposed to
	FXSAVE-supporting CPU)

	* i386/include/mach/i386/fp_reg.h (FP_387X): Rename to FP_387FX.
	(FP_387X): New macro.
	* i386/i386/fpu.c (init_fpu, fpu_set_state, fpu_get_state, fpexterrflt,
	fpastintr, fp_save, fp_load, fp_state_alloc): Update accordingly.
	* i386/i386/fpu.h (fpu_save_context): Likewise.

2020-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	fp_reg: update to latest SSE supported by FXSAVE
	* i386/include/mach/i386/fp_reg.h (struct i386_xfp_save): Extend
	fp_xreg_word to 16 registers.
	(sizeof(struct i386_xfp_save)): Assert that it is equal to 512.

	x86: Pave the way for xsave/xrstor support
	* i386/i386/fpu.h (xgetbv, get_xcr0, xsetbv, set_xcr0): New inline
	functions.
	(xsave, xrstor): New macros.
	* i386/i386/locore.S (cpu_features): Extend to two words.
	(cpu_features_edx, cpu_features_ecx): New labels.
	(discover_x86_cpu_type): Also save ecx cpuid(1) report.
	* x86_64/locore.S: Likewise.
	* i386/i386/locore.h (cpu_features): Extend to two words.
	(CPU_FEATURE_XSAVE): New macro.
	* i386/i386/proc_reg.h (CR4_OSXSAVE): New macro.

	x86: allow using 8bit constants in in/out instructions
	* i386/i386/pio.h (inl, inw, inb, outl, outw, outb): Add N constraint
	alternative on port.
	(outl): Cast data to unsigned int.

2020-11-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable com3 and com4
	We do not support shared IRQs for these, so avoid boot issues when
	running on a system with more than 2 com ports.

	* i386/configfrag.ac (ncom) [at:i?86]: Set to 2.
	* x86_64/configfrag.ac (ncom) [at:x86_64]: Set to 2.

2020-11-22  guy fleury iteriteka  <gfleury@disroot.org>

	fix missing include header guard.
	* i386/i386/pit.h: Add header guard angaist multiple inclusion.
	Message-Id: <20201122074155.4883-1-gfleury@disroot.org>

2020-11-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	genhd: Fix building without IDE drivers
	* linux/dev/drivers/block/genhd.c [!CONFIG_BLK_DEV_IDE] (device_setup):
	Do not call ide_setup.

2020-11-08  Masanori Ogino  <masanori.ogino@gmail.com>

	i386 pmap: Omit pmap workaround on i486 or later.
	As described in XXX comments, the workaround for memory mapping is
	implemented for 80386 and it is unnecessary on i486 or later.  Thus, it
	is safe to omit that if the kernel is built for the recent (1989~)
	processors.

	Fuhito Inagawa pointed out the problem to me.

	* i386/i386/trap.c (kernel_trap): Disable the workaround when the kernel
	is built for i[456]86.
	* i386/intel/pmap.c (pmap_protect, pmap_enter): Ditto.
	* i386/intel/read_fault.c: Define intel_read_fault if and only if it is
	necessary.

2020-11-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Fix warning
	* i386/intel/pmap.c (pmap_enter): Fix debugging print format.

2020-10-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	elf-load: Avoid loading PIE binaries at address 0
	It seems that ld.so sometimes gets into troubles and hangs at bootstrap.

	* kern/elf-load.c (exec_load): When x.e_type == ET_DYN || x.e_type ==
	ET_REL, add 128MiB as loadbase.

2020-10-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	bootstrap: Increase STACK_SIZE
	* kern/bootstrap.c (STACK_SIZE): Set to 128KB. glibc's
	__MAX_ALLOCA_CUTOFF is 64K by default.

2020-10-07  Almudena Garcia  <liberamenso10000@gmail.com>

	Add comment about mp_desc_init call

	fix: fix kernel panic in SMP mode Add mp_desc_init() call in BSP processor, to initialize some structures needed for SMP

2020-09-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	smp: Add --enable-ncpus option and fix build
	* 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-09-19  Almudena Garcia  <liberamenso10000@gmail.com>

	model_dep.c: Add smp_init call
	if NCPUS > 1, call to smp_init to start the search and enumeration of the cpus

	*i386/i386/model_dep.c (machine_init): add smp_init() call

2020-09-19  Almudena Garcia  <liberamenso10000@gmail.com>

	smp: Add generic smp pseudoclass
	This pseudoclass generalize the initialization and access of SMP data,
	allowing expands it to other architectures. In x86, the functions calls to apic functions.

	*kern/smp.c: Source file. Implements a interface to load the SMP functions for the current architecture.
	*kern/smp.h: Header file. Add declaration for smp_data structure.
	*i386/i386/smp.c: Source file. Implements a set of functions to manage the SMP actions in i386
	*i386/i386/smp.h: Header file. Add declarations for SMP functions in i386.

2020-09-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	acpi parser: Fix build warnings

2020-09-19  Almudena Garcia  <liberamenso10000@gmail.com>

	smp: Add APIC finder and parser
	To find the processors, It's necessary to find the APIC (MADT) table
	This table is found inside ACPI tables.

	This set of functions find the MADT table, and parse it to find the APIC structures
	and register it in the kernel.

	*acpi_parse_apic.h: ACPI structures and function prototypes.
	*acpi_parse_apic.c: ACPI/APIC function definitions.

2020-09-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device_pager_setup: Add FIXME comment

2020-08-12  Almudena Garcia  <liberamenso10000@gmail.com>

	vm_kern: Add kmem_alloc_aligned_table
	This function allows to map a table in a memory page,
	using its physical address,aligning the start of the page with the start of the table

	*vm/vm_kern.c (kmem_alloc_aligned_table): New function. Returns a reference for the virtual address of the table.
	*vm/vm_kern.h (kmem_alloc_aligned_table): New prototype

2020-08-12  Almudena Garcia  <liberamenso10000@gmail.com>

	smp: Add pseudoclass to manage APIC operations
	The SMP support requires access, register and configure some APIC structures,
	like Local APIC and IOAPIC.
	This pseudoclass includes functions to register some APIC structures into the kernel,
	and access to these structures to extract some information.

	*apic.h: Header file recovered from Mach 4 source code, and updated for xAPIC.
	Includes some structs with Local APIC and IOAPIC fields,
	and the declaration of the functions.

	*apic.c: Source file. Includes the definition of the functions, within some globals
	of apic_info structures and the lapic reference.

2020-07-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device intr: Fix reference leak
	On RPC success we have to release the passed send rights, otherwise
	references accumulate and we never notice when the receiver dies.

	* device/ds_routines.c (ds_device_intr_ack): On success, call
	ipc_port_release_send on the notification receive port.

2020-07-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intr_register: better document how we'd handle crashes

2020-07-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	64bit: fix build
	* device/ds_routines.c (ds_device_intr_register, ds_device_intr_ack)
	[__x86_64__]: Disable.
	* x86_64/Makefrag.am (libkernel_a_SOURCES): Add i386/i386/irq.c and
	i386/i386/irq.h.

2020-07-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix xen build
	* device/ds_routines.c (ds_device_intr_register, ds_device_intr_ack)
	[MACH_XEN]: Return D_INVALID_OPERATION.
	* i386/Makefrag.am [!PLATFORM_at] (libkernel_a_SOURCES): Remove
	i386/i386/irq.c and i386/i386/irq.h.
	* i386/i386/irq.c: Include <kern/assert.h>.

2020-07-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add hardware interrupt notification mechanism
	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-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add vm_allocate_contiguous RPC
	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-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add experimental RPC infrastructure
	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-06-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: Allow passing the name of a memory object
	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-01  наб  <nabijaczleweli@gmail.com>

	Support GPT disklabels and build them by default
	Based on UEFI 2.8A spec

2020-05-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	kmem_alloc_wired: factorize with kmem_valloc
	* vm/vm_kern.c (kmem_alloc_wired): Factorize with kmem_valloc.

2020-05-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add kmem_valloc
	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-16  Ricardo Wurmus  <rekado@elephly.net>

	doc: Add missing word.
	* doc/mach.texi (Features): Add missing word.
	Message-Id: <20200416202143.16804-1-rekado@elephly.net>

2020-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_trap_table: Fix 64bit version
	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-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add warning about one of the next 64bit fixes to make

	ddb: Add 64bit support to memory examination
	* ddb/db_examine.c(db_examine): Add q modifier to examine 64bit values.
	* doc/mach.texi (examine): Document q modifier.

2020-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	bootstrap: Add missing reference to send port between tasks
	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-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	boot_script: Explicit missing symbol name
	* kern/boot_script.c: Include <kern/printf.h>.
	(boot_script_exec): Print missing symbol name on symbol lookup error.

	x86_64: Fix userland max address
	* i386/include/mach/i386/vm_param.h (VM_MAX_ADDRESS) [__x86_64__]: Set
	to 0x40000000UL.

2020-04-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Fix passing argument
	* kern/boot_script.c (add_arg): Make val parameter long.

	xen: Fix vm_page layout for x86_64
	* 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.

	xen: Fix rdtsc call for x86_64
	* i386/i386/xen.h (hyp_cpu_clock): Replace "=A" register constraint with
	separate "=a" and "=d".

	Xen x86_64: Fix getting page table base
	* i386/intel/pmap.c (pmap_bootstrap): Reload base from boot_info at each
	loop.

	Fix warning
	* xen/net.c (hyp_net_intr): Cast WINDOW to long.

	Fix xen build
	* xen/grant.c: Include <machine/model_dep.h> instead of <model_dep.h>.

2020-04-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: Fix boot with kvm+PAE on some systems
	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-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap.h: Fix PDPMASK in 32bit PAE
	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-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with -fno-common
	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-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: fix const warning
	* 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-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Restore vm_size_t to natural_t
	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-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	seg: Fix fill_gate offset
	* i386/i386/seg.h (fill_gate): Make offset an unsigned long.

2020-03-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix 64bit TSS/LDT system descriptors
	* 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.

	Fix gate definition for 64bit.
	* i386/i386/seg.h (real_gate): Add offset_ext and reserved fields.
	(fill_gate): Fill offset_ext and reserved fields.

	ldt: do not reload kernel LDT if we are already using it
	* i386/i386/pcb.c (switch_ktss): Do not call set_ldt(KERNEL_LDT) if
	get_ldt() is already KERNEL_LDT.

2020-03-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Share ncom, lpr, PAE definitions between i386 and x86_64
	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-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix warning
	* i386/intel/pmap.c (pmap_enter): Fix print format.

	64bit: fix warnings
	* 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-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	64bit: Fix vm_size_t size
	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-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	mach_port: Fix 64bit warnings
	* ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Cast sizeof
	to int.

	64bit: Fix segment definitions
	* 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.

	db_interface: Fix 64bit warnings
	* 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.

	com: Fix 64bit warnings
	* i386/i386at/com.c (comopen, comclose, comparam, comstart, comtimer):
	  Cast tp->t_addr to uinptr_t instead of int.

	64bit: Fix format warnings
	* i386/i386at/biosmem.c: Include <inttypes.h>
	(biosmem_map_show, biosmem_load_segment): Use PRIx64.

	x86_64: drop unused functions
	* x86_64/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions.
	(dr_msk, dr_addr): Remove variables.

2020-03-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	x86_64: Fix map address given to linker
	See VM_MIN_KERNEL_ADDRESS.

	* x86_64/Makefrag.am (gnumach_LINKFLAGS): Set _START to
	_START_MAP+0x40000000 instead of +0xC0000000.

2020-03-29  Etienne Brateau  <etienne.brateau@gmail.com>

	Enable x86_64 build for at
	* x86_64/Makefrag.am: Add instructions to build

	spl: Fix assembly files
	* x86_64/spl.S: fix instruction length

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Enable at x86_64 build
	* 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.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	at-x86_64: Enable fpu/pic/pit macros
	This must be replaced by 64bit equivalents, but let's enable them for now so
	it can build.

	* i386/i386/pic.h [ATX86_64]: Enable macros.
	* i386/i386/pit.h [ATX86_64]: Likewise.
	* i386/i386/fpu.c [ATX86_64]: Enable fpintr function.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: fix 64bit non-xen build
	* i386/intel/pmap.c (pmap_bootstrap) [!MACH_PV_PAGETABLES]: Do not call
	  pmap_set_page_readonly_init.

	kdasm: Fix 64bit build
	* x86_64/kdasm.S (count): Fix type to 32bit.
	(kd_slmscu, kd_slmscd): Fix getting count as 32bit.

	IDT: fix entries format
	* i386/i386/idt.c (idt_init_entry): Set entrypoint type to unsigned long.
	* x86_64/idt_inittab.S (IDT_ENTRY): Fix entry format accordingly.

	interrupt: Add 64bit variant
	* x86_64/interrupt.S: New file.

	kdasm: Add 64bit variant
	* i386/i386at/kdasm.S (start, count, value, from, to): Use B_ARG*
	  instead of reimplementing them.
	* x86_64/kdasm.S: New file.

	Fix low-level macros for 64bit
	* i386/i386/proc_reg.h (get_eflags, set_eflags): Add 64bit version.
	(get_dr0, set_dr0, get_dr1, set_dr1, get_dr2, set_dr2, get_dr3, set_dr3,
	get_dr6, set_dr6, get_dr7, set_dr7): Drop explicit size qualifier.

2020-03-28  Etienne Brateau  <etienne.brateau@gmail.com>

	Fix hardclock build on 64bit
	* i386/i386/hardclock.c [ATX86_64]: Include <i386/ipl.h>.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	build system: Add 64bit variant
	Only Xen platform for now.

	* Makefrag.am [HOST_x86_64]: Include x86_64/Makefrag.am.
	* configure.ac: Include x86_64/configfrag.ac.
	[default:x86_64] (host_platform): Set platform to xen.
	* x86_64/Makefrag.am, x86_64/configfrag.ac: New files.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add 64bit/32bit compatibility symlinks
	This makes inclusions easier.

	* x86_64/include/mach/x86_64, x86_64/x86_64: New symlinks.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen: Add 64bit variant
	* x86_64/xen_boothdr.S, x86_64/xen_locore.S: New files.

	spl: Add 64bit variant
	* x86_64/spl.S: New file.

	locore: Add 64bit variant
	* x86_64/locore.S: New file.

	ldscript: Add 64bit variant
	* x86_64/ldscript: New file.

	idt_inittab: Add 64bit variant
	* x86_64/idt_inittab.S: New file.

	debug_trace: Add 64bit variant
	* x86_64/debug_trace.S: New file.

	cswitch: Add 64bit variant
	* x86_64/cswitch.S: New file.

	Fix 64bit link
	* Makefile.am (clib_routines): Add __rela_iplt_start __rela_iplt_end.

	pmap.h: Add 64bit variant
	* i386/intel/pmap.h (L4SHIFT, L4MASK, lin2l4num): New macros
	(PDPNUM, PDPMASK, set_pmap): Add 64bit variant. Make PAE use the 64bit mask
	too.
	(pmap): Add l4base, user_l4base, user_pdpbase fields.
	* i386/intel/pmap.c (pmap_bootstrap): Clear the whole PDP. Enable write
	bit in PDP. Set user pagetable to NULL. Initialize l4base.
	(pmap_clear_bootstrap_pagetable): Add 4th-level support.
	(pmap_ceate): Clear the whole PDP. Enable write bit in PDP. Initialize
	l4base, user_pdpbase, user_l4base.
	(pmap_destroy): Clear l4base, user_pdpbase, user_l4base.
	* i386/i386at/model_dep.c (i386at_init): Load l4base on 64bits.

	trap.c: Add 32bit lcall 7 emulation on 64bit
	* i386/i386/trap.c: Detect lcall 7 instructions.

	bootstrap.c: Add 32-on-64bit support
	* kern/bootstrap.c (bootstrap_create): Support loading 32bit binaries on
	  64bit.

	Fix tab vs spaces

	* xen/evt.c: Add 64bit variant
	* xen/evt.c (hyp_intrinit): Fix hyp_set_callbacks for 64bit.

	syscall_sw.h: Add 64bit variant
	* kern/syscall_sw.h (mach_trap_t): Fix structure for 64bit.

	include/mach/xen.h: Add 64bit variant
	* include/mach/xen.h (PFN_LIST): Set to MACH2PHYS_VIRT_START.

	multiboot.h: Add 64bit variant
	* i386/include/mach/i386/multiboot.h (multiboot32_module): New
	  structure.

	asm.h: Add 64bit variant
	* i386/include/mach/i386/asm.h (S_ARG0, S_ARG1, S_ARG2, S_ARG3, S_ARG4,
	  S_ARG5, FRAME, EMARF, B_ARG0, B_ARG1, B_ARG2, B_ARG3, INT_FIX): Add
	  64bit variants.

	xen.h: Add 64bit variant
	* i386/i386/xen.h (_hypcall_ret, _hypcall_arg1, _hypcall_arg2,
	  _hypcall_arg3, _hypcall_arg4, _hypcall_arg5): New macros.
	  (_hypcall0, _hypcall1, _hypcall2, _hypcall3, _hypcall4, _hypcall5): Fix
	  parameters and return type.
	  (set_callbacks, update_descriptor, set_segment_base,
	  update_va_mapping, set_timer_op): Add 64bit variant.
	  (hyp_set_user_cr3): New macro.
	  (iretq): New macro.

	vm_param: Add 64bit variant
	* i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS, HYP_VIRT_START,
	  LINEAR_MIN_KERNEL_ADDRESS, LINEAR_MAX_KERNEL_ADDRESS): Add 64bit
	  variants.

	thread.h: Add 64bit variant
	* i386/i386/thread.h (i386_saved_state, i386_kernel_state,
	  i386_interrupt_state): Add 64bit registers.

	setjmp: Add 64bit variant
	* x86_64/_setjmp.S: New file
	* i386/i386/setjmp.h (jmp_buf): Add 64bit variant.

	i386asm.sym: Add 64bit variant
	* i386/i386/i386asm.sym (KSS_ESI, KSS_EDI): Remove.
	(KSS_R12, KSS_R13, KSS_R14, KSS_R15, r15): Add.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gdt: 64bit Variant
	There is no segmentation in 64bit mode.

	* i386/i386/gdt.c (gdt_init): Do not load segments on 64bit.

2020-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	db_trace: Add 64bit variant
	* i386/i386/db_trace.c (i386_kregs): On 64bit, remove edi and esi, and
	  add r12, r13, r14, r15.

	db_interface: Add 64bit variant
	* i386/i386/db_interface.c (int_regs): Drop edi/esi fields on 64bit.
	(kdb_kentry): Fix saving rsi/rdi.

	cpu_number: Add 64bit variant
	* i386/i386/cpu_number.h (CX): Add 64bit variant.

2020-03-28  Etienne Brateau  <etienne.brateau@gmail.com>

	Fix inl result size
	* i386/i386/pio.h (inl): Make result unsigned int instead of unsigned
	long.

2020-03-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_object_copy_call: Make sure vm_object_enter succeeds
	Suggested by guy fleury iteriteka <gfleury@disroot.org>

	* vm/vm_object.c (ipc/mavm_object_copy_call): Make sure vm_object_enter call
	succeeds.

2020-03-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Set readtodc parameter 64bit
	In order to fix year 2038 limit.

	* i386/i386at/rtc.h (readtodc): Make tp parameter uint64_t *.
	* i386/i386at/rtc.c (readtodc): Likewise.
	* xen/time.c (readtodc): Likewise.
	* i386/i386at/model_dep.c (inittodr): Pass uint64_t pointer to readtodc.

2020-01-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Set time_t type to 64bit
	In order to fix year 2038 limit in RTC driver

	* include/sys/types.h (time_t): Bump type to 64bit.
	* Makefile.am (clib_routines): Also allow __moddi3.

2020-01-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	doc: Fix mapped-time example
	One needs to use memory barriers to be sure to be reading values in the
	proper order.

	* doc/mach.texi (Host Time): Add __sync_synchronize() in mapped-time
	example.

2020-01-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Cope with machine_info.memory_size overflow
	* kern/startup.c (setup_main): When memory size overflows
	machine_info.memory_size, set to maximum size.

2019-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	i386: use 64bit precision by default
	This is the System V ABI default.

	* i386/i386/fpu.c (fpinit): Use FPC_PC_64 instead of FPC_PC_53.
	(fp_state_alloc): Likewise.

2019-11-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	irq: Add disabling counter
	* 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-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	PIC: Acknowledge interrupts more carefully
	Specs seems to be saying that we should mask an irq out while
	acknowledging it with EOI. Also, better acknowledge only the concerned
	irq.

	* i386/i386at/interrupt.S (interrupt): Mask irq before notifying EOI.
	Using specific EOI instead of unspecific EOI.

2019-11-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	PIC: fix EOI values
	* i386/i386/pic.h (SPECIFIC_EOI, ROT_NON_SPEC, SET_ROT_AEOI,
	ROT_SPEC_EOI, SET_PRIORITY, NO_OPERATION): Shift value left by one bit.

2019-11-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	intnull: Only warn once.
	On real hardware, irq 7 seems to get raised often for some reason.

	* i386/i386/pic.c (intnull): Only print once the warning about interrupt
	being unexpectedly raised.

2019-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	spl: Remove intpri array
	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-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make default boot less scary
	* 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.

	Fix build warning
	* ddb/db_command.c: Include <ipc/mach_port.h>.

	Run interrupt handlers at spl7
	* i386/i386at/interrupt.S (interrupt): Call spl7 instead of the
	intpri-provided one.

2019-11-10  Damien Zammit  <damien@zamaudio.com>

	simplify interrupt handling
	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-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ide: Use default IRQ by default
	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-11-10  Damien Zammit  <damien@zamaudio.com>

	spl: Squash levels 1-6 into level 7
	* i386/i386/spl.S (SETIPL): Remove macro.
	(splsoftclock, spl1, spl2, spl3, splnet, splhdw, spl4, splbio, spldcm,
	spl5, spltty, splimp, splvm, spl6): Move entries to the spl7 entry.

2019-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pmap: fix format warnings
	* i386/intel/pmap.c (pmap_bootstrap, pmap_set_page_readwrite,
	pmap_set_page_readonly, pmap_set_page_readonly_init,
	pmap_clear_bootstrap_pagetable, pmap_map_mfn, pmap_destroy, pmap_enter,
	pmap_collect, phys_attribute_clear): Fix format warnings.

2019-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Xen: fix boot
	Xen seems to want a whole page for the PAE pdp.

	* i386/intel/pmap.c (pmap_init): Make pdpt cache use page-size
	allocation.

2019-11-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	sched: cause ast on master processor too
	Nowadays' processors are way fast enough to handle everything fine.

	* kern/sched_prim.c (thread_setrun): Do not check against target
	processor being master.

2019-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	pit: fix build
	* i386/i386/pit.c: Include <kern/cpu_number.h>

	pit: avoid initializating several times
	i386/i386/pit.c (clkstart): Do not initialize PIT if cpu_number() is not 0.

2019-10-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop spurious change
	* version.m4: Remove spurious git tag qualifier.

2019-10-27  Almudena Garcia  <liberamenso10000@gmail.com>

	patch: add last_processor to thread info structures
	* include/mach/thread_info.h (thread info structures): Add new member
	"last_processor" in thread_sched_info.
	* kern/thread.c (thread management): Fill new member "last_processor" in
	thread_info() function.

2019-10-24  Luca Weiss  <luca@z3ntu.xyz>

	Fix build with texinfo 6.7
	doc/mach.texi: Specify document encoding as ISO-8859-1.

2019-09-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	compiler-gcc*.h: Keep on the gcc 5 version for now
	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-31  guy fleury iteriteka  <gfleury@disroot.org>

	satisfy 'werror=parantheses'.
	* vm/vm_map.c(vm_map_msync): explit group of first condition.

	Fix the pointer comparison of different type.
	* vm/vm_map.c(vm_map_fork): use VM_MAP_NULL instead of PMAP_NULL when compare
	  with new_map.

2019-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add gcc-9 compatibility
	    * linux/src/include/linux/compiler-gcc9.h: New file.

2019-08-30  guy fleury iteriteka  <gfleury@disroot.org>

	fix return KERN_INVALID_ARGUMENT when the map is NULL.
	* vm/vm_map.c(vm_map_msync): Add missing return keyword.

2019-08-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix format
	* ipc/mach_port.c (mach_port_mod_refs): Fix passing string size.

	Fix format
	* kern/task.c (task_create_kernel): Fix passing string size.

	Fix allocation test
	* vm/vm_map.c (vm_map_fork): Check for `new_map` being non-NULL, and not
	for `new_pmap` a second time.

	Fix printk format
	* linux/dev/drivers/block/ahci.c (ahci_identify, ahci_probe_port): Fix
	format.

	Fix printf format
	* ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Fix format.

	Fix uninitialized value
	* kern/gsync.c (temp_mapping): Initialize start address to
	VM_MIN_KERNEL_ADDRESS.

2019-04-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid calling biosmem with size 0
	* i386/i386at/model_dep.c (register_boot_data): Register reserved
	biosmem areas only when they have a non-zero size.

	Avoid calling biosmem with size 0
	* i386/configfrag.ac (register_boot_data): Process modules only when
	their count is non-zero.
	(i386at_init): Likewise.

2019-04-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ahci: Ignore multifunction bit in PCI header type
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Clear bit 7 of
	hdrtype.

2018-12-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Move -D__ASSEMBLY__ to general AM_CCASFLAGS
	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-12-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	io_perm: Rename macro to better name
	* i386/i386/io_perm.c (IS_IN_PROTECTED_RANGE): Rename to
	CONTAINS_PCI_CFG.

2018-12-05  Damien Zammit  <damien@zamaudio.com>

	Restrict access to PCI cfg io ports to one process
	* i386/i386/io_perm.c (PCI_CFG1_START, PCI_CFG1_END, PCI_CFG2_START,
	PCI_CFG2_END, IS_IN_PROTECTED_RANGE): New macros.
	(taken_pci_cfg): New variable.
	(io_perm_deallocate): New function.
	(i386_io_perm_create): Return KERN_PROTECTION_FAILURE if requested port
	range contains PCI config registers and that is already taken. Set
	taken_pci_cfg to true when taking them.
	* i386/i386/io_perm.h (io_perm_deallocate): New declaration.
	* i386/include/mach/i386/mach_i386.defs (io_perm_t): Add
	io_perm_deallocate destructor.

2018-11-26  Kalle Olavi Niemitalo  <kon@iki.fi>

	Add GPLv3 license text
	To help people satisfy the license when they convey clones
	of the gnumach Git repository, in which gitlog-to-changelog
	and some deleted files are licensed under GPLv3-or-later.

	A normal build does not use the GPLv3-or-later files.  "make dist"
	runs gitlog-to-changelog but does not copy it to gnumach-*.tar.

	Bug: https://savannah.gnu.org/bugs/?49024

2018-11-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix interactivity of inactive threads
	A new thread will mosty probably start working, assume it will take
	its share of CPU, to avoid having to find it out slowly.  Decaying will
	however fix that quickly if it actually does not work.

	This fixes stalling issues when a program keeps creating threads.

	* kern/thread.c (thread_create): Set new_thread's cpu_usage and
	sched_usage to a fair share of the current load.

2018-11-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix task and thread collection frequency
	sched_tick is incremented only once per second, not once per tick.

	* kern/task.c (consider_task_collect): Divide task_collect_max_rate by
	(hz / 1) to get a number of scheduler ticks.
	* kern/thread.c (consider_thread_collect): Divide thread_collect_max_rate by
	(hz / 1) to get a number of scheduler ticks.

2018-11-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop SIMPLE_CLOCK support
	This wasn't building and is not useful with nowaday's hardware.

	* configfrag.ac (SIMPLE_CLOCK): Do not define.
	* kern/sched.h [SIMPLE_CLOCK] (sched_usec): Remove variable declaration.
	* kern/sched_prim.c [SIMPLE_CLOCK] (sched_usec): Remove variable.
	[SIMPLE_CLOCK] (sched_init): Do not initialize sched_usec variable.
	[SIMPLE_CLOCK] (recompute_priorities): Do not tinker sched_usec
	variable.
	* kern/thread.c [SIMPLE_CLOCK] (thread_info): Do not ajust for clock
	drift.

2018-11-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make scheduling more reactive
	Give smaller quantums to processes, to get more frequent context
	switches. This fixes some reactivity for concurrent processes.

	* kern/sched.h (MIN_QUANTUM): Define to hz / 33.
	* kern/sched_prim.c (sched_init): Use MIN_QUANTUM instead of hz / 10.

2018-11-06  Guillem Jover  <guillem@hadrons.org>

	build: Distribute tarball compressed with xz instead of bzip2
	* configure.ac (AM_INIT_AUTOMAKE): Change dist-bzip2 to dist-xz.

2018-11-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix using all dynamic priorities
	6a2342010811 ("Increase number of priorities") increased NRQS but didn't
	increase PRI_SHIFT to extend the use of the additional queues by the
	scheduler.  This does it.  While at it, extend to NRQS to 64, the double
	of the original 32, to keep all values coherent.

	* i386/i386/sched_param.h (PRI_SHIFT): Set from 18 to 17.
	* kern/sched.h (PRI_SHIFT):  Set from 18 to 17.
	(NRQS): Set to 64.

2018-11-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing patch file
	* Makefile.am (EXTRA_DIST): Add Makefile.in.dep.patch.

	Add vm_object_sync support
	* include/mach/vm_sync.h: New file.
	* include/mach/mach_types.h: Include <mach/vm_sync.h>
	* Makefrag.am (include_mach_HEADERS): Add include/mach/vm_sync.h.
	* include/mach/mach_types.defs (vm_sync_t): Add type.
	* include/mach/gnumach.defs (vm_object_sync, vm_msync): Add RPCs.
	* vm/vm_map.h: Include <mach/vm_sync.h>.
	(vm_map_msync): New declaration.
	* vm/vm_map.c (vm_map_msync): New function.
	* vm/vm_user.c: Include <mach/vm_sync.h> and <kern/mach.server.h>.
	(vm_object_sync, vm_msync): New functions.

	Fix typo

2018-08-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop spurious changes

	Fix building out of source
	* configure.ac: Fix patching Makefile.in in $srcdir.

	Fix bootstrap hack for automake 1.16
	* Makefile.in.dep.patch: New file.
	* configure.ac: Try to apply Makefile.in.dep.patch if
	config.status.dep.patch failed to apply.

2018-07-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	device: Fix d_mmap type
	* device/conf.h (dev_ops): Make d_mmap return vm_offset_t instead of
	int.
	(nomap): Update accordingly.
	* device/blkio.c (block_io_mmap): Likewise.
	* device/blkio.h (block_io_mmap): Likewise.
	* device/dev_name.c (nomap): Likewise.
	* i386/i386at/kd.c (kdmmap): Likewise.
	* i386/i386at/kd.h (kdmmap): Likewise.
	* i386/i386at/mem.c (memmmap): Likewise.
	* i386/i386at/mem.h (memmmap): Likewise.
	* i386/i386at/model_dep.c (timemmap): Likewise.
	* i386/i386at/model_dep.h (timemmap): Likewise.

2018-07-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix dev_ops types
	* device/conf.h: Include <device/device_types.h>.
	(dev_ops): Make d_getstat and d_setstat fields use dev_flavor_t,
	dev_status_t, and mach_msg_type_number_t types.
	* device/tty.h: (t_getstat, t_setstat): Likewise.

	* device/conf.h (nulldev_getstat, nulldev_setstat): Fix parameter types
	accordingly.
	* device/dev_name.c (nulldev_getstat, nulldev_setstat): Likewise.
	* device/kmsg.c (kmsggetstat): Likewise.
	* device/kmsg.h (kmsggetstat): Likewise.
	* device/net_io.c (net_getstat): Likewise.
	* device/net_io.h (net_getstat): Likewise.
	* i386/i386at/com.c (comgetstat, comsetstat): Likewise.
	* i386/i386at/com.h (comgetstat, comsetstat): Likewise.
	* i386/i386at/kd.c (kdgetstat, kdsetstat): Likewise.
	* i386/i386at/kd.h (kdgetstat, kdsetstat): Likewise.
	* i386/i386at/kd_event.c (kbdgetstat, kbdsetstat): Likewise.
	* i386/i386at/kd_event.h (kbdgetstat, kbdsetstat): Likewise.
	* i386/i386at/kd_mouse.c (mousegetstat): Likewise.
	* i386/i386at/kd_mouse.h (mousegetstat): Likewise.
	* i386/i386at/lpr.c (lprgetstat, lprsetstat): Likewise.
	* i386/i386at/lpr.h (lprgetstat, lprsetstat): Likewise.
	* xen/console.c (hypcngetstat, hypcnsetstat): Likewise.
	* xen/console.h (hypcngetstat, hypcnsetstat): Likewise.

	* device/dev_hdr.h: Forward-declare struct dev_ops and dev_ops_t type
	instead of including <device/conf.h>.
	* device/dev_pager.c: Include <device/conf.h>
	* i386/i386/pcb.h: Include <machine/io_perm.h>
	* i386/i386/thread.h: Do not include <i386/tss.h>

2018-07-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix warning
	* i386/intel/pmap.c (pmap_enter): Fix panic format.

	Add gcc-8 compatibility
	* linux/src/include/linux/compiler-gcc8.h: New file.

2018-07-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add ffs to clib_routines
	Since pmap.c uses it in SMP mode.

	* Makefile.am (clib_routines): Add ffs.

2018-06-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix interrupt_processor prototype
	* i386/i386/mp_desc.h [MULTIPROCESSOR] (interrupt_processor): Add
	prototype.
	* i386/intel/pmap.c [NCPUS > 1]: Include <i386/mp_desc.h>

	Add missing include
	* i386/intel/pmap.c: Include <i386/spl.h>.

	Fix pmap name
	* i386/intel/pmap.c (pmap_map_bd): Lock kernel_pmap, not just the
	inexistent pmap.

	Add splvm prototype
	* i386/i386/spl.h (splvm): Add prototype.

2018-06-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add cause_ast_check prototype
	As reported by Almudena Garcia <liberamenso10000@gmail.com>

	* kern/ast.h [NCPUS > 1] (cause_ast_check): Add prototype.

2018-06-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Define CPU_L1_SIZE even when NCPUS != 1
	As reported by Almudena Garcia <liberamenso10000@gmail.com>

	* kern/cpu_number.h [NCPUS != 1] (CPU_L1_SIZE): Define macro.

2018-06-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable position-independant compilation
	as now enabled automatically by some distributions...

	Reported and tested by Almudena Garcia <liberamenso10000@gmail.com>

	* Makefile.am (AM_CFLAGS): Add -no-pie -fno-pic.

2018-06-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing prototype
	* kern/machine.h (action_thread): Add prototype.

	Re-fix typo
	* machine/lock.h (_simple_lock_xchg_): Remove spurious parenthesis.

	Fix typo
	* machine/lock.h (_simple_lock_xchg_): Add missing parenthesis.

2018-06-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Keep DMA enabled on QEMU disks
	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.

2018-04-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	vm_map: Fix bugs on huge masks parameters
	* vm/vm_map.c (vm_map_find_entry_anywhere): Also check that (min + mask) &
	~mask remains bigger than min.

2018-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid old type
	* include/device/bpf.h: Do not include <sys/types.h>
	(struct bpf_version): Use unsigned short type instead of u_short.

2018-01-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add const MIG types
	* i386/include/mach/i386/mach_i386_types.h (const_descriptor_list_t):
	New type.
	* include/mach/port.h (const_mach_port_array_t): New type.

	Fix warning
	* i386/i386at/lpr.c (lpropen): Cast io port to void *.

	Fix warning
	* vm/vm_map.c (vm_map_copyout): Fix panic format.

	Fix warning
	* kern/sched_prim.c (assert_wait): Fix panic format.

	Fix warning
	* kern/ast.c (ast_check): Fix panic format.

2017-11-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix halt message
	* i386/i386at/model_dep.c (halt_all_cpus): Change halt message to better
	explain what happened.

2017-11-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux block: fix outbound access to non-directmap user data
	* linux/dev/glue/block.c (rdwr_full): Set BH_Bounce if the physical
	address of the user data is not in directmap.

2017-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	linux-block: Fix calling vm_map_copy_discard on uninitialized variable
	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-27  Justus Winter  <teythoon@avior.uberspace.de>

	Fix commit 10ebf9565f69760e46a8f271e22c5367d54e10ff.
	* kern/task.c (task_ledger_acquire): Remove function that I added by
	accident.
	(task_ledger_release): Likewise.

2017-10-26  Justus Winter  <teythoon@avior.uberspace.de>

	kern: Fix new task notifications.
	* kern/task.c (task_create_kernel): Handle NULL parent tasks.

2017-10-26  Justus Winter  <teythoon@avior.uberspace.de>

	kern: Fix crash.
	Check receiver in task_create.  Fixes a crash when sending that
	message to a non-task port.

	* kern/bootstrap.c (boot_script_task_create): Use the new function.
	* kern/task.c (task_create): Rename to task_create_internal, create a
	new function in its place that checks the receiver first.
	* kern/task.h (task_create_internal): New prototype.

2017-10-26  Justus Winter  <teythoon@avior.uberspace.de>

	linux: Fix warnings.
	* linux/dev/glue/net.c (device_write): Remove unused variables.

2017-10-23  Justus Winter  <justus@gnupg.org>

	Drop the register qualifier.
	* i386/intel/pmap.c: Drop the register qualifier.
	* ipc/ipc_kmsg.h: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/profile.c: Likewise.
	* kern/thread.c: Likewise.
	* vm/vm_object.c: Likewise.

2017-09-30  Justus Winter  <justus@gnupg.org>

	linux: Fix interrupt glue.
	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-09-21  Justus Winter  <justus@gnupg.org>

	device: Remove unused file.
	* device/dev_forward.defs: Remove unused file.

	vm: Remove old memory manager remnants.
	* vm/vm_object.c (vm_object_accept_old_init_protocol): Remove.
	(vm_object_enter): Adapt.

2017-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ddb: More gracefully handle address errors
	* i386/i386/db_interface.h (db_read_bytes): Return boolean_t instead of
	void.
	* i386/i386/db_interface.c (db_user_to_kernel_address): Return -1
	instead of calling db_error() if address is bogus.
	(db_read_bytes): Return FALSE instead of calling db_error() if address
	is bogus.
	* ddb/db_access.c (db_get_task_value): Return 0 if db_read_bytes failed.
	* ddb/db_examine.c (db_xcdump): Only print * if db_read_bytes failed.

2017-08-14  Justus Winter  <justus@gnupg.org>

	i386: Fix pmap_remove on PAE kernels.
	* i386/intel/pmap.c (pmap_remove): Fix iteration over page directory.
	(pmap_enter): Explain why it is ok here.

	vm: Improve error handling.
	* vm/vm_map.c (vm_map_create): Gracefully handle resource exhaustion.
	(vm_map_fork): Likewise at the callsite.

	Fix typo.

2017-08-12  Justus Winter  <justus@gnupg.org>

	ddb: Add magic variable $mapXX.
	Maps '$mapXX' to a VM map structure address.  @var{xx} is a task
	identification number printed by a @code{show all tasks} command.

	* ddb/db_task_thread.c (db_get_map): New function.
	* ddb/db_task_thread.h (db_get_map): New declaration.
	* ddb/db_variables.c (db_vars): Add new variable.
	* doc/mach.texi: Document this.

2017-08-12  Justus Winter  <justus@gnupg.org>

	vm: Mute paging error message.
	* vm/vm_fault.c (vm_fault_page): Mute paging error message if the
	objects pager is NULL.  This happens when a pager is destroyed,
	e.g. at system shutdown time when the root filesystem terminates.

2017-08-05  Justus Winter  <justus@gnupg.org>

	ddb: debug traps and port references
	* ddb/db_command.c (db_debug_all_traps_cmd): New declaration and
	function.
	(db_debug_port_references_cmd): Likewise.
	* doc/mach.texi: Describe new commands.
	* i386/i386/db_interface.h (db_debug_all_traps): New declaration.
	* i386/i386/trap.c (db_debug_all_traps): New function.
	* ipc/mach_port.c (db_debug_port_references): New function.
	* ipc/mach_port.h (db_debug_port_references): New declaration.

	ddb: Print scheduling information.
	* ddb/db_print.c (OPTION_SCHED): New macro.
	(db_print_thread): Display scheduling information if the flag is
	given.
	(db_print_task): Adapt.
	(db_show_all_threads): Parse new modifier.
	(db_show_one_thread): Likewise.
	* doc/mach.texi: Document the new flag.

	doc: Document 'show all tasks'.

	kern: Fix reporting the minimum quantum used for scheduling.
	* kern/host.c (host_info): Scale 'min_quantum' by 'tick', then convert
	to milliseconds.

	Steal '__divdi3'.
	* Makefile.am (clib_routines): Steal '__divdi3' from the gcc runtime.

	i386: Make function static.
	* i386/intel/pmap.c (pmap_remove_range): Make function static.
	* i386/intel/pmap.h (pmap_remove_range): Remove declaration.

2017-06-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix year computation
	* i386/i386at/rtc.c (readtodc): Do not spuriously add 70 to the year.

	Fix Epoch computation
	* i386/i386at/rtc.c (CENTURY_START): New macro.
	(readtodc): Use CENTURY_START instead of assuming it is equal to 1970,
	and set yr to an absolute date before calling yeartoday.

2017-05-07  David Michael  <fedora.dm0@gmail.com>

	Support GCC 7
	* Makefile.am (clib_routines): Add __udivmoddi4.
	* linux/src/include/linux/compiler-gcc7.h: New file.

2017-05-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2017-03-18  Justus Winter  <justus@gnupg.org>

	kern: Make kernel task available to bootscript.
	* kern/bootstrap.c (bootstrap_create): Insert the variable
	'kernel-task' into the bootscript environment.  Userspace can use this
	instead of guessing based on the order of the first tasks.

2017-03-04  Agustina Arzille  <avarzille@riseup.net>

	Rewrite gsync so that it works with remote tasks v2

	Implement basic sleeping locks for gnumach
	* kern/atomic.h: New file.
	* kern/kmutex.h: New file.
	* kern/kmutex.c: New file.
	* Makefrag.am (libkernel_a_SOURCES): Add atomic.h, kmutex.h, kmutex.c.
	* kern/sched_prim.h (thread_wakeup_prim): Make it return boolean_t.
	* kern/sched_prim.c (thread_wakeup_prim): Return TRUE if we woke a
	thread, and FALSE otherwise.

2017-01-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix bissextile years computation
	In practice, fixes 2100, 2200, 2300, 2500, 2600, 2700, etc.

	* i386/i386at/rtc.c (yeartoday): Make years divisible by 100 but not
	divisible by 400 non-bisextile.

2016-12-27  Richard Braun  <rbraun@sceen.net>

	VM: really fix pageout of external objects backed by the default pager
	Commit eb07428ffb0009085fcd01dd1b79d9953af8e0ad does fix pageout of
	external objects backed by the default pager, but the way it's done
	has a vicious side effect: because they're considered external, the
	pageout daemon can keep evicting them even though the external pagers
	haven't released them, unlike internal pages which must all be
	released before the pageout daemon can make progress. This can lead
	to a situation where too many pages become wired, the default pager
	cannot allocate memory to process new requests, and the pageout
	daemon cannot recycle any more page, causing a panic.

	This change makes the pageout daemon use the same strategy for both
	internal pages and external pages sent to the default pager: use
	the laundry bit and wait for all laundry pages to be released,
	thereby completely synchronizing the pageout daemon and the default
	pager.

	* vm/vm_page.c (vm_page_can_move): Allow external laundry pages to
	be moved.
	(vm_page_seg_evict): Don't alter the `external_laundry' bit, merely
	disable double paging for external pages sent to the default pager.
	* vm/vm_pageout.c: Include vm/memory_object.h.
	(vm_pageout_setup): Don't check whether the `external_laundry' bit
	is set, but handle external pages sent to the default pager the same
	as internal pages.

2016-12-25  Richard Braun  <rbraun@sceen.net>

	Increase the size of the kernel map
	Sometimes, in particular during IO spikes, the slab allocator needs
	more virtual memory than is currently available. The new size should
	also be fine for the Xen version.

	* i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE): Increase value.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	doc: update documentation about wiring
	* doc/mach.texi: Describe vm_wire_all, and add more information
	about vm_wire and vm_protect.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	VM: add the vm_wire_all call
	This call maps the POSIX mlockall and munlockall calls.

	* Makefrag.am (include_mach_HEADERS): Add include/mach/vm_wire.h.
	* include/mach/gnumach.defs (vm_wire_t): New type.
	(vm_wire_all): New routine.
	* include/mach/mach_types.h: Include mach/vm_wire.h.
	* vm/vm_map.c: Likewise.
	(vm_map_enter): Automatically wire new entries if requested.
	(vm_map_copyout): Likewise.
	(vm_map_pageable_all): New function.
	vm/vm_map.h: Include mach/vm_wire.h.
	(struct vm_map): Update description of member `wiring_required'.
	(vm_map_pageable_all): New function.
	* vm/vm_user.c (vm_wire_all): New function.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	VM: rework map entry wiring
	First, user wiring is removed, simply because it has never been used.

	Second, make the VM system track wiring requests to better handle
	protection. This change makes it possible to wire entries with
	VM_PROT_NONE protection without actually reserving any page for
	them until protection changes, and even make those pages pageable
	if protection is downgraded to VM_PROT_NONE.

	* ddb/db_ext_symtab.c: Update call to vm_map_pageable.
	* i386/i386/user_ldt.c: Likewise.
	* ipc/mach_port.c: Likewise.
	* vm/vm_debug.c (mach_vm_region_info): Update values returned
	as appropriate.
	* vm/vm_map.c (vm_map_entry_copy): Update operation as appropriate.
	(vm_map_setup): Update member names as appropriate.
	(vm_map_find_entry): Update to account for map member variable changes.
	(vm_map_enter): Likewise.
	(vm_map_entry_inc_wired): New function.
	(vm_map_entry_reset_wired): Likewise.
	(vm_map_pageable_scan): Likewise.
	(vm_map_protect): Update wired access, call vm_map_pageable_scan.
	(vm_map_pageable_common): Rename to ...
	(vm_map_pageable): ... and rewrite to use vm_map_pageable_scan.
	(vm_map_entry_delete): Fix unwiring.
	(vm_map_copy_overwrite): Replace inline code with a call to
	vm_map_entry_reset_wired.
	(vm_map_copyin_page_list): Likewise.
	(vm_map_print): Likewise. Also print map size and wired size.
	(vm_map_copyout_page_list): Update to account for map member variable
	changes.
	* vm/vm_map.h (struct vm_map_entry): Remove `user_wired_count' member,
	add `wired_access' member.
	(struct vm_map): Rename `user_wired' member to `size_wired'.
	(vm_map_pageable_common): Remove function.
	(vm_map_pageable_user): Remove macro.
	(vm_map_pageable): Replace macro with function declaration.
	* vm/vm_user.c (vm_wire): Update call to vm_map_pageable.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout of external objects backed by the default pager
	Double paging on such objects causes deadlocks.

	* vm/vm_page.c: Include <vm/memory_object.h>.
	(vm_page_seg_evict): Rename laundry to double_paging to increase
	clarity. Set the `external_laundry' bit when evicting a page
	from an external object backed by the default pager.
	* vm/vm_pageout.c (vm_pageout_setup): Wire page if the
	`external_laundry' bit is set.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	VM: fix pageability check
	Unlike laundry pages sent to the default pager, pages marked with the
	`external_laundry' bit remain in the page queues and must be filtered
	out by the pageability check.

	* vm/vm_page.c (vm_page_can_move): Check the `external_laundry' bit.

2016-12-24  Richard Braun  <rbraun@sceen.net>

	VM: fix mapping removal on wired pages
	Memory wiring is about to be reworked, at which point the VM system
	will properly track wired mappings. Removing them when changing
	protection makes sense, and is fine as long as the VM system
	rewires them when access is restored.

	* i386/intel/pmap.c (pmap_page_protect): Decrease wiring count instead
	of causing a panic when removing a wired mapping.

2016-12-21  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout timeout
	The interval parameter to the thread_set_timeout function is actually
	in ticks.

	* vm/vm_pageout.c (vm_pageout): Fix call to thread_set_timeout.

2016-12-18  Thomas Schwinge  <thomas@codesourcery.com>

	GNU Mach 1.8
	* version.m4 (AC_PACKAGE_VERSION): Set to 1.8.
	* NEWS: Finalize for 1.8.

2016-12-11  Richard Braun  <rbraun@sceen.net>

	VM: make vm_wire more POSIX-friendly
	* doc/mach.texi: Update return codes.
	* vm/vm_map.c (vm_map_pageable_common): Return KERN_NO_SPACE instead
	of KERN_FAILURE if some of the specified address range does not
	correspond to mapped pages. Skip unwired entries instead of failing
	when unwiring.

2016-12-09  Justus Winter  <justus@gnupg.org>

	Update the NEWS file

2016-12-09  Richard Braun  <rbraun@sceen.net>

	rbtree: minor change
	* kern/rbtree.h (rbtree_for_each_remove): Remove trailing slash.

2032-05-12  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout throttling to external pagers
	Since the VM system has been tracking whether pages belong to internal
	or external objects, pageout throttling to external pagers has simply
	not been working. The reason is that, on pageout, requests for external
	pages are correctly tracked, but on page release (which is used to
	acknowledge the request), external pages are not marked external
	any more. This is because the external bit tracks whether a page
	belongs to an external object, and all pages, including external
	ones, are moved to an internal object during pageout.

	To solve this issue, a new "external_laundry" bit is added. It has
	the same purpose as the laundry bit, but for external pagers.

	* vm/vm_page.c (vm_page_seg_min_page_available): Function unused, remove.
	(vm_page_seg_evict): Use vm_page_external_laundry_count instead of
	vm_page_external_pagedout. Add an assertion about double paging.
	(vm_page_check_usable): Use vm_page_external_laundry_count instead of
	vm_page_external_pagedout.
	(vm_page_evict): Likewise.
	* vm/vm_page.h (struct vm_page): New `external_laundry' member.
	(vm_page_external_pagedout): Rename to ...
	(vm_page_external_laundry_count): ... this.
	* vm/vm_pageout.c: Include kern/printf.h.
	(DEBUG): New macro.
	(VM_PAGEOUT_TIMEOUT): Likewise.
	(vm_pageout_setup): Use vm_page_external_laundry_count instead of
	vm_page_external_pagedout. Set `external_laundry' where appropriate.
	(vm_pageout): Use VM_PAGEOUT_TIMEOUT with thread_set_timeout.
	Add debugging code, commented out by default.
	* vm/vm_resident.c (vm_page_external_pagedout): Rename to ...
	(vm_page_external_laundry_count): ... this.
	(vm_page_init_template): Set `external_laundry' member to FALSE.
	(vm_page_release): Rename external parameter to external_laundry.
	Slightly change pageout resuming.
	(vm_page_free): Rename external variable to external_laundry.

2016-11-30  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout on low memory
	Instead of determining if memory is low, directly use the
	vm_page_alloc_paused variable, which is true when memory has reached
	a minimum threshold until it gets back above the high thresholds.

	This makes sure double paging is used when external pagers are unable
	to allocate memory.

	* vm/vm_page.c (vm_page_seg_evict): Rename low_memory to alloc_paused.
	(vm_page_evict_once): Remove low_memory and its computation. Blindly
	pass the new alloc_paused argument instead.
	(vm_page_evict): Pass the value of vm_page_alloc_paused to
	vm_page_evict_once.

2016-11-30  Richard Braun  <rbraun@sceen.net>

	VM: fix eviction logic error
	* vm/vm_page.c (vm_page_evict): Test both vm_page_external_pagedout
	and vm_page_laundry_count in order to determine there was "no pageout".

2016-11-30  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout stop condition
	When checking whether to continue paging out or not, the pageout daemon
	only considers the high free page threshold of a segment. But if e.g.
	the default pager had to allocate reserved pages during a previous
	pageout cycle, it could have exhausted a segment (this is currently
	only seen with the DMA segment). In that case, the high threshold
	cannot be reached because the segment has currently no pageable page.

	This change makes the pageout daemon identify this condition and
	consider the segment as usable in order to make progress. The segment
	will simply be ignored on the allocation path for unprivileged threads,
	and if this happens with too many segments, the system will fail at
	allocation time.

	* vm/vm_page.c (vm_page_seg_usable): Report usable if the segment has
	no pageable page.

2016-11-10  Brent Baccala  <cosine@freesoft.org>

	gsync: Avoid NULL pointer dereference
	* kern/gsync.c (gsync_wait, gsync_wake, gsync_requeue):
	Return immediately if task argument is TASK_NULL

2016-11-06  Justus Winter  <justus@gnupg.org>

	Revert "i386: use ACPI to power off the machine"
	This reverts commit c031b41b783cc99c0bd5aac7d14c1d6e34520397.

	Adding the ACPI parser from GRUB was a mistake as its license
	conflicts with the one used by the legacy Linux drivers.  Furthermore,
	adding support for ACPI to the kernel violates the minimality
	principle.

2016-11-04  Justus Winter  <justus@gnupg.org>

	vm: Print names of maps in the debugger.
	* vm/vm_map.c (vm_map_print): Print name of the map.

2016-11-01  Justus Winter  <justus@gnupg.org>

	include: Fix new task notifications.
	Instead of copying the send right, move it.  This fixes a send-right
	leak.

	* include/mach/task_notify.defs (task_move_t): New type.
	(mach_notify_new_task): Use the new type.

2016-11-01  Justus Winter  <justus@gnupg.org>

	i386: Use discontiguous page directories when using PAE.
	Previously, we used contiguous page directories four pages in length
	when using PAE.  To prevent physical memory fragmentation, we need to
	use virtual memory for objects spanning multiple pages.  Virtual
	kernel memory, however, is a scarce commodity.

	* i386/intel/pmap.h (lin2pdenum): Never include the page directory pointer table index.
	(lin2pdenum_cont): New macro which does include said index.
	(struct pmap): Remove the directory base pointer when using PAE.
	* i386/intel/pmap.c (pmap_pde): Fix lookup.
	(pmap_pte): Fix check for uninitialized pmap.
	(pmap_bootstrap): Do not store the page directory base if PAE.
	(pmap_init): Reduce size of page directories to one page, use
	direct-mapped memory.
	(pmap_create): Allocate four page directories per pmap.
	(pmap_destroy): Adapt to the discontinuous directories.
	(pmap_collect): Likewise.
	* i386/i386/xen.h (hyp_mmu_update_la): Adapt code manipulating the
	kernels page directory.
	* i386/i386at/model_dep.c (i386at_init): Likewise.

2016-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gsync: fix licence
	Agustina relicenced her work.

	* kern/gsync.c: Relicence to GPL 2+.
	* kern/gsync.h: Relicence to GPL 2+.

2016-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gsync: Fix crash when task is not current task
	* kern/gsync.c (gsync_wait, gsync_wake, gsync_requeue): Return
	KERN_FAILURE when task != current_task().

2016-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	gsync: Fix assertion failure with MACH_LDEBUG
	vm_map_lock_read calls check_simple_locks(), so we need to lock hbp
	after taking the vm_map read lock.

	* kern/gsync.c (gsync_wait): Call vm_map_lock_read before locking
	&hbp->lock.
	(gsync_wake): Likewise.

2016-10-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make multiboot cmdline and modules non-permanent reservations
	* i386/i386at/model_dep.c (register_boot_data): For multiboot cmdline,
	module structure, module data and module strings, set
	biosmem_register_boot_data temporary parameter to TRUE.

2016-10-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix taking LDFLAGS into account
	* Makefile.am (clib-routines.o): Add $(LDFLAGS) to link command.

	Fix taking LDFLAGS into account
	* Makefile.am (gnumach_o_LINK, gnumach_LINK): Add $(LDFLAGS).

	Fix warnings
	* i386/i386/seg.h (fill_descriptor): Fix format for vm_offset_t.
	* i386/i386/xen.h (hyp_free_mfn, hyp_free_page): Fix format for unsigned
	long.

2016-10-22  Justus Winter  <justus@gnupg.org>

	i386: Allocate page directories using the slab allocator.
	* i386/intel/pmap.c (pd_cache): New variable.
	(pdp_cache): Likewise.
	(pmap_init): Initialize new caches.
	(pmap_create): Use the caches.
	(pmap_destroy): Free to the caches.

2016-10-21  Justus Winter  <justus@gnupg.org>

	Gracefully handle pmap allocation failures.
	* kern/task.c (task_create): Gracefully handle pmap allocation
	failures.
	* vm/vm_map.c (vm_map_fork): Likewise.

	vm: Print map names in case of failures.
	* vm/vm_kern.c (kmem_alloc): Print map names in case of failures.
	(kmem_alloc_wired): Likewise.
	(kmem_alloc_aligned): Likewise.
	(kmem_alloc_pageable): Likewise.

2016-10-13  Justus Winter  <justus@gnupg.org>

	Make task notification ports mutable.
	* include/mach/task_notify.defs (task_notify_port_t): New type.
	(mach_notify_new_task): Use the specialized type.

2016-10-12  Justus Winter  <justus@gnupg.org>

	linux: Remove incompatible local prototype.
	* linux/dev/glue/kmem.c (vremap): Remove prototype, include the right
	header instead.

2016-10-03  Justus Winter  <justus@gnupg.org>

	Remove deprecated external memory management interface.
	* NEWS: Update.
	* device/dev_pager.c (device_pager_data_request): Prune unused branch.
	(device_pager_data_request_done): Remove function.
	(device_pager_data_write): Likewise.
	(device_pager_data_write_done): Likewise.
	(device_pager_copy): Use 'memory_object_ready'.
	* device/dev_pager.h (device_pager_data_write_done): Remove prototype.
	* device/device_pager.srv (memory_object_data_write): Remove macro.
	* doc/mach.texi: Update documentation.
	* include/mach/mach.defs (memory_object_data_provided): Drop RPC.
	(memory_object_set_attributes): Likewise.
	* include/mach/memory_object.defs: Update comments.
	(memory_object_data_write): Drop RPC.
	* include/mach/memory_object_default.defs: Update comments.
	* include/mach_debug/vm_info.h (VOI_STATE_USE_OLD_PAGEOUT): Drop
	macro.
	* vm/memory_object.c (memory_object_data_provided): Remove function.
	(memory_object_data_error): Simplify.
	(memory_object_set_attributes_common): Make static, remove unused
	parameters, simplify.
	(memory_object_change_attributes): Update callsite.
	(memory_object_set_attributes): Remove function.
	(memory_object_ready): Update callsite.
	* vm/vm_debug.c (mach_vm_object_info): Adapt to the changes.
	* vm/vm_object.c (vm_object_bootstrap): Likewise.
	* vm/vm_object.h (struct vm_object): Drop flag 'use_old_pageout'.
	* vm/vm_pageout.c: Update comments.
	(vm_pageout_page): Simplify.

2016-10-02  David Michael  <fedora.dm0@gmail.com>

	Fix format security
	* i386/i386at/biosmem.c (boot_panic): Use %s format instead of passing
	the string directly to `panic'.
	(biosmem_unregister_boot_data): Use %s format instead of passing
	`biosmem_panic_inval_boot_data' directly to `panic'.

2016-10-01  Justus Winter  <justus@gnupg.org>

	kern: Improve panic messages from the scheduler.
	* kern/sched_prim.c (state_panic): Turn into macro, print symbolic
	values of thread state.

	kern: Improve assertions and panics.
	* 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-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	biosmem: show memory map at boot
	* i386/i386at/biosmem.c (biosmem_type_desc, biosmem_map_show): Define
	even if DEBUG is 0.  But show biosmem heap addresses only if DEBUG is 1.

2016-09-21  Richard Braun  <rbraun@sceen.net>

	Enable high memory
	* i386/i386at/biosmem.c (biosmem_setup): Load the HIGHMEM segment if
	present.
	(biosmem_free_usable): Report high memory as usable.
	* vm/vm_page.c (vm_page_boot_table_size, vm_page_table_size,
	vm_page_mem_size, vm_page_mem_free): Scan all segments.
	* vm/vm_resident.c (vm_page_grab): Describe allocation strategy
	with regard to the HIGHMEM segment.

2016-09-21  Richard Braun  <rbraun@sceen.net>

	Update device drivers for highmem support
	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-21  Richard Braun  <rbraun@sceen.net>

	Update Linux block layer glue code
	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-21  Richard Braun  <rbraun@sceen.net>

	Rework pageout to handle multiple segments
	As we're about to use a new HIGHMEM segment, potentially much larger
	than the existing DMA and DIRECTMAP ones, it's now compulsory to make
	the pageout daemon aware of those segments.

	And while we're at it, let's fix some of the defects that have been
	plaguing pageout forever, such as throttling, and pageout of internal
	versus external pages (this commit notably introduces a hardcoded
	policy in which as many external pages are selected before considering
	internal pages).

	* kern/slab.c (kmem_pagefree_physmem): Update call to vm_page_release.
	* vm/vm_page.c: Include <kern/counters.h> and <vm/vm_pageout.h>.
	(VM_PAGE_SEG_THRESHOLD_MIN_NUM, VM_PAGE_SEG_THRESHOLD_MIN_DENOM,
	VM_PAGE_SEG_THRESHOLD_MIN, VM_PAGE_SEG_THRESHOLD_LOW_NUM,
	VM_PAGE_SEG_THRESHOLD_LOW_DENOM, VM_PAGE_SEG_THRESHOLD_LOW,
	VM_PAGE_SEG_THRESHOLD_HIGH_NUM, VM_PAGE_SEG_THRESHOLD_HIGH_DENOM,
	VM_PAGE_SEG_THRESHOLD_HIGH, VM_PAGE_SEG_MIN_PAGES,
	VM_PAGE_HIGH_ACTIVE_PAGE_NUM, VM_PAGE_HIGH_ACTIVE_PAGE_DENOM): New macros.
	(struct vm_page_queue): New type.
	(struct vm_page_seg): Add new members `min_free_pages', `low_free_pages',
	`high_free_pages', `active_pages', `nr_active_pages', `high_active_pages',
	`inactive_pages', `nr_inactive_pages'.
	(vm_page_alloc_paused): New variable.
	(vm_page_pageable, vm_page_can_move, vm_page_remove_mappings): New functions.
	(vm_page_seg_alloc_from_buddy): Pause allocations and start the pageout
	daemon as appropriate.
	(vm_page_queue_init, vm_page_queue_push, vm_page_queue_remove,
	vm_page_queue_first, vm_page_seg_get, vm_page_seg_index,
	vm_page_seg_compute_pageout_thresholds): New functions.
	(vm_page_seg_init): Initialize the new segment members.
	(vm_page_seg_add_active_page, vm_page_seg_remove_active_page,
	vm_page_seg_add_inactive_page, vm_page_seg_remove_inactive_page,
	vm_page_seg_pull_active_page, vm_page_seg_pull_inactive_page,
	vm_page_seg_pull_cache_page): New functions.
	(vm_page_seg_min_page_available, vm_page_seg_page_available,
	vm_page_seg_usable, vm_page_seg_double_lock, vm_page_seg_double_unlock,
	vm_page_seg_balance_page, vm_page_seg_balance, vm_page_seg_evict,
	vm_page_seg_compute_high_active_page, vm_page_seg_refill_inactive,
	vm_page_lookup_seg, vm_page_check): New functions.
	(vm_page_alloc_pa): Handle allocation failure from VM privileged thread.
	(vm_page_info_all): Display additional segment properties.
	(vm_page_wire, vm_page_unwire, vm_page_deactivate, vm_page_activate,
	vm_page_wait): Move from vm/vm_resident.c and rewrite to use segments.
	(vm_page_queues_remove, vm_page_check_usable, vm_page_may_balance,
	vm_page_balance_once, vm_page_balance, vm_page_evict_once): New functions.
	(VM_PAGE_MAX_LAUNDRY, VM_PAGE_MAX_EVICTIONS): New macros.
	(vm_page_evict, vm_page_refill_inactive): New functions.
	* vm/vm_page.h: Include <kern/list.h>.
	(struct vm_page): Remove member `pageq', reuse the `node' member instead,
	move the `listq' and `next' members above `vm_page_header'.
	(VM_PAGE_CHECK): Define as an alias to vm_page_check.
	(vm_page_check): New function declaration.
	(vm_page_queue_fictitious, vm_page_queue_active, vm_page_queue_inactive,
	vm_page_free_target, vm_page_free_min, vm_page_inactive_target,
	vm_page_free_reserved, vm_page_free_wanted): Remove extern declarations.
	(vm_page_external_pagedout): New extern declaration.
	(vm_page_release): Update declaration.
	(VM_PAGE_QUEUES_REMOVE): Define as an alias to vm_page_queues_remove.
	(VM_PT_PMAP, VM_PT_KMEM, VM_PT_STACK): Remove macros.
	(VM_PT_KERNEL): Update value.
	(vm_page_queues_remove, vm_page_balance, vm_page_evict,
	vm_page_refill_inactive): New function declarations.
	* vm/vm_pageout.c (VM_PAGEOUT_BURST_MAX, VM_PAGEOUT_BURST_MIN,
	VM_PAGEOUT_BURST_WAIT, VM_PAGEOUT_EMPTY_WAIT, VM_PAGEOUT_PAUSE_MAX,
	VM_PAGE_INACTIVE_TARGET, VM_PAGE_FREE_TARGET, VM_PAGE_FREE_MIN,
	VM_PAGE_FREE_RESERVED, VM_PAGEOUT_RESERVED_INTERNAL,
	VM_PAGEOUT_RESERVED_REALLY): Remove macros.
	(vm_pageout_reserved_internal, vm_pageout_reserved_really,
	vm_pageout_burst_max, vm_pageout_burst_min, vm_pageout_burst_wait,
	vm_pageout_empty_wait, vm_pageout_pause_count, vm_pageout_pause_max,
	vm_pageout_active, vm_pageout_inactive, vm_pageout_inactive_nolock,
	vm_pageout_inactive_busy, vm_pageout_inactive_absent,
	vm_pageout_inactive_used, vm_pageout_inactive_clean,
	vm_pageout_inactive_dirty, vm_pageout_inactive_double,
	vm_pageout_inactive_cleaned_external): Remove variables.
	(vm_pageout_requested, vm_pageout_continue): New variables.
	(vm_pageout_setup): Wait for page allocation to succeed instead of
	falling back to flush, update double paging protocol with caller,
	add pageout throttling setup.
	(vm_pageout_scan): Rewrite to use the new vm_page balancing,
	eviction and inactive queue refill functions.
	(vm_pageout_scan_continue, vm_pageout_continue): Remove functions.
	(vm_pageout): Rewrite.
	(vm_pageout_start, vm_pageout_resume): New functions.
	* vm/vm_pageout.h (vm_pageout_continue, vm_pageout_scan_continue): Remove
	function declarations.
	(vm_pageout_start, vm_pageout_resume): New function declarations.
	* vm/vm_resident.c: Include <kern/list.h>.
	(vm_page_queue_fictitious): Define as a struct list.
	(vm_page_free_wanted, vm_page_external_count, vm_page_free_avail,
	vm_page_queue_active, vm_page_queue_inactive, vm_page_free_target,
	vm_page_free_min, vm_page_inactive_target, vm_page_free_reserved):
	Remove variables.
	(vm_page_external_pagedout): New variable.
	(vm_page_bootstrap): Don't initialize removed variable, update
	initialization of vm_page_queue_fictitious.
	(vm_page_replace): Call VM_PAGE_QUEUES_REMOVE where appropriate.
	(vm_page_remove): Likewise.
	(vm_page_grab_fictitious): Update to use list_xxx functions.
	(vm_page_release_fictitious): Likewise.
	(vm_page_grab): Remove pageout related code.
	(vm_page_release): Add `laundry' and `external' parameters for
	pageout throttling.
	(vm_page_grab_contig): Remove pageout related code.
	(vm_page_free_contig): Likewise.
	(vm_page_free): Remove pageout related code, update call to
	vm_page_release.
	(vm_page_wait, vm_page_wire, vm_page_unwire, vm_page_deactivate,
	vm_page_activate): Move to vm/vm_page.c.

2016-09-21  Richard Braun  <rbraun@sceen.net>

	Redefine what an external page is
	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-21  Richard Braun  <rbraun@sceen.net>

	Replace vm_offset_t with phys_addr_t where appropriate
	* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys,
	copy_from_phys, kvtophys): Use the phys_addr_t type for physical
	addresses.
	* i386/intel/pmap.c (pmap_map, pmap_map_bd, pmap_destroy,
	pmap_remove_range, pmap_page_protect, pmap_enter, pmap_extract,
	pmap_collect, phys_attribute_clear, phys_attribute_test,
	pmap_clear_modify, pmap_is_modified, pmap_clear_reference,
	pmap_is_referenced): Likewise.
	* i386/intel/pmap.h (pt_entry_t): Unconditionally define as a
	phys_addr_t.
	(pmap_zero_page, pmap_copy_page, kvtophys): Use the phys_addr_t
	type for physical addresses.
	* vm/pmap.h (pmap_enter, pmap_page_protect, pmap_clear_reference,
	pmap_is_referenced, pmap_clear_modify, pmap_is_modified,
	pmap_extract, pmap_map_bd): Likewise.
	* vm/vm_page.h (vm_page_fictitious_addr): Declare as a phys_addr_t.
	* vm/vm_resident.c (vm_page_fictitious_addr): Likewise.
	(vm_page_grab_phys_addr): Change return type to phys_addr_t.

2016-09-21  Richard Braun  <rbraun@sceen.net>

	Remove phys_first_addr and phys_last_addr global variables
	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-09-20  Richard Braun  <rbraun@sceen.net>

	VM: remove commented out code
	The vm_page_direct_va, vm_page_direct_pa and vm_page_direct_ptr
	functions were imported along with the new vm_page module, but
	never actually used since the kernel already has phystokv and
	kvtophys functions.

2016-09-16  Richard Braun  <rbraun@sceen.net>

	VM: improve pageout deadlock workaround
	Commit 5dd4f67522ad0d49a2cecdb9b109251f546d4dd1 makes VM map entry
	allocation done with VM privilege, so that a VM map isn't held locked
	while physical allocations are paused, which may block the default
	pager during page eviction, causing a system-wide deadlock.

	First, it turns out that map entries aren't the only buffers allocated,
	and second, their number can't be easily determined, which makes a
	preallocation strategy very hard to implement.

	This change generalizes the strategy of VM privilege increase when a
	VM map is locked.

	* device/ds_routines.c (io_done_thread): Use integer values instead
	of booleans when setting VM privilege.
	* kern/thread.c (thread_init, thread_wire): Likewise.
	* vm/vm_pageout.c (vm_pageout): Likewise.
	* kern/thread.h (struct thread): Turn member `vm_privilege' into an
	unsigned integer.
	* vm/vm_map.c (vm_map_lock): New function, where VM privilege is
	temporarily increased.
	(vm_map_unlock): New function, where VM privilege is decreased.
	(_vm_map_entry_create): Remove VM privilege workaround from this
	function.
	* vm/vm_map.h (vm_map_lock, vm_map_unlock): Turn into functions.

2016-09-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix spurious warning
	* i386/i386/db_trace.c (db_i386_stack_trace): Do not check for frame
	validity if it is 0.

	Fix size of functions interrupt and syscall
	* i386/i386/locore.S (syscall): Add END(syscall).
	* i386/i386at/interrupt.S (interrupt): Add END(interrupt).

	Set function type on symbols created by ENTRY macro
	* i386/include/mach/i386/asm.h (ENTRY, ENTRY2, ASENTRY, Entry): Use .type
	@function on created entries.

	Close parenthesis
	* i386/i386/db_trace.c (db_i386_stack_trace): When stopping on zero frame,
	close parameters parenthesis.

	Fix exploring stack trace up to assembly
	* i386/i386/db_trace.c (db_i386_stack_trace): Do not stop as soon as frame
	is 0, lookup PC first, and stop only before accessing the frame content.

2016-09-11  Justus Winter  <justus@gnupg.org>

	ipc: Fix crash in debug code.
	* ipc/mach_debug.c (mach_port_kernel_object): Check that the receiver
	is valid.

2016-09-07  Richard Braun  <rbraun@sceen.net>

	Remove map entry pageability property.
	Since the replacement of the zone allocator, kernel objects have been
	wired in memory. Besides, as of 5e9f6f (Stack the slab allocator
	directly on top of the physical allocator), there is a single cache
	used to allocate map entries.

	Those changes make the pageability attribute of VM maps irrelevant.

	* device/ds_routines.c (mach_device_init): Update call to kmem_submap.
	* ipc/ipc_init.c (ipc_init): Likewise.
	* kern/task.c (task_create): Update call to vm_map_create.
	* vm/vm_kern.c (kmem_submap): Remove `pageable' argument. Update call
	to vm_map_setup.
	(kmem_init): Update call to vm_map_setup.
	* vm/vm_kern.h (kmem_submap): Update declaration.
	* vm/vm_map.c (vm_map_setup): Remove `pageable' argument. Don't set
	`entries_pageable' member.
	(vm_map_create): Likewise.
	(vm_map_copyout): Don't bother creating copies of page entries with
	the right pageability.
	(vm_map_copyin): Don't set `entries_pageable' member.
	(vm_map_fork): Update call to vm_map_create.
	* vm/vm_map.h (struct vm_map_header): Remove `entries_pageable' member.
	(vm_map_setup, vm_map_create): Remove `pageable' argument.

2016-09-06  Richard Braun  <rbraun@sceen.net>

	Fix registration of strings from in boot data
	* i386/i386at/model_dep.c (register_boot_data): Use phystokv on strings
	when computing their length.

2016-09-06  Richard Braun  <rbraun@sceen.net>

	Make early physical page allocation truely reliable
	Import upstream biosmem changes and adjust for local modifications.

	Specifically, this change makes the biosmem module reliably track all
	boot data by storing their addresses in a sorted array. This allows
	both the early page allocator and the biosmem_free_usable function
	to accurately find any range of free pages.

	* i386/i386at/biosmem.c: Remove inclusion of <i386at/elf.h>.
	(_start, _end): Remove variable declarations.
	(BIOSMEM_MAX_BOOT_DATA): New macro.
	(struct biosmem_boot_data): New type.
	(biosmem_boot_data_array, biosmem_nr_boot_data): New variables.
	(biosmem_heap_start, biosmem_heap_bottom, biosmem_heap_top,
	biosmem_heap_end): Change type to phys_addr_t.
	(biosmem_panic_inval_boot_data): New variable.
	(biosmem_panic_too_many_boot_data): Likewise.
	(biosmem_panic_toobig_msg): Variable renamed ...
	(biosmem_panic_too_big_msg): ... to this.
	(biosmem_register_boot_data): New function.
	(biosmem_unregister_boot_data): Likewise.
	(biosmem_map_adjust): Update reference to panic message.
	(biosmem_map_find_avail): Add detailed description.
	(biosmem_save_cmdline_sizes): Remove function.
	(biosmem_find_heap_clip): Likewise.
	(biosmem_find_heap): Likewise.
	(biosmem_find_avail_clip, biosmem_find_avail): New functions.
	(biosmem_setup_allocator): Receive const multiboot info, replace
	calls to biosmem_find_heap with calls to biosmem_find_avail and
	update accordingly. Register the heap as boot data.
	(biosmem_xen_bootstrap): Register the Xen boot info and the heap as
	boot data.
	(biosmem_bootstrap): Receive const multiboot information. Remove call
	to biosmem_save_cmdline_sizes.
	(biosmem_bootalloc): Remove assertion on the VM system state.
	(biosmem_type_desc, biosmem_map_show): Build only if DEBUG is true.
	(biosmem_unregister_temporary_boot_data): New function.
	(biosmem_free_usable_range): Change address range format.
	(biosmem_free_usable_entry): Rewrite to use biosmem_find_avail
	without abusing it.
	(biosmem_free_usable): Call biosmem_unregister_temporary_boot_data,
	update call to biosmem_free_usable_entry.
	* i386/i386at/biosmem.h (biosmem_register_boot_data): New function.
	(biosmem_bootalloc): Update description.
	(biosmem_bootstrap): Update description and declaration.
	(biosmem_free_usable): Likewise.
	* i386/i386at/model_dep.c: Include <i386at/elf.h>.
	(machine_init): Update call to biosmem_free_usable.
	(register_boot_data): New function.
	(i386at_init): Call register_boot_data where appropriate.

2016-09-03  Richard Braun  <rbraun@sceen.net>

	Fix early physical page allocation
	Import upstream biosmem and vm_page changes, and adjust for local
	modifications.

	Specifically, the biosmem module was mistakenly loading physical
	segments that did not clip with the heap as completely available.
	This change makes it load them as completely unavailable during
	startup, and once the VM system is ready, additional pages are
	loaded.

	* i386/i386at/biosmem.c (DEBUG): New macro.
	(struct biosmem_segment): Remove members `avail_start' and `avail_end'.
	(biosmem_heap_cur): Remove variable.
	(biosmem_heap_bottom, biosmem_heap_top, biosmem_heap_topdown): New variables.
	(biosmem_find_boot_data_update, biosmem_find_boot_data): Remove functions.
	(biosmem_find_heap_clip, biosmem_find_heap): New functions.
	(biosmem_setup_allocator): Rewritten to use the new biosmem_find_heap
	function.
	(biosmem_bootalloc): Support both bottom-up and top-down allocations.
	(biosmem_directmap_size): Renamed to ...
	(biosmem_directmap_end): ... this function.
	(biosmem_load_segment): Fix segment loading.
	(biosmem_setup): Restrict usable memory to the directmap segment.
	(biosmem_free_usable_range): Add checks on input parameters.
	(biosmem_free_usable_update_start, biosmem_free_usable_start,
	biosmem_free_usable_reserved, biosmem_free_usable_end): Remove functions.
	(biosmem_free_usable_entry): Rewritten to use the new biosmem_find_heap
	function.
	(biosmem_free_usable): Restrict usable memory to the directmap segment.
	* i386/i386at/biosmem.h (biosmem_bootalloc): Update description.
	(biosmem_directmap_size): Renamed to ...
	(biosmem_directmap_end): ... this function.
	(biosmem_free_usable): Update declaration.
	* i386/i386at/model_dep.c (machine_init): Call biosmem_free_usable.
	* vm/vm_page.c (DEBUG): New macro.
	(struct vm_page_seg): New member `heap_present'.
	(vm_page_load): Remove heap related parameters.
	(vm_page_load_heap): New function.
	* vm/vm_page.h (vm_page_load): Remove heap related parameters. Update
	description.
	(vm_page_load_heap): New function.

2016-09-01  Richard Braun  <rbraun@sceen.net>

	pmap: fix map window creation on xen
	* i386/intel/pmap.c (pmap_get_mapwindow, pmap_put_mapwindow): Use
	the appropriate xen hypercall if building for paravirtualized page
	table management.

2016-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid using non-ascii source encoding
	* xen/console.c (hypcnintr): Replace latin1 £ character with the 0xA3
	number.

2016-08-29  Richard Braun  <rbraun@sceen.net>

	vm: fix boot on xen
	* vm/vm_map.c (_vm_map_entry_create: Make sure there is a thread
	before accessing VM privilege.

2016-08-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "Fix documentation for vm_map"
	This reverts commit 57694037a02dda29bd678dc3b8531bd437682ba7.

	We rather prefer the kernel just use whatever slot it sees fit. Userland has
	already been fixed into not using the behavior anyway.

2016-08-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing memory barriers in simple lock debugging
	* kern/lock.c (_simple_lock, _simple_lock_try, simple_unlock): Add compiler
	memory barrier to separate simple_locks_taken update from information
	filling.

	Use invlpg for single-page pagetable changes
	* i386/intel/pmap.c (INVALIDATE_TLB): When e-s is constant, equal to
	PAGE_SIZE, use just one invlpg instruction to flush the TLB.

	Drop unused macro
	* i386/intel/pmap.c (MAX_TBIS_SIZE): Drop unused macro.

2016-08-16  Richard Braun  <rbraun@sceen.net>

	Replace libc string functions with internal implementations
	* Makefile.am (clib_routines): Remove memcmp, memcpy, memmove,
	strchr, strstr and strsep.
	* kern/strings.c (memset): Comment out.
	(strchr, strsep, strstr): New functions.

	i386: import string functions from X15 and relicense to GPLv2+
	* i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386/strings.c.
	* i386/i386/strings.c: New file.

2016-08-12  Richard Braun  <rbraun@sceen.net>

	i386: request the boot loader to page-align modules
	* i386/i386at/boothdr.S (MULTIBOOT_FLAGS): Set LSB bit.

2016-08-07  Richard Braun  <rbraun@sceen.net>

	VM: fix pageout-related deadlock
	* vm/vm_map.c (_vm_map_entry_create): Temporarily set the current thread
	as VM privileged.

2016-08-06  Richard Braun  <rbraun@sceen.net>

	Augment VM maps with task names
	This change improves the clarity of "no more room for ..." VM map
	allocation errors.

	* kern/task.c (task_init): Call vm_map_set_name for the kernel map.
	(task_create): Call vm_map_set_name where appropriate.
	* vm/vm_map.c (vm_map_setup): Set map name to NULL.
	(vm_map_find_entry_anywhere): Update error message to include map name.
	* vm/vm_map.h (struct vm_map): New `name' member.
	(vm_map_set_name): New inline function.

2016-06-29  Richard Braun  <rbraun@sceen.net>

	Fix page fault in critical section in the slab allocator
	* kern/slab.c (host_slab_info): Use wired kernel memory to build the
	cache info.

	Fix locking error in the slab allocator
	* kern/slab.c (kmem_slab_create): Set `slab->cache` member.
	(kmem_cache_reap): Return dead slabs instead of destroying in place.
	(slab_collect): Destroy slabs outside of critical section.
	* kern/slab.h (struct kmem_slab): New `cache` member.

2016-06-27  Richard Braun  <rbraun@sceen.net>

	Fix locking error
	* i386/i386/io_perm.c (no_senders): Remove bogus call to ip_lock.

2016-06-17  Richard Braun  <rbraun@sceen.net>

	Change page cache statistics
	Instead of reporting statistics about unreferenced objects (the object
	cache), report statistics about external objects (the page cache).

	* vm/vm_object.c (vm_object_cached_count): Remove variable.
	(vm_object_cache_add): Remove object cache stats updates.
	(vm_object_cache_remove): Likewise.
	(vm_object_terminate): Update page cache stats.
	* vm/vm_object.h (vm_object_cached_count): Remove variable.
	(vm_object_cached_pages): Likewise.
	(vm_object_cached_pages_lock_data): Likewise.
	(vm_object_cached_pages_update): Remove macro.
	(vm_object_external_count): New extern variable.
	(vm_object_external_pages): Likewise.
	* vm/vm_resident.c (vm_object_external_count): New variable.
	(vm_object_external_pages): Likewise.
	(vm_page_insert): Remove object cache stats updates and
	update page cache stats.
	(vm_page_replace): Likewise.
	(vm_page_remove): Likewise.
	* vm/vm_user.c (vm_cache_statistics): Report page cache stats instead
	of object cache stats.

2016-06-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Allow setting x86 debug flags for the current thread
	* kern/thread.c (thread_get_state): Allow call for the current thread,
	without suspending it.
	(thread_set_status): Likewise.

	Use int3 on x86_64 build too
	* kern/debug.c (SoftDebugger) [__x86_64__]: Use int3 instruction to trigger
	debugger.

2016-06-09  Richard Braun  <rbraun@sceen.net>

	Fix overflow checking on VM map copyin
	* vm/vm_map (vm_map_copyin, vm_map_copyin_page_list): Check overflow
	before page alignment of source data.

2016-06-07  Richard Braun  <rbraun@sceen.net>

	Fix deadlock
	* vm/vm_map.c (vm_map_copyout_page_list): Fix call to
	vm_map_find_entry_anywhere to avoid relocking VM map.

2016-06-02  Richard Braun  <rbraun@sceen.net>

	Fix some license headers.
	As the original author of the files imported, I explicitely dual
	license them to something compatible with GPLv2.

	kern/macros.h: Switch license from GPLv3 to BSD 2-clause.
	kern/rdxtree_i.h: Likewise.

2016-05-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix buffer size passed to scsi_do_cmd
	* 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.

	Cope with getc returning -1
	* i386/i386at/lpr.c (lprstart): Use int instead of char to store result of
	getc, so as to return in case of getting -1.

	Fix potential divisal by zero
	* kern/debug.c (panic, log): Pass 16 as default radix to _doprnt.

2016-05-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix getting ELF symbol bind and type
	ddb/db_elf.c (elf_db_search_symbol): Use ELF32_ST_BIND and ELF32_ST_TYPE to
	access symbol bind and type.

2016-05-20  Richard Braun  <rbraun@sceen.net>

	vm_map: back allocations with a red-black tree
	This change augments VM maps with a gap tree, sorted by gap size, to
	use for non-fixed allocations.

	* vm/vm_map.c: Include kern/list.h.
	(vm_map_entry_gap_cmp_lookup, vm_map_entry_gap_cmp_insert,
	vm_map_gap_valid, vm_map_gap_compute, vm_map_gap_insert_single,
	vm_map_gap_remove_single, vm_map_gap_update, vm_map_gap_insert,
	vm_map_gap_remove, vm_map_find_entry_anywhere): New functions.
	(vm_map_setup): Initialize gap tree.
	(_vm_map_entry_link): Call vm_map_gap_insert.
	(_vm_map_entry_unlink): Call vm_map_gap_remove.
	(vm_map_find_entry, vm_map_enter, vm_map_copyout,
	vm_map_copyout_page_list, vm_map_copyin): Replace look up loop with
	a call to vm_map_find_entry_anywhere. Call vm_map_gap_update and
	initialize gap tree where relevant.
	(vm_map_copy_insert): Turn macro into an inline function and rewrite.
	(vm_map_simplify): Reorder call to vm_map_entry_unlink so that previous
	entry is suitable for use with gap management functions.
	* vm/vm_map.h: Include kern/list.h.
	(struct vm_map_entry): New members `gap_node`, `gap_list`,
	`gap_size` and `in_gap_tree`.
	(struct vm_map_header): New member `gap_tree`.

2016-05-20  Justus Winter  <justus@gnupg.org>

	xen: fix prototype
	Amends a7f248bf.

	* xen/console.h (hypcnclose): Fix type of parameter.

2016-05-18  Thomas Schwinge  <thomas@codesourcery.com>

	GNU Mach 1.7
	* version.m4 (AC_PACKAGE_VERSION): Set to 1.7.
	* NEWS: Finalize for 1.7.

2016-05-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix gcc-6 warnings
	* ddb/db_elf.c (elf_db_sym_init): Turn `i' into unsigned.
	* device/ds_routines.c (ds_device_open, device_writev_trap): Likewise.
	* i386/i386/user_ldt.c (i386_set_ldt): Likewise for `i', `min_selector', and
	`first_desc'.
	(i386_get_ldt): Likewise for `ldt_count'.
	(user_ldt_free): Likewise for `i'.
	* i386/i386/xen.h (hyp_set_ldt): Turn `count' into unsigned long.
	* i386/intel/pmap.c (pmap_bootstrap): Turn `i', `j' and 'n' into unsigned.
	(pmap_clear_bootstrap_pagetable): Likewise for `i' and `j'.
	* ipc/ipc_kmsg.c (ipc_msg_print): Turn `i' and `numwords' into unsigned.
	* kern/boot_script.c (boot_script_parse_line): Likewise for `i'.
	* kern/bootstrap.c (bootstrap_create): Likewise for `n' and `i'.
	* kern/host.c (host_processors): Likewise for `i'.
	* kern/ipc_tt.c (mach_ports_register): Likewise.
	* kern/mach_clock.c (tickadj, bigadj): turn into unsigned.
	* kern/processor.c (processor_set_things): Turn `i' into unsigned.
	* kern/task.c (task_threads): Likewise.
	* kern/thread.c (consider_thread_collect, stack_init): Likewise.
	* kern/strings.c (memset): Turn `i' into size_t.
	* vm/memory_object.c (memory_object_lock_request): Turn `i' into unsigned.
	* xen/block.c (hyp_block_init): Use %u format for evt.
	(device_open): Drop unused err variable.
	(device_write): Turn `copy_npages', `i', `nbpages', and `j' into unsigned.
	* xen/console.c (hypcnread, hypcnwrite, hypcnclose): Turn dev to dev_t.
	(hypcnclose): Return void.
	* xen/console.h (hypcnread, hypcnwrite, hypcnclose): Fix prototypes
	accordingly.
	* xen/evt.c (form_int_mask): Turn `i' into int.
	* xen/net.c (hyp_net_init): Use %u format for evt.
	(device_open): Remove unused `err' variable.

2016-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "Fix getting ELF symbol bind and type"
	This reverts commit a8a52cafb5621b475737ffdc81f63703d5b37904.

	It seems to be breaking backtracing in ddb...

2016-05-16  Richard Braun  <rbraun@sceen.net>

	Fix pageout deadlock
	The pageout daemon uses small, internal, temporary objects to transport
	the data out to memory managers, which are expected to release the data
	once written out to backing store. Releasing this data is done with a
	vm_deallocate call. The problem with this is that vm_map is allowed to
	merge these objects, in which case vm_deallocate will only remove a
	reference instead of releasing the underlying pages, causing the pageout
	daemon to deadlock.

	This change makes the pageout daemon mark these objects so that they
	don't get merged.

	* vm/vm_object.c (vm_object_bootstrap): Update template.
	(vm_object_coalesce): Don't coalesce if an object is used for pageout.
	* vm/vm_object.h (struct vm_object): New `used_for_pageout` member.
	* vm/vm_pageout.c (vm_pageout_page): Mark new objects for pageout.

2016-05-15  Richard Braun  <rbraun@sceen.net>

	Fix warning
	ddb/db_output.c (db_printf): Return 0.
	ddb/db_printf.h (db_printf): Change declaration to return an int.

2016-04-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix xen boot
	* i386/i386/pcb.c (pcb_init): Make sure there is a thread before calling
	current_task().

2016-04-20  Justus Winter  <justus@gnupg.org>

	Fix type of program counter argument
	* i386/i386/hardclock.c (hardclock): Use '0' instead of 'NULL'.
	* vm/vm_fault (vm_fault_cleanup): Likewise.

	xen: fix build
	* i386/xen/xen.c (hypclock_machine_intr): Fix 'clock_interrupt' call.
	* xen/time.c (clkstart): Likewise.

2016-04-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add kernel profiling through sampling
	* NEWS: Advertise feature.
	* configfrac.ac (--enable-kernsample): Add option.
	* kern/pc_sample.h (take_pc_sample): Add usermode and pc parameter.
	(take_pc_sample_macro): Take usermode and pc parameters, pass as such to
	take_pc_sample.
	* kern/pc_sample.c (take_pc_sample): Use pc parameter when usermode is 1.
	* kern/mach_clock.c (clock_interrupt): Add pc parameter. Pass usermode and
	pc to take_pc_sample_macro call.
	* i386/i386/hardclock.c (hardclock): Pass regs->eip to clock_interrupt call
	on normal interrupts, NULL on interrupt interrupt.
	* vm/vm_fault.c (vm_fault_cleanup): Set usermode to 1 and pc to NULL in
	take_pc_sample_macro call.

2016-04-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add memory barrier to spl*
	* i386/i386/spl.S (mb): Define macro
	(SETIPL, spl0, spl7): Call mb.

	Avoid using C99 for variable declaration for now
	* kern/gsync.c (gsync_setup): Declare `i' variable out of for loop.

2016-04-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	update NEWS file

2016-04-15  Agustina Arzille  <avarzille@riseup.net>

	Lightweight synchronization mechanism
	* Makefrag.am (libkernel_a_SOURCES): Add kern/gsync.c and kern/gsync.h.
	* include/mach/gnumach.defs (gsync_wait, gsync_wake, gsync_requeue): New
	routines.
	* include/mach/kern_return.h (KERN_TIMEDOUT, KERN_INTERRUPTED): New error
	codes.
	* kern/gsync.c: New file.
	* kern/gsync.h: New file.
	* kern/startup.c: Include <kern/gsync.h>
	(setup_main): Call gsync_setup.

2016-04-15  Justus Winter  <justus@gnupg.org>

	Update NEWS file

	Add --disable-assert flag to disable assertions
	* configfrag.ac: Use 'AC_HEADER_ASSERT'.

	i386: Fix error handling
	* i386/i386at/model_dep.c (i386at_init): Fix error handling.

2016-04-05  Flavio Cruz  <flaviocruz@gmail.com>

	Fix bootstraping issues with stdint.h.
	* include/mach/std_types.h: Do not include stdint.h.
	* kern/rdxtree.h: Replace sys/types.h with stdint.h.

2016-04-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Follow-up stdint use
	7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb ('Use uint32_t instead of
	unsigned32_t.') missed some Xen code

	* xen/net.c (recompute_checksum): Use stdint.h types.
	* xen/time.c (hyp_get_stime): Likewise.

2016-04-04  Flavio Cruz  <flaviocruz@gmail.com>

	Use uint32_t instead of unsigned32_t.
	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-03-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make kernel mapping start address configurable
	and move it to 16MiB by default to free 24bit DMA area

	* i386/configfrag.ac (--with-_START_MAP): Add option, default to 0x1000000.
	* i386/Makefrag.am (_START_MAP): Set to $(_START_MAP).
	(_START): Set to _START_MAP+0xC0000000.

2016-03-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix getting ELF symbol bind and type
	ddb/db_elf.c (elf_db_search_symbol): Use ELF32_ST_BIND and ELF32_ST_TYPE to
	access symbol bind and type.

2016-03-13  Richard Braun  <rbraun@sceen.net>

	Avoid panics on physical memory exhaustion
	* vm/vm_resident (vm_page_grab_contig): Return NULL instead of calling
	panic on memory exhaustion.

2016-03-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Ship missing files
	Makefrag.am (libkernel_a_SOURCES): Add kern/log2.h.
	(EXTRA_DIST): Add kern/exc.defs.
	i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/elf.h.

2016-03-11  Richard Braun  <rbraun@sceen.net>

	Merge remote-tracking branch 'remotes/origin/rbraun/vm_cache_policy'
	Finally ;-).

2016-03-09  Richard Braun  <rbraun@sceen.net>

	Fix stack allocation on Xen
	Stack allocation on Xen can fail because of fragmentation. This change
	makes stack allocation use the slab allocator.

	* kern/thread.c (thread_stack_cache): New global variable.
	(stack_alloc): Use kmem_cache_alloc instead of vm_page_grab_contig.
	(stack_collect): Use kmem_cache_free instead of vm_page_free_contig.
	(kmem_cache_init): Initialize thread_stack_cache.

2016-03-09  Richard Braun  <rbraun@sceen.net>

	Relax slab allocation alignment constraint
	* kern/slab.c (kmem_pagealloc_virtual): Pass alignment to function,
	call kmem_alloc_aligned when greater than a page.
	(kmem_pagealloc): Pass alignment to function.
	(kmem_slab_create): Update call to kmem_pagealloc.
	(kalloc): Likewise.
	(kmem_cache_compute_properties): Fix handling of color with large slab
	sizes.
	(kmem_cache_init): Allow alignment greater than the page size.

2016-03-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Inherit fpu control word from parent to child
	* i386/i386/thread.h (struct pcb): Add init_control field.
	* i386/i386/fpu.h (fpinherit): New prototype.
	* i386/i386/fpu.c (fpinit): Add thread parameter. When init_control field is
	set, use that value instead of a hardcoded one.
	(fpinherit): New function.
	(fp_load): Pass thread parameter to fpinit().
	* kern/thread.c (thread_create): Pass parent task to pcb_init().
	* i386/i386/pcb.c (pcb_init): Add parent_task parameter, call fpinherit when
	it is equal to current_task().

2016-02-28  Justus Winter  <justus@gnupg.org>

	ipc: add missing kernel object type
	* ipc/ipc_object.c (ikot_print_array): Add entry for IKOT_PAGER_PROXY.

	doc: clarify memory object initialization
	* doc/mach.texi: Mention another way how a memory manager can signal
	that an object is ready.

	i386: add parts of cpu.h from x15
	* i386/Makefrag.am (libkernel_a_SOURCES): Add new file.
	* i386/i386/cpu.h: New file.

2016-02-26  Justus Winter  <justus@gnupg.org>

	include: avoid generating unused client stubs
	* include/mach/mach.defs: Avoid generating unused client stubs, some
	of which use an unreasonable amount of stack space and showed up in
	compiler warnings.

2016-02-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document thread_sleep about events woken from interrupt handlers
	* kern/sched_prim.c (thread_sleep): Document case of events woken from
	interrupt handlers.

	Document why code is not racy
	* i386/i386at/kd_mouse.c (kd_mouse_read): Document why the
	assert_wait/thread_block pair is not racy.

2016-02-23  Justus Winter  <justus@gnupg.org>

	Include the exception protocol in 'gnumach.msgids'
	* Makefrag.am: Include the exception protocol in 'gnumach.msgids'.
	* kern/exc.defs: New file.

2016-02-22  Richard Braun  <rbraun@sceen.net>

	Remove kmem cache flags from the debugging interface
	* include/mach_debug/slab_info.h (CACHE_FLAGS_NO_CPU_POOL,
	CACHE_FLAGS_SLAB_EXTERNAL, CACHE_FLAGS_NO_RECLAIM,
	CACHE_FLAGS_VERIFY, CACHE_FLAGS_DIRECT): Remove macros.
	* kern/slab.c (host_slab_info): Pass raw cache flags to caller.

2016-02-22  Richard Braun  <rbraun@sceen.net>

	Fix slab allocator option handling
	The slab allocator has grown to use multiple ways to allocate slabs
	as well as track them, which got a little messy. One consequence is
	the breaking of the KMEM_CF_VERIFY option. In order to make the code
	less confusing, this change expresses all options as explicit cache
	flags and clearly defines their relationships.

	The special kmem_slab and vm_map_entry caches are initialized
	accordingly.

	* kern/slab.c (KMEM_CF_DIRECTMAP): Rename to ...
	(KMEM_CF_PHYSMEM): ... this new macro.
	(KMEM_CF_DIRECT): Restore macro.
	(KMEM_CF_USE_TREE, KMEM_CF_USE_PAGE): New macros.
	(KMEM_CF_VERIFY): Update value.
	(kmem_pagealloc_directmap): Rename to...
	(kmem_pagealloc_physmem): ... this new function.
	(kmem_pagefree_directmap): Rename to ...
	(kmem_pagefree_physmem): ... this new function.
	(kmem_pagealloc, kmem_pagefree): Update macro names.
	(kmem_slab_use_tree): Remove function.
	(kmem_slab_create, kmem_slab_destroy): Update according to the new
	cache flags.
	(kmem_cache_compute_sizes): Rename to ...
	(kmem_cache_compute_properties): ... this new function, and update
	to properly set cache flags.
	(kmem_cache_init): Update call to kmem_cache_compute_properties.
	(kmem_cache_alloc_from_slab): Check KMEM_CF_USE_TREE instead of
	calling the defunct kmem_slab_use_tree function.
	(kmem_cache_free_to_slab): Update according to the new cache flags.
	kmem_cache_free_verify): Add assertion.
	(slab_init): Update initialization of kmem_slab_cache.
	* kern/slab.h (KMEM_CACHE_DIRECTMAP): Rename to ...
	(KMEM_CACHE_PHYSMEM): ... this new macro.
	* vm/vm_map.c (vm_map_init): Update initialization of vm_map_entry_cache.

2016-02-22  Richard Braun  <rbraun@sceen.net>

	Optimize slab lookup on the free path
	Caches that use external slab data but allocate slabs from the direct
	physical mapping can look up slab data in constant time by associating
	the slab data directly with the underlying page.

	* kern/slab.c (kmem_slab_use_tree): Take KMEM_CF_DIRECTMAP into account.
	(kmem_slab_create): Set page private data if relevant.
	(kmem_slab_destroy): Clear page private data if relevant.
	(kmem_cache_free_to_slab): Use page private data if relevant.
	* vm/vm_page.c (vm_page_init_pa): Set `priv' member to NULL.
	* vm/vm_page.h (vm_page_set_priv, vm_page_get_priv): New functions.

2016-02-22  Richard Braun  <rbraun@sceen.net>

	Fix unused variable warnings
	* kern/slab.c (slab_init): Remove unused variables.

2016-02-20  Richard Braun  <rbraun@sceen.net>

	Avoid slab allocation failures caused by memory fragmentation
	Since the slab allocator has been changed to sit directly on top of the
	physical allocator, failures caused by fragmentation have been observed,
	as one could expect. This change makes the slab allocator revert to
	kernel virtual memory when allocating larger-than-page slabs. This
	solution is motivated in part to avoid the complexity of other solutions
	such as page mobility, and also because a microkernel cannot be extended
	to new arbitrary uncontrolled usage patterns such as a monolithic kernel
	with loadable modules. As such, large objects are rare, and their use
	infrequent, which is compatible with the use of kernel virtual memory.

	* kern/slab.c: Update module description.
	(KMEM_CF_SLAB_EXTERNAL, KMEM_CF_VERIFY): Update values.
	(KMEM_CF_DIRECT): Remove macro.
	(KMEM_CF_DIRECTMAP): New macro.
	(kmem_pagealloc_directmap, kmem_pagefree_directmap,
	kmem_pagealloc_virtual, kmem_pagefree_virtual): New functions.
	(kmem_pagealloc, kmem_pagefree, kmem_slab_create, kmem_slab_destroy,
	kalloc, kfree): Update to use the new pagealloc functions.
	(kmem_cache_compute_sizes): Update the algorithm used to determine slab
	size and other cache properties.
	(kmem_slab_use_tree, kmem_cache_free_to_slab, host_slab_info): Update to
	correctly use the cache flags.
	(slab_init): Add KMEM_CACHE_DIRECTMAP to the kmem_slab_cache init flags.
	* kern/slab.h (KMEM_CACHE_VERIFY): Change value.
	(KMEM_CACHE_DIRECTMAP): New macro.
	* vm/vm_map.c (vm_map_init): Add KMEM_CACHE_DIRECTMAP to the
	vm_map_entry_cache init flags.

2016-02-16  Richard Braun  <rbraun@sceen.net>

	Avoid panics on physical memory exhaustion
	* vm/vm_resident (vm_page_grab): Return NULL instead of calling panic
	on memory exhaustion.

2016-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Reduce VM_KERNEL_MAP_SIZE
	Now that KMEM_MAP_SIZE (128MiB) has been removed.

	* i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE): Decrease by 128MiB.

2016-02-07  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: initialize external maps
	* vm/vm_external.c (vm_external_create): Initialize allocated maps.

2016-02-07  Richard Braun  <rbraun@sceen.net>

	Fix page cache accounting
	* vm/vm_object.c (vm_object_bootstrap): Set template object `cached'
	member to FALSE.
	(vm_object_cache_add, vm_object_cache_remove): New functions.
	(vm_object_collect, vm_object_deallocate, vm_object_lookup,
	vm_object_lookup_name, vm_object_destroy): Use new cache management functions.
	(vm_object_terminate, vm_object_collapse): Make sure object isn't cached.
	* vm/vm_object.h (struct vm_object): New `cached' member.

2016-02-07  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: allocate a large map for all objects larger than SMALL_SIZE
	* vm/vm_external.c (vm_external_create): Allocate a large map for all
	objects larger than SMALL_SIZE.  'vm_external_state_{g,s}et' can deal
	with offsets larger than 'LARGE_SIZE', so currently objects larger
	than 'LARGE_SIZE' are missing out on the optimization.

	vm: remove unused field from struct vm_external
	* vm/vm_external.h (struct vm_external): Remove unused field
	'existence_count'.

2016-02-07  Richard Braun  <rbraun@sceen.net>

	Remove kmem map
	Now that the slab allocator doesn't use kernel virtual memory any more,
	this map has become irrelevant.

	* kern/slab.c (KMEM_MAP_SIZE): Remove macro.
	(kmem_map_store, kmem_map): Remove variables.
	(slab_init): Remove call kmem_submap.
	* kern/slab.h (kmem_map): Remove extern declaration.

2016-02-06  Richard Braun  <rbraun@sceen.net>

	Change computation of slab size
	Allocating directly out of the physical memory allocator makes the slab
	allocator vulnerable to failures due to fragmentation. This change makes
	the slab allocator use the lowest possible size for its slabs to reduce
	the chance of contiguous allocation failures.

	* kern/slab.c (KMEM_MIN_BUFS_PER_SLAB, KMEM_SLAB_SIZE_THRESHOLD): Remove
	macros.
	(kmem_cache_compute_sizes): Update the algorithm used to determine slab
	size and other cache properties.

2016-02-02  Richard Braun  <rbraun@sceen.net>

	Fix various memory managment errors
	A few errors were introduced in the latest changes.

	o Add VM_PAGE_WAIT calls around physical allocation attempts in case of
	memory exhaustion.
	o Fix stack release.
	o Fix memory exhaustion report.
	o Fix free page accounting.

	* kern/slab.c (kmem_pagealloc, kmem_pagefree): New functions
	(kmem_slab_create, kmem_slab_destroy, kalloc, kfree): Use kmem_pagealloc
	and kmem_pagefree instead of the raw page allocation functions.
	(kmem_cache_compute_sizes): Don't store slab order.
	* kern/slab.h (struct kmem_cache): Remove `slab_order' member.
	* kern/thread.c (stack_alloc): Call VM_PAGE_WAIT in case of memory
	exhaustion.
	(stack_collect): Call vm_page_free_contig instead of kmem_free to
	release pages.
	* vm/vm_page.c (vm_page_seg_alloc): Fix memory exhaustion report.
	(vm_page_setup): Don't update vm_page_free_count.
	(vm_page_free_pa): Check page parameter.
	(vm_page_mem_free): New function.
	* vm/vm_page.h (vm_page_free_count): Remove extern declaration.
	(vm_page_mem_free): New prototype.
	* vm/vm_pageout.c: Update comments not to refer to vm_page_free_count.
	(vm_pageout_scan, vm_pageout_continue, vm_pageout): Use vm_page_mem_free
	instead of vm_page_free_count, update types accordingly.
	* vm/vm_resident.c (vm_page_free_count, vm_page_free_count_minimum):
	Remove variables.
	(vm_page_free_avail): New variable.
	(vm_page_bootstrap, vm_page_grab, vm_page_release, vm_page_grab_contig,
	vm_page_free_contig, vm_page_wait): Use vm_page_mem_free instead of vm_page_free_count,
	update types accordingly, don't set vm_page_free_count_minimum.
	* vm/vm_user.c (vm_statistics): Likewise.

2016-02-02  Richard Braun  <rbraun@sceen.net>

	Fix unused variable warnings
	* i386/i386at/biosmem.c (biosmem_bootstrap): Remove unused variables.

2016-02-02  Richard Braun  <rbraun@sceen.net>

	Stack the slab allocator directly on top of the physical allocator
	In order to increase the amount of memory available for kernel objects,
	without reducing the amount of memory available for user processes,
	a new allocation strategy is introduced in this change.

	Instead of allocating kernel objects out of kernel virtual memory,
	the slab allocator directly uses the direct mapping of physical
	memory as its backend. This largely increases the kernel heap, and
	removes the need for address translation updates.

	In order to allow this strategy, an assumption made by the interrupt
	code had to be removed. In addition, kernel stacks are now also
	allocated directly from the physical allocator.

	* i386/i386/db_trace.c: Include i386at/model_dep.h
	(db_i386_reg_value): Update stack check.
	* i386/i386/locore.S (trap_from_kernel, all_intrs,
	int_from_intstack): Update interrupt handling.
	* i386/i386at/model_dep.c: Include kern/macros.h.
	(int_stack, int_stack_base): New variables.
	(int_stack_high): Remove variable.
	(i386at_init): Update interrupt stack initialization.
	* i386/i386at/model_dep.h: Include i386/vm_param.h.
	(int_stack_top, int_stack_base): New extern declarations.
	(ON_INT_STACK): New macro.
	* kern/slab.c: Include vm/vm_page.h
	(KMEM_CF_NO_CPU_POOL, KMEM_CF_NO_RECLAIM): Remove macros.
	(kmem_pagealloc, kmem_pagefree, kalloc_pagealloc, kalloc_pagefree): Remove
	functions.
	(kmem_slab_create): Allocate slab pages directly from the physical allocator.
	(kmem_slab_destroy): Release slab pages directly to the physical allocator.
	(kmem_cache_compute_sizes): Update the slab size computation algorithm to
	return a power-of-two suitable for the physical allocator.
	(kmem_cache_init): Remove custom allocation function pointers.
	(kmem_cache_reap): Remove check on KMEM_CF_NO_RECLAIM.
	(slab_init, kalloc_init): Update calls to kmem_cache_init.
	(kalloc, kfree): Directly fall back on the physical allocator for big
	allocation sizes.
	(host_slab_info): Remove checks on defunct flags.
	* kern/slab.h (kmem_slab_alloc_fn_t, kmem_slab_free_fn_t): Remove types.
	(struct kmem_cache): Add `slab_order' member, remove `slab_alloc_fn' and
	`slab_free_fn' members.
	(KMEM_CACHE_NOCPUPOOL, KMEM_CACHE_NORECLAIM): Remove macros.
	(kmem_cache_init): Update prototype, remove custom allocation functions.
	* kern/thread.c (stack_alloc): Allocate stacks from the physical allocator.
	* vm/vm_map.c (vm_map_kentry_cache, kentry_data, kentry_data_size): Remove
	variables.
	(kentry_pagealloc): Remove function.
	(vm_map_init): Update calls to kmem_cache_init, remove initialization of
	vm_map_kentry_cache.
	(vm_map_create, _vm_map_entry_dispose, vm_map_copyout): Unconditionnally
	use vm_map_entry_cache.
	* vm/vm_map.h (kentry_data, kentry_data_size, kentry_count): Remove extern
	declarations.
	* vm/vm_page.h (VM_PT_STACK): New page type.
	* device/dev_lookup.c (dev_lookup_init): Update calls to kmem_cache_init.
	* device/dev_pager.c (dev_pager_hash_init, device_pager_init): Likewise.
	* device/ds_routines.c (mach_device_init, mach_device_trap_init): Likewise.
	* device/net_io.c (net_io_init): Likewise.
	* i386/i386/fpu.c (fpu_module_init): Likewise.
	* i386/i386/machine_task.c (machine_task_module_init): Likewise.
	* i386/i386/pcb.c (pcb_module_init): Likewise.
	* i386/intel/pmap.c (pmap_init): Likewise.
	* ipc/ipc_init.c (ipc_bootstrap): Likewise.
	* ipc/ipc_marequest.c (ipc_marequest_init): Likewise.
	* kern/act.c (global_act_init): Likewise.
	* kern/processor.c (pset_sys_init): Likewise.
	* kern/rdxtree.c (rdxtree_cache_init): Likewise.
	* kern/task.c (task_init): Likewise.
	* vm/memory_object_proxy.c (memory_object_proxy_init): Likewise.
	* vm/vm_external.c (vm_external_module_initialize): Likewise.
	* vm/vm_fault.c (vm_fault_init): Likewise.
	* vm/vm_object.c (vm_object_bootstrap): Likewise.
	* vm/vm_resident.c (vm_page_module_init): Likewise.
	(vm_page_bootstrap): Remove initialization of kentry_data.

2016-01-30  Richard Braun  <rbraun@sceen.net>

	Fix early page allocation on Xen
	The Xen target was completely ignored when porting the biosmem and
	vm_page physical memory allocators. Let's fix this.

	* i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/biosmem.{c,h}.
	* i386/i386/vm_page.h (VM_PAGE_MAX_SEGS, VM_PAGE_DIRECTMAP_LIMIT,
	VM_PAGE_HIGHMEM_LIMIT): Define for Xen.
	* i386/i386at/biosmem.c: Include mach/xen.h.
	(biosmem_panic_setup_msg): Comment out for Xen since it's unused.
	(biosmem_map_build, biosmem_map_build_simple,
	biosmem_save_cmdline_sizes, biosmem_find_boot_data_update,
	biosmem_find_boot_data, biosmem_setup_allocator): Likewise.
	(biosmem_bootstrap_common): New function.
	(biosmem_xen_bootstrap): Likewise, for Xen.
	(biosmem_bootalloc): Perform bottom-up allocations for Xen.
	* i386/i386at/biosmem.h (biosmem_xen_bootstrap): New prototype, for Xen.
	* i386/i386at/model_dep.c (i386at_init): Call biosmem_xen_bootstrap instead
	of biosmem_bootstrap on Xen.
	* i386/include/mach/i386/vm_types.h (phys_addr_t): Define as an unsigned
	64-bits integer when PAE is enabled.

2016-01-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable probing legacy IDE when AHCI driver works
	* 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.

	Use PCI macros
	* 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.

	ahci: print PCI bus/dev/fun in hexadecimal
	* linux/dev/drivers/block/ahci.c: Print PCI bus/dev/fun number in
	hexadecimal

2016-01-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fallback on direct PCI access when no BIOS32 is available
	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-23  Richard Braun  <rbraun@sceen.net>

	Merge branch 'rbraun/vm_page'

2016-01-23  Richard Braun  <rbraun@sceen.net>

	Use vm_page as the physical memory allocator
	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-23  Richard Braun  <rbraun@sceen.net>

	Import the vm_page module from X15 and relicense to GPLv2+
	* vm/vm_page.c: New File.
	* vm/vm_page.h: Merge vm_page.h from X15.
	(struct vm_page): New members: node, type, seg_index, order,
	vm_page_header. Turn phys_addr into a phys_addr_t.

	Import the biosmem module from X15 and relicense to GPLv2+
	* i386/i386at/biosmem.c: New file.
	* i386/i386at/biosmem.h: Likewise.

	Import the multiboot module from X15 and relicense to GPLv2+
	* i386/include/mach/i386/multiboot.h: Merge multiboot.h from X15.

	Import the elf module from X15 and relicense to GPLv2+
	* i386/i386at/elf.h: New file.

	Import the log2 module from X15 and relicense to GPLv2+
	* kern/log2.h: New file.

2016-01-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with gcc-6
	* linux/src/include/linux/compiler-gcc6.h: New file.

2016-01-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increase kernel map size
	To avoid running out of memory due to the increased consumption by radix
	trees which replaced arrays.

	* kern/slab.c (KMEM_MAP_SIZE): Bump from 96MiB to 128MiB.
	* i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE): Add 32MiB accordingly.

2016-01-02  Richard Braun  <rbraun@sceen.net>

	Completely disable strict aliasing
	* Makefile.am (AM_CFLAGS): Add -fno-strict-aliasing.

	Fix object page list type
	* vm/vm_object.h (struct vm_object): Use queue_head_t instead of
	queue_chain_t as the page list type.

2016-01-02  Flavio Cruz  <flaviocruz@gmail.com>

	replace extern with static in some linux code
	* 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.

	fix t_addr assignment in lpropen
	* i386/i386at/lpr.c (lpropen): Fix assignment to t_addr.

2016-01-01  Flavio Cruz  <flaviocruz@gmail.com>

	remove unnused disk code and headers
	* 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.

	fix some compiler warnings in gnumach
	* 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 *.

2016-01-01  Richard Braun  <rbraun@sceen.net>

	Slightly improve map debugging readability
	* vm/vm_object.c (vm_object_print): Break line so all debugging output fits
	in a page.

2015-12-29  Richard Braun  <rbraun@sceen.net>

	Improve map debugging readability
	* vm/vm_map.c (vm_map_print): Reduce indentation, break lines earlier.
	(vm_map_copy_print): Likewise.
	* vm/vm_object.c (vm_object_print): Likewise.

	Improve VM map debugging
	* vm/vm_map.c (vm_map_print): Update arguments to conform to ddb
	protocol.
	* vm/vm_print.h (vm_map_print): Likewise for prototype.

	Fix vm_map_copyout
	* vm/vm_map.c (vm_map_copyout): Reinitialize copy map red-black tree.

2015-12-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix boot under kvm in linux 4.3
	* i386/i386/locore.S (discover_x86_cpu_type): Disable Cyrix CPU discovery.

2015-11-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Nicer out of memory condition reporting
	* vm/vm_object.c (_vm_object_allocate): Return 0 immediately when
	kmem_cache_alloc returned 0.
	(vm_object_allocate): Panic when _vm_object_allocate returns 0.

2015-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix wired accounting
	* vm/vm_map.c (vm_map_pageable_common): Put back wired_count decrementation
	into user_wired_count test.

	Fix ahci unit MAX_PORTS check
	* linux/dev/drivers/block/ahci.c (ahci_do_request): Fix checking unit
	against MAX_PORTS.

	Fix bound
	* i386/i386at/lpr.c (lprprobe): Fix checking unit against NLPR.

	Fix missing format in printk
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing format.

2015-10-31  Thomas Schwinge  <thomas@codesourcery.com>

	GNU Mach 1.6
	* version.m4 (AC_PACKAGE_VERSION): Set to 1.6.
	* NEWS: Finalize for 1.6.

2015-10-31  Thomas Schwinge  <thomas@codesourcery.com>

	Rework *.msgids handling when neither client nor server stubs are required
	Originally added in commit 255c47e669819f153c722c98a230f6fe4e6ece08, but "make
	distcheck" didn't like that:

	    [...]
	    ERROR: files left in build directory after distclean:
	    ./ipc/notify.msgids
	    Makefile:7489: recipe for target 'distcleancheck' failed
	    make[1]: *** [distcleancheck] Error 1
	    make[1]: Leaving directory '[...]/gnumach/release.build/gnumach-1.5/_build/sub'
	    Makefile:7416: recipe for target 'distcheck' failed
	    make: *** [distcheck] Error 1

	Instead of special-casing that, generalize the Makefile rules.

	* Makefrag.am (nodist_lib_dep_tr_for_defs_a_SOURCES): Add
	ipc/notify.none.defs.c.
	(nodist_libkernel_a_SOURCES): Add ipc/notify.none.msgids.
	(gnumach.msgids): Remove ipc/notify.msgids prerequisite.
	* Makerules.mig.am (%.msgids): Remove rule, and instead...
	(%.none.defs.c, %.none.msgids): ... add these rules.

2015-10-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Update NEWS file

2015-10-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix time going back in Xen case
	when backward time correction happens to get bigger than the tick duration.

	* kern/mach_clock.c (clock_interrupt): When `tickdelta' is bigger than `usec',
	truncate it to `usec-1'.

2015-10-05  Joshua Branson  <bransoj@hotmail.com>

	Add generated mach documentation files to gitignore
	* .gitignore: Add doc/mach.aux doc/mach.cp doc/mach.cps doc/mach.fn
	doc/mach.fns doc/mach.ky doc/mach.log doc/mach.pdf doc/mach.pg doc/mach.toc
	doc/mach.tp doc/mach.vr.

2015-09-29  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/slab: print total used and reclaimable memory
	* kern/slab.c (_slab_info): Print total used and reclaimable memory.

	kern/slab: include flags in the slab information
	* kern/slab.c (_slab_info): Include flags in the slab information.

	ddb: fix line formatting
	* ddb/db_output.c (db_putchar): Fix off-by-one, allowing one more
	character to be printed before the newline is inserted.

	ddb: add new command `show slabinfo'
	* ddb/db_command.c (db_show_cmds): Add `slabinfo'.
	* kern/slab.c (slab_info): Generalize so that it can be used with
	different printf-like functions, and turn it into a static function.
	(slab_info): New wrapper retaining the old behaviour.
	(db_show_slab_info): New wrapper that uses `db_printf' instead.
	* kern/slab.h (db_show_slab_info): New declaration.

2015-09-27  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: trace syscalls of a single task
	* i386/i386/debug_i386.c (syscall_trace_task): New variable.
	(syscall_trace_print): If set, trace only syscalls from this task.

	i386: improve syscall tracing
	* kern/syscall_sw.h (mach_trap_t): Turn unused field into `mach_trap_name'.
	(MACH_TRAP, MACH_TRAP_STACK): Record name.
	* i386/i386/debug_i386.c (syscall_trace_print): Use the name and
	format the arguments to look like c.

	Fix build with -DDEBUG
	* device/cirbuf.c: Add missing include.
	* i386/i386/debug.h (dump_ss): Hide declaration from assembler.
	* i386/i386/debug_i386.c: Fix include.
	* kern/sched_prim.h: Add missing include, fix declaration.

	kern/bootstrap: drop into the debugger
	* kern/bootstrap.c (boot_script_prompt_task_resume): Drop into the
	debugger instead of merely waiting for return using `safe_gets', which
	disables interrupts, making it impossible to break into the debugger
	using the magic keys.

2015-09-19  Flávio Cruz  <flaviocruz@gmail.com>

	Add macros to convert between time_value_t and timespec
	* include/mach/time_value.h (TIME_VALUE_TO_TIMESPEC,
	TIMESPEC_TO_TIME_VALUE): New macros

2015-09-07  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: use proper memory fences when handling the mapped time
	* include/mach/time_value.h (struct mapped_time_value): Adjust comment.
	* kern/mach_clock.c (mtime): Likewise.  Also make it volatile.
	(update_mapped_time): Use full hardware barriers.
	(read_mapped_time): New macro with proper fences.
	(record_time_stamp, host_get_time): Use the new macro.

2015-09-07  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix loop reading the time value
	Previously, recent versions of gcc would hoist the loads out of the
	loop reading the time value.

	* kern/macros.h (access_once): New macro.
	* kern/mach_clock.c (host_get_time): Use the new macro to prevent the
	loads from being hoisted out of the loop.

2015-09-07  Rik van Riel  <riel@conectiva.com.br>

	commit fce798016c4bd2be89b86b0d343ab54505409412
	    [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.

2015-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Reserve 64k at beginning of memory, not just 4k
	Linux does this to be extra careful with some BIOSes which apparently
	spuriously write between 4k and 64k.

	* i386/i386at/model_dep.c (RESERVED_BIOS): New macro.
	(avail_next, mem_size_init, init_alloc_aligned): Use RESERVED_BIOS instead
	of hardcoded 0x1000.

2015-08-30  James Clarke  <jrtc27@jrtc27.com>

	Fix printk not handling ANSI escape codes
	* i386/i386at/kd.c (kdstart): Moved escape sequence handling to new
	kd_putc_esc function.
	(kd_putc_esc): New function with logic from kdstart.
	(kdcnputc): Call kd_putc_esc rather than kd_putc to allow for ANSI
	escape codes.
	* i386/i386at/kd.h (kd_putc_esc): New function.

2015-08-28  Flávio Cruz  <flaviocruz@gmail.com>

	Make sure the reply port's reference is released when the thread needs to be halted.
	* kern/thread.h (thread_halt_self): Add continuation_t parameter.
	* kern/thread.c (thread_halt_self): Pass continuation_t parameter to
	thread_block instead of thread_exception_return.
	* kern/ast.c (ast_taken): Pass thread_exception_return to thread_halt_self.
	* kern/profile.c (profile_thread): Likewise.
	* kern/exception.c (exception_no_server): Likewise.
	(thread_release_and_exception_return): New function.
	(exception_raise_continue_slow): Pass thread_release_and_exception_return to
	thread_halt_self.

2015-08-28  Flávio Cruz  <flaviocruz@gmail.com>

	Add a thread_no_continuation definition
	to replace the use of the NULL pointer.

	* kern/sched_prim.h (thread_no_continuation): New macro.
	* kern/machine.c (processor_assign, processor_doaction): Use
	thread_no_continuation instead of 0.
	* kern/profile.c (send_last_sample_buf): Likewise
	* kern/sched_prim.c (thread_sleep, thread_invoke, thread_dispatch):
	Likewise.
	* kern/task.c (task_terminate, task_assign): Likewise.
	* kern/thread.c (thread_suspend): Likewise.
	* kern/thread.h (struct thread): Change type of swap_func field to
	continuation_t.

2015-08-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/bootstrap: tune locking
	* kern/bootstrap.c (boot_script_exec_cmd): Avoid holding the lock
	across the call to `thread_create'.

	i386: enable assertions
	* i386/intel/pmap.c (pmap_page_protect): Enable assertions.
	(phys_attribute_clear, phys_attribute_test): Likewise.

	kern: really zero-out unused simple lock info entries
	* kern/lock.c (simple_unlock): Really zero-out unused simple lock info
	entries.

2015-08-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: fix panic message
	* i386/intel/pmap.c (pmap_page_protect): Fix function name in panic
	message.

	vm: collapse unreachable branch into assertion
	* vm/vm_object.c (vm_object_collapse): Collapse unreachable branch
	into assertion.

2015-08-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: keep track of the writer when debugging locks
	* configfrag.ac (MACH_LDEBUG): Adjust comment, we use it to sanity
	check all locks now.
	* kern/lock.c (lock_write): Keep track of the writer thread.
	(lock_done): Clear writer.
	(lock_read_to_write): Keep track of the writer thread.
	(lock_write_to_read): Assert that the current thread holds the lock.
	Clear writer.
	(lock_try_write): Keep track of the writer thread.
	(lock_try_read_to_write): Likewise.
	(lock_set_recursive): Assert that the current thread holds the lock.
	* kern/lock.h (struct lock): New field `writer'.
	(have_read_lock, have_write_lock, have_lock): New macros that can be
	used to assert that the current thread holds the given lock.  If
	MACH_LDEBUG is not set, they evaluate to true.

2015-08-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: improve simple lock debugging
	Do not bother saving the return address when acquire a simple lock.
	Save the location as provided by the compiler as string instead.  Also
	save the lock parameter.

	* kern/lock.c (struct simple_locks_info): Drop `ra', add `expr', `loc'.
	(simple_lock): Rename to `_simple_lock', add expression and location
	parameters and save them.
	(simple_lock_try): Likewise.
	(simple_unlock): Zero-out the now unused slot in the list of taken locks.
	(db_show_all_slocks): Use the new information.
	* kern/lock.h (simple_lock, simple_lock_try): Provide macro versions
	passing the location and expression as string.

2015-08-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: disable the simple lock checks while debugging
	* kern/lock.c (do_check_simple_locks): New variable.
	(check_simple_locks): Make check conditional.
	(check_simple_locks_{en,dis}able): New functions.
	* kern/lock.h (check_simple_locks_{en,dis}able): New declarations.
	* ddb/db_trap.c (db_task_trap): Disable simple lock checks.

2015-08-15  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: fix compiler warning
	* vm/vm_user.c (vm_wire): Drop unused but set variable `host'.

	vm: enable extra assertions
	* vm/vm_fault.c (vm_fault_page): Enable extra assertions.

	Avoid re-defining macros
	* kern/macros.h: Avoid re-defining macros.
	* linux/src/include/linux/compiler-gcc.h: Likewise.
	* linux/src/include/linux/compiler.h: Likewise.

2015-07-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: add boot-time clock, use it for time stamps
	The kernel keeps track of task and thread creation times by saving a
	time stamp.  Previously, the real-time clock was used for this.  When
	the real-time clock is changed, however, the reference frame for the
	time stamps is lost.  This surfaced in Hurd systems reporting
	spuriously long uptimes.

	Fix this by creating a boot-time clock and use it as reference frame
	for the time stamps.

	* kern/mach_clock.c (clock_boottime_offset): Create clock by keeping
	track of the offset from the real-time.
	(clock_boottime_update): New function.
	(record_time_stamp): Use the boot-time clock for time stamps.
	(read_time_stamp): New function to convert it back to real-time.
	(host_set_time): Call `clock_boottime_update'.
	* kern/mach_clock.h (record_time_stamp): Amend comment.
	(read_time_stamp): New declaration.
	* kern/task.c (task_info): Use `read_time_stamp'.
	* kern/thread.c (thread_info): Likewise.

2015-07-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: provide time-value substraction
	* include/mach/time_value.h (time_value_assert): New macro to assert
	that the given value is well-formed.
	(time_value_add_usec): Use the new macro.
	(time_value_sub_usec): New macro.
	(time_value_add): Use `time_value_add_usec'.
	(time_value_sub_usec): New macro.

	kern/lock: make sure the macros are only used on simple locks
	* kern/lock.h (struct slock, simple_lock_data_empty): Add field
	`is_a_simple_lock'.
	(simple_lock_assert): New macro that tests for `is_a_simple_lock'.
	Use this macro to assert that the arguments to various other macros
	are indeed simple locks.

	Disable the kernel tracing system XPR
	* configfrag.ac (XPR_DEBUG): Disable tracing system.

	ipc/space: inline reference counting
	* ipc/ipc_space.h (is_{reference,release}): Use the macro variant.

	Make sure the field offsets are updated
	* Makerules.am: Make sure the field offsets are updated.

2015-07-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/bootstrap: deallocate thread
	Previously, killing the thread would fail because of the extra
	reference, making task_terminate loop forever.

	* kern/bootstrap.c (boot_script_exec_command): Deallocate thread.

2015-07-19  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/bootstrap: deallocate task
	* kern/bootstrap.c (boot_script_free_task): Deallocate task.

2015-07-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	linux/net: fix build with -O0
	* linux/src/drivers/net/pci-scan.c: Avoid #erroring out.

2015-07-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/printf: do not serialize printf and co
	A lot of code assumes that printf is re-entrant, e.g. the pagination
	code in the debugger, or any use of assert inside the console driver.

	* kern/printf.c: Drop the lock serializing calls to `_doprnt'.
	(printf_init): Remove function.
	* kern/printf.h (printf_init): Remove declaration.
	* kern/startup.c (setup_main): Remove call to `printf_init'.

2015-07-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern/lock: use compiler built-in functions to get return address
	* kern/lock.c (struct simple_locks_info): Fix type of `ra'.
	(simple_lock, simple_lock_try): Use compiler built-in functions to get
	return address.

	kern/bootstrap: fix locking
	* kern/bootstrap.c (boot_script_exec_cmd): Add missing unlock.
	(user_bootstrap): Likewise.

	kern/slab: fix locking
	* kern/slab.c (host_slab_info): Fix locking.

2015-07-15  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: use a general lock to protect IPC spaces
	This fixes a corruption in the radix trees representing the IPC spaces
	when memory was tight.

	* ipc/ipc_space.h: Use a general lock to protect IPC spaces.

2015-07-15  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: fix the locking of the IPC entry allocation functions
	* ipc/ipc_entry.c (ipc_entry_alloc): Assume the space is write-locked.
	(ipc_entry_alloc_name): Likewise.
	* ipc/ipc_object.c: Fix the locking around all call sites to the two
	functions where the space was not locked before.

	i386: fix typo
	* i386/intel/pmap.c: Fix typo.

2015-07-12  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: avoid kmem_alloc
	* ipc/ipc_table.c (ipc_table_alloc): Unconditionally use `kalloc'.
	(ipc_table_free): Unconditionally use `kfree'.

2015-07-12  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: really fix traversing the list of inactive pages
	Previously, the pageout code traversed the list of pages in an object
	instead of the list of inactive pages.

	* vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
	inactive pages.

2015-07-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: make sure the queue macros are only used on queues
	This turns mistakes as the one corrected in e59f05e9 into compile-time
	errors.

	* kern/queue.h: Add a new macro, queue_assert, and use it to assert
	that all arguments given to the queue macros have the correct type.
	* device/net_io.c (ENQUEUE_DEAD): Adapt to the fact that
	`queue_next(q)' is no longer an lvalue.

2015-07-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: fix traversing the list of inactive pages
	Previously, the pageout code traversed the hash table chain instead of
	the list of inactive pages.  The code merely compiled by accident,
	because the `struct page' also has a field called `next' for the hash
	table chain.

	* vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
	inactive pages.

2015-07-10  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: drop debugging remnants
	* vm/vm_object.c (vm_object_terminate): Drop debugging remnants.

	kern: make printf handle long long integers
	* Makefile.am (clib_routines): Steal `__umoddi3'.
	* kern/printf.c (MAXBUF): Increase size.
	(printnum, _doprnt): Handle long long integers.
	* kern/printf.h (printnum): Adjust declaration.

2015-07-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: fix panic message
	* vm/vm_kern.c (kmem_init): Fix panic message.

	i386: fix line wrapping in the immediate console
	* i386/i386at/immc.c (immc_cnputc): Fix line wrapping.

	kern: remove superfluous file
	* kern/server_loop.ch: Remove superfluous file.

	kern: improve error handling
	* kern/bootstrap.c (boot_script_exec_cmd): Improve error handling.

2015-07-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Allow non-privileged tasks to wire 64KiB task memory
	* doc/mach.texi (vm_wire): Document that the host port does not have to be
	privileged.
	* include/mach/mach_hosts.defs (vm_wire): Use mach_port_t instead of
	host_priv_t.
	* vm/vm_map.h (vm_map): Add user_wired field.
	* vm/vm_map.c (vm_map_setup): Initialize user_wired field to 0.
	(vm_map_pageable_common, vm_map_entry_delete, vm_map_copy_overwrite,
	vm_map_copyout_page_list, vm_map_copyin_page_list): When switching
	user_wired_count field of entry between 0 and non-0, accumulate the
	corresponding size into the user_wired field of map.
	* vm/vm_user.c (vm_wire): Turn host parameter into port parameter, and
	inline a version of convert_port_to_host_priv which records whether the host
	port is privileged or not.  When it is not privileged, check whether
	the additional amount to user_wired will overcome 64KiB.

2015-07-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with -O0
	* linux/src/include/linux/string.h (strcpy, strncpy, strcat, strncat,
	strchr, strrchr, strlen, strnlen, strcmp, strncmp, memmove,
	memscan): Comment out extern declarations.
	* linux/dev/include/asm-i386/string.h (strcpy, strncpy, strcat, strncat,
	strcmp, strncmp, strchr, strrchr, strlen, __memcpy, __constant_memcpy,
	memmove, memchr, __memset_generic, __constant_c_memset, strnlen,
	__constant_c_and_count_memset, memscan): Turn extern inline into static
	inline.
	* linux/dev/include/linux/fs.h (mark_buffer_uptodate): Likewise.
	* linux/src/include/asm-i386/bitops.h (set_bit, clear_bit, change_bit,
	test_and_set_bit, test_and_clear_bit, test_and_change_bit, test_bit,
	find_first_zero_bit, find_next_zero_bit, ffz, ffs): Likewise.
	* linux/src/include/asm-i386/io.h (virt_to_phys, phys_to_virt, __out##s,
	__in##s, ins##s, outs##s): Likewise.
	* linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up):
	Likewise.
	* linux/src/include/asm-i386/segment.h [!__OPTIMIZE]: Emit an ud2 instruction
	instead of an undefined reference.

2015-07-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing distributed file
	* Makefrag.am (EXTRA_DIST): Add ipc/notify.defs.

2015-06-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Fix re-configuring out-of-tree builds
	Previously, running `../configure ...' to reconfigure an out-of-tree
	build would link `machine' to `i386/i386' instead of `../i386/i386'
	(i.e. point to the build directory instead to the source) if
	`i386/i386' also exists in the build directory because of a previous
	build.

	* configfrag.ac: Prefix machine link target with `$srcdir'.

2015-06-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix restoring interrupts on timeout
	* linux/dev/drivers/block/ahci.c (ahci_identify): Restore flags before
	returning on timeout.

2015-06-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Print about powered-down AHCI ports
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Print messages when
	device is present but powered down.

2015-06-28  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ddb: automatically display stack traces
	* ddb/db_trap.c (db_task_trap): Automatically display stack traces if
	an unexpected trap occurs.

2015-06-28  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: improve the immediate console
	Improve the immediate console to the point that it can be enabled and
	display e.g. assertion failures from very early on (i.e. from
	`c_boot_entry').

	* device/cons.h (romgetc, romputc): New declarations.
	* i386/configfrag.ac: Add configuration variable.
	* i386/i386at/conf.c (dev_name_list): Add entry.
	* i386/i386at/cons_conf.c (constab): Add entry.
	* i386/i386at/immc.c: Add missing includes.
	(immc_cnprobe, immc_cninit, immc_cngetc, immc_romputc): New functions.
	(immc_cnputc): Fix signature, use virtual addresses.
	* i386/i386at/immc.h: New file.
	* i386/i386at/kd.c: Use `#if ENABLE_IMMEDIATE_CONSOLE'.
	* i386/i386at/kd.h (kd_setpos): Add missing declaration.
	* i386/i386at/model_dep.c (c_boot_entry): Install immediate console as
	early boot console.

2015-06-26  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: add comment
	* i386/i386at/model_dep.c (rebootflag): Explain flag.

2015-06-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix error handling
	This avoids calling `thread_deallocate' with an uninitialized value,
	as found by the Clang Static Analyzer.

	* kern/thread.c (kernel_thread): Fix error handling.

2015-06-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: add function attributes to the printf-functions
	* kern/printf.h (sprintf, snprintf, vsnprintf, printf): Add the
	`printf' function attribute that allows the compiler to check the
	format strings and arguments.

2015-06-05  Flávio Cruz  <flaviocruz@gmail.com>

	Fix typo
	* vm/vm_kern.c (kmem_alloc_aligned): Fix typo.

	Use custom port macros.
	* ipc/ipc_port.c (ipc_port_alloc_special): Use ip_alloc and ip_lock_init
	macros instead of manually inlining them.

2015-05-31  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: fix typo
	* ipc/notify.defs: Fix typo.

	Include the notify protocol in `gnumach.msgids'
	* Makefrag.am (gnumach.msgids): Add `notify.msgids' as prerequisite.
	* Makerules.mig.am: Add rule to generate the list of message ids when
	neither the client nor the server stubs are required.
	* ipc/notify.defs: New file.

2015-05-29  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix argument handling
	Previously, the processor argument was not checked.  If called with a
	non-processor argument (like a task), `processor' is set to NULL,
	triggering a page fault.  Likewise for the other functions.

	* kern/processor.c (processor_get_assignment): Fix argument handling.
	* kern/task.c (task_get_assignment): Likewise.
	* kern/thread.c (thread_get_assignment): Likewise.

2015-05-23  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Restrict `-fno-strict-aliasing' to the Linux drivers
	* Makefile.am: Move `-fno-strict-aliasing'...
	* linux/Makefrag.am: ... here.

	i386: avoid breaking the strict-aliasing rules
	* i386/i386/pcb.c (switch_ktss): Cleanly convert the value.

	kern: avoid breaking the strict-aliasing rules
	* kern/exception.c (exception_parse_reply): Use `BAD_TYPECHECK'.

	vm: drop unused `kmem_realloc'
	* vm/vm_kern.c (kmem_realloc): Remove function.
	(kmem_alloc_wired): Adopt comment.
	* vm/vm_kern.h (kmem_realloc): Remove declaration.

2015-05-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add stdint integer types in Linux glue
	* linux/dev/include/linux/types.h (int8_t, uint8_t, int16_t, uint16_t,
	int32_t, uint32_t, int64_t, uint64_t): New types.

2015-05-22  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: drop remnants of the IPC tables
	* ipc/ipc_table.c (ipc_table_entries): Remove.
	(ipc_table_entries_size): Likewise.
	(ipc_table_init): Remove initialization of `ipc_table_entries'.
	(ipc_table_realloc): Remove function.
	* ipc/ipc_table.h: Adjust comments.
	(ipc_table_entries): Remove declaration.
	(ipc_table_realloc): Likewise.
	(it_entries_{alloc,reallocable,realloc,free}): Remove macros.

	ipc: drop size parameter from `ipc_space_create'
	* ipc/ipc_space.c (ipc_space_create): Drop size parameter.
	* ipc/ipc_space.h (ipc_space_create): Adopt declaration, fix comment.
	* kern/ipc_tt.c (ipc_task_init): Adopt accordingly.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: inline key ipc entry lookup functions
	Declare functions looking up IPC entries that were previously inlined
	manually with `static inline' so that they will be inlined into the
	fast paths by the compiler.

	* ipc/ipc_entry.c (ipc_entry_lookup, ipc_entry_get,
	ipc_entry_dealloc): Move functions...
	* ipc/ipc_space.h: ... here, and declare them as `static inline'.
	* ipc/ipc_entry.h: Drop associated declarations.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: replace the IPC table with a radix tree
	Currently, the port names are mapped to an IPC object (e.g. a port)
	using a table.  This, however, requires large chunks of continuous
	memory, and leads to scalability problems as virtual kernel memory is
	a scarce resource.  To avoid excessive overhead, non-contiguous port
	names are spilled into a splay tree.

	Replace the IPC table with a radix tree.  As the radix tree is able to
	store non-contiguous names with reasonable overhead, we can drop the
	splay tree as well.

	* ipc/ipc_entry.c (ipc_entry_tree_collision): Remove function.
	(ipc_entry_cache): New variable.
	(ipc_entry_lookup): Replace with a radix tree lookup.
	(ipc_entry_get): The free list handling is changed a little.  Adopt
	accordingly.
	(ipc_entry_free_name): New function.
	(ipc_entry_alloc): Adopt accordingly.
	(ipc_entry_alloc_name): Likewise.
	(ipc_entry_dealloc): Likewise.
	(ipc_entry_grow_table): Remove function.
	* ipc/ipc_entry.h (struct ipc_entry): Update comment, add field for
	name and free list, remove unused fields.
	(ipc_entry_cache, ie_alloc, ie_free): New declarations.
	(struct ipc_tree_entry): Remove.  Also remove any related declarations.
	(ipc_entry_grow_table): Remove declaration.
	* ipc/ipc_init.c (ipc_bootstrap): Adopt initialization.
	* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): Use `ipc_entry_alloc'
	instead of re-coding it.  Adopt free list handling.
	(ipc_kmsg_copyout_object): Adopt free list handling, store the name.
	* ipc/ipc_object.c (ipc_object_copyout): Likewise.
	(ipc_object_copyout_multiname): Likewise.
	* ipc/ipc_space.c (ipc_space_create): Initialize radix tree and free list.
	Drop table and splay tree initialization.
	(ipc_space_destroy): Free ipc entries and radix tree, remove table and
	splay tree cleanup.
	* ipc/ipc_space.h (struct ipc_space): Add radix tree, free list, and size.
	Remove all fields related to the table and splay tree.
	* ddb/db_print.c (db_port_iterate): Adopt iteration.
	(db_lookup_port): Adopt lookup.
	* include/mach_debug/ipc_info.h: Remove unused parts of the debug interface.
	* include/mach_debug/mach_debug.defs: Likewise.
	* include/mach_debug/mach_debug_types.defs: Likewise.
	* ipc/mach_debug.c: Likewise.
	* ipc/ipc_right.c (ipc_right_reverse): Adopt lookup, store name.
	(ipc_right_check): Adopt removal.
	(ipc_right_destroy): Likewise.
	(ipc_right_dealloc): Likewise.
	(ipc_right_delta): Likewise.
	(ipc_right_copyin): Adopt insertion, adopt removal.
	(ipc_right_copyin_two): Adopt removal.
	(ipc_right_copyout): Adopt insertion, adopt removal.
	(ipc_right_rename): Likewise, also update comment.
	* ipc/mach_port.c (mach_port_names): Adopt iteration.
	(mach_port_get_set_status): Likewise.
	* ipc/port.h: Update comment.
	* ipc/ipc_hash.c: Delete file.
	* ipc/ipc_hash.h: Likewise.
	* ipc/ipc_splay.c: Likewise.
	* ipc/ipc_splay.h: Likewise.
	* Makefrag.am (libkernel_a_SOURCES): Remove these files.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: replace reverse hash table with a radix tree
	Currently, there is a hash table mapping (space, object) tuples to
	`ipc_entry' objects.  This hash table is intertwined with the IPC
	tables.  There is one hash table per IPC space, but it is only for the
	entries in the IPC table.  This hash table is called `local' in the
	source.  All IPC entries being spilled into the splay tree are instead
	mapped by a global hash table.

	Replace the local (i.e. per IPC space) reverse hash table with a radix
	tree.

	* ipc/ipc_entry.c (ipc_entry_grow_table): Adjust accordingly.
	* ipc/ipc_entry.h (struct ipc_entry): Adjust comment.
	* ipc/ipc_hash.c: Adjust comment explaining the local lookup table.
	(IPC_LOCAL_HASH_INVARIANT): New macro.
	(ipc_hash_local_lookup): Use the new `ipc_reverse_lookup' function.
	(ipc_hash_local_insert): Use the new `ipc_reverse_insert' function.
	(ipc_hash_local_delete): Use the new `ipc_reverse_remove' function.
	* ipc/ipc_space.c (ipc_space_create): Initialize radix tree.
	(ipc_space_destroy): Free radix tree.
	* ipc/ipc_space.h (struct ipc_space): Add radix tree.
	(ipc_reverse_insert): New function.
	(ipc_reverse_remove): Likewise.
	(ipc_reverse_remove_all): Likewise.
	(ipc_reverse_lookup): Likewise.
	* ipc/ipc_right.c (ipc_right_clean): Update comment.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: undo manual inlining of `ipc_entry_X' functions
	Today we can rely on the compiler to inline functions.  Undoing this
	manual optimization is a first step to replace the IPC tables.

	* ipc/mach_msg.c (mach_msg_trap): Undo the manual inlining of
	`ipc_entry_lookup', `ipc_entry_dealloc', and `ipc_entry_get'.
	* ipc/ipc_kmsg.c (ipc_kmsg_copyin_header, ipc_kmsg_copyout_header): Likewise.
	* kern/exception.c (exception_raise): Likewise.
	* kern/ipc_mig.c (fast_send_right_lookup): Likewise.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: add radix tree library
	Import a radix tree library from Richard Braun's librbraun.

	* Makefile.am (clib_routines): Steal `__ffsdi2'.
	* Makefrag.am (libkernel_a_SOURCES): Add new files.
	* kern/rdxtree.c: New file.
	* kern/rdxtree.h: Likewise.
	* kern/rdxtree_i.h: Likewise.
	* kern/startup.c (setup_main): Initialize radix tree library.

2015-05-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: gracefully handle resource shortage
	* kern/thread.c (stack_alloc): Report resource shortage.
	* kern/sched_prim.h (stack_alloc): Adjust declaration accordingly.
	* kern/thread_swap.c (thread_doswapin): Report resource shortage.
	(swapin_thread_continue): If the swap-in fails, put the thread back on
	the queue and go back to sleep.
	* kern/thread_swap.h (thread_doswapin): Adjust declaration accordingly.

	vm: gracefully handle resource shortage
	* vm/vm_object.c (vm_object_copy_call): Gracefully handle resource
	shortage by doing the allocation earlier and aborting the function if
	unsuccessful.

	kern: gracefully handle resource shortage
	* kern/task.c (task_create): Gracefully handle resource shortage.

2015-05-19  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: import `macros.h' from x15
	Import the macro definitions from the x15 kernel project, and replace
	all similar definitions littered all over the place with it.

	Importing this file will make importing code from the x15 kernel
	easier.  We are already using the red-black tree implementation and
	the slab allocator from it, and we will import even more code in the
	near future.

	* kern/list.h: Do not define `structof', include `macros.h' instead.
	* kern/rbtree.h: Likewise.
	* kern/slab.c: Do not define `ARRAY_SIZE', include `macros.h' instead.
	* i386/grub/misc.h: Likewise.
	* i386/i386/xen.h: Do not define `barrier', include `macros.h' instead.
	* kern/macro_help.h: Delete file.  Replaced by `macros.h'.
	* kern/macros.h: New file.
	* Makefrag.am (libkernel_a_SOURCES): Add new file, remove old file.
	* device/dev_master.h: Adopt accordingly.
	* device/io_req.h: Likewise.
	* device/net_io.h: Likewise.
	* i386/intel/read_fault.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_mqueue.h: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/ipc_splay.c: Likewise.
	* ipc/ipc_splay.h: Likewise.
	* kern/assert.h: Likewise.
	* kern/ast.h: Likewise.
	* kern/pc_sample.h: Likewise.
	* kern/refcount.h: Likewise.
	* kern/sched.h: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/timer.c: Likewise.
	* kern/timer.h: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_map.h: Likewise.
	* vm/vm_object.h: Likewise.
	* vm/vm_page.h: Likewise.

2015-05-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: avoid compiler warning
	* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys,
	copy_from_phys): Avoid compiler warning about `map' being used
	uninitialized.

2015-05-14  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: use macro to compute address of saved registers
	* i386/i386/pcb.c (stack_attach): Use `USER_REGS'.
	(stack_handoff): Likewise.

2015-05-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix semaphore failure path special calling convention
	* linux/src/include/asm-i386/semaphore.h (down): Pass semaphore address to
	down_failed through ecx.
	(down_interruptible): Likewise to down_failed_interruptible.
	(up): Likewise to up_wakeup.

2015-05-02  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix comment
	* kern/rbtree.h: Fix comment.

2015-05-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix warning
	* i386/i386at/rtc.c (rtcget, rtcput): Make functions take an rtc_st
	structure which it casts to char * itself.

	Fix warnings
	* device/ds_routines.c (device_open, ds_open_done, device_close,
	device_write, device_write_inband, ds_write_done, device_read,
	device_read_inband, ds_read_done, device_set_status, mach_device_get_status,
	device_set_filter, device_map, ds_no_senders): Convert from K&R declaration,
	fix type of `device' into void*.

	Fix block_io_mmap prototype
	* device/blkio.c (block_io_mmap): Fix prototype of dummy function.
	* device/blkio.h (block_io_mmap): Likewise.

2015-05-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use gnu89 inline style
	* Makefile.am (AM_CFLAGS): Add -fgnu89-inline option.

2015-05-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Replace clobbers with earlyclobbers
	Newer gccs consider the former "impossible"

	* linux/src/include/asm-i386/bitops.h (find_first_zero_bit): Replace
	clobbers with earlyclobbers.
	* linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up):
	Likewise.

2015-04-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with gcc-5
	* linux/src/include/linux/compiler-gcc5.h: New file.

2015-04-24  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: avoid hardcoding the lowest priority
	The number of priorities has been changed from 32 to 50 in
	6a234201081156e6d5742e7eeabb68418b518fad.

	* kern/syscall_subr.c (thread_depress_priority): Avoid hardcoding the
	lowest priority.

2015-04-23  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: disable stack allocation counters by default
	Disable the stack allocation counters by default.  Casual checking
	revealed that the hits-to-miss ratio is excellent.

	* kern/thread.c (stack_alloc_{hits,misses,max}): Move variables...
	* kern/counters.c: ... here, and add the usual counter prefix.
	* kern/counters.h: New declarations.

2015-04-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid accessing ip_protected_payload without the lock.
	* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): Avoid accessing
	dest->ip_protected_payload without the lock.
	* ipc/mach_msg.c (ipc/mach_msg.c): Avoid accessing
	dest_port->ip_protected_payload without the lock.

	Prepend 0x to hexadecimal offset
	* i386/i386/db_trace.c (db_i386_stack_trace): Prepend 0x to hexadecimal offset.

2015-04-10  Thomas Schwinge  <thomas@codesourcery.com>

	GNU Mach 1.5.
	* version.m4 (AC_PACKAGE_VERSION): Set to 1.5.
	* NEWS: Finalize for 1.5.

2015-03-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Give the Debian package name for the non-multilib libc.a
	* Makefile.am (clib-routines.o): Mention the Debian libc6-dev:i386 package.

2015-03-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Remove spl debugging in Xen case
	xen cli/sti doesn't use IF

	* i386/i386/spl.S [MACH_XEN]: Disable IF check.

2015-03-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Show odd number of ports
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Show odd number of ports.

2015-02-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use printf_once instead of recoding it
	* i386/i386at/kd_event.c: Call printf_once instead of recoding it.
	* i386/i386at/kd_mouse.c: Likewise.

	Limit printing "queue full" messages
	* i386/i386at/kd_event.c (kbd_enqueue): Print "queue full" warning only
	once.
	* i386/i386at/kd_mouse.c (mouse_enqueue): Likewise.

2015-02-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: inherit the name of the parent task
	* kern/task.c (task_create): Inherit the name of the parent task.

2015-02-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: specialize `copyinmsg' and `copyoutmsg'
	Previously, `copyinmsg' was the same function as `copyin'.  The former
	is for messages, and the size of messages is a multiple of four.
	Likewise for `copyoutmsg'.

	Provide a specialized version of both functions.  This shaves off a
	couple of instructions and improves our IPC performance.

	* i386/i386/locore.S (copyinmsg): New function.
	(copyoutmsg): New function.

2015-02-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: drop needless instruction from `copyout'
	* i386/i386/locore.S (copyout): Do not needlessly copy length to %eax
	first.

2015-02-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: improve assert
	Use the ternary operator to implement `assert' like it is done in the
	glibc.  The glibcs changelog does not mention the rationale behind
	this change, but doing the same seems to improve our IPC performance.

	* kern/assert.h (assert): Define macro using the ternary operator.

2015-02-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	linux: fix compiler warning
	If the loop above completes at least one iteration, `i' will be larger
	than zero.

	* linux/dev/glue/block.c (rdwr_full): Add assertion to appease the
	compiler.

2015-02-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: reduce the size of `struct thread'
	Reduce the size of `struct thread' by twelve bytes making it fit into
	exactly five cache lines (on 32-bit platforms).

	* kern/thread.h (struct thread): Group the state and all flags in a
	bitfield.
	(TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys
	for synchronization primitives like `thread_wakeup'.
	* kern/thread.c (thread_halt, thread_dowait, thread_suspend): Use the
	new keys instead of addresses of fields for the synchronisation.
	* kern/ipc_sched.c (thread_handoff): Likewise.
	* kern/sched_prim.c (thread_invoke, thread_dispatch): Likewise.

2015-02-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: avoid #if 0ing out thread_collect_scan
	Currently, `thread_collect_scan' does nothing because `pcb_collect' is
	a nop.  Its body is exempt from compilation by means of the
	preprocessor.

	This is unfortunate as it increases the risk of bitrot, and we still
	need to pay the price of rate-limiting thread_collect_scan.

	* kern/thread.c (thread_collect_scan): Drop #if 0 around the body.
	* vm/vm_pageout.c (vm_pageout_scan): Do not call
	`consider_thread_collect' and document why.

2015-02-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: fix typo
	* vm/vm_resident.c: Fix typo.

2015-01-22  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: warn about more port management bugs
	* ipc/mach_port.c (mach_port_destroy): Simplify expression.  Reword warning.
	(mach_port_deallocate): Likewise.
	(mach_port_mod_refs): Also warn about errors when using this function.

2015-01-02  Stefan Weil  <sw@weilnetz.de>

	vm: Fix typo in comment (found by codespell)

	kern: Fix typos in comments (found by codespell)

	ipc: Fix typo in comment (found by codespell)

	include: Fix typos in comments (found by codespell)

	i386: Fix typos in comments (found by codespell)

	device: Fix typos in comments (found by codespell)

	Makefile.am: Fix typos and grammar in comment

	ddb: Fix typos in comments (found by codespell)

2015-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Handle kernel traps happening before starting userland
	* i386/i386/trap.c (kernel_trap): When current_thread is null, assume that
	we are in kernel land.

2014-12-16  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: gracefully handle bogus sample pc sequence number
	If a sequence number larger than the sample control sequence number is
	supplied, `nsamples' becomes negative.  Handle this gracefully.

	* kern/pc_sample.c (get_sampled_pcs): Handle bogus sequence number.

2014-12-16  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: guard test code with `MACH_IPC_TEST'
	* ipc/ipc_kmsg.h (ikm_mark_bogus): New macro.
	(ipc_kmsg_rmqueue_first_macro): Use `ikm_mark_bogus'.
	* ipc/ipc_kmsg.c (ipc_kmsg_rmqueue): Likewise.

2014-12-16  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: tune size of cached kernel message buffers
	The previous limit was 256 bytes.  That seems a little crummy by
	todays standards, and we are frequently sending bigger packets
	(e.g. every RPC containing a string_t on Hurd).

	Use the page size for IKM_SAVED_KMSG_SIZE to make sure the page is
	pinned to a single processor.

	* ipc/ipc_kmsg.h (IKM_SAVED_KMSG_SIZE): Define to `PAGE_SIZE'.

2014-12-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make spl7 just clear IF instead of setting the PIC mask
	* i386/i386/spl.S (spl7): Just set curr_ipl and cli.
	(splx) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared.
	(splx): When staying at ipl7, do not enable interrupts.
	(spl) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared.
	(spl): When new ipl is 7, branch to spl7.
	* i386/i386/locore.S (TIME_TRAP_UENTRY, TIME_TRAP_SENTRY): Save flags, and
	restore them instead of blindly using sti.

2014-12-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Ship missing file
	* Makefrag.am (EXTRA_DIST): Add kern/task_notify.cli.

2014-12-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: add X_IMPORTS to ipc definitions
	This makes it possible to inject imports.

	* include/mach/gnumach.defs: Make it possible to inject imports.
	* include/mach/mach.defs: Likewise.
	* include/mach/mach_host.defs: Likewise.

2014-12-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: provide notifications about new tasks
	These notifications are sent to the port registered via
	`register_new_task_notification' and provide a robust parental
	relation between tasks to a userspace server.

	* Makefrag.am: Add task_notify.defs.
	* include/mach/gnumach.defs: Add register_new_task_notification.
	* include/mach/task_notify.defs: New file.
	* kern/task.c (new_task_notification): New variable.
	(task_create): Send new task notifications.
	(register_new_task_notification): Add server function.
	* kern/task_notify.cli: New file.

2014-12-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Retire procedure `old_mach_port_get_receive_status'
	Retire the compatibility RPC `old_mach_port_get_receive_status' that
	works like `mach_port_get_receive_status' but returns an
	`old_mach_port_status' object that lacks the `mps_seqno' field.

	Do not remove the type yet, so we do not break anyones build.  The RPC
	stubs currently distributed with the glibc require it.

	* include/mach/mach_port.defs (old_mach_port_get_receive_status): Drop RPC.
	* include/mach/mach_types.defs (old_mach_port_status_t): Drop type.
	* include/mach/port.h (old_mach_port_status_t): Add note to remove
	this for the 1.6 release.
	* ipc/mach_port.c (old_mach_port_get_receive_status): Drop function.

2014-12-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix pthread_create warning on translator termination
	This was due to task_terminate not actually properly suspending threads
	before disable the task port, which was thus preventing pthread_create
	from being able to create a stack. Thanks Gabriele Giacone for finding
	out a reproducer of this.

	* kern/task.h (task_hold_locked): New declaration.
	* kern/task.c (task_hold): Move the locked part of the code into...
	(task_hold_locked): ... new function.
	(task_terminate): Call task_hold_locked just before deactivating the
	task. Call ipc_task_disable after waiting for threads to actually
	suspend with task_dowait.

2014-12-01  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: disable all counters by default
	Make all five non-conditional counters conditional ones.  Casual
	checking revealed that the hits-to-miss ratio is excellent.

	* kern/counters.c: Make all counters conditional.
	* kern/counters.h: Likewise.
	* kern/ipc_sched.c: Likewise.
	* kern/sched_prim.c: Likewise.

2014-11-28  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: make `mach_port_t' payload-aware
	Honor a new macro `MACH_PAYLOAD_TO_PORT' to inject a translation
	function mapping payloads to port names in the definition of
	`mach_port_t'.

	* include/mach/std_types.defs (mach_port_t): Honor
	`MACH_PAYLOAD_TO_PORT'.
	* include/device/device.defs (reply_port_t): Likewise.
	* include/device/device_reply.defs (reply_port_t): Likewise.
	* include/device/device_request.defs (reply_port_t): Likewise.

2014-11-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix programming PIT counter
	* linux/dev/arch/i386/kernel/irq.c (init_IRQ): Properly mask 8 bits of
	PIT counter.

2014-11-21  David Michael  <fedora.dm0@gmail.com>

	Correct GCC's -Wformat-security issues
	* linux/pcmcia-cs/clients/axnet_cs.c (axdev_init): Add a format string
	literal where printk only has a single variable argument.
	* linux/src/drivers/net/3c507.c (el16_probe1): Likewise.
	* linux/src/drivers/net/3c509.c (el3_probe): Likewise.
	* linux/src/drivers/net/3c515.c (init_module): Likewise.
	(tc515_probe): Likewise.
	* linux/src/drivers/net/ac3200.c (ac_probe1): Likewise.
	* linux/src/drivers/net/apricot.c (apricot_probe): Likewise.
	* linux/src/drivers/net/at1700.c (at1700_probe1): Likewise.
	* linux/src/drivers/net/de4x5.c (de4x5_hw_init): Likewise.
	* linux/src/drivers/net/de600.c (de600_probe): Likewise.
	* linux/src/drivers/net/de620.c (de620_probe): Likewise.
	* linux/src/drivers/net/depca.c (depca_hw_init): Likewise.
	* linux/src/drivers/net/e2100.c (e21_probe1): Likewise.
	* linux/src/drivers/net/eepro.c (eepro_probe1): Likewise.
	* linux/src/drivers/net/eepro100.c (speedo_found1): Likewise.
	* linux/src/drivers/net/eexpress.c (eexp_hw_probe): Likewise.
	* linux/src/drivers/net/ewrk3.c (ewrk3_hw_init): Likewise.
	* linux/src/drivers/net/fmv18x.c (fmv18x_probe1): Likewise.
	* linux/src/drivers/net/hp-plus.c (hpp_probe1): Likewise.
	* linux/src/drivers/net/hp.c (hp_probe1): Likewise.
	* linux/src/drivers/net/lance.c (lance_probe1): Likewise.
	* linux/src/drivers/net/ne.c (ne_probe1): Likewise.
	* linux/src/drivers/net/pcnet32.c (pcnet32_probe1): Likewise.
	* linux/src/drivers/net/seeq8005.c (seeq8005_probe1): Likewise.
	* linux/src/drivers/net/smc-ultra.c (ultra_probe1): Likewise.
	* linux/src/drivers/net/smc-ultra32.c (ultra32_probe1): Likewise.
	* linux/src/drivers/net/wd.c (wd_probe1): Likewise.

2014-11-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Only set debug registers when they are used
	* i386/i386/db_interface.c (zero_dr): New variable
	(db_load_context): Do not set debug registers to zero when they are already
	zero.
	(db_dr): When kernel debug registers get zero, record that the debug
	registers have been zeroed.

2014-11-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add nodma options
	Some very slow qemu instances would eventually trigger DMA timeouts,
	let's give a way to disable DMA there, it does not actually slow down
	operations anyway.

	* linux/src/drivers/block/ide.h (ide_drive_s): Add nodma field.
	* linux/src/drivers/block/ide.c (do_identify): Do not call
	dmaproc(ide_dma_check) when nodma is 1.
	(ide_setup): Add nodma option.

2014-11-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Pass ide and hd kernel options to ide driver
	* linux/dev/drivers/block/genhd.c: Include <linux/hdreg.h> and
	<alloca.h>
	(device_setup): Look for ide and hd options, and call ide_setup with
	them.
	* linux/src/drivers/block/ide.c (ide_setup) [MACH]: Parse hd[0-7] instead
	of hd[a-h].

2014-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix documentation for vm_map
	doc/mach.texi (vm_map): Document that vm_map uses the address as a
	starting hint even when anywhere is TRUE.

	Revert "Make vm_map really ignore `address' when `anywhere' is true"
	This reverts commit 5ae510e35c54009626999a88f0f1cb34d6dfc94f.

2014-11-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: add a payload-aware intran mutator for device_t
	* include/device/device_types.defs (device_t): Add a payload-aware
	intran mutator.

	include: add a payload-aware intran mutator for notify_port_t
	* include/mach/notify.defs (notify_port_t): Add a payload-aware intran
	mutator.

	include: add a payload-aware intran mutator for memory_object_t
	* include/mach/mach_types.defs (memory_object_t): Add a payload-aware
	intran mutator.
	* include/mach/memory_object.defs: Likewise in the inlined type
	declarations.

2014-11-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix link refusal
	* Makefile.am (clib-routines.o): Refuse to link only when multiarch is
	detected.

2014-11-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Refuse to link against a libc with multiarch support
	We don't have support for this yet.

	* Makefile.am (clib-routines.o): Check for the presence of
	__init_cpu_features, and in such case refuse to continue.

2014-11-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build when gcc avoids inlining
	* ipc/ipc_port.h (ipc_port_flag_protected_payload,
	ipc_port_flag_protected_payload_set,
	ipc_port_flag_protected_payload_clear): Use static inline qualifier instead
	of extern inline.

2014-10-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "Make sure mig is available"
	This reverts commit b28e05e203e0739fa5db59c5af378b29eea7a232.

2014-10-10  Justus Winter  <4winter@informatik.uni-hamburg.de>

	doc: restore section `Inherited Ports'
	Previously, the section `Inherited Ports' was commented out.  This was
	done, as the functionality was unused by the Hurd.  The functions
	`mach_ports_register' and `mach_ports_lookup' were never removed, and
	are exposed to user space.

	This patch brings the documentation back and adds a remark at the top,
	that the section documents the original intentions for this interface.

	I chose bringing back the documentation over removing the
	functionality because I like to make use of it as a method for service
	discovery that is deliberately orthogonal to the way the service
	lookup is usually done in the Hurd.  This can be used to implement
	robust low-level debugging facilities.

	* doc/mach.texi: Restore section `Inherited Ports'.

2014-10-01  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Add protected payloads to NEWS

	ipc: provide the protected payload in ipc_kmsg_copyout_header
	* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is
	set for the destination port, provide it in msgh_protected_payload.
	* ipc/mach_msg.c (mach_msg_trap): Likewise in the fast paths.
	* doc/mach.texi (Message Receive): Document message semantics with
	protected payloads.

	include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD
	* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD.
	(MACH_MSG_TYPE_LAST): Adjust accordingly.
	* doc/mach.texi (Message Format): Document
	MACH_MSG_TYPE_PROTECTED_PAYLOAD.

	include: add msgh_protected_payload to mach_msg_header_t
	* include/mach/message.h (mach_msg_header_t): Add
	  msgh_protected_payload as a union with msgh_local_port.
	* doc/mach.texi (Message Format): Document msgh_protected_payload.

	ipc: implement mach_port_{set,clear}_protected_payload
	* include/mach/mach_port.defs: Add mach_port_{set,clear}_protected_payload.
	* ipc/mach_port.c: Implement mach_port_{set,clear}_protected_payload.
	* doc/mach.texi (Receive Rights): Document
	mach_port_{set,clear}_protected_payload.

2014-10-01  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: add protected payload
	Add a field ip_protected_payload and a flag ip_has_protected_payload
	to struct ipc_port.

	Clear the protected payload when a receive port is moved from one ipc
	space to another.  This is done to retain the old behavior of
	mach_msg, so that a port name is sent in the msgh_local_port field.
	If the new owner of that receive right wishes to use the protected
	payload mechanism, it has to be explicitly set again.

	* ipc/ipc_port.h (struct ipc_port): Add field ip_protected_payload.
	(ipc_port_set_protected_payload): Add function declaration.
	(ipc_port_clear_protected_payload): Likewise.
	(ipc_port_flag_protected_payload): Add accessor for the protected
	payload flag.
	(ipc_port_flag_protected_payload_set): Likewise.
	(ipc_port_flag_protected_payload_clear): Likewise.
	* ipc/ipc_port.c (ipc_port_init): Initialize protected payload.
	(ipc_port_print): Print protected_payload.
	(ipc_port_set_protected_payload): New function.
	(ipc_port_clear_protected_payload): Likewise.
	(ipc_port_destroy): Clear the payload when moving a receive port.
	* ipc/ipc_right.c (ipc_right_copyin): Likewise.
	(ipc_right_copyout): Likewise.
	* ipc/ipc_object.c (ipc_object_copyin_from_kernel): Likewise.
	* ipc/ipc_object.h (IO_BITS_PROTECTED_PAYLOAD): New bitmask.
	(IO_BITS_OTYPE): Adjust accordingly.

2014-09-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ipc: use fast modulo operation in local hash table
	* ipc/ipc_table.h: Document that table sizes must be powers of two.
	* ipc/ipc_hash.c (IH_LOCAL_HASH): Use fast modulo operation.

	kern: silence compiler warning about uninitialized variable
	* kern/slab.c (kmem_cache_compute_sizes): Initialize optimal_size and
	assert that a size is selected.

	kern: fix type of recompute_priorities
	* kern/sched_prim.c (recompute_priorities): Fix type.
	* kern/sched_prim.h (recompute_priorities): Likewise.

2014-09-26  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: create send rights as they are inserted at bootstrap time
	Previously, it was impossible to hand e.g. the master device port to
	more than one bootstrap task.  Fix this by creating the send right as
	it is inserted into the target task.

	* kern/bootstrap.c (bootstrap_create): Do not create the send rights
	here...
	(boot_script_insert_right): ... but here.

2014-09-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Update NEWS file

2014-09-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ddb: add support for ELF symbol tables
	* ddb/db_elf.c: New file.
	* ddb/db_elf.h: Likewise.
	* Makefrag.am (libkernel_a_SOURCES): Add db_elf.{c,h}.
	* ddb/db_sym.c (dummy_db_sym_init): New stub db_sym_init function.
	(db_sym_switch): Add ELF functions.
	* ddb/db_sym.h (SYMTAB_ELF): New macro.
	(elf_db_sym_init): New declaration.
	* i386/i386at/model_dep.c (c_boot_entry): Get ELF section header
	information from the multiboot structure, and call elf_db_sym_init.

	ddb: add `show all tasks' command
	* ddb/db_command.c (db_show_all_cmds): Add `tasks'.
	* ddb/db_print.c (db_show_all_tasks): New function.
	* ddb/db_print.h (db_show_all_tasks): New prototype.

2014-09-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Report DR6 to userland
	* i386/i386/trap.c (user_trap): On T_DEBUG, record the content of dr6 in
	PCB, and clear it.

2014-09-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make vm_map really ignore `address' when `anywhere' is true
	As vm_allocate does.

	* vm/vm_user.c (vm_map): When `anywhere' is true, set `address' to the
	minimum address of the `target_map'.

2014-09-01  Pietro Braione  <schizophonic@tiscali.it>

	Fix printf warning
	linux/src/drivers/net/sundance.c (start_tx): Fix format string according
	to parameter.

2014-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Tune pageout parameters
	This targets having always at least 8% free memory instead of just 1%.
	This has shown improving buildd stability a lot. Also increase the
	reserved amount to nowadays standards.

	* vm/vm_pageout.c (VM_PAGE_FREE_TARGET): Increase to 10%.
	(VM_PAGE_FREE_MIN): Increase to 8%.
	(VM_PAGE_FREE_RESERVED): Increase to 500 pages.
	(VM_PAGEOUT_RESERVED_INTERNAL): Increase to 150 pages.
	(VM_PAGEOUT_RESERVED_REALLY): Increase to 100 pages.

2014-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increate the pageout thread priority
	* vm/vm_pageout.c (vm_pageout): Set the priority to 0.

2014-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Bump NR_GRANT_PAGES
	This has shown needed on buildds with several disks and network
	interfaces.

	* xen/grant.c (NR_GRANT_PAGES): Increase from 4 to 8.

2014-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix computation
	* i386/i386at/com.c (comintr): Fix computation of '@'.

2014-08-22  Neal H. Walfield  <neal@walfield.org>

	Even less magic-looking control value
	* i386/i386at/com.c (comintr): Use 'A'-1 instead of '@'.

2014-08-22  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Support invoking the debugger over the serial console
	* i386/i386at/com.c (comintr): Invoke the debugger if ctrl-alt-d is
	pressed.
	* i386/i386at/com.h (kdb_kintr): Add declaration.

2014-07-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop debugging prints
	* i386/i386at/acpi.c (grub_machine_acpi_get_rsdpv2): Drop debugging
	prints.

2014-07-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not unmap page 0 when not needed
	Since we need it to access some BIOS information, e.g. at ACPI shutdown.  When
	the kernel VM is not starting at 0, there is already nothing mapped there in
	user tasks, anyway.

	* i386/i386at/model_dep.c (machine_init) [VM_MIN_KERNEL_ADDRESS != 0]:
	Do not call pmap_unmap_page_zero.
	* i386/intel/pmap.c (pmap_unmap_page_zero): Warn that unmapping page
	zero may break some BIOS functions.

2014-07-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document that io_map_cached leaks memory

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2014-07-06  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: use ACPI to power off the machine
	This is a mostly verbatim copy of acpihalt.c from GRUB2 with a little
	bit of glue code.

	* i386/Makefrag.am (libkernel_a_SOURCES): Add the new files.
	* i386/grub/acpi.h: Verbatim copy from GRUB2.
	* i386/grub/compiler.h: Likewise.
	* i386/grub/cpu/io.h: Likewise.
	* i386/grub/cpu/time.h: Likewise.
	* i386/grub/cpu/types.h: Likewise.
	* i386/grub/err.h: Likewise.
	* i386/grub/misc.h: Likewise.
	* i386/grub/mm.h: Likewise.
	* i386/grub/symbol.h: Likewise.
	* i386/grub/time.h: Likewise.
	* i386/grub/types.h: Likewise.
	* i386/i386at/acpi.c: Likewise.
	* i386/i386at/acpihalt.c: Likewise.
	(grub_acpi_halt): Map physical addresses.
	* i386/i386at/acpihalt.h: New file.
	* i386/grub/glue.h: Some glue macros.
	* i386/grub/i18n.h: Stub out i18n.
	* i386/i386at/grub_glue.c: Some glue code.
	* i386/i386at/model_dep.c (halt_all_cpus): Use grub_acpi_halt.

2014-07-06  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: add io_map_cached
	io_map_cached is like io_map, but reuses the old mapping if it is
	applicable.

	* i386/i386/io_map.c: Add io_map_cached.

2014-06-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	doc: explain the floating point flag in kdb output
	* doc/mach.texi (Kernel Debugger Commands): Explain the floating point
	flag.

2014-06-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: remap some keys
	As a convenience for the nice people using our debugger, remap some
	keys to the readline-like shortcuts supported by dde.

	* i386/i386at/kd.c (kdcnmaygetc): Remap some keys.

2014-06-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: reformat the key map
	* i386/i386at/kd.c (key_map): Remove superfluous newlines so that
	every entry fits into one line.  This way line numbers can be used as
	an index into the map.

	ddb: use db_thread_stat to format the flags
	* ddb/db_print.c (db_print_thread): Use db_thread_stat to format the
	flags.

	ddb: print task names if available
	* ddb/db_print.c (db_print_task): Print task name if available.
	* i386/i386/db_interface.c (db_task_name): Likewise.
	* i386/i386/db_machdep.h (DB_GNUMACH_TASK_NAME): Remove unused definition.

	kern: set the name of the kernel task to 'gnumach'
	* kern/taks.c (task_init): Set the name of the kernel task to 'gnumach'.

2014-06-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	device: fix net_rcv_msg-messages
	Previously, all net_rcv_msg-messages sent by net_deliver were
	malformed.  It never was a problem in practice, since the messages are
	not complex and thus the kernel does not try to parse the message.

	struct net_rcv_msg contains an additional field of type boolean_t.
	This field has no associated type descriptor, so it must not be
	included in the message.

	* device/net_io.c (net_deliver): Account for the extra field in the
	msgh_size calculation.

2014-05-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing memory clobber
	* i386/i386/xen.h (mb, rmb, wmb): Add memory clobber.

2014-05-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Rewrite old-style #endif FOO directives
	* i386/include/mach/i386/cthreads.h: Rewrite old-style #endif FOO
	directives.
	* include/device/tape_status.h: Likewise.
	* include/mach/alert.h: Likewise.
	* include/mach/boot.h: Likewise.
	* include/mach/default_pager_types.defs: Likewise.
	* include/mach/default_pager_types.h: Likewise.
	* include/mach/multiboot.h: Likewise.
	* include/mach/notify.defs: Likewise.
	* include/mach_debug/pc_info.h: Likewise.
	* kern/act.h: Likewise.
	* kern/refcount.h: Likewise.
	* kern/shuttle.h: Likewise.

2014-05-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: fix the embedded type definitions in memory_object.defs
	In order to use MIG translation functions to lookup memory objects,
	preprocessor macros have been introduced into the definition of
	memory_object_t in 50cc5152.

	The procedure definitions contain inlined type definitions in order to
	change the type of the argument in question (i.e. to make it
	polymorphic).  The inline definitions however lack the destructor
	function, leading to reference leaks when a reference is acquired in
	the intran function.

	* include/mach/memory_object.defs: Add the destructor functions to the
	inlined type definitions.

2014-05-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ddb: add "halt" command
	* ddb/db_command.c (db_command_table): Add "halt" command.
	* i386/i386/db_interface.h (db_halt_cpu): New declaration.
	* i386/i386at/model_dep.c (db_halt_cpu): New function.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: make struct vm_map fit into a cache line
	Currently, the size of struct vm_map is 68 bytes.  By using a bit
	field for the boolean flags, it can be made fit into a cache line.

	* vm/vm_map.h (struct vm_map): Use a bit field for the boolean flags
	wait_for_space and wiring_required.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: fix MACHINE_SERVER_HEADER
	Commit b6dab094 introduced a way to include the MIG-generated server
	files for the machine specific interface in ipc_kobject.c.

	This broke out-of-tree builds.  Here, 'machine' is a symlink to
	'../i386/i386', it points into the source tree.  The MIG-generated
	files however are put in the build tree in i386/i386.

	* i386/i386/machine_routines.h (MACHINE_SERVER_HEADER): Fix path.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: include the MIG-generated server headers for MACHINE_SERVER
	GNU MIG recently gained support for emitting x_server_routine
	declarations in the generated server header file.  Using this
	declaration, the x_server_routine functions can be inlined into the
	ipc_kobject_server function.

	* kern/ipc_kobject.c: Include the MIG-generated server headers for the
	machine-dependent interfaces.
	(ipc_kobject_server): Drop the simple declaration of
	MACHINE_SERVER_ROUTINE.
	* i386/i386/machine_routines.h (MACHINE_SERVER_HEADER): New
	definition.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: do not guard the host_slab_info RPC with MACH_VM_DEBUG
	Previously, the definition of the host_slab_info RPC was guarded with
	MACH_VM_DEBUG, even though it is not at all concerned with the VM
	subsystem.  Furthermore, there was no "skip" directive for
	host_slab_info.

	The function host_slab_info is guarded with MACH_DEBUG.  The server
	for the RPCs in mach_debug.defs is only used if MACH_DEBUG is
	defined. There is no need to guard host_slab_info.

	* include/mach_debug/mach_debug.defs (host_slab_info): Unconditionally
	include the RPC.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	Install the mach_debug header files
	The task_set_name RPC introduced in 877a319c changed
	include/mach/gnumach.defs to include mach_debug/mach_debug_types.defs.
	Previously though, the debug headers were not installed.

	* Makefrag.am: Install the mach_debug header files.

2014-04-30  Justus Winter  <4winter@informatik.uni-hamburg.de>

	doc: fix the number of priorities
	The number of priorities has been changed from 32 to 50 in
	6a234201081156e6d5742e7eeabb68418b518fad.

	* doc/mach.texi: Update accordingly.

2014-04-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make sure mig is available
	* configure.ac (MIG): Error out if MiG was not found.

2014-04-13  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: set the name of tasks created during the bootstrap
	* kern/bootstrap.c (boot_script_task_create): Set the name of newly
	created tasks.

2014-04-10  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: fix the definition of device_open
	Previously, every userspace server implementing the device protocol
	filtered the device definitions to replace the device_t type with
	mach_port_send_t to make the device argument of device_open
	polymorphic.  Rather than doing that, which makes it impossible to use
	translation functions, fix the definition of device_open.

	* include/device/device.defs (device_open): Redefine the device
	argument to make it polymorphic unless a outran function is specified.

2014-04-08  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: make the device_t types translation functions mutable
	Make the intran, outtran and destructor functions mutable using
	preprocessor macros.  Make it possible to inject imports using the
	DEVICE_IMPORTS macro.  This way, userspace servers can provide their
	own translation functions.

	* include/device/device_types.defs: Honor DEVICE_IMPORTS.
	(device_t): Make the translation mutable using preprocessor macros.

2014-04-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: make the notify_port_t types translation functions mutable
	Make the intran, outtran and destructor functions mutable using
	preprocessor macros.  Make it possible to inject imports using the
	NOTIFY_IMPORTS macro.  This way, userspace servers can provide their
	own translation functions.

	* include/mach/notify.defs: Honor NOTIFY_IMPORTS.
	(notify_port_t): Make the translation mutable using preprocessor macros.

2014-04-04  Marin Ramesa  <mpr@hi.t-com.hr>

	Convert from K&R to ANSI
	Convert from K&R style function definitions to ANSI style
	function definitions.

	* ddb/db_access.c: Convert function prototypes from K&R to ANSI.
	* ddb/db_aout.c: Likewise.
	* ddb/db_break.c: Likewise.
	* ddb/db_command.c: Likewise.
	* ddb/db_cond.c: Likewise.
	* ddb/db_examine.c: Likewise.
	* ddb/db_expr.c: Likewise.
	* ddb/db_ext_symtab.c: Likewise.
	* ddb/db_input.c: Likewise.
	* ddb/db_lex.c: Likewise.
	* ddb/db_macro.c: Likewise.
	* ddb/db_mp.c: Likewise.
	* ddb/db_output.c: Likewise.
	* ddb/db_print.c: Likewise.
	* ddb/db_run.c: Likewise.
	* ddb/db_sym.c: Likewise.
	* ddb/db_task_thread.c: Likewise.
	* ddb/db_trap.c: Likewise.
	* ddb/db_variables.c: Likewise.
	* ddb/db_watch.c: Likewise.
	* device/blkio.c: Likewise.
	* device/chario.c: Likewise.
	* device/dev_lookup.c: Likewise.
	* device/dev_name.c: Likewise.
	* device/dev_pager.c: Likewise.
	* device/ds_routines.c: Likewise.
	* device/net_io.c: Likewise.
	* device/subrs.c: Likewise.
	* i386/i386/db_interface.c: Likewise.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/io_map.c: Likewise.
	* i386/i386/loose_ends.c: Likewise.
	* i386/i386/mp_desc.c: Likewise.
	* i386/i386/pcb.c: Likewise.
	* i386/i386/phys.c: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386/user_ldt.c: Likewise.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/kd_event.c: Likewise.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/kd_queue.c: Likewise.
	* i386/i386at/lpr.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/i386at/rtc.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* i386/intel/read_fault.c: Likewise.
	* ipc/ipc_entry.c: Likewise.
	* ipc/ipc_hash.c: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_mqueue.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_right.c: Likewise.
	* ipc/mach_debug.c: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_port.c: Likewise.
	* ipc/mach_rpc.c: Likewise.
	* kern/act.c: Likewise.
	* kern/exception.c: Likewise.
	* kern/ipc_mig.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/lock_mon.c: Likewise.
	* kern/mach_clock.c: Likewise.
	* kern/machine.c: Likewise.
	* kern/printf.c: Likewise.
	* kern/priority.c: Likewise.
	* kern/startup.c: Likewise.
	* kern/syscall_emulation.c: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/thread_swap.c: Likewise.
	* kern/time_stamp.c: Likewise.
	* kern/timer.c: Likewise.
	* kern/xpr.c: Likewise.
	* vm/memory_object.c: Likewise.
	* vm/vm_debug.c: Likewise.
	* vm/vm_external.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_kern.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_pageout.c: Likewise.
	* vm/vm_user.c: Likewise.

2014-04-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix prototype
	* linux/dev/glue/block.c (device_set_status): Fix prototype.

2014-04-04  Marin Ramesa  <mpr@hi.t-com.hr>

	Use explicit prototypes for struct dev_ops fields
	* device/conf.h: Include <sys/types.h>, <mach/port.h>, <mach/vm_prot.h>.
	Predefine struct io_req, io_req_t and io_return_t.
	(dev_ops): Add explicit prototypes for d_open, d_close, d_read, d_write,
	d_getstat, d_setstat, d_mmap, d_port_death.
	(nulldev_open, nulldev_close, nulldev_read, nulldev_write,
	nulldev_getstat, nulldev_setstat, nulldev_portdeath): Add prototypes.
	(nomap): Fix prototype.
	* device/dev_name.c (nulldev_open, nulldev_close, nulldev_read,
	nulldev_write, nulldev_getstat, nulldev_setstat, nulldev_portdeath): New
	functions.
	(nomap): Fix prototype.
	* device/ds_routines.c (dev_close): Pass 0 as flag parameter.
	* device/kmsg.c (kmsgclose): Drop return value.
	* device/kmsg.h (kmsgclose): Fix prototype.
	* i386/i386at/com.c (comopen): Fix prototype.
	(comclose): Fix prototype, drop return value.
	(comread, comwrite): Fix prototype.
	* i386/i386at/com.h (comopen, comclose, comread, comwrite): Fix
	prototype.
	* i386/i386at/conf.c (dev_ops): Use nulldev_open, nulldev_close,
	nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat,
	nulldev_portdeath where appropriate.
	* i386/i386at/kd.c (kdclose, kdread, kdwrite, kdmmap): Fix prototype.
	* i386/i386at/kd.h (kdclose, kdread, kdwrite, kdmmap): Likewise.
	* i386/i386at/kd_event.c (kbdopen): Likewise.
	* i386/i386at/kd_event.h (kbdopen): Likewise.
	* i386/i386at/kd_mouse.c (mouseopen): Likewise.
	* i386/i386at/kd_mouse.h (mouseopen): Likewise.
	* i386/i386at/lpr.c (lpropen, lprclose, lprread, lprwrite): Likewise.
	* i386/i386at/lpr.h (lpropen, lprclose, lprread, lprwrite): Likewise.
	* i386/i386at/mem.c (memmmap): Likewise.
	* i386/i386at/mem.h (memmmap): Likewise.
	* i386/i386at/model_dep.c (timemmap): Likewise.
	* i386/i386at/model_dep.h (timemmap): Likewise.
	* kern/mach_clock.c (timeopen, timeclose): Likewise.
	* kern/mach_clock.h: Include <sys/types.h>, predefine struct io_req and
	io_req_t.
	(timeopen, timeclose): Fix prototype.

2014-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Assume EGA/VGA card
	CGA and MONO cards are more than hard to find nowadays, and some buggy BIOSes
	claim running them nowadays...

	* i386/i386at/kd.c (kd_xga_init): Do not handle CGA and MONO cases any
	more, which thus default to EGA/VGA.

2014-03-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Really default to EGA/VGA on unknown CMOS values
	* i386/i386at/kd.c (kd_xga_init): Use CM_EGA_VGA behavior as default
	case for unknown values of CMOS data.

2014-03-26  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix formatting of multiboot modules
	Previously, bootstrap_create would print the multiboot modules with
	padding applied to the end of the line.  As multiboot modules as used
	by the Hurd span more than one line.  This makes the list of modules
	hard to read and it looks unclean, more like an accident.
	Furthermore, it is not clear what the intend of this was, as the
	padding is applied at the end of the line, with no further information
	printed thereafter.

	* kern/bootstrap.c (bootstrap_create): Remove variable maxlen and len,
	update printfs.

2014-03-25  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: make the memory_object_t types translation functions mutable
	Make the intran, outtran and destructor functions mutable using
	preprocessor macros.  Make it possible to inject imports using the
	MEMORY_OBJECT_IMPORTS macro.  This way, userspace servers can provide
	their own translation functions.

	* include/mach/mach_types.defs (memory_object_t): Make the translation
	mutable using preprocessor macros.
	* include/mach/memory_object.defs: Likewise for the inlined type declarations.
	Honor MEMORY_OBJECT_IMPORTS.
	* include/mach/memory_object_default.defs: Likewise.

2014-03-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2014-03-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix overflow
	We were filling much more than the mapwindows array, thus overwriting in
	at least debugger variables.

	* i386/intel/pmap.c (pmap_bootstrap): Make sure to limit mapwindows
	initialization within PMAP_NMAPWINDOWS.

2014-03-20  Justus Winter  <4winter@informatik.uni-hamburg.de>

	xen: fix error handling
	Previously, the error KERN_RESOURCE_SHORTAGE was not properly
	propagated.

	Found using the Clang Static Analyzer.

	* xen/block.c (device_open): Fix error handling, remove unused label.
	* xen/net.c (device_open): Likewise.

2014-03-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Only complain once per boot about Xen console smash
	* xen/console.c (hypputc): Make `complain' variable static.

2014-03-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increase possible number of AHCI devices to 8
	by reducing possible number of partitions to 32.

	* linux/dev/drivers/block/ahci.c (MAX_PORTS): Set to 8.
	(PARTN_BITS): Set to 5.

2014-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2014-03-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Keep two virtual pages as mapping windows to access physical memory
	PCI devices expose their memory etc. way beyond last_phys_addr. Userland
	drivers opening /dev/mem need to open those too, even if phystokv() will
	not work for them.

	* i386/intel/pmap.h (pmap_mapwindow_t): New type.
	(pmap_get_mapwindow, pmap_put_mapwindow): New prototypes.
	(PMAP_NMAPWINDOWS): New macro.
	* i386/intel/pmap.c (mapwindows): New array.
	(pmap_get_mapwindow, pmap_put_mapwindow): New functions.
	(pmap_bootstrap, pmap_virtual_space): Reserve virtual pages for the mapping
	windows.
	* i386/i386/phys.c: Include <i386/model_dep.h>
	(INTEL_PTE_W, INTEL_PTE_R): New macros
	(pmap_zero_page, pmap_copy_page, copy_to_phys, copy_from_phys): Use
	`pmap_get_mapwindow' to temporarily map physical pages beyond last_phys_addr.

2014-02-26  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix mig_strncpy
	Previously, the function mig_strncpy would always zero-terminate the
	destination string.  Make mig_strncpy behave like mig_strncpy and
	strncpy in the glibc.  Also fix the implementation of mig_strncpy to
	return the length of the written string to align the implementation
	with the declaration in include/mach/mig_support.h.

	* kern/ipc_mig.c (mig_strncpy): Do not zero-terminate the destination
	string.  Return length of destination string.

2014-02-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	AHCI driver cleanups
	* linux/dev/drivers/block/ahci.c (struct port): Add id and is_cd fields.
	(ahci_end_request): Only print error if quiet flag of the request is not
	set.
	(ahci_do_port_request): Upgrade sector parameter to 64 bit. Include
	those bits in the LBA48 request.
	(ahci_do_request): Upgrade sector count to 64bit. Only print errors if
	quiet flag of the request is not set.
	(ahci_probe_port): Move identify code...
	(ahci_identify): ... to new function. Handle WIN_PIDENTIFY case to
	recognize ATAPI devices.
	(ahci_probe_port): Also try WIN_PIDENTIFY command.
	(ahci_geninit): Avoid checking partition table on empty devices.

2014-02-19  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: skip routines related to migrating threads
	* include/mach/mach_port.defs: Skip the routines mach_port_set_rpcinfo
	  and mach_port_create_act if MIGRATING_THREADS is not defined.

2014-02-12  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Reduce kmem_map to make room for kentry_data_size
	* kern/slab.c (KMEM_MAP_SIZE): Decrease from 128MiB to 96MiB.

2014-02-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make open return ENXIO on missing CD-ROM
	* linux/src/drivers/block/ide-cd.c (ide_cdrom_open): Return -ENXIO when
	CD sense failed.

	Add quiet flag to CD I/O
	* linux/src/drivers/block/ide-cd.c (cdrom_queue_packet_command): Add `quiet'
	parameter, copied into the request.
	(cdrom_decode_status): Do not print I/O error when `quiet' field of
	request is non-zero.
	(cdrom_end_request): Do not print sense results when `quiet' field of
	request is non-zero.
	(cdrom_check_status, cdrom_read_capacity, cdrom_read_tocentry): Pass 1 to
	`cdrom_queue_packet_command''s `quiet' parameter.
	(cdrom_lockdoor, cdrom_eject, cdrom_pause, cdrom_startstop,
	cdrom_read_subchannel, cdrom_mode_sense, cdrom_mode_select,
	cdrom_play_lba_range_1, cdrom_read_block, cdrom_load_unload,
	ide_cdrom_ioctl): Pass 0 to `cdrom_queue_packet_command''s `quiet' parameter.

	Add missing initialization
	* linux/src/drivers/block/ide.c (ide_init_drive_cmd): Initialize `quiet'
	field of request to 0;

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2014-02-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add quiet flag to block I/O
	This avoids grub & such making Mach print flurries of floppy errors.

	* linux/dev/include/linux/blkdev.h (request): Add `quiet' field.
	* linux/dev/include/linux/blk.h (end_request): Print I/O error only if
	the `quiet' field of the request is 0.
	* linux/dev/include/linux/fs.h (ll_rw_block): Add `quiet' parameter.
	* linux/dev/glue/block.c (ll_rw_block): Add `quiet' parameter, copied into
	the request.
	(bread, rdwr_partial, rdwr_full): Pass 0 to `ll_rw_block''s `quiet' parameter.
	* linux/dev/drivers/block/floppy.c (floppy_revalidate): Pass 1 to
	`ll_rw_block''s `quiet' parameter.

2014-02-06  Richard Braun  <rbraun@sceen.net>

	vm: trigger garbage collection on kernel memory pressure
	In addition to physical pages, the slab allocator also consumes kernel
	virtual memory, so reclaim pages on failure to allocate from a kernel map.
	This method isn't foolproof but helps alleviate fragmentation.

	* vm/vm_kern.c (kmem_alloc): Call slab_collect and retry allocation
	once on failure.
	(kmem_realloc): Likewise.
	(kmem_alloc_wired): Likewise.
	(kmem_alloc_wired): Likewise.
	(kmem_alloc_aligned): Likewise.

2014-02-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Remove duplicate typedef
	* device/net_io.c (net_rcv_port_t, net_hash_entry_t, net_hash_header_t):
	Remove duplicate typedefs.

2014-02-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	doc: document task_set_name
	* doc/mach.texi (Task Information): Document the new task_set_name
	procedure.

2014-02-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: add task_set_name
	task_set_name sets the name of a task.  This is a debugging aid.  The
	name will be used in error messages printed by the kernel.

	* include/mach/gnumach.defs (task_set_name): New procedure.

2014-02-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: implement task_set_name
	task_set_name sets the name of a task.  This is a debugging aid.  The
	name will be used in error messages printed by the kernel.

	* kern/task.c (task_set_name): New function.
	* kern/task.h (task_set_name): New declaration.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix comstart when the queue is empty
	Found by Coverity

	* i386/i386at/com.c (comstart): Make `nch' an int.  When `getc' returns
	-1, just return.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix potential NULL dereference
	Found by Coverity

	* i386/i386/user_ldt.c (i386_get_ldt): Fetch `pcb' field of `thread'
	only after looking for `thread' being NULL.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix potential NULL dereference
	* vm/vm_kern.c (projected_buffer_deallocate): Look for `map' being NULL
	or kernel_map before locking it.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix potential NULL dereference
	Found by Coverity

	* i386/i386/db_trace.c (db_find_kthread): Handle case when task is NULL.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix potential NULL dereference
	Found by Coverity.

	* i386/i386at/com.c (comopen): On com_reprobe() returning success, check
	for `isai' again.

2014-02-04  Justus Winter  <4winter@informatik.uni-hamburg.de>

	xen: fix buffer size
	Previously, only strlen(device_name) bytes were allocated, missing one
	byte for the terminating zero.

	* xen/block.c (hyp_block_init): Fix buffer size.

2014-02-04  Justus Winter  <4winter@informatik.uni-hamburg.de>

	ddb: safely copy symbol names into the symtab structure
	Use strncpy instead of strcpy to copy the name of a symbol into the
	symtab structure.  Make sure that the string is properly terminated.

	Found using Coverity.

	* ddb/db_sym.c (db_add_symbol_table): Use strncpy instead of strcpy,
	ensure string termination.

2014-02-04  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: make kmem_error panic
	The slab allocator relies on the fact that kmem_cache_error does not
	return.  Previously, kmem_error was using printf.  Use panic instead.

	Found using the Clang Static Analyzer.

	* kern/slab.c (kmem_error): Use panic instead of printf.

2014-02-04  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: use kmem_warn instead of kmem_error in kmem_cache_error
	* kern/slab.c (kmem_cache_error): Use kmem_warn instead of kmem_error
	to print the cache name and its address.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix FPU state copy size
	* i386/i386/fpu.c (fpu_set_state, fpu_get_state): Fix size of
	`user_fp_regs' access.

	Make empty while loops more prominent
	* i386/i386at/kd.c (kdintr, kd_senddata, kd_sendcmd, kd_getgata,
	kd_cmdreg_read, kd_cmdreg_write, kd_mouse_drain): Move semi colon of
	empty while loops on a single line to make it more visible.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix FPU state access
	Found by coverity.

	* i386/i386/fpu.c (fpu_set_state, fpu_get_state): Fix out of bound
	`user_fp_regs' access.

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix typo
	* i386/i386at/kd_mouse.c (mouseopen): Fix typo.

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2014-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing break
	Found by Coverity

	* i386/i386at/kd_mouse.c (mouseopen): Add missing break.

2014-02-01  Justus Winter  <4winter@informatik.uni-hamburg.de>

	include: add a fixed-size string type for debugging purposes
	* include/mach/debug.defs: New file.
	* include/mach/debug.h: Likewise.

	ipc: use the name of the task for error messages
	* ipc/mach_port.c (mach_port_destroy): Use the name of the task for
	error messages.
	(mach_port_deallocate): Likewise.

	kern: add a name field to struct task
	* kern/task.c (task_create): Initialize name with the address of the task.
	* kern/task.h (TASK_NAME_SIZE): New definition.
	(struct task): Add field name.

	kern: add snprintf
	* kern/printf.c (snprintf): New function.
	* kern/printf.h (snprintf): New declaration.

2014-01-16  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: include the mig-generated server headers in ipc_kobject.c
	GNU MIG recently gained support for emitting x_server_routine
	declarations in the generated server header file.  Using this
	declaration, the x_server_routine functions can be inlined into the
	ipc_kobject_server function.

	* kern/ipc_kobject.c: Include the mig-generated server headers.

2014-01-16  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: remove the declaration of memory_object_create_proxy
	It is not clear to me why the declaration was put there in the first
	place.  It is not used anywhere, and it conflicts with the declaration
	generated by mig.

	* vm/memory_object_proxy.h (memory_object_create_proxy): Remove declaration.

2014-01-09  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: align kmem_cache objects using __cacheline_aligned
	* kern/slab.h (struct kmem_cache): Align kmem_cache objects using
	__cacheline_aligned.

	include: add new file for cache-related definitions
	* include/cache.h (__cacheline_aligned): This macro can be used to
	align statically allocated objects so that they start at a cache line.

2014-01-06  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: optimize the layout of struct kmem_cache
	* kern/slab.h (struct kmem_cache): Reorder the fields so that all hot
	fields are within the first cache line.

2014-01-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: explain the significance of the chosen length
	* kern/slab.h (KMEM_CACHE_NAME_SIZE): Explain the significance of the
	chosen length.

2014-01-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	linux: fix bit tests
	The pattern is !x&y. An expression of this form is almost always
	meaningless, because it combines a boolean operator with a bit
	operator. In particular, if the rightmost bit of y is 0, the result
	will always be 0.

	Fixed using coccinelle.

	// !x&y combines boolean negation with bitwise and
	//
	// Confidence: High
	// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU.  GPLv2.
	// URL: http://www.emn.fr/x-info/coccinelle/rules/notand.html
	// Options:

	@@ expression E1,E2; @@
	(
	  !E1 & !E2
	|
	- !E1 & E2
	+ !(E1 & E2)
	)

	* linux/src/drivers/scsi/FlashPoint.c: Fix bit tests.

2014-01-05  Justus Winter  <4winter@informatik.uni-hamburg.de>

	linux: fix bit tests
	The pattern is !x&y. An expression of this form is almost always
	meaningless, because it combines a boolean operator with a bit
	operator. In particular, if the rightmost bit of y is 0, the result
	will always be 0.

	Fixed using coccinelle.

	// !x&y combines boolean negation with bitwise and
	//
	// Confidence: High
	// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU.  GPLv2.
	// URL: http://www.emn.fr/x-info/coccinelle/rules/notand.html
	// Options:

	@@ expression E; constant C; @@
	(
	  !E & !C
	|
	- !E & C
	+ !(E & C)
	)

	* linux/src/drivers/net/tlan.c: Fix bit tests.
	* linux/src/drivers/scsi/AM53C974.c: Likewise.
	* linux/src/drivers/scsi/FlashPoint.c: Likewise.
	* linux/src/drivers/scsi/NCR5380.c: Likewise.
	* linux/src/drivers/scsi/t128.c: Likewise.

2014-01-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: make struct kmem_cache fit into two cache lines
	Previously, the size of struct kmem_cache was 136 bytes, just eight
	bytes larger than 128 bytes, which is typically two cache lines on
	today's CPUs.

	By reducing the size of the name field which holds a human-readable
	description by eight bytes to 24 bytes, the struct kmem_cache can be
	made fit into two cache lines.  This change should not affect the
	usefulness of this field.  For reference, the length of the largest
	hard-coded name is 17.

	* kern/slab.h (KMEM_CACHE_NAME_SIZE): Define to 24.

2014-01-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: reduce the size of struct task
	* kern/task.h (struct task): Reduce the size of struct task by
	2 * sizeof boolean_t by using a bit field for the boolean flags.

2014-01-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: reduce the size of struct vm_page
	Previously, the bit field left 31 bits unused.  By reducing the size
	of wire_count by one bit, the size of the whole struct is reduced by
	four bytes.

	* vm/vm_page.h (struct vm_page): Reduce the size of wire_count to 15
	bits.

2014-01-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: merge the two bit fields in struct vm_page
	* vm/vm_page.h (struct vm_page): Merge the two bit fields.

2014-01-03  Justus Winter  <4winter@informatik.uni-hamburg.de>

	vm: remove NS32000-specific padding from struct vm_page
	Apparently, the NS32000 was a 32-bit CPU from the 1990ies.  The string
	"ns32000" appears nowhere else in the source.

	* vm/vm_page.h (struct vm_page): Remove NS32000-specific padding.

2014-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make sure cursor is initialized
	* i386/i386at/kd.c (kd_xga_init): Add start, stop variables, read them
	from CRT registers, make sure the cursor is enabled and is not reduced
	to 0, and write them back to CRT registers.
	* i386/i386at/kd.h (C_START, C_STOP): New macros.

2014-01-01  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/include/mach/i386/mach_i386_types.h: add comments after else and endif
	* i386/include/mach/i386/mach_i386_types.h (MACH_KERNEL): Add comments after else and endif.

	Add comment after endif
	* i386/i386/io_perm.h (_I386_IO_PERM_H_): Add comment after endif.

2013-12-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2013-12-20  Marin Ramesa  <mpr@hi.t-com.hr>

	Mark pure functions with attribute pure

	kern/strings.c (strlen): mark with attribute pure
	* kern/strings.c (strlen): Mark with attribute pure.

	ddb/db_watch.c (db_watchpoint_cmd): remove forward declaration
	* ddb/db_watch.c (db_watchpoint_cmd) (db_option): Remove forward declaration.

2013-12-20  Marin Ramesa  <mpr@hi.t-com.hr>

	Declare void argument lists (part 2)
	Declare void argument lists that were not declared in the first
	part of this patch and

	* kern/sched_prim.h (recompute_priorities): Fix prototype.
	* kern/startup.c (setup_main) (recompute_priorities): Fix call.

2013-12-18  Justus Winter  <4winter@informatik.uni-hamburg.de>

	i386: add missing includes
	* i386/i386at/kd_event.h: Add missing includes.

2013-12-17  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: avoid the casts in enqueue_head() and enqueue_tail()
	* kern/eventcount.c (simpler_thread_setrun) (enqueue_head) (th): Avoid the cast.
	* kern/thread.c (thread_halt_self) (enqueue_tail) (thread): Likewise.
	* kern/thread_swap.c (thread_swapin) (enqueue_tail) (thread): Likewise.

	Mark functions that don't return with attribute noreturn

	vm: qualify pointers whose dereferenced values are constant with const

	util: qualify pointers whose dereferenced values are constant with const

	kern: qualify pointers whose dereferenced values are constant with const

	ipc: qualify pointers whose dereferenced values are constant with const

	i386: qualify pointers whose dereferenced values are constant with const

	device: qualify pointers whose dereferenced values are constant with const

	Cleanup of the copyin() and copyout() calls
	* device/ds_routines.c (device_write_trap) (copyin) (data): Cast to (void *). Argument is an address.
	(device_write_trap) (copyin) (io_data): Don't cast.
	(device_writev_trap) (copyin) (iovec, stack_iovec): Likewise.
	(device_writev_trap) (copyin) (data, p): Cast to (void *). Arguments are addresses.
	* kern/bootstrap.c (build_args_and_stack) (copyout) (arg_count, string_pos, zero): Don't cast.
	* kern/ipc_mig.c (syscall_vm_map) (copyin, copyout) (addr, address): Likewise.
	(syscall_vm_allocate) (copyin, copyout) (addr, address): Likewise.
	(syscall_task_create) (copyout) (name, child_task): Likewise.
	(syscall_mach_port_allocate) (copyout) (name, namep): Likewise.
	* kern/time_stamp.c (copyout) (temp, tsp): Likewise.

2013-12-17  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/sched_prim.h: remove unnecessary __GNUC__ #ifdef
	Attribute noreturn is used irrespective of __GNUC__. Remove
	unnecessary #ifdef.

	* kern/sched_prim.h [__GNUC__]: Remove #ifdef.

2013-12-17  Justus Winter  <4winter@informatik.uni-hamburg.de>

	xen: add missing includes
	* xen/console.h: Add missing includes.

2013-12-16  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: quiet GCC warnings about set but unused variables
	* kern/lock.h (simple_lock_data_empty): Define.
	(decl_simple_lock_data, simple_unlock): Likewise.
	* kern/sched_prim.c (lock): Declare.
	[MACH_SLOCKS]: Remove #ifs.
	* kern/task.c (task_lock, task_unlock): Remove address operator.

	Quiet GCC warning about uninitialized variable
	* ddb/db_command.h (db_error): Mark with attribute noreturn.
	* i386/i386/setjmp.h (_longjmp): Likewise.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_trace.c: use (long *) instead of an (int *)
	* i386/i386/db_trace.c (db_lookup_i386_kreg) (kregp): Use (long *) instead of an (int *).

	device/dev_pager.c (device_pager_data_request_done): cast to size_t instead to unsigned
	* device/dev_pager.c (device_pager_data_request_done) (memset) (io_residual): Cast to size_t instead to unsigned.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	device/dev_pager.c: remove unnecessary casts
	Variable pager is already of ipc_port_t type.

	* device/dev_pager.c: Remove unnecessary casts.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/sched_prim.c: avoid casts
	Avoid the casts by passing the address of the links thread
	structure member to enqueue_tail().

	* kern/sched_prim.c: Avoid casts.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb: qualify pointers whose dereferenced values are constant with const

2013-12-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix gcc signedness warning
	Thanks Marin Ramesa and Richard Braun for investigating.

	* i386/i386at/kd.c (kdintr): Make `char_idx' and `max' unsigned.
	(kdstate2idx): Make function take and return unsigned ints for the state.
	* i386/i386at/kd.h (kdstate2idx): Likewise.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	Type definition
	* i386/i386/ast_check.c (init_ast_check, cause_ast_check): Define return type.
	* i386/i386/pic.c (intnull, prtnull): Define argument types.
	* i386/i386at/com.c (compr_addr): Likewise.
	(compr): Likewise.
	(compr_addr): Fix printf format.
	* i386/i386at/kd.c (kd_cmdreg_write, kd_kbd_magic): Define argument types.
	* i386/i386at/kd_mouse.c (init_mouse_hw): Likewise.
	* ipc/mach_port.c (sact_count): Define return type.
	* ipc/mach_rpc.c (mach_port_rpc_sig): Define argument types.
	* kern/act.c (dump_act): Define return type.
	* kern/lock_mon.c (simple_lock, simple_lock_try, simple_unlock, lip, lock_info_sort, lock_info_clear, print_lock_info): Define return type.
	(time_lock): Define return type and argument type.
	* kern/timer.c (time_trap_uexit): Define argument type.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_expr.c (db_mult_expr): initialize lhs
	Initialize lhs to zero to avoid uninitialized usage in db_unary().

	* ddb/db_expr.c (db_mult_expr) (lhs): Initialize to zero.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c (db_delete_cmd): remove unnecessary initialization
	Now that we have returns there are no more warnings from GCC about
	uninitialized variable. Remove unnecessary initialization of variable
	bkpt.

	* ddb/db_break.c (db_delete_cmd) (bkpt): Remove unnecessary initialization.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c (db_find_breakpoint_here): remove unnecessary casts
	Variable addr and member address are already of db_addr_t type which
	is type defined as vm_offset_t.

	* ddb/db_break.c (db_find_breakpoint_here) (DB_PHYS_EQ) (addr, address): Remove unecessary casts.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	vm/vm_resident.c (vm_page_print): remove unnecessary casts
	Members offset and phys_addr are of vm_offset_t types.

	* vm/vm_resident.c (vm_page_print) (offset, phys_addr): Remove unnecessary casts.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	vm/vm_kern.c (kmem_submap): remove unnecessary cast
	The return value from vm_map_min() is already of vm_offset_t type.

	* vm/vm_kern.c (kmem_submap) (addr): Remove unnecessary cast.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/ldt.c: remove forward declaration
	* i386/i386/ldt.c (syscall): Remove forward declaration.
	Include locore.h.
	* i386/i386/locore.h (syscall): Add prototype.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/mach_clock.c: update comment
	This is mach_clock.c, not clock_prim.c.

	* kern/mach_clock.c: Update comment.

2013-12-15  Marin Ramesa  <mpr@hi.t-com.hr>

	Declare void argument lists

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/kd_mouse.c (kd_mouse_open): remove forward declaration
	* i386/i386at/kd_mouse.c (kd_mouse_open) (kdintr): Remove forward declaration.

	i386/i386at/kd.c (kdinit): remove forward declaration
	* i386/i386at/kd.c (kdinit) (kd_xga_init): Remove forward declaration.
	* i386/i386at/kd.h (kd_xga_init): Add prototype.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/kd.c (kdmmap): remove unnecessary cast
	Variable off is already an unsigned int.

	* i386/i386at/kd.c (kdmmap) (off): Remove unnecessary cast.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/kd.c: remove forward declarations
	* i386/i386at/kd.c (kd_getdata, state2leds, kdstart, kdstop): Remove forward declarations.
	* i386/i386at/kd.h (kd_getdata, state2leds, kdstart, kdstop): Add prototypes.
	Include device/tty.h.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_trace.c (db_i386_stack_trace): remove unnecessary cast
	Argument to INKERNEL() is already cast to vm_offset_t in the macro itself.

	* i386/i386/db_trace.c (db_i386_stack_trace) (INKERNEL) (callpc): Don't cast to unsigned long.
	(db_i386_stack_trace) (INKERNEL) (frame): Likewise.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_trace.c: remove forward declaration
	* i386/Makefrag.am: List i386/i386/db_trace.h.
	* i386/i386/db_trace.c: Include machine/db_trace.h.
	(db_i386_stack_trace): Remove forward declaration.
	* i386/i386/db_trace.h: New file.
	Add copyright.
	[_I386_DB_TRACE_H_]: Add ifndef.
	(i386_frame): Declare forward.
	(db_i386_stack_trace): Add prototype.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/mach_debug.c (mach_port_kernel_object): remove unnecessary cast
	Member ip_kobject is of type vm_offset_t.

	* ipc/mach_debug.c (mach_port_kernel_object) (ip_kobject): Remove unnecessary cast.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/mach_debug.c (mach_port_kernel_object): remove unnecessary cast
	Return value from ip_kotype is an unsigned int.

	* ipc/mach_debug.c (mach_port_kernel_object) (ip_kotype): Remove unnecessary cast.

2013-12-11  Marin Ramesa  <mpr@hi.t-com.hr>

	Cleanup of the memcpy(), memmove(), memcmp() and memset() calls
	Addresses were cast to (void *). Pointers uncasted.

	* device/ds_routines.c (ds_read_done) (memset) (start_sent): Cast to (void *) instead to (char *). Argument is an address.
	(ds_read_done) (memset) (end_data): Likewise.
	* i386/i386/pcb.c (thread_getstatus) (memcpy) (pm): Don't cast. Argument is a pointer.
	(thread_getstatus) (memcpy) (iopb): Likewise.
	* i386/i386at/immc.c (immc_cnputc) (memmove): Cast first argument to (void *). Argument is an address.
	(immc_cnputc) (memmove): Cast second argument to (void *). Argument is an address.
	(immc_cnputc) (memset): Cast first argument to (void *). Argument is an address.
	* i386/i386at/model_dep.c (i386at_init) (memcpy) (phystokv): Cast to (void *) instead to (char *). Argument is an address.
	* i386/intel/pmap.c (pmap_init) (memset) (addr): Likewise.
	* ipc/mach_debug.c (mach_port_space_info) (memset) (table_addr + size_used): Likewise.
	(mach_port_space_info) (memset) (tree_addr + size_used): Likewise.
	* kern/host.c (host_processor_sets) (memcpy) (newaddr): Likewise.
	(host_processor_sets) (memcpy) (addr): Likewise.
	* kern/xpr.c (xprbootstrap) (memset) (addr): Likewise.
	* vm/vm_debug.c (mach_vm_object_pages) (memset) (addr + size_used): Likewise.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/subrs.c: use io_req_t instead of struct buf
	Struct buf is not defined. Use io_req_t instead of it.

	* device/subrs.c (harderr) (bp): Change name to ior and use io_req_t as type instead of (struct buf *).
	(harderr) (minor): Use io_unit instead of b_dev.
	(harderr): Use io_recnum instead of b_blkno.
	(gateblk): Use io_req_t as return value instead of (struct buf *).
	(brelse) (bp): Change name to ior and use io_req_t as type instead of (struct buf *).
	(brelse) (ior): Remove variable.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/net_io.c: remove forward declarations
	* device/net_io.c (bpf_hash, net_do_filter, bpf_do_filter, hash_ent_remove, net_free_dead_infp, net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info, bpf_match): Remove forward declarations.
	* device/net_io.h (net_rcv_port, net_hash_entry, net_hash_header): Declare forward.
	(bpf_hash, net_do_filter, bpf_do_filter, hash_ent_remove, net_free_dead_infp, net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info, bpf_match): Add prototypes.

	device/dev_pager.c: remove forward declarations
	* device/dev_pager.c (device_pager_data_request_done, device_pager_data_write_done): Remove forward declarations.
	* device/dev_pager.h (device_pager_data_request_done, device_pager_data_write_done): Add prototypes.

	device/dev_pager.c: remove forward declaration
	* Makefrag.am: Include device/blkio.h.
	* device/blkio.h: New file.
	Add copyright.
	[_DEVICE_BLKIO_H_]: Add ifndef.
	(block_io_mmap): Add prototype.
	* device/dev_pager.c: Include device/blkio.h.
	(block_io_mmap): Remove forward declaration.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/dev_pager.c (device_pager_data_request_done): remove unnecessary cast
	The argument to trunc_page() is already cast to vm_offset_t in the
	macro itself.

	* device/dev_pager.c (device_pager_data_request_done) (trunc_page) (io_data): Don't cast to vm_offset_t.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/dev_pager.c (device_pager_data_request): cast to (void *) instead to (char *)
	* device/dev_pager.c (device_pager_data_request) (vm_object_page_map) (ds): Cast to (void *) instead to (char *).

	device/dev_pager.c (device_pager_data_request): remove forward declaration
	* Makefrag.am: Include device/dev_pager.h.
	* device/dev_pager.c: Likewise.
	(device_map_page): Remove forward declaration.
	* device/dev_pager.h: New file.
	Add copyright.
	[_DEVICE_DEV_PAGER_H_]: Add ifndef.
	(device_map_page): Add prototype.

	device/cons.c: fix argument list
	* device/cons.c (romgetc, romputc): Fix argument list.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/cirbuf.c (cb_free): use vm_size_t instead of an int
	This is more in line with the call to kfree() in cb_free().

	* device/cirbuf.c (cb_free) (size): Use vm_size_t instead of an int.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/cirbuf.c (cb_alloc): use vm_size_t instead of an int
	This is more in line with the call to kalloc() in cb_alloc().

	* device/chario.c (tty_inq_size, tty_outq_size): Use unsigned int instead if an int.
	* device/cirbuf.c (cb_alloc) (buf_size): Use vm_size_t instead of an int.
	* device/cirbuf.h (cb_alloc) (buf_size): Likewise.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device/chario.c: trivial stylistic fix for consistency
	* device/chario.c: Trivial stylistic fix for consistency.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.c: use vm_offset_t instead of an unsigned int
	This is more in line with how the function db_user_to_kernel_address() is
	called. In this way there is one cast less and several GCC warnings are
	silenced.

	* i386/i386/db_interface.c (db_set_hw_watchpoint) (kern_addr): Use vm_offset_t instead of an unsigned int.
	(db_user_to_kernel_address) (kaddr): Likewise.
	(db_user_to_kernel_address) (ptetokv): Don't cast return value.
	(db_read_bytes) (kern_addr): Use vm_offset_t instead of an unsigned int.
	(db_write_bytes_user_space) (kern_addr): Likewise.
	(db_task_name) (vaddr, kaddr): Likewise.
	* i386/i386/db_interface.h (db_user_to_kernel_address) (kaddr): Likewise.

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/kd_event.c (kbdsetstat): fix difference in signedness
	* i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Cast first arguments to (unsigned int *).

2013-12-10  Marin Ramesa  <mpr@hi.t-com.hr>

	i386: move prototypes to fix implicit declaration of function
	This fixes the implicit declarations in kern/machine.c and kern/debug.c.

	* i386/i386/model_dep.h (halt_cpu, halt_all_cpus): Add prototypes.
	* i386/i386at/model_dep.h (halt_cpu, halt_all_cpus): Remove prototypes.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_trap.c (db_task_trap): remove forward declarations
	* ddb/db_break.h (db_check_breakpoint_valid): Add prototype.
	* ddb/db_trap.c (db_init_default_thread, db_check_breakpoint_valid): Remove forward declarations.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	Use db_addr_t instead of db_expr_t
	In this way everything falls into place and there is one cast less.

	Function db_task_printsym() is already always called with the cast to
	db_addr_t in the first argument.

	* ddb/db_aout.c (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t.
	(aout_db_search_by_addr): Don't cast to vm_offset_t. Argument is already
	db_addr_t.
	* ddb/db_aout.h (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t.
	* ddb/db_sym.c (db_task_printsym): Likewise.
	(db_line_at_pc): Likewise.
	* ddb/db_sym.h (db_task_printsym): Likewise.
	(db_line_at_pc): Likewise.
	* i386/i386/db_trace.c (db_task_printsym): Cast to db_addr_t instead of db_expr_t.
	Member swap_func is a pointer to void.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_print.c: use unsigned long instead of an unsigned int
	Variable db_maxoff is in other files declared as unsigned long.

	* ddb/db_print.c (db_maxoff): Use unsigned long instead of an unsigned int.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_mp.c: definition of db_console() only if CONSOLE_ON_MASTER
	Function db_console() is called only if CONSOLE_ON_MASTER.

	If it stays this way, db_console() will not compile. I don't know
	if it should be removed. Maybe someone will rewrite it.

	* ddb/db_mp.c (db_console): Definition only if CONSOLE_ON_MASTER.
	* ddb/db_mp.h [CONSOLE_ON_MASTER] (db_console): Add prototype.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_mp.c: use boolean instead of an int
	* ddb/db_mp.c (db_enter_debug): Use boolean instead of an int.

	ddb/db_examine.c: trivial stylistic fix for consistency
	* ddb/db_examine.c: Trivial stylistic fix for consistency.

	ddb/db_examine.c (db_examine_cmd): remove forward declaration
	* ddb/db_examine.c (db_option): Remove forward declaration.

	ddb/db_command.c (db_command): remove forward declaration
	* ddb/db_command.c (db_fncall): Remove forward declaration.

	ddb/db_command.c: use boolean values
	* ddb/db_command.c (db_cmd_loop_done): Use boolean values.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/kd.c: use io_req instead of uio
	Struct uio is nowhere defined and in device/buf.h the string uio is defined
	as io_req. Remove all declarations of uio structure and use io_req_t instead
	of it.

	* device/buf.h (uio, io_req): Remove definition.
	* i386/i386at/kd.c: Remove comment.
	(kdread): Use io_req_t.
	(kdwrite): Likewise.
	* i386/i386at/kd.h (kdread, kdwrite): Use io_req_t as argument type.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c (db_find_thread_breakpoint_here): remove unnecessary cast
	Variable addr is already of type db_addr_t.

	* ddb/db_break.c (db_find_thread_breakpoint_here) (addr): Don't cast to db_addr_t.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c (db_add_thread_breakpoint): fix argument list
	* ddb/db_break.c (db_add_thread_breakpoint): Fix argument list.

	ddb/db_aout.c (aout_db_lookup): remove forward declaration
	* ddb/db_aout.c (db_sym_parse_and_lookup): Remove forward declaration.
	* ddb/db_sym.h (db_sym_parse_and_lookup): Add prototype.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_aout.c (aout_db_qualified_search): use DB_SYM_NULL as return value
	Function aout_db_qualified_search() returns db_sym_t. Use DB_SYM_NULL as
	return value instead of zero.

	* ddb/db_aout.c (aout_db_qualified_search): Use DB_SYM_NULL as return value.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.c: remove forward declaration
	* i386/i386/db_interface.c (db_write_bytes_user_space): Remove forward declaration.
	* i386/i386/db_interface.h (db_write_bytes_user_space): Add prototype.

	i386/i386at/lpr.c: fix initalization from incompatible pointer type
	* i386/i386at/lpr.c (lprprobe): Modify argument types.
	* i386/i386at/lpr.h (lprprobe): Likewise.

	i386/i386at/com.c: fix assignment from incompatible pointer type
	* device/tty.h (tty): Modify so that correct argument list and return type is listed.

	i386/i386at/com.c: fix initialization from incompatible pointer type
	* i386/i386at/com.c (comprobe): Modify argument types.
	(comprobe): Cast from (struct bus_ctrl *) to (struct bus_device *).
	comprobe_general() uses only a small subset of members, so it's all
	the same which struct it is.
	* i386/i386at/com.h (comprobe): Modify argument types.

	kern/startup.c: use boolean values
	* kern/startup.c (reboot_on_panic): Use boolean values.

	vm/vm_map.c: use boolean instead of an int
	* vm/vm_map.c (vm_map_pmap_enter_print, vm_map_pmap_enter_enable): Use boolean instead of an int.

	vm/vm_object.c: remove unused variable
	* vm/vm_object.c (vm_object_terminate_remove_all): Remove unused variable.

	vm/vm_pageout.c: remove forward declarations
	* vm/vm_pageout.c (vm_pageout_continue, vm_pageout_scan_continue): Remove forward declarations.
	* vm/vm_pageout.h (vm_pageout_continue, vm_pageout_scan_continue): Add prototypes.

	i386/i386at/pic_isa.c: remove forward declaration
	* i386/Makefrag.am: Include i386/i386/hardclock.h.
	* i386/i386/hardclock.h: New file.
	Add copyright.
	[_I386_HARDCLOCK_H_]: Add ifndef.
	(hardclock): Add prototype.
	* i386/i386at/pic_isa.c (hardclock): Remove forward declaration.
	Include i386/hardclock.h.

	i386/i386at/model_dep.c: fix argument list
	* i386/i386at/model_dep.c (timemmap): Fix argument list.

	i386/i386at/lpr.c: fix argument list
	* i386/i386at/lpr.c (lprprobe): Fix argument list.

	ddb/db_output.c: remove forward declaration
	* ddb/db_input.h (db_check_interrupt): Add prototype.
	* ddb/db_output.c: Include ddb/db_input.h.
	(db_check_interrupt): Remove forward declaration.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/act.h: remove unnecessary include
	File kern/act.h includes itself. Remove this include.

	* kern/act.h: Don't include kern/act.h.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	Cleanup of the prototypes
	* device/cirbuf.h (nqdb): Remove prototype without definition.
	* device/conf.h (dev_set_indirect): Likewise.
	* kern/boot_script.h (boot_script_read_file): Likewise.
	* kern/eventcount.h (evc_notify_abort): Remove duplicate prototype.
	* kern/thread.h (thread_set_own_priority): Likewise.
	* kern/thread_swap.h (thread_swapout): Remove prototype without definition.
	* kern/timer.h (softclock): Remove duplicate prototype.
	* vm/pmap.h (pmap_resident_count, pmap_access, pmap_phys_address, pmap_phys_to_frame): Remove prototypes without function definition.
	* vm/vm_page.h (vm_set_page_size): Likewise.

	vm/vm_page.h: remove unused variables
	* vm/vm_page.h (first_phys_addr, last_phys_addr): Remove unused variables.

	kern/syscall_sw.c: use boolean instead of an int
	* kern/syscall_sw.c (kern_invalid_debug): Use boolean instead of an int.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/refcount.h: remove unnecessary include
	File kern/refcount.h includes itself. Remove this include.

	* kern/refcount.h: Don't include kern/refcount.h.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/rbtree.h: remove unnecessary include
	File kern/rbtree.h includes itself. Remove this include.

	* kern/rbtree.h: Don't include kern/rbtree.h.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/priority.c: update comment
	This is priority.c. Not clock_prim.c.

	* kern/priority.c: Update comment.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/pc_sample.c: remove unused variables
	* kern/pc_sample.c (pc_sampling_enabled, pc_sampling_lock): Remove unused variables.

	kern/lock_mon.c: remove dead assignments
	* kern/lock_mon.c (scurval, ssum, sli): Remove variables.
	(scurval, ssum, sli): Remove dead assignments.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/lock_mon.c: use spl_t instead of an int
	Variable curr_ipl is in other files declared as spl_t.

	* kern/lock_mon.c (curr_ipl): Use spl_t instead of an int.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/act.h: remove prototype without definition
	* kern/act.h (act_create_kernel): Remove prototype without definition.

2013-12-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add comment

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/port.h: update comment
	This is ipc/port.h. Not ipc/ipc_port.h.

	* ipc/port.h: Update comment.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/mach_port.c: use boolean instead of an int
	* ipc/mach_port.c (mach_port_deallocate_debug): Use boolean instead of an int.

	ipc/ipc_init.c: qualify constant with const
	* ipc/ipc_init.c (ipc_kernel_map_size): Qualify constant with const.

	i386/intel/pmap.c: remove unused variable
	* i386/intel/pmap.c (end): Remove unused variable.

	i386/intel/pmap.c: use boolean instead of an int
	* i386/intel/pmap.c (pmap_debug): Use boolean instead of an int.

	time: remove unused variable
	* i386/i386at/rtc.c (tz): Remove unused variable.
	* xen/time.c (tz): Remove unused variable.

	i386/i386at/rtc.c: use boolean instead of an int
	* i386/i386at/rtc.c (first_rtcopen_ever): Use boolean instead of an int.

	i386/i386at/kd.c: use boolean instead of an unsigned int
	* i386/i386at/kd.c (kd_bellstate): Use boolean instead of an unsigned int.

	i386/i386at/kd.c: use boolean instead of an int
	* i386/i386at/kd.c (mouse_in_use): Use boolean instead of an int.
	Remove duplicate declaration.

	i386/i386at/model_dep.c, kd.c: use boolean instead of an int
	* i386/i386at/kd.c (rebootflag): Use boolean instead of an int.
	Remove duplicate variable declaration.
	* i386/i386at/model_dep.c (rebootflag): Use boolean instead of an int.

	i386/i386at/immc.c, kd.c: use boolean instead of an int
	* i386/i386at/immc.c (immediate_console_enable): Use boolean instead of an int.
	* i386/i386at/kd.c (immediate_console_enable): Likewise.

	i386/i386/user_ldt.c: remove unused variable
	* i386/i386/user_ldt.c (acc_type): Remove unused variable.

	i386/i386/trap.c: remove unused variables
	* i386/i386/trap.c (v86_assist_on, v86_unsafe_ok, v86_do_sti_cli, v86_do_sti_immediate, cli_count, sti_count): Remove unused variables.

	i386/i386/trap.c: remove unused variable
	* i386/i386/trap.c (brb): Remove unused variable.

	i386/i386/pit.c: remove unused variables
	* i386/i386/pit.c (pitctr1_port, pitctr2_port): Remove unused variables.

	i386/i386/pic.c: remove unused variables
	* i386/i386/pic.c (nintr, npics): Remove unused variables.

	i386/i386/mp_desc.c: remove unused variable
	* i386/i386/mp_desc.c (avail_start): Remove unused variable.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/ipl.h: remove ifdef and add ifndef
	This code is used even if KERNEL is not defined. Remove the ifdef.

	* i386/i386/ipl.h [_I386_IPL_H_]: Add ifndef.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.c: use boolean instead of an int
	* i386/i386/db_interface.c (kernel_dr): Use boolean instead of an int.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	device/tty.h, chario.h: move prototype
	Now that we have device/chario.h move the chario_init() prototype
	from device/tty.h to device/chario.h.

	* device/chario.h (chario_init): Add prototype.
	* device/device_init.c: Include device/chario.h.
	* device/tty.h (chario_init): Remove prototype.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	device/kmsg.c: use boolean instead of an int
	* device/kmsg.c (kmsg_init_done): Use boolean instead of an int.

	device/kmsg.c: use boolean instead of an int
	* device/kmsg.c (kmsg_in_use): Use boolean instead of an int.

	device/if_ether.h: remove unused variable
	* device/if_ether.h (etherbroadcastaddr): Remove unused variable.
	* device/subrs.c (etherbroadcastaddr): Remove initialization.

	device/dev_lookup.c: remove unused lock
	* device/dev_lookup.c (dev_port_lock): Remove unused lock.

	device/cirbuf.c: use boolean instead of an int
	* device/cirbuf.c (cb_check_enable): Use boolean instead of an int.

	device/chario.c: use boolean instead of an int
	* device/chario.c (pdma_default): Use boolean instead of an int.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_output.c: remove duplicate function
	Function kdbprintf() and db_printf() are the same function. Remove
	kdbprintf() and define kdbprintf to db_printf.

	* ddb/db_output.c (kdbprintf): Remove function.
	* ddb/db_output.h: Define kdbprintf to db_printf.
	(kdbprintf): Remove prototype.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_output.c: remove call to nonexistent db_printf_enter()
	* ddb/db_output.c [db_printf_enter] (db_printf_enter): Remove call to nonexistent function.

	ddb/db_command.h: remove duplicate variable declaration
	* ddb/db_command.h (db_recover): Remove duplicate variable declaration.

	ddb/db_command.c: remove forward declaration
	* ddb/db_command.c (db_skip_to_eol): Remove forward declaration.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/setjmp.h: remove ifdef
	Function _longjmp() is used even if __GNUC__ is not defined. Avoid
	implicit declaration in that case by removing the ifdef.

	* i386/i386/setjmp.h [__GNUC__] (_longjmp): Remove ifdef.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/machine.c: remove __volatile__
	Shutdown can be optimised. Remove __volatile__.

	* kern/machine.c [__GNUC__] (processor_doshutdown): Remove volatile function qualifier.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/ipc_port.c: trivial stylistic fix for consistency
	* ipc/ipc_port.c (indent): Trivial stylistic fix for consistency.

2013-12-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make unsigned character constants unsigned
	Thanks Marin Ramesa for the report.

	* i386/i386at/kd.h (K_DONE, NC, K_SCAN): Make constants unsigned.

2013-12-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Always make Assert trigger debugger
	* kern/debug.c (Assert): Always call Debugger, even if db_breakpoints_insert
	is not set.

2013-12-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix implicit declaration of function
	Thanks Marin Ramesa for the report.

	* device/ds_routines.h (device_deallocate): Move declaration to...
	* include/device/device_types.h (device_deallocate): ... here.

2013-12-08  Marin Ramesa  <mpr@hi.t-com.hr>

	device/device_types_kernel.h: remove redeclaration of dev_port_lookup()
	* device/device_types_kernel.h (dev_port_lookup): Remove prototype.

	Add ifndefs
	* i386/i386at/cram.h [_CRAM_H_]: Add ifndef.
	* i386/i386at/disk.h [_DISK_H_]: Likewise.
	* i386/i386at/i8250.h [_I8250_H_]: Likewise.
	* i386/include/mach/i386/asm.h [_MACH_I386_ASM_H_]: Likewise.
	* i386/include/mach/i386/disk.h [_MACH_I386_DISK_H_]: Likewise.

	Add comments after endifs
	* device/cons.c [MACH_KMSG]: Likewise.
	[CONSBUFSIZE > 0]: Likewise.
	* i386/i386/trap.c [MACH_KDB]: Likewise.
	[MACH_PV_PAGETABLES]: Likewise.
	* i386/i386at/kd.c [ENABLE_IMMEDIATE_CONSOLE]: Likewise.
	* ipc/ipc_kmsg_queue.h [_IPC_KMSG_QUEUE_H_]: Likewise.
	* kern/act.c [ACTWATCH]: Likewise.
	* kern/refcount.h [MACHINE_REFCOUNT]: Likewise.
	* kern/task.c [FAST_TAS]: Likewise.

2013-12-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing include
	* ddb/db_variables.h: Include <machine/db_machdep.h>.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at/com.h: include chips/busses.h for struct bus_device
	* i386/i386at/com.h: Include chips/busses.h.

	ddb/db_variables.c: fix near initialization
	* ddb/db_task_thread.c (db_set_default_thread): New parameter.
	* ddb/db_task_thread.h (db_set_default_thread): Likewise.

	kern/mach_clock.c: remove forward declaration
	* Makefrag.am: Include kern/priority.h.
	* kern/mach_clock.c (thread_quantum_update): Remove forward declaration.
	Include kern/priority.h.
	* kern/priority.h: New file.
	Add copyright.
	[_KERN_PRIORITY_H_]: Add ifndef.
	(thread_quantum_update): Add prototype.

	ipc/mach_port.c: remove forward declaration
	* ipc/mach_port.c (mach_port_get_receive_status): Remove forward declaration.
	* ipc/mach_port.h (mach_port_get_receive_status): Add prototype.

	ipc/ipc_entry.c: remove forward declaration
	* ipc/ipc_entry.c (db_ipc_object_by_name): Remove forward declaration.
	* ipc/ipc_entry.h (db_ipc_object_by_name): Add prototype.

	i386/i386at/model_dep.c: remove forward declaration
	* i386/i386at/model_dep.c (init_alloc_aligned): Remove forward declaration.
	* i386/i386at/model_dep.h (init_alloc_aligned): Add prototype.

	kern/time_stamp.c: remove multimax code
	* kern/time_stamp.c [multimax]: Remove code.

2013-12-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Remove unnecessary file
	* i386/Makefrag.am: Don't include i386/include/mach/i386/rpc.h.
	* i386/include/mach/i386/rpc.h: Remove file.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	vm/vm_user.c: remove forward declaration
	* vm/vm_user.c (vm_map_machine_attribute): Remove forward declaration.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	vm/vm_resident.c: correct comment
	This is vm_resident.c, not vm_page.c.

	* vm/vm_resident.c: Correct comment.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	vm/vm_map.c: remove forward declarations
	* vm/vm_map.c (_vm_map_clip_start, _vm_map_copy_clip_start, _vm_map_clip_end, _vm_map_copy_clip_end): Remove forward declarations.
	* vm/vm_map.h (_vm_map_clip_end): Correct prototype.

	vm/vm_kern.c: remove forward declarations
	* vm/vm_kern.c (kmem_alloc_pages, kmem_remap_pages): Remove forward declarations.
	* vm/vm_kern.h (kmem_alloc_pages, kmem_remap_pages): Add prototypes.

	vm/vm_fault.c: remove forward declaration
	* vm/vm_fault.c (vm_fault_wire_fast): Remove forward declaration.
	* vm/vm_fault.h (vm_fault_wire_fast): Add prototype.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc/ipc_kmsg.h: update comment
	Struct ipc_kmsg_queue is not defined in kern/thread.h.

	* ipc/ipc_kmsg.h: Update comment.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: remove forward declaration
	* kern/xpr.c (db_printf): Remove forward declaration.
	[MACH_KDB] Include ddb/db_output.h.

	kern/thread.c: remove forward declaration
	* i386/i386/pcb.h (pcb_module_init): Add prototype.
	* kern/thread.c (pcb_module_init): Remove forward declaration.

	kern/task.c: remove forward declarations
	* ipc/ipc_mqueue.h: Include ipc/ipc_kmsg_queue.h.
	* kern/ipc_kobject.h: Move includes into ifndef.
	* kern/syscall_emulation.h: Include kern/task.h.
	(eml_init, eml_task_reference, eml_task_deallocate): Add prototypes.
	* kern/task.c: Include kern/syscall_emulation.h.
	(eml_init, eml_task_reference, eml_task_deallocate): Remove forward declarations

	kern/syscall_sw.c: remove forward declarations
	* kern/eventcount.h (evc_wait_clear): Add prototype.
	* kern/ipc_mig.h: Include device/device_types.h.
	(syscall_vm_map, syscall_vm_allocate, syscall_vm_deallocate, syscall_task_create, syscall_task_terminate, syscall_task_suspend, syscall_task_set_special_port, syscall_mach_port_allocate, syscall_mach_port_deallocate, syscall_mach_port_insert_right, syscall_mach_port_allocate_name, syscall_thread_depress_abort, syscall_device_write_request, syscall_device_writev_request): Add prototypes.
	* kern/syscall_sw.c (syscall_vm_map, syscall_vm_allocate, syscall_vm_deallocate, syscall_task_create, syscall_task_terminate, syscall_task_suspend, syscall_task_set_special_port, syscall_mach_port_allocate, syscall_mach_port_deallocate, syscall_mach_port_insert_right, syscall_mach_port_allocate_name, syscall_thread_depress_abort, evc_wait, evc_wait_clear, syscall_device_write_request, syscall_device_writev_request): Remove forward declarations.
	Include kern/ipc_mig.h.
	Include kern/eventcount.h.

	kern/syscall_subr.c: remove forward declaration
	* kern/syscall_subr.c (thread_depress_priority): Remove forward declaration.
	* kern/syscall_subr.h (thread_depress_priority): Add prototype.

	kern/startup.c: remove forward declarations
	* Makefrag.am: Include kern/bootstrap.h.
	Include vm/vm_init.h.
	Include device/device_init.h.
	* device/device_init.h: New file.
	Add copyright.
	[_DEVICE_DEVICE_INIT_H_]: Add ifndef.
	(device_service_create): Add prototype.
	* i386/i386/mp_desc.h (start_other_cpus): Add prototype.
	* kern/bootstrap.h: New file.
	Add copyright.
	[_KERN_BOOTSTRAP_H_]: Add ifndef.
	(bootstrap_create): Add prototype.
	* kern/sched_prim.h (idle_thread, sched_thread): Add prototypes.
	* kern/startup.c: Include kern/bootstrap.h.
	Include kern/startup.h.
	Include vm/vm_init.h.
	Include vm/vm_pageout.h.
	Include device/device_init.h.
	(vm_mem_init, vm_mem_bootstrap, init_timeout, machine_init, idle_thread, vm_pageout, reaper_thread, swapin_thread, sched_thread, bootstrap_create, device_service_create, cpu_launch_first_thread, start_kernel_threads, start_other_cpus, action_thread): Remove forward declarations.
	[NCPUS > 1] Include machine/mp_desc.h and kern/machine.h.
	* kern/startup.h: Include kern/thread.h.
	(cpu_launch_first_thread, start_kernel_threads): Add prototypes.
	* vm/vm_init.h: New file.
	Add copyright.
	[_VM_VM_INIT_H_]: Add ifndef.
	(vm_mem_init, vm_mem_bootstrap): Add prototypes.
	* vm/vm_pageout.h (vm_pageout): Add prototype.

	kern/sched_prim.c: remove forward declarations
	* kern/sched_prim.c (set_pri, do_thread_scan, choose_pset_thread, checkrq, thread_check): Remove forward declarations.
	* kern/sched_prim.h (set_pri, do_thread_scan, choose_pset_thread, checkrq, thread_check): Add prototypes.

	kern/processor.c: remove forward declarations
	* kern/processor.c (quantum_set, pset_init, processor_init): Remove forward declarations.
	* kern/processor.h (quantum_set, pset_init, processor_init): Add prototypes.

	kern/ipc_mig.c: remove forward declarations
	* device/ds_routines.h (ds_device_write_trap, ds_device_writev_trap): Add prototypes.
	* kern/ipc_mig.c (ds_device_write_trap, ds_device_writev_trap): Remove forward declarations.

	kern/debug.c: remove forward declaration
	* kern/debug.c (cnputc): Remove forward declaration.
	Include device/cons.h.

	kern/bootstrap.c: remove forward declarations
	* i386/i386/pcb.h: Include mach/thread_status.h.
	Include machine/thread.h.
	* kern/bootstrap.c: Include machine/pcb.h.
	(user_stack_low, set_user_regs): Remove forward declarations.

	ipc/mach_msg.c: remove forward declarations
	* ipc/mach_msg.c: Include kern/exception.h.
	(exception_raise_continue, exception_raise_continue_fast): Remove forward declarations.
	* kern/exception.h: Include ipc/ipc_types.h.
	Include ipc/ipc_kmsg.h.

	ipc/ipc_table.c: remove forward declaration
	* ipc/ipc_table.c (ipc_table_fill): Remove forward declaration.
	* ipc/ipc_table.h (ipc_table_fill): Add prototype.

	ipc/ipc_kmsg.c: remove forward declarations
	* ipc/ipc_kmsg.c (copyinmap, copyoutmap, ipc_msg_print): Remove forward declarations.
	* ipc/ipc_kmsg.h (ipc_msg_print): Add prototype.

	i386/intel/pmap.c: remove forward declarations
	* i386/intel/pmap.c (pmap_remove_range, signal_cpus): Remove forward declarations.
	* i386/intel/pmap.h (pmap_remove_range, signal_cpus): Add prototypes.

2013-12-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop duplicate declaration
	* i386/i386/model_dep.h (halt_cpu, halt_all_cpus): Remove duplicate
	declaration.
	* i386/i386at/model_dep.h (halt_cpu, halt_all_cpus): Add comments.

2013-12-04  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386at: remove forward declarations
	* Makefrag.am: Include kern/startup.h.
	* i386/i386at/model_dep.c: Include kern/startup.h.
	Include i386at/model_dep.h.
	(setup_main, halt_all_cpus, halt_cpu, inittodr): Remove forward declarations.
	* i386/i386at/model_dep.h  (halt_all_cpus, halt_cpu, inittodr): Add prototypes.
	* kern/startup.h: New file.
	Add copyright.
	[_KERN_STARTUP_H_]: Add ifndef.
	(setup_main): Add prototype.

	i386/i386at/kd_mouse.c: remove forward declarations
	* i386/i386at/kd_mouse.c (mouseintr, mouse_enqueue, mouse_read_done): Remove forward declarations.
	(mouseintr): Define argument type.
	* i386/i386at/kd_mouse.h (mouseintr, mouse_enqueue, mouse_read_done): Add prototypes.

	i386/i386at/kd_event.c: remove forward declarations
	* i386/i386at/kd_event.c (kbd_enqueue, X_kdb_enter_init, X_kdb_exit_init, kbd_read_done): Remove forward declarations.
	* i386/i386at/kd_event.h (kbd_enqueue, X_kdb_enter_init, X_kdb_exit_init, kbd_read_done): Add prototypes.

	i386/i386at/kd.c: remove forward declarations
	* i386/i386at/kd.c (kd_enqsc, kdcheckmagic, do_modifier, bmpch2bit, bmppaintcsr, bit2fbptr): Remove forward declarations.
	* i386/i386at/kd.h: Include device/buf.h.
	Include i386at/kdsoft.h.
	(kdcheckmagic, do_modifier, bmpch2bit, bmppaintcsr, bit2fbptr): Add prototypes.
	* i386/i386at/kd_event.h (kd_enqsc): Add prototype.

	i386/i386at/conf.c: remove forward declarations
	* i386/Makefrag.am: Include i386/i386at/model_dep.h and i386/i386at/mem.h.
	* i386/i386at/com.h (comgetstat, comsetstat): Declare as extern.
	(comopen, comclose, comread, comwrite, comportdeath): Add prototypes.
	* i386/i386at/conf.c: Include kern/mach_clock.h and i386at/model_dep.h.
	(timeopen, timeclose, timemmap): Remove forward declarations.
	(kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Likewise.
	(comopen, comclose, comread, comwrite, comportdeath, comgetstat, comsetstat): Likewise.
	(lpropen, lprclose, lprread, lprwrite, lprportdeath, lprgetstat, lprsetstat): Likewise.
	(kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise.
	(mouseopen, mouseclose, mouseread, mousegetstat): Likewise.
	(memmmap): Likewise.
	(kmsgopen, kmsgclose, kmsgread, kmsggetstat): Likewise.
	(hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Likewise.
	Include i386at/kd.h.
	Include i386at/com.h.
	Include i386at/lpr.h.
	Include i386at/kd_event.h.
	Include i386at/kd_mouse.h.
	Include i386at/mem.h.
	Include device/kmsg.h.
	Include xen/console.h.
	* i386/i386at/kd.h: Include device/io_req.h.
	(kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Add prototypes.
	* i386/i386at/kd_event.h (kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise.
	* i386/i386at/kd_mouse.h (mouseopen, mouseclose, mouseread, mousegetstat): Likewise.
	* i386/i386at/lpr.h (lpropen, lprclose, lprread, lprwrite, lprportdeath): Likewise.
	(lprgetstat, lprsetstat): Declare as extern.
	* i386/i386at/mem.h: New file.
	Add copyright.
	[_MEM_H_]: Add ifndef.
	(memmmap): Add prototype.
	* i386/i386at/model_dep.c: Include i386/i386at/model_dep.h.
	(timemmap): Fix argument list.
	* i386/i386at/model_dep.h: New file.
	Add copyright.
	[_MODEL_DEP_H_]: Add ifndef.
	(timemmap): Add prototype.
	* kern/mach_clock.h (timeopen, timeclose): Add prototypes.
	* xen/console.h (hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Add prototypes.

	i386/i386at/autoconf.c, com.c, lpr.c: remove forward declarations
	* i386/i386/autoconf.c (comintr, lprintr): Remove forward declarations.
	Include i386at/com.h.
	Include i386at/lprreg.h.
	* i386/i386at/com.c (comprobe, commctl, comstart, comstop, comattach, comintr, comgetstat, comsetstat): Remove forward declarations.
	* i386/i386at/com.h: Include device/tty.h.
	(comprobe, commctl, comstart, comstop, comattach, comintr, comgetstat, comsetstat): Add prototypes.
	* i386/i386at/lpr.c (lprprobe, lprstop, lprintr, lprstart, lprattach, lprgetstat, lprsetstat, lprpr_addr): Remove forward declarations.
	(lprprobe): Fix argument list.
	(lprpr): Define argument type.
	lprpr_addr): Likewise.
	* i386/i386at/lprreg.h (lprprobe, lprstop, lprintr, lprstart, lprattach, lprgetstat, lprsetstat, lprpr_addr): Add prototypes.

	kern/exception.c: remove forward declarations
	* i386/i386/trap.h (thread_kdb_return): Add prototype.
	* kern/exception.c (thread_kdb_return, db_printf): Remove forward declarations.
	Include machine/trap.h.
	Include ddb/db_output.h.

	kern: new header file exception.h
	* Makefrag.am: Include kern/exception.h.
	* i386/i386/trap.c: Include kern/exception.h.
	(exception, thread_exception_return): Remove forward declarations.
	* kern/exception.c: Include kern/exception.h.
	(exception, exception_try_task, exception_no_server, exception_raise, exception_parse_reply, exception_raise_continue, exception_raise_continue_slow, exception_raise_continue_fast): Remove forward declarations.
	* kern/exception.h: New file.
	Add copyright.
	[_KERN_EXCEPTION_H_]: Add ifndef.
	(exception, exception_try_task, exception_no_server, exception_raise, exception_parse_reply, exception_raise_continue, exception_raise_continue_slow, exception_raise_continue_fast): Add prototypes.

	i386/i386/pcb.c: remove forward declarations
	* i386/i386/pcb.c (Load_context, Switch_context, Thread_continue, user_ldt_free): Remove forward declarations.
	* i386/i386/pcb.h (Load_context, Switch_context, Thread_continue): Add prototypes.
	* i386/i386/user_ldt.h (user_ldt_free): Add prototype.

	i386/i386/io_perm.c: remove forward declaration
	* i386/i386/io_perm.c: Include pcb.h.
	(update_ktss_iopb): Remove forward declaration.
	* i386/i386/pcb.h (update_ktss_iopb): Add prototype.

	i386/i386/fpu.c, trap.c: remove forward declarations
	* i386/i386/fpu.c: Include i386/trap.h.
	(void i386_exception, fp_save, fp_load): Remove forward declaration.
	* i386/i386/trap.c (void i386_exception): Remove forward declaration.
	* i386/i386/trap.h (void i386_exception): Add prototype.

	i386/i386/db_trace.c: remove forward declaration
	* i386/i386/db_interface.h: Include ddb/db_variables.h.
	(db_i386_reg_value): Add prototype.
	* i386/i386/db_trace.c (db_i386_reg_value): Remove forward declaration.

	device/device_init.c: remove forward declarations
	* device/dev_lookup.c: Include device/ds_routines.h.
	* device/device_init.c: Include device/ds_routines.h.
	Include device/net_io.h.
	(mach_device_init, dev_lookup_init, net_io_init, device_pager_init, io_done_thread, net_thread): Remove forward declarations.
	* device/ds_routines.h (mach_device_init, dev_lookup_init, device_pager_init, io_done_thread): Add prototypes.
	* device/net_io.h (net_io_init, net_thread): Add prototypes.

	ddb/db_variables.c: remove forward declarations
	* ddb/db_task_thread.h: Include ddb/db_variables.h.
	(db_set_default_thread, db_get_task_thread): Add prototypes.
	* ddb/db_variables: Include ddb/db_macro.h.
	(db_set_default_thread, db_get_task_thread, db_arg_variable): Remove forward declarations.

	ddb/db_trap.c: remove forward declarations
	* ddb/db_run.h (db_restart_at_pc, db_stop_at_pc): Add prototypes.
	* ddb/db_trap.c (db_restart_at_pc, db_stop_at_pc): Remove forward declarations.
	Include ddb/db_run.h.

	ddb/db_command.c: remove useless forward declaration without definition
	* ddb/db_command.c (ddb_display): Remove forward declaration.
	Remove ddb_display call.

	ddb/db_command.c: remove forward declaration
	* ddb/db_command.c (db_reset_cpu): Remove forward declaration.
	* i386/i386/db_interface.h (db_reset_cpu): Add prototype.
	* i386/i386at/model_dep.c: Include i386/db_interface.h.

	ddb/db_sym.c: fix argument list
	* ddb/db_sym.c (dummy_db_free_symbol): Fix argument list.

	ddb/db_sym.c: remove useless forward declarations without definitions
	* ddb/db_sym.c (coff_db_sym_init, coff_db_line_at_pc, db_sym_t coff_db_lookup, coff_db_search_symbol, coff_db_symbol_values): Remove forward declarations.
	(x_db): Modify field definition.

	ddb: new header file db_aout.h
	* Makefrag.am: Include ddb/db_aout.h.
	* ddb/db_aout.c: Include ddb/db_aout.h.
	* ddb/db_aout.h: New file.
	Add copyright.
	[_DDB_DB_AOUT_H_]: Add ifndef.
	Include ddb/db_sym.h.
	Include machine/db_machdep.h.
	(aout_db_line_at_pc, aout_db_lookup, aout_db_search_symbol, aout_db_symbol_values): Add prototypes.
	* ddb/db_sym.c: Include ddb/db_aout.h.
	(db_search_in_task_symbol, aout_db_line_at_pc, aout_db_lookup, aout_db_search_symbol, aout_db_symbol_values): Remove forward declarations.
	* ddb/db_sym.h (db_search_in_task_symbol): Add prototype.

	ddb/db_aout.c: trivial stylistic fix for consistency
	* ddb/db_aout.c: Trivial stylistic fix for consistency.

	ddb/db_run.c: add comment after endif
	* ddb/db_run.c [FIXUP_PC_AFTER_BREAK]: Add comment after endif.

	ddb/db_mp.c: add comment after else and endif
	* ddb/db_mp.c [CONSOLE_ON_MASTER]: Add comment after else and endif.

	ddb/db_input.c: add comment after endif
	* ddb/db_input.c [DB_HISTORY_SIZE]: Add comment after endif.

	ddb/db_command.c: remove forward declarations
	* ddb/db_command.c: Include machine/db_interface.h.
	(db_help_cmd, db_stack_trace_cmd): Remove forward declarations.
	* ddb/db_command.h (db_help_cmd): Add prototype.
	* i386/i386/db_interface.h (db_stack_trace_cmd): Add prototype.

	device/net_io.c: initialize hash_entp to NULL
	* device/net_io.c (hash_entp): Initialize to NET_HASH_ENTRY_NULL.

2013-11-24  Marin Ramesa  <mpr@hi.t-com.hr>

	Modify struct db_variable
	* ddb/db_macro.c (db_arg_variable): Make function void.
	* ddb/db_macro.h (db_arg_variable): Declare void return.
	* ddb/db_task_thread.c (db_set_default_thread): Make function void.
	(db_get_task_thread): Make function void.
	* ddb/db_variables.c (db_set_default_thread, db_get_task_thread, db_arg_variable): Declare void return.
	(db_read_write_variable): Use void in initialization.
	* ddb/db_variables.h (db_variable): Make third member return void.
	[FCN_NULL]: Define void.
	* i386/i386/db_trace.c (db_i386_reg_value): Make function void.

	device: new header file chario.h
	* Makefrag.am: Include device/chario.h.
	* device/chario.c (queue_delayed_reply, tty_output, char_open_done, char_read_done, char_write_done): Remove forward declarations.
	* device/chario.h: New file.
	Add copyright.
	[_DEVICE_CHARIO_H_]: Add ifndef.
	Include device/tty.h.
	(queue_delayed_reply, tty_output, char_open_done, char_read_done, char_write_done): Add prototypes.

	ddb/db_examine.c: trivial stylistic fix for consistency
	* ddb/db_examine.c: Trivial stylistic fix for consistency.

	ddb: move forward declarations into a header file
	* ddb/db_examine.c (db_disasm, db_search): Remove forward declarations.
	* ddb/db_examine.h (db_disasm, db_search): Add prototypes.

	ddb: move forward declaration into a header file
	* ddb/db_sym.c (db_lookup): Remove forward declaration.
	* ddb/db_sym.h (db_lookup): Add prototype.

	ddb: create new header file db_mp.h
	* Makefrag.am: Include ddb/db_mp.h.
	* ddb/db_mp.c (remote_db, lock_db, unlock_db): Remove forward declarations.
	* ddb/db_mp.h: New file.
	Add copyright.
	[_DDB_DB_MP_H_]: Add ifndef.
	(remote_db, lock_db, unlock_db): Add prototypes.

	ddb: move forward declarations into a header file
	* ddb/db_run.c (db_set_task_single_step, db_clear_task_single_step): Remove forward declarations.
	* ddb/db_run.h (db_set_task_single_step, db_clear_task_single_step): Add prototypes.

2013-11-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Simplify test
	* ddb/db_sym.c (db_name_is_ambiguous): Simplify test for value returned by
	X_db_lookup.

	Drop spurious volatile qualifier
	* kern/processor.h (processor_doshutdown): Drop spurious volatile qualifier.

2013-11-24  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: move forward declarations into a header file
	* kern/machine.c (processor_doaction, processor_doshutdown): Remove forward declarations.
	* kern/processor.h (processor_doaction, processor_doshutdown): Add prototypes.

	kern: move forward declaration into a header file
	* kern/eventcount.c [NCPUS] (simpler_thread_setrun): Remove forward declaration.
	* kern/eventcount.h [NCPUS] (simpler_thread_setrun): Add prototype.

	kern: move forward declaration into a header file
	* kern/timer.c (timer_init): Remove forward declaration.
	* kern/timer.h (timer_init): Add prototype.

	kern: move forward declaration into a header file
	* kern/mach_clock.c (softclock): Remove forward declaration.
	* kern/timer.h (softclock): Add prototype.

	kern: move forward declarations into a header file
	* kern/thread.c [MACH_DEBUG] (stack_init, stack_finalize): Remove forward declarations.
	* kern/thread.h [MACH_DEBUG] (stack_init, stack_finalize): Add prototypes.

	vm: move forward declarations into a header file
	* vm/vm_map.c (vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard, vm_map_lookup_entry): Remove forward declarations.
	* vm/vm_map.h (vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard, vm_map_lookup_entry): Add prototypes.

	vm: move forward declarations into a header file
	* vm/vm_object.c (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Remove forward declarations.
	* vm/vm_object.h (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Add prototypes.

2013-11-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2013-11-24  Marin Ramesa  <mpr@hi.t-com.hr>

	Remove leftover register qualifiers
	* ddb/db_break.c: Remove register qualifiers.
	* i386/i386/pcb.c: Likewise.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/lpr.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* kern/machine.c: Likewise.
	* kern/queue.h: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/sched_prim.h: Likewise.
	* kern/timer.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_resident.h: Likewise.

2013-11-24  Richard Braun  <rbraun@sceen.net>

	New RPC for thread destruction
	A new call, thread_terminate_release, is added to support self
	destruction in threading libraries.

	* include/mach/gnumach.defs (thread_terminate_release): New
	simpleroutine declaration.
	* kern/thread.c: Include vm/vm_user.h and ipc/mach_port.h.
	(thread_terminate_release): New function.
	* kern/thread.h (thread_terminate_release): New prototype.

2013-11-24  Richard Braun  <rbraun@sceen.net>

	Export mach_port_destroy declaration
	* ipc/mach_port.h (mach_port_destroy): Add prototype.

2013-11-22  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c: remove duplicate include
	* ddb/db_break.c: Don't include ddb/db_access.h.

2013-11-21  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.h: fix implicit declaration of function
	* i386/i386/db_interface.h (cnpollc): Add prototype.

	ddb/db_sym.c: move assignment outside if
	* ddb/db_sym.c: Move assignment outside of if.
	(db_lookup): New variable.

	i386/i386at/kd.h: fix implicit declaration of function
	* i386/i386at/kd.h [MACH_KDB] (kdb_kintr): Add prototype.

	ddb/db_break.c: fix implicit declaration of functions
	* ddb/db_break.c: Include machine/db_interface.h.

2013-11-20  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/trap.c: fix implicit declaration of function
	* i386/i386/trap.c: Include machine/db_interface.h.

	i386/i386/db_trace.c: don't cast to db_addr_t
	* i386/i386/db_trace.c (db_check_thread_address_valid): Don't cast argument 1 to db_addr_t.

2013-11-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Comment out db_search_null
	* i386/i386/db_interface.c (db_search_null) [!GNU]: Do not define
	db_search_null.

2013-11-20  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.c: add comments after else and endif
	* i386/i386/db_interface.c [GNU]: Add comments after else and endif.

2013-11-20  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_interface.c: remove return value
	Void function returns with FALSE. Remove return value.

	* i386/i386/db_interface.c (db_task_name): Remove return value.

2013-11-20  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/i386/db_trace.c: fix implicit declaration of function
	* i386/i386/db_trace.c: Include machine/db_interface.h.

	i386/i386/db_interface.c: fix implicit declaration of function
	* i386/i386/db_interface.c: Include string.h.

	i386/i386/db_interface.c: fix implicit declaration of function
	* i386/i386/db_interface.c: Include vm/vm_fault.h.

	Fix implicit declaration of function
	* ddb/db_sym.c (aout_db_sym_init): Remove forward declaration.
	* ddb/db_sym.h (aout_db_sym_init): Add prototype.
	* i386/i386at/model_dep.c (aout_db_sym_init): Fix call.
	[MACH_KDB]: Include ddb/db_sym.h.
	[MACH_KDB]: Add comment after else and endif.

	kern/xpr.c: quiet warning about uninitialized variable
	* kern/xpr.c (s): Initialize.

	kern/startup.c: fix implicit declaration of function
	* kern/startup.c [MACH_KDB]: Include device/cons.h.

	ipc/ipc_print.h: include ipc/ipc_pset.h for ipc_pset_t
	* ipc/ipc_print.h: Include ipc/ipc_pset.h for ipc_pset_t.

	ddb/db_variables.c: fix initializations from incompatible pointer type
	* ddb/db_variables.c (db_set_default_thread, db_get_task_thread, db_arg_variable, fcn): Declare long return type.

	ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP
	* ddb/db_run.c (brpc): Move declaration into SOFTWARE_SSTEP code.

	ddb/db_run.c: trivial stylistic fix for consistency
	* ddb/db_run.c: Trivial stylistic fix for consistency.

	ddb/db_run.c: remove set but unused variable
	* ddb/db_run.c (ins): Remove variable.

	ddb: fix implicit declaration of function
	* ddb/db_variables.c (db_read_write_variable): Remove forward declaration.
	* ddb/db_variables.h (db_read_write_variable): Add prototype.

	ddb/db_examine.c: add missing cast
	ddb/db_examine.c (addr, count): Cast to (db_expr_t *).

	Add comment
	* ddb/db_command.c [DB_MACHINE_COMMANDS]: Add comment after endif.

2013-11-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop volatile function qualifier
	* i386/i386/setjmp.h (_longjmp): Drop volatile function qualifier.

2013-11-20  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/db_break.c: quiet GCC warning about uninitialized variable
	* ddb/db_break.c (bkpt): Initialize.

2013-11-19  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/slab.c: initialize info_size
	info_size is initialized to a random value. Quiet the warning by
	initializing to zero.

	* kern/slab.c (info_size): Initialize to zero.

2013-11-19  Marin Ramesa  <mpr@hi.t-com.hr>

	kern/slab.c: initialize optimal_embed
	optimal_embed is initialized to a random value. Quiet the warning by
	initializing to zero.

	* kern/slab.c (optimal_embed): Initialize to zero.

2013-11-19  Marin Ramesa  <mpr@hi.t-com.hr>

	Add copyright
	* ddb/db_write_cmd.h: Add copyright.
	* ipc/ipc_print.h: Likewise.
	* vm/vm_print.h: Likewise.

2013-11-18  Marin Ramesa  <mpr@hi.t-com.hr>

	Add ifndefs
	Finish up with the addition of ifndefs.

	* device/buf.h: Add ifndef.
	* device/dev_master.h: Likewise.
	* include/device/tty_status.h: Likewise.
	* include/mach/version.h: Likewise.
	* ipc/ipc_machdep.h: Likewise.

2013-11-17  Marin Ramesa  <mpr@hi.t-com.hr>

	ddb/stab.h: add ifndef
	* ddb/stab.h: Add ifndef.

	ddb/db_write_cmd.c: remove register qualifiers
	* ddb/db_write_cmd.c: Remove register qualifiers.

	ddb/db_watch.c: remove register qualifiers
	* ddb/db_watch.c: Remove register qualifiers.

	ddb/db_variables.c: remove register qualifiers
	* ddb/db_variables.c: Remove register qualifiers.

	ddb/db_task_thread.c: remove register qualifiers
	* ddb/db_task_thread.c: Remove register qualifiers.

	ddb/db_sym.h: add comment after endif
	* ddb/db_sym.h: Add comment after endif.

	ddb/db_sym.c: remove register qualifiers
	* ddb/db_sym.c: Remove register qualifiers.

	ddb/db_run.h: add ifndef
	* ddb/db_run.h: Add ifndef.

	ddb/db_run.c: remove register qualifiers
	* ddb/db_run.c: Remove register qualifiers.

	ddb/db_print.c: remove register qualifiers
	* ddb/db_print.c: Remove register qualifiers.

	ddb/db_output.h: add ifndef
	* ddb/db_output.h: Add ifndef.

	ddb/db_output.c: remove register qualifiers
	* ddb/db_output.c: Remove register qualifiers.

	ddb/db_mp.c: remove register qualifier
	* ddb/db_mp.c: Remove register qualifier.

	ddb/db_macro.c: remove register qualifiers
	* ddb/db_macro.c: Remove register qualifiers.

	ddb/db_lex.h: add ifndef
	* ddb/db_lex.h: Add ifndef.

	ddb/db_lex.c: remove register qualifiers
	* ddb/db_lex.c: Remove register qualifiers.

	ddb/db_input.c: remove register qualifiers
	* ddb/db_input.c: Remove register qualifiers.

	ddb/db_expr.c: remove register qualifier
	* ddb/db_expr.c: Remove register qualifier.

	ddb/db_examine.c: remove register qualifiers
	* ddb/db_examine.c: Remove register qualifiers.

	ddb/db_cond.c: remove register qualifiers
	* ddb/db_cond.c: Remove register qualifiers.

	ddb/db_command.h: add ifndef
	* ddb/db_command.h: Add ifndef.

	ddb/db_command.c: remove register qualifiers
	* ddb/db_command.c: Remove register qualifiers.

	ddb/db_break.c: remove register qualifiers
	* ddb/db_break.c: Remove register qualifiers.

	ddb/db_aout.c: remove register qualifiers
	* ddb/db_aout.c: Remove register qualifiers.

	ddb/db_access.h: add ifndef
	* ddb/db_access.h: Add ifndef.

	ddb/db_access.c: remove register qualifiers
	* ddb/db_access.c: Remove register qualifiers.

2013-11-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Remove dead code
	Thanks Marin Ramesa for the report.

	* i386/i386/user_ldt.c (selector_check): Remove function.
	* i386/i386/user_ldt.h (S_CODE, S_STACK, S_DATA): Remove macros.
	(selector_check): Remove declaration.

2013-11-15  Marin Ramesa  <mpr@hi.t-com.hr>

	i386/intel/read_fault.c: remove register qualifier
	* i386/intel/read_fault.c: Remove register qualifier.

	i386/intel/pmap.h: remove register qualifiers
	* i386/intel/pmap.h: Remove register qualifiers.

	i386/intel/pmap.c: remove register qualifiers
	* i386/intel/pmap.c: Remove register qualifiers.

	i386/i386at/rtc.h: remove register qualifiers
	* i386/i386at/rtc.h: Remove register qualifiers.

	i386/i386at/rtc.c: remove register qualifier
	* i386/i386at/rtc.c: Remove register qualifier.

	i386/i386at/lpr.c: remove register qualifier
	* i386/i386at/lpr.c: Remove register qualifier.

	i386/i386at/kd_mouse.c: remove register qualifiers
	* i386/i386at/kd_mouse.c: Remove register qualifiers.

	i386/i386at/kd.c: remove register qualifiers
	* i386/i386at/kd.c: Remove register qualifiers.

	i386/i386at/kd_event.c: remove register qualifiers
	* i386/i386at/kd_event.c: Remove register qualifiers.

	i386/i386at/int_init.h: add comment after endif
	* i386/i386at/int_init.h (__ASSEMBLER__): Add comment after endif.

	i386/i386at/idt.h: add comment after endif
	* i386/i386at/idt.h (__ASSEMBLER__): Add comment after endif.

	i386/i386at/com.c: remove register qualifiers
	* i386/i386at/com.c: Remove register qualifiers.

	i386/i386at/com.c: trivial stylistic fix for consistency
	* i386/i386at/com.c: Trivial stylistic fix for consistency.

	i386/i386at/autoconf.c: remove register qualifiers
	* i386/i386at/autoconf.c: Remove register qualifiers.

	i386/i386/trap.c: remove register qualifiers
	* i386/i386/trap.c: Remove register qualifiers.

	i386/i386/thread.h: add comment after endif
	* i386/i386/thread.h (LINUX_DEV): Add comment after endif.

	i386/i386/pic.h: add comment after endif
	* i386/i386/pic.h (__ASSEMBLER__): Add comment after endif.

	i386/i386/pcb.c: remove register qualifiers
	* i386/i386/pcb.c: Remove register qualifiers.

	i386/i386/mp_desc.c: remove register qualifiers
	* i386/i386/mp_desc.c: Remove register qualifiers.

	i386/i386/machine_routines.h: add comment after endif
	* i386/i386/machine_routines.h (_I386_MACHINE_ROUTINES_H_): Add comment after endif.

	i386/i386/loose_ends.c: remove unused variable
	* i386/i386/loose_ends.c (boothowto): Remove unused variable.

	i386/i386/loose_ends.c: add comment after endif
	* i386/i386/loose_ends.c (NDEBUG): Add comment after endif.

	i386/i386/lock.h: remove register quaalifier
	* i386/i386/lock.h: Remove register qualifier.

	i386/i386/kttd_interface.c: trivial stylistic fix for consistency
	* i386/i386/kttd_interface.c: Trivial stylistic fix for consistency.

	i386/i386/hardclock.c: add comment after endif
	* i386/i386/hardclock.c (LINUX_DEV): Add comment after endif.

	i386/i386/fpu.h: remove register qualifiers
	* i386/i386/fpu.h: Remove register qualifiers.

	i386/i386/fpu.c: remove register qualifiers
	* i386/i386/fpu.c: Remove register qualifiers.

	i386/i386/db_trace.c: qualify constants with const
	* i386/i386/db_trace.c: Qualify constants with const.

	i386/i386/db_trace.c: remove register qualifiers
	* i386/i386/db_trace.c: Remove register qualifiers.

	i386/i386/db_interface.c: remove register qualifiers
	* i386/i386/db_interface.c: Remove register qualifiers.

	Fix typo

	i386/i386/vm_tuning.h: remove file
	* i386/Makefrag.am: Remove i386/i386/vm_tuning.h.
	* i386/i386/vm_tuning.h: Remove file.
	* vm/vm_pageout.c: Don't include i386/i386/vm_tuning.h.

	i386/i386at: add ifndefs
	* i386/i386at/kd_queue.h: Add ifndef.
	* i386/i386at/kdsoft.h: Likewise.
	* i386/i386at/lprreg.h: Likewise.
	* i386/i386at/rtc.h: Likewise.

	chips/busses.c: remove register qualifiers
	* chips/busses.c: Remove register qualifiers.

	chips/busses.c: use boolean instead of an int
	* chips/busses.c (found): Constrain range of values to a boolean.

	vm/vm_user.c: remove register qualifiers
	* vm/vm_user.c: Remove register qualifiers.

	vm/vm_resident.c: remove register qualifiers
	* vm/vm_resident.c: Remove register qualifiers.

	vm/vm_pageout.c: remove register qualifiers
	* vm/vm_pageout.c: Remove register qualifiers.

	vm/vm_object.c: remove register qualifiers
	* vm/vm_object.c: Remove register qualifiers.

	vm/vm_map.c: remove register qualifiers
	* vm/vm_map.c: Remove register qualifiers.

	vm/vm_map.c: trivial stylistic fix for consistency
	* vm/vm_map.c: Trivial stylistic fix for consistency.

	vm/vm_kern.c: remove register qualifiers
	* vm/vm_kern.c: Remove register qualifiers.

	vm/vm_fault.c: remove register qualifiers
	* vm/vm_fault.c: Remove register qualifiers.

	vm/vm_fault.c: remove unused variable
	* vm/vm_fault.c: Remove unused variable.

	vm/memory_object_proxy.h: fix definition
	* vm/memory_object_proxy.h (_VM_MEMORY_OBJECT_PROXY_H_): Fix definition.

	vm/memory_object.c: remove register qualifiers
	* vm/memory_object.c: Remove register qualifiers.

2013-11-13  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: remove register qualifiers
	* kern/xpr.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/timer.h: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/timer.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/thread_swap.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/thread.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/task.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/syscall_subr.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/syscall_emulation.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/strings.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/startup.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/sched_prim.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/sched.h: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/queue.h: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/queue.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/processor.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/priority.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/printf.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/pc_sample.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/machine.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/mach_factor.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/mach_clock.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/lock_mon.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/lock.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/ipc_tt.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/ipc_sched.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/ipc_mig.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/host.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/exception.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/eventcount.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/bootstrap.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/ast.c: Remove register qualifiers.

	kern: remove register qualifiers
	* kern/act.c: Remove register qualifiers.

2013-11-11  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc: remove register qualifiers
	* ipc/ipc_thread.h: Remove register qualifiers.

	ipc: remove register qualifiers
	* ipc/mach_msg.c: Remove register qualifiers.

	ipc: qualify constants with const
	* ipc/ipc_table.c: Qualify constants with const.

	ipc: trivial stylistic fix for consistency
	* ipc/ipc_pset.c: Trivial stylistic fix for consistency.

2013-11-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2013-11-11  Marin Ramesa  <mpr@hi.t-com.hr>

	ipc: remove register qualifiers
	* ipc/ipc_kmsg.c: Remove register qualifiers.

2013-11-11  Justus Winter  <4winter@informatik.uni-hamburg.de>

	kern: fix the error handling in exec_load
	Found using the Clang Static Analyzer.

	* kern/elf-load.c (exec_load): Properly propagate errors.

2013-11-10  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: comment unused variable
	Variable reply_port is never used. There is indication in the comments
	that it might be used in future function call, so comment it.

	* kern/ipc_mig.c (syscall_device_writev_request): Comment variable.

2013-11-10  Marin Ramesa  <mpr@hi.t-com.hr>

	device: initialize to zero offset
	Initialize addr to zero offset to quiet warnings about uninitialized
	deallocation.

	* device/chario.c (addr): Initialize to zero.

2013-11-10  Marin Ramesa  <mpr@hi.t-com.hr>

	remove register qualifiers
	* device/subrs.c: Remove register qualifiers.

	remove register qualifiers
	* device/net_io.c: Remove register qualifiers.

	remove definitions of ETHERMTU and ETHERMIN
	* device/if_ether.h (ETHERMTU, ETHERMIN): Remove unused definitions.

	remove register qualifiers
	* device/blkio.c: Remove register qualifiers.

2013-11-09  Vladimir 'φ-coder/phcoder' Serbinenko  <phcoder@gmail.com>

	Fix overflow in Xen clock computation
	* xen/time.c (hyp_get_stime): Split `delta` into `delta_high` and
	`delta_low`, as it may overflow 4 second timing nowadays.

2013-11-09  Marin Ramesa  <mpr@hi.t-com.hr>

	Remove lint code

2013-10-10  Richard Braun  <rbraun@sceen.net>

	Increase kernel map entry pool size
	* vm/vm_map.h (KENTRY_DATA_SIZE): Set to 256 pages.

2013-10-09  Richard Braun  <rbraun@sceen.net>

	VM cache policy change
	This patch lets the kernel unconditionnally cache non empty unreferenced
	objects instead of using a fixed arbitrary limit. As the pageout daemon
	evicts pages, it collects cached objects that have become empty. The
	effective result is a graceful adjustment of the number of objects
	related to memory management (virtual memory objects, their associated
	ports, and potentially objects maintained in the external memory
	managers). Physical memory can now be almost entirely filled up with
	cached pages. In addition, these cached pages are not automatically
	deactivated as objects can quickly be referenced again.

	There are problems with this patch however. The first is that, on
	machines with a large amount of physical memory (above 1 GiB but it also
	depends on usage patterns), scalability issues are exposed. For example,
	file systems which don't throttle their writeback requests can create
	thread storms, strongly reducing system responsiveness. Other issues
	such as linear scans of memory objects also add visible CPU overhead.

	The second is that, as most memory is used, it increases the chances of
	swapping deadlocks. Applications that map large objects and quickly
	cause lots of page faults can still easily bring the system to its
	knees.

2013-09-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add files missing in distrib tarball
	* Makefrag.am (libkernel_a_SOURCES): Add ddb/db_write_cmd.h,
	ipc/ipc_print.h, vm/vm_print.h
	* linux/Makefrag.am (EXTRA_DIST): Add linux/src/drivers/scsi/FlashPoint.c,
	linux/src/drivers/scsi/eata_pio_proc.c, linux/src/drivers/scsi/scsiiom.c.

2013-09-27  Thomas Schwinge  <thomas@codesourcery.com>

	Merge remote-tracking branch 'savannah/master' into master

	GNU Mach 1.4.
	* version.m4 (AC_PACKAGE_VERSION): Set to 1.4.
	* NEWS: Finalize changes for 1.4.
	* README: Update.

	* configure.ac (AM_INIT_AUTOMAKE): Add dist-bzip2.

	Generate ChangeLog files for distributions.
	* gitlog-to-changelog: New file; import from gnulib's
	9fc81090f6c5590bd1b0e0fa5087577a2ee43a3e:build-aux/gitlog-to-changelog.
	* Makefile.am (gen-ChangeLog): New target.
	(dist-hook): Depend on it.

	dist-hook extensibility.
	* Makefile.am (dist-hook): Rename to...
	(dist-rm-CVS): ... this new target.
	(dist-hook): Depend on it.

	* README: Simplify build instructions.
	Follow-up to commit 471e5b080f7790c2cf95e3069d9fed1173c9ec17.

2013-09-27  Svante Signell  <srs@kth.se>

	Fix typo
	* README: Fix typo.

2013-09-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix gpl.texi build
	texinfo does not support @heading/@center in the middle of an enumerate.

	* doc/gpl.texi: Move "NO WARRANTY" to item heading.

2013-09-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Really update README
	* README: Network drivers are actually enabled by default.

	Update README
	* README: Update default drivers notice.  Mention cross-compilation flags
	for 64bit systems.

2013-09-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop Invariant, Front-Cover and Back-Cover references
	The referenced Invariant sections does not exist, and the front and back
	covers do not hold much information.

2013-09-22  Marin Ramesa  <mpr@hi.t-com.hr>

	device: remove unused file dk_label.c
	* device/dk_label.c: Remove file.

2013-09-21  Marin Ramesa  <mpr@hi.t-com.hr>

	add comments after endifs
	* device/ds_routines.c [CONFIG_PCMCIA, CONFIG_INET, LINUX_DEV, MACH_HYP]: Add comments after endifs.

	remove lint code
	* device/ds_routines.c [lint]: Remove ifdefs and associated code.

	remove register qualifiers
	* device/ds_routines.c: Remove register qualifiers.

	remove lint code
	* device/dev_pager.c [lint]: Remove ifdefs and associated code.

	Coding style trivial fixes

	remove register qualifiers
	* device/dev_pager.c: Remove register qualifiers.

2013-09-16  Marin Ramesa  <mpr@hi.t-com.hr>

	another small change in style for consistency
	* device/dev_name.c: Change in coding style.

2013-09-16  Marin Ramesa  <mpr@hi.t-com.hr>

	use boolean_t instead of an int
	Variable 'found' already receives values TRUE and FALSE, so why not make
	it a boolean.

	* device/dev_name.c: Use boolean_t instead of an int.

2013-09-16  Marin Ramesa  <mpr@hi.t-com.hr>

	remove preprocessor comments
	The first one is a message that name lookup has been called, which
	I think is safe to remove, or maybe add #if DEBUG. Second one is a
	alternate calculation that I doubt it will ever be used, so I think
	it's safe to remove it.

	* device/dev_name.c: Remove preprocessor comments.

2013-09-16  Marin Ramesa  <mpr@hi.t-com.hr>

	another small change in style for consistency
	* device/dev_name.c: Change in coding style.

	small style changes for consistency
	* device/dev_name: Changes in coding style.

	remove register qualifiers
	* device/dev_name.c: Remove register qualifiers.

2013-09-15  Marin Ramesa  <mpr@hi.t-com.hr>

	remove definition of NDEVICES
	NDEVICES is never used. Judging by the position and the comments
	it was once used in initialization, but it's not anymore. I think
	it's safe to remove it.

	* device/dev_lookup.c (NDEVICES): Remove definition.

2013-09-15  Marin Ramesa  <mpr@hi.t-com.hr>

	remove register qualifiers
	* device/dev_lookup.c: Remove register qualifiers.

2013-09-11  Marin Ramesa  <mpr@hi.t-com.hr>

	remove register qualifiers.
	* device/cirbuf.c: Remove register qualifiers.

2013-09-11  Marin Ramesa  <mpr@hi.t-com.hr>

	track the console init with a boolean instead of an int
	A variable that keeps track if the console init has been called. It should
	never receive values other than 0 and 1, so constrain it's possible range of
	values to a boolean.

	* device/cons.c (cn_inited): Use boolean_t instead of an int.

2013-09-11  Marin Ramesa  <mpr@hi.t-com.hr>

	track the console buffer usage with a boolean instead of an int
	A variable that keeps track of the console buffer usage should never receive
	values other than 0 and 1, so constrain it's value range to boolean. Plus, it's
	more readable this way.

	* device/cons.c (consbufused): Use boolean_t instead of an int.

2013-09-11  Marin Ramesa  <mpr@hi.t-com.hr>

	drop unused CONSMAJOR
	CONSMAJOR is never used. I'm guessing that in the past it was
	a part of some problematic code. I don't see a reason to keep
	it's definition.

	* device/cons.h (CONSMAJOR): Remove definition.

2013-09-09  Marin Ramesa  <mpr@hi.t-com.hr>

	Remove register qualifiers
	* device/chario.c: Remove register qualifiers.

	Add const qualifiers.
	* device/chario.c (tty_inq_size, tty_outq_size): Qualify constants as const.

	Drop useless forward declaration
	* device/chario.c (tty_flush): Remove forward declaration (prototype is in tty.h).

	Drop luna88k bits
	* device/tty.h [luna88k]: Remove ifdef and include for nonexistent header files.
	* kern/debug.c: Remove check for luna88k.

2013-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop FXSR initialization message
	* i386/i386/fpu.c (init_fpu): Drop FXSR initialization message

2013-07-18  Marin Ramesa  <mpr@hi.t-com.hr>

	kern: add missing prototype
	* kern/lock.h (db_show_all_slocks): Add prototype.

	ipc: organize ipc print function prototypes
	* ipc/ipc_print.h: New file.
	[MACH_KDB] Include <mach/mach_types.h>.
	[MACH_KDB] Include <mach/message.h>.
	[MACH_KDB] Include <ipc/ipc_types.h>.
	(ipc_port_print): Add prototype.
	(ipc_pset_print): Likewise.
	(ipc_kmsg_print): Likewise.
	(ipc_msg_print): Likewise.
	* ipc/ipc_port.h (ipc_port_print): Remove prototype.
	* ipc/ipc_port.c [MACH_KDB]: Include <ipc/ipc_print.h>.
	* ipc/ipc_pset.h (ipc_pset_print): Remove prototype.
	* ipc/ipc_pset.c [MACH_KDB]: Include <ipc/ipc_print.h>.
	* ipc/ipc_kmsg.c [MACH_KDB]: Include <ipc/ipc_print.h>.

	vm: organize vm print function prototypes
	* vm/vm_print.h: New file.
	Include <vm/vm_map.h>.
	Include <machine/db_machdep.h>.
	(vm_map_print): Add prototype.
	(vm_map_copy_print): Likewise.
	(vm_object_print): Likewise.
	(vm_page_print): Likewise.
	Include <vm/vm_object.h>.
	Include <vm/vm_page.h>
	* vm/vm_map.h (vm_map_print): Remove prototype.
	* vm/vm_map.c [MACH_KDB]: Include <vm/vm_print.h>.
	* vm/vm_object.h (vm_object_print): Remove prototype.
	* vm/vm_object.c [MACH_KDB]: Include <vm/vm_print.h>.
	* vm/vm_resident.c [MACH_KDB]: Include <vm/vm_print.h>.

	ddb: cleanup db_command.c
	* ddb/db_command.c (_longjmp): Remove prototype.
	(vm_map_print): Likewise.
	(vm_object_print): Likewise.
	(vm_page_print): Likewise.
	(vm_map_copy_print): Likewise.
	(ipc_port_print): Likewise.
	(ipc_pset_print): Likewise.
	(db_show_all_slocks): Likewise.
	(ipc_kmsg_print): Likewise.
	(ipc_msg_print): Likewise.
	Include <vm/vm_print.h>.
	Include <ipc/ipc_print.h>.
	Include <kern/lock.h>.
	* i386/i386/setjmp.h [__GNUC__] (_longjmp): Add prototype.

2013-07-07  Marin Ramesa  <marin.ramesa@gmail.com>

	fix implicit declarations
	* ddb/db_trap.c: Include <machine/setjmp.h>.
	* i386/i386/setjmp.h (_setjmp): Add prototype.

2013-07-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Restore db_help_cmd
	* ddb/db_command.c (db_help_cmd): Restore function.

2013-07-06  Marin Ramesa  <marin.ramesa@gmail.com>

	ddb: cleanup db_command.c
	* ddb/db_write_cmd.h: New file.
	(db_write_cmd): Add prototype.
	Include <mach/boolean.h>.
	Include <machine/db_machdep.h>.
	* ddb/db_break.h (db_listbreak_cmd): Add prototype.
	(db_delete_cmd): Likewise.
	(db_breakpoint_cmd): Likewise.
	* ddb/db_watch.h (db_listwatch_cmd): Likewise.
	(db_deletewatch_cmd): Likewise.
	(db_watchpoint_cmd): Likewise.
	* ddb/db_print.h (db_show_one_thread): Likewise.
	(db_show_all_threads): Likewise.
	* ddb/db_examine.h (db_print_cmd): Likewise.
	(db_examine_forward): Likewise.
	(db_examine_backward): Likewise.
	(db_search_cmd): Likewise.
	* ddb/db_variables.h (db_set_cmd): Likewise.
	* ddb/db_run.h (db_trace_until_call_cmd): Likewise.
	(db_trace_until_matching_cmd): Likewise.
	(db_continue_cmd): Likewise.
	* ddb/db_command.h (db_fncall): Likewise.
	* ddb/db_command.c: Include <ddb/db_break.h>.
	Include <ddb/db_watch.h>.
	Include <ddb/db_variables.h>.
	Include <ddb/db_write_cmd.h>.
	Include <ddb/db_run.h>.
	Include <ddb/db_cond.h>.
	(db_listbreak_cmd): Remove prototype.
	(db_listwatch_cmd): Likewise.
	(db_show_one_thread): Likewise.
	(db_show_all_threads): Likewise.
	(db_show_macro): Likewise.
	(db_show_help): Likewise.
	(db_print_cmd): Likewise.
	(db_examine_cmd): Likewise.
	(db_set_cmd): Likewise.
	(db_examine_forward): Likewise.
	(db_examine_backward): Likewise.
	(db_search_cmd): Likewise.
	(db_write_cmd): Likewise.
	(db_delete_cmd): Likewise.
	(db_breakpoint_cmd): Likewise.
	(db_deletewatch_cmd): Likewise.
	(db_watchpoint_cmd): Likewise.
	(db_single_step_cmd): Likewise.
	(db_trace_until_call_cmd): Likewise.
	(db_trace_until_matching_cmd): Likewise.
	(db_continue_cmd): Likewise.
	(db_cond_cmd): Likewise.
	(db_help_cmd): Likewise.
	(db_def_macro_cmd): Likewise.
	(db_del_macro_cmd): Likewise.
	(db_fncall): Likewise.

2013-07-05  Marin Ramesa  <marin.ramesa@gmail.com>

	ddb: use and cleanup db_print.h
	* ddb/db_command.c: Include db_print.h.
	Remove extern db_show_regs().
	Remove extern db_show_one_task().
	Remove extern db_show_port_id().
	* ddb/db_print.c: Include db_print.h
	* ddb/db_print.h (db_show_all_acts): Remove prototype.
	(db_show_one_act): Likewise.
	(db_show_shuttle): Likewise.
	(db_show_one_task_vm): Likewise.
	(db_show_all_task_vm): Likewise.
	(db_show_one_space): Likewise.
	(db_show_all_spaces): Likewise.
	(db_sys): Likewise.
	(db_port_kmsg_count): Likewise.
	(db_show_one_simple_lock): Likewise.
	(db_show_one_mutex): Likewise.
	(db_show_subsystem): Likewise.
	(db_show_runq): Likewise.

2013-07-04  Marin Ramesa  <marin.ramesa@gmail.com>

	ddb: fix implicit declarations
	* ddb/db_break.c: Include ddb/db_access.h.
	* ddb/db_examine.h (db_xcdump): Add prototype.
	* ddb/db_ext_symtab.c: Include vm/vm_user.h.
	* ddb/db_input.c: Include device/cons.h.
	* ddb/db_output.c: Likewise.

2013-06-29  Marin Ramesa  <marin.ramesa@gmail.com>

	(slab_info): fix format warnings
	* kern/slab.c (slab_info): Fix format for vm_size_t.

	Add device_pager_setup prototype
	* device/ds_routines.h (device_pager_setup): Add prototype.

	Add [nh]to[hn][ls] prototypes
	* device/net_io.h (ntohl, htonl, ntohs, htons): Add prototypes.

2013-06-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix int/long discrepancy
	* device/net_io.c (bpf_match): Make the `keys' parameter a pointer to
	unsigned int instead of unsigned long.
	(bpf_do_filter): Make `A', `B' and `mem' unsigned ints instead of unsigned
	longs. Also turn long casts into int casts.

2013-06-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add partitioning reload support to ahci
	* linux/dev/drivers/block/ahci.c (port): Add `gd' field.
	(ahci_ioctl): New function.
	(ahci_fops): Fill `ioctl' field with `ahci_ioctl'.
	(ahci_probe_pci): Fill `gd' field with `gd'.

	Fix printing ahci PCI dev and fun
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Compute `dev' and `fun'
	earlier so they can be printed.

2013-06-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing 4KiB memory
	* i386/i386at/model_dep.c (init_alloc_aligned): Let allocated area last
	until end of memory map.

	Add non-contiguous mmap support
	* 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-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2013-06-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not skip AHCI controller without HOST_CAP_ONLY
	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-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add timeout to ahci IDENTIFY
	* linux/dev/drivers/block/ahci.c (identify_timeout): New function.
	(identify_timer): New variable.
	(ahci_probe_port): Add timer to abandon identify command.

	Fix printf format
	* 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.

	Fix format

2013-06-09  Richard Braun  <rbraun@sceen.net>

	Fix object construction in the slab allocator
	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-04  Marin Ramesa  <marin.ramesa@gmail.com>

	Comment unused variable
	* kern/ipc_mig.c (syscall_device_write_request): Comment unused variable.

2013-06-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2013-06-04  Miguel Figueiredo  <elmig@debianpt.org>

	Fix format warnings
	* 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-02  Miguel Figueiredo  <elmig@debianpt.org>

	Remove unused variable
	* kern/act.c (act_create): Remove unused variable.

2013-06-02  Richard Braun  <rbraun@sceen.net>

	Fix yet another locking error in the slab allocator
	* kern/slab.c (kmem_cache_free): Relock cache before retrying releasing
	an object to the CPU pool layer.

2013-06-02  Miguel Figueiredo  <elmig@debianpt.org>

	Remove unused variable
	* ipc/mach_port.c (mach_port_set_syscall_right): Remove unused variable.

2013-05-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add LBA48 support to AHCI driver
	* 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-27  Miguel Figueiredo  <elmig@debianpt.org>

	Remove old elevator algorithm function
	* device/blkio.c (disksort): remove unused function

2013-05-19  Miguel Figueiredo  <elmig@debianpt.org>

	Remove unneeded variable initialization
	* kern/thread.c (thread_force_terminate): Remove unneeded variable
	initialization.

2013-05-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Remove duplicate line
	Reported by Miguel Figueiredo

	* kern/thread.c (thread_create): Remove duplicate reset of
	new_thread->pc_sample.buffer to 0.

2013-05-16  Richard Braun  <rbraun@sceen.net>

	Reduce fragmentation in the slab allocator
	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-16  Richard Braun  <rbraun@sceen.net>

	Rename list_insert to list_insert_head
	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-15  Richard Braun  <rbraun@sceen.net>

	Fix itemization errors in the texinfo documentation
	* doc/mach.texi: Replace @itemx with @item for --enable-tulip and
	--enable-epic100.

2013-05-13  Miguel Figueiredo  <elmig@debianpt.org>

	Drop unused variables
	* kern/slab.c (kalloc_init): Remove unused variables.

2013-05-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing parameters to printf
	* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing parameters to
	printf.

2013-05-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix ahci.h path
	* linux/Makefrag.am (liblinux_a_SOURCES): Fix path to ahci.h

	Add AHCI driver
	* 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-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix non-block-aligned-offset reads
	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-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Fix macro name
	* 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-21  Richard Braun  <rbraun@sceen.net>

	Optimize slab reaping
	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-21  Richard Braun  <rbraun@sceen.net>

	Rework slab lists handling
	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-21  Richard Braun  <rbraun@sceen.net>

	Fix locking error in the slab allocator
	* kern/slab.c (kmem_cache_free): Lock cache before releasing an object to
	the slab layer.

2013-04-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add -fno-optimize-sibling-calls option for better kdb traces
	* Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-optimize-sibling-calls
	option.

2013-03-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Update BASEPRI_USER
	* kern/sched.h (BASEPRI_USER): Increase to 25.

	Fix build without kdb
	* i386/i386/db_interface.h [! MACH_KBD] (db_set_hw_watchpoint,
	db_clear_hw_watchpoint, db_dr): Do not declare functions.

2013-03-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increase number of priorities
	* kern/sched.h (NRQS): Increase to 50.

2013-03-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not hardcode maximum priority value
	* kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1.
	idle_thread: Likewise.

2013-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Include machine/db_interface instead of hardcoding function prototypes
	* 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-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Plug hw debug register support into kdb
	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-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document dwatch
	* doc/mach.texi: Add dwatch documentation.

2013-02-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add x86 hardware debugging register support
	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-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Prevent the kernel from making any FPU use
	* i386/Makefrag.am (AM_CFLAGS): Add -mno-3dnow -mno-mmx -mno-sse -mno-sse2.

2013-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Implement pmap_map_mfn for the PVH case
	* i386/intel/pmap.c (pmap_map_mfn) [MACH_XEN && !MACH_PV_PAGETABLES]:
	Implement.

	Make the PVH variant get sure that the support is available in the hypervisor
	* i386/xen/xen_boothdr.S (FEATURES): Mark PVH features as required.

2013-01-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add comment for TODO

	Do not use 4gb segment assistance in PVH
	* 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.

	Drop spurious inclusion
	* i386/i386/vm_param.h [MACH_XEN && !MACH_PV_PAGETABLES]: Do not include
	<xen/public/xen.h>.

	Increase VM_MAX_KERNEL_ADDRESS for PVH case
	* 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-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	More ifdef fixes for ring1 support and pv descriptors support
	* 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.

	Add initial code for disabling PV pagetables
	* 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.

	Fix comments

	Fix build with --disable-pseudo-phys
	* i386/i386/i386asm.sym (PFN_LIST) [!MACH_PSEUDO_PHYS]: Do not define.

	Add initial code for disabling ring1 xen execution
	* xen/configfrag.ac (--disable-ring1): Add option.
	* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_RING1]: Add
	supervisor_mode_kernel.
	* i386/i386/seg.h (KERNEL_RING) [!MACH_RING1]: Set macro to 0.

	Add initial code for disabling PV descriptors
	* xen/configfrag.ac (--disable-pv-descriptors): Add option
	* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_DESCRIPTORS]: Add
	writable_descriptor_tables.
	* i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into
	MACH_PV_DESCRIPTORS tests.
	* i386/i386/gdt.h: Likewise.
	* i386/i386/i386asm.sym: Likewise.
	* i386/i386/idt.c: Likewise.
	* i386/i386/idt_inittab.S: Likewise.
	* i386/i386/ldt.c: Likewise.
	* i386/i386/pcb.c: Likewise.
	* i386/i386/seg.h: Likewise.
	* i386/i386/user_ldt.c: Likewise.
	* i386/i386/user_ldt.h: Likewise.

2013-01-22  Richard Braun  <rbraun@sceen.net>

	Add the mach_print debugging system call
	The purpose of this system call is to help debugging in situations where
	it's desirable to bypass the mach_msg call entirely.

	* include/mach/syscall_sw.h (mach_print): Generate system call code.
	* kern/syscall_subr.c: Include <kern/printf.h>.
	[MACH_KDB] (mach_print): New function.
	* kern/syscall_subr.h (mach_print): New prototype.
	* kern/syscall_sw.c [MACH_KDB] (mach_trap_table): Declare mach_print
	system call.

2013-01-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Fix task stats incrementations
	* vm/vm_fault.c (vm_fault_page): Properly increment
	current_task()->zero_fills and cow_faults.

2013-01-13  David Höppner  <0xffea@gmail.com>

	Add statistics for task_events_info
	* ipc/ipc_mqueue.c (ipc_mqueue_send, ipc_mqueue_receive): Increment
	counters for message sent and received.
	* kern/ipc_kobject.c (ipc_kobject_server): Increment sent and received
	counters for the kernel task.
	* kern/task.c (task_create): Zero statistics.
	* kern/task.c (task_info): Add task_events_info call.
	* kern/task.h: Add statistics.
	* vm/vm_fault.c (vm_fault_page): Increment zero_fills, pageins,
	reactivations and cow_faults counters.
	* vm/vm_fault.c (vm_fault_wire_fast): Increment faults counters.
	* vm/vm_pageout.c (vm_pageout_scan): Increment reactivations counter.

2013-01-08  Richard Braun  <rbraun@sceen.net>

	Fix slab cache list locking
	This problem was overlooked because of simple locks being no-ops.

	* kern/slab.c (slab_collect): Fix lock name to kmem_cache_list_lock.
	(host_slab_info): Likewise.

2013-01-08  Richard Braun  <rbraun@sceen.net>

	Add function to dump a raw summary of the slab allocator state
	The purpose of this function is to allow kernel code to display the state
	of the slab caches in situations where the host_slab_info RPC wouldn't be
	available, e.g. before a panic.

	* kern/slab.c (slab_info): New function.
	* kern/slab.h: Add declaration for slab_info.

2013-01-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Double KENTRY_DATA_SIZE
	* vm/vm_map.h (KENTRY_DATA_SIZE): Bump from 32 pages to 64 pages.

2013-01-04  David Höppner  <0xffea@gmail.com>

	Fix compilation warning implicit function declaration kdbprintf
	When kernel debugger support is requested ipc and vm need
	the prototype for the debugger function kdbprintf.

	* ddb/db_output.h: Add prototype for kdbprintf.
	* ipc/ipc_object.c: Add include file ddb/db_output.h
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_pset.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_resident.c: Likewise.

2012-12-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix slow boot in virtualbox
	By disabling some of the most slow drivers by default, and giving progress
	feedback to the user.

	* linux/configfrag.ac (CONFIG_SCSI_NCR53C7xx, CONFIG_SCSI_AIC7XXX,
	CONFIG_SCSI_GDTH): Disable by default
	* linux/src/drivers/scsi/eata.c (__initfunc): Don't feed line in probe
	message.
	* linux/src/drivers/scsi/hosts.c (scsi_init): Print SCSI probe progress.

2012-12-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix spurious error on accessing fd1
	Cherry picked from Linux kernel commit 76c25284e0d845bff4ee1031721556148af4db1c

	* linux/dev/drivers/block/floppy.c (config_types): Clear from
	`allowed_drive_mask' floppy drives whose cmos type is 0.

2012-12-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2012-12-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make thread_suspend wait for !TH_UNINT
	0a55db5 made thread_suspend return KERN_FAILURE when the target thread is in
	TH_UNINT state. That however is not currently handled by libc, and it's more
	useful to just wait for the thread to get interruptible.

	* kern/sched_prim.c (thread_invoke): Wake NEW_THREAD->STATE for thread_suspend.
	* kern/thread.c (thread_suspend): Wait on NEW_THREAD->STATE as long as THREAD
	has TH_UNINT.

2012-12-21  David S. Miller  <davem@davemloft.net>

	ide: Increase WAIT_DRQ to accomodate some CF cards and SSD drives.
	Based upon a patch by Philippe De Muyter, and feedback from Mark
	Lord and Robert Hancock.

	As noted by Mark Lord, the outdated ATA1 spec specifies a 20msec
	timeout for setting DRQ but lots of common devices overshoot this.

	(cherry picked from Linux kernel commit 602da297e293eb2cbd28dcdbbe247593a46a853a)

	* linux/src/drivers/block/ide.h (WAIT_DRQ): Increase to 1 s.

2012-12-21  Thomas Schwinge  <thomas@codesourcery.com>

	IDE disk drives with unusual C/H/S.
	* linux/src/drivers/block/ide.c: Partially update to Linux 2.0.40 code.

2012-12-05  Richard Braun  <rbraun@sceen.net>

	Fix kernel task creation time
	The mapable_time_init function is called before machine_init, but the
	latter sets the system boot time. Fix their calling order.

	* kern/startup.c (setup_main): Call machine_init before mapable_time_init.

2012-12-04  Richard Braun  <rbraun@sceen.net>

	Strongly reduce risks of name capture in rbtree macros
	* kern/rbtree.h (rbtree_lookup): Prefix local variable names with three
	underscores.
	(rbtree_lookup_nearest): Likewise.
	(rbtree_insert): Likewise.
	(rbtree_lookup_slot): Likewise.
	(rbtree_insert_slot): Rewrite as an inline function.

2012-11-21  Richard Braun  <rbraun@sceen.net>

	Fix calls to vm_map when size is 0
	* vm/vm_map.c (vm_map_enter): return KERN_INVALID_ARGUMENT if size is 0.
	* vm/vm_user.c (vm_map): Likewise.

2012-11-19  Matthew Leach  <matthew@mattleach.net>

	Fix compilation error with older versions of GCC
	Some versions of GCC will error if you define a type twice (even if
	the definition is the same). The NCR53C8XX SCSI driver defines
	'vm_offset_t', this is also defined in vm_types.h and will therefore
	cause a compilation error depending on the GCC version.

	* linux/src/drivers/scsi/ncr53c8xx.c [!MACH] (vm_offset_t, vm_size_t): Don't
	define types.

2012-09-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix gnumach_server_routine prototype
	* kern/ipc_kobject.c (ipc_kobject_server): Set gnumach_server_routine
	prototype to mig_routine_t.

2012-09-23  Richard Braun  <rbraun@sceen.net>

	Add missing file for page statistics
	* kern/gnumach.srv: New file.

	Add missing file for page statistics
	* include/mach/vm_cache_statistics.h: New file

2012-09-23  Gianluca Guida  <glguida@gmail.com>

	Fix panic on irq >= 16
	* linux/src/drivers/net/pci-scan.c (pci_drv_register): Skip device
	if we are getting an invalid IRQ >= 16 and different from 255 (it
	happens in some motherboard).

2012-09-23  Sergio Lopez  <koro@sinrega.org>

	Update DMA auto-enabling, make forcing DMA an option
	* linux/configfrag.ac (--enable-ide-forcedma): Add option.
	* linux/src/drivers/block/ide.c (ide_probe_promise_20246): Do not call
	ide_init_promise.
	(probe_for_hwifs): Add SI, VIA, AL PCI probing.
	* linux/src/drivers/block/ide.h (hwif_chipset_t): Add hpt343, udma and
	ultra66 chipsets.
	* linux/src/drivers/block/triton.c: Update to upstream 1.14 version.
	* linux/src/include/linux/hdreg.h (HDIO_GET_IDENTITY): Rename to ...
	(HDIO_OBSOLETE_IDENTITY): ... new macro.
	(HDIO_GET_IDENTITY): New macro.
	(hd_driveid): Add fields for extended identification.

2012-09-23  Alexey Dejneka  <adejneka@comail.ru>

	Fix CDROM door unlock on closure without device_close
	* linux/dev/glue/block.c
	(device_open): Properly return devp on multiple opens.
	(device_close_forced): Renamed from device_close, when force parameter is 1, do
	not wait for open_count to become 0 before closing.
	(device_close): New function.
	(device_no_senders): New function.
	linux_block_emulation_ops: Use (device_no_senders).

2012-09-23  Richard Braun  <rbraun@sceen.net>

	Provide basic page cache statistics
	* Makefrag.am (EXTRA_DIST): Add kern/gnumach.srv.
	(include_mach_HEADERS): Add include/mach/gnumach.defs and
	include/mach/vm_cache_statistics.h
	(nodist_libkernel_a_SOURCES): Add kern/gnumach.server.defs.c,
	kern/gnumach.server.h, kern/gnumach.server.c, kern/gnumach.server.msgids,
	kern/gnumach.server.defs.
	* include/mach/mach_types.h: Add #include <mach/vm_cache_statistics.h>.
	* kern/ipc_kobject.c (ipc_kobject_server): Declare and call
	gnumach_server_routine.
	* vm/vm_object.c (vm_object_cached_pages): New variable.
	(vm_object_cached_pages_lock_data): Likewise.
	(vm_object_deallocate): Update number of cached pages.
	(vm_object_lookup): Likewise.
	(vm_object_lookup_name): Likewise.
	(vm_object_destroy): Likewise.
	(vm_object_enter): Likewise.
	* vm/vm_object.h (ref_count): Declare as int.
	(resident_page_count): Likewise.
	(vm_object_cached_count): Add extern declaration.
	(vm_object_cached_pages): Likewise.
	(vm_object_cached_pages_lock_data): Likewise.
	(vm_object_cached_pages_update): New macro.
	* vm/vm_resident.c (vm_page_insert): Assert resident page count doesn't
	overflow, update number of cached pages as appropriate.
	(vm_page_replace): Likewise.
	(vm_page_remove): Update number of cached pages as appropriate.
	* vm/vm_user.c: Add #include <mach/vm_cache_statistics.h>.
	(vm_cache_statistics): New function.
	* vm/vm_user.h: Add #include <mach/mach_types.h>.
	(vm_cache_statistics): New declaration.
	* include/mach/gnumach.defs: New file.

2012-08-24  Richard Braun  <rbraun@sceen.net>

	Store threads waiting on a message queue in LIFO order
	* ipc/ipc_thread.h (ipc_thread_enqueue_macro): Insert thread at the
	head of the list instead of the tail.

2012-07-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix Xen boot at linear address 0xC0000000
	* i386/intel/pmap.c (pmap_bootstrap): Interate over linear addresses and compute
	l3 and l2 offsets from it instead of assuming nul l3 offset.

2012-07-08  Richard Braun  <rbraun@sceen.net>

	Fix slab collection timing
	The slab garbage collector uses sched_tick as its time reference, which
	is increased every seconds, while the interval is expressed in clock
	ticks. Use the proper time reference instead.

	* kern/slab.c (kmem_gc_last_tick): Declare as unsigned long.
	(slab_collect): Use elapsed_ticks instead of sched_tick.

2012-07-08  Richard Braun  <rbraun@sceen.net>

	Increase the slab collection interval
	* kern/slab.c (KMEM_GC_INTERVAL): Increase to 5 seconds.

2012-07-07  Richard Braun  <rbraun@sceen.net>

	Allocate kernel thread stacks out of kmem_map
	The kernel submaps eat most of the available kernel space. Using the
	main kernel map for thread stacks sometimes lead to exhaustion when many
	threads are created. Use kmem_map instead to increase this limit.

	* kern/thread.c (stack_alloc): Use kmem_map instead of kernel_map for
	stack allocation.
	(stack_collect): Likewise for release.

2012-07-07  Richard Braun  <rbraun@sceen.net>

	Merge kalloc_map into kmem_map
	* ipc/ipc_table.c: Add #include <kern/slab.h>.
	(ipc_table_alloc): Use kmem_map instead of kalloc_map when allocating
	a table.
	(ipc_table_realloc): Likewise for reallocation.
	(ipc_table_free): Likewise for release.
	* kern/kalloc.h (kalloc_map): Remove declaration.
	* kern/slab.c (KMEM_MAP_SIZE): Increase to 128 MiB.
	(KALLOC_MAP_SIZE): Remove macro.
	(kalloc_map_store): Remove variable.
	(kalloc_map): Likewise.
	(kalloc_pagealloc): Use kmem_map instead of kalloc_map for general
	purpose allocations.
	(kalloc_pagefree): Likewise.
	(kalloc_init): Remove the creation of kalloc_map.

2012-06-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Permit to select/deselect whole driver groups
	* linux/configfrag.ac (AC_OPTION_Linux_group): New function
	(AC_OPTION_Linux_ix86_at): Do not enable driver by default if the group was
	explicitly disabled.
	(scsi, net, pcmcia, wireless): Define groups.

2012-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Offset bios32 entry
	* linux/src/arch/i386/kernel/bios32.c (check_pcibios, pcibios_init): Convert
	physical bios32 entry address to kernel virtual address.

2012-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Clear direction flag after bios32 call
	Linux does this, there are probably wild BIOSes out there.

	* linux/src/arch/i386/kernel/bios32.c (bios32_service, check_pcibios,
	pci_bios_find_class, pci_bios_find_device, pci_bios_read_config_byte,
	pci_bios_read_config_word, pci_bios_read_config_dword,
	pci_bios_write_config_byte, pci_bios_write_config_word,
	pci_bios_write_config_dword): Clear direction flag after lcall to bios32.

2012-05-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Offset kernel addresses by 3GiB
	This permits better trace support in kdb.

	* i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS): Set to 0xC0000000
	* i386/Makefrag.am (_START): Set to 0xC0100000.

2012-05-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document how to offset the kernel to get better debugging
	* i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS): Document that it can be
	changed, but _START has to be offset too.
	(INIT_VM_MIN_KERNEL_ADDRESS): Document that it should remain 0.

2012-04-27  Richard Braun  <rbraun@sceen.net>

	Augment VM maps with a red-black tree
	* vm/vm_map.c: Add #include <kern/rbtree.h>.
	(vm_map_setup): Initialize the map red-black tree.
	(vm_map_entry_cmp_lookup): New function.
	(vm_map_entry_cmp_insert): Likewise.
	(_vm_map_entry_link): Insert map entry in the red-black tree.
	(_vm_map_entry_unlink): Remove map entry from the red-black tree.
	(vm_map_lookup_entry): Rework the way the VM map hint is used, and
	replace the linear search with a binary search tree lookup.
	(vm_map_copy_insert): Move map entries from the map copy tree to the
	destination map tree.
	(vm_map_copyin): Initialize the map copy red-black tree.
	* vm/vm_map.h: Add #include <kern/rbtree.h>.
	(vm_map_entry): Add `tree_node' member.
	(vm_map_header): Add `tree' member.

2012-04-22  Richard Braun  <rbraun@sceen.net>

	Update comments.
	Literature about red-black trees vary concerning the cases numbering,
	and the implementation doesn't make all of them clearly appear. Remove
	cases numbering references to avoid confusion.

2012-04-22  Richard Braun  <rbraun@sceen.net>

	Fix copyright assignment
	Maksym and I have assigned copyright to the Free Software Foundation.
	In addition, restore the original upstream copyrights for correctness.

	* kern/list.h: Fix copyright assignment.
	* kern/rbtree.c: Likewise.
	* kern/rbtree.h: Likewise.
	* kern/rbtree_i.h: Likewise.
	* kern/slab.c: Likewise.
	* kern/slab.h: Likewise.

2012-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Check hyp_stack_switch return
	* i386/i386/pcb.c (switch_ktss): Check value returned by hyp_stack_switch.

	Fix integer type
	* kern/thread.c (host_stack_usage): Set `total' type to natural_t.

2012-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not take address of va_list variable
	This breaks on x86_64, where it is an array and thus gets bogus results.

	* ddb/db_output.c (db_printf, kdbprintf): Pass copy of va_list variable instead
	of its address.
	* kern/debug.c (panic, log): Likewise.
	* kern/printf.c (vprintf, iprintf, sprintf, vsnprintf): Likewise.
	(_doprnt): Take va_list instead of va_list *, fix usage and comment accordingly.
	* kern/printf.h (_doprnt): Take va_list instead of va_list *.

2012-03-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix Xen boot after c74adfe
	* i386/Makefrag.am (_START_MAP): Define symbol to 0x100000.
	* i386/xen/Makefrag.am (_START_MAP): Define symbol to 0xC0000000.
	* i386/ldscript: Use _START_MAP instead of hardcoding 0x100000.

2012-03-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Relocate kernel at bootup
	Grub is not able to map us at high addresses. We can however make it load us at
	low addresses (through the linker script mapping), then use segmentation to move
	ourselves to high addresses, and switch to C which uses high addresses
	(through _START definition).

	* i386/ldscript: Force mapping kernel at 0x100000, regardless of the value
	of _START.
	* i386/i386at/boothdr.S (boot_entry): Set up initial segments to project the
	bootstrap linear space to high addresses.

2012-03-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make sure BIOS area is mapped in kernel threads
	* i386/i386at/model_dep.c (i386at_init): Map BIOS memory at 0.
	* i386/intel/pmap.c (pmap_create): Do not map BIOS memory in user tasks.

2012-03-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Separate INIT_VM_MIN_KERNEL_ADDRESS from VM_MIN_KERNEL_ADDRESS
	The former is the initial value set by the bootloader. It may not be the
	same as what Mach will set up.

	* i386/i386/vm_param.h (INIT_VM_MIN_KERNEL_ADDRESS): New macro.
	* i386/i386at/model_dep.c (i386at_init): Use INIT_VM_MIN_KERNEL_ADDRESS
	instead of VM_MIN_KERNEL_ADDRESS.

2012-03-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add missing phystokv/kvtophys calls
	* i386/i386/vm_param.h [!MACH_XEN]: Do not include <xen/public/xen.h>.
	* i386/i386at/model_dep.c (init_alloc_aligned): Use phystokv to compare physical
	memory addresses with kernel start, end, and symbol table.
	* i386/intel/pmap.c (pmap_enter): Use kvtophys to convert ptp pointer to pte
	entry.
	* linux/dev/init/main.c (alloc_contig_mem, linux_init): Use phystokv to convert
	allocated pages to virtual pointer.
	* linux/src/include/asm-i386/io.h: Include <machine/vm_param.h>.
	(virt_to_phys): Call _kvtophys.
	(phys_to_virt): Call phystokv.
	* linux/src/include/linux/compatmac.h: Include <asm/io.h>.
	(ioremap): Use phys_to_virt to convert physical address to virtual pointer.
	(my_iounmap): Likewise.
	* linux/dev/include/asm-i386/page.h: Include <mach/vm_param.h>.
	(PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Remove macros.
	* linux/src/drivers/scsi/ncr53c8xx.c (vm_size_t): Remove type.
	* linux/dev/glue/net.c: Include <machine/vm_param.h>
	(device_write): Call phystokv to convert from physical page address to
	virtual pointer.
	* linux/dev/glue/block.c (alloc_buffer, free_buffer, rdwr_full): Likewise.

	Fix issig crash at boot
	* linux/dev/glue/misc.c (issig): Return 0 if current_thread() is NULL.

	Fix wrap-around in pmap bootstrap
	* i386/intel/pmap.c (pmap_bootstrap): Check against `va' wrap around
	0xffffffff.

2012-03-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix boot with big values of _start
	When _start is not close to 0, just using init_alloc_aligned() is not enough
	to know how much should be duplicated between linear and virtual mappings.
	Just mapping everything that can be is not very costly and should just work
	when it can work.

	* i386/i386at/model_dep.c (i386at_init) [VM_MIN_KERNEL_ADDRESS !=
	LINEAR_MIN_KERNEL_ADDRESS]: Extend `nb_direct' to VM_MIN_KERNEL_ADDRESS -
	LINEAR_MIN_KERNEL_ADDRESS.

2012-03-22  Ludovic Courtès  <ludo@gnu.org>

	Refer to `PFN_LIST' on Xen only.
	* i386/i386/i386asm.sym (PFN_LIST): Enclose in #ifdef MACH_XEN.  Thanks
	  to Samuel Thibault for the suggestion.

2012-03-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use long types
	* ddb/db_examine.c (db_xcdump): Do not cast addr before passing to
	db_read_bytes.
	* ddb/db_macro.c (db_arg_variable): Return long.
	* ddb/db_macro.h (db_arg_variable): Likewise.
	* ddb/db_sym.c (db_maxoff): Set type to unsigned long.
	* ddb/db_task_thread.c (db_set_default_thread, db_get_task_thread): Return
	long.
	* ddb/db_variables.h (db_variable): Make fcn function field to return long.
	(FCN_NULL): Make function type return long.
	* i386/i386/db_interface.c (int_regs): Set field sizes to long.
	* i386/i386/db_machdep.h (db_expr_t): Set type to long.
	* i386/i386/db_trace.c (db_i386_reg_value): Return long. Use long types.
	(i386_frame, i386_kregs, interrupt_frame, db_nextframe): Set field sizes to
	long.
	(db_regs, i386_kregs): Use long * pointers.
	(db_lookup_i386_kreg): Return long *.
	(db_numargs, db_nextframe, db_stack_trace_cmd, db_i386_stack_trace): Use long
	types.
	* i386/i386/debug_i386.c (dump_ss): Fix format.
	* i386/i386/ktss.c (ktss_init): Use long type.
	* i386/i386/pcb.c (set_user_regs): Likewise.
	* i386/i386/thread.h (i386_saved_state, v86_segs, i386_kernel_state,
	i386_interrupt_state): Set field sizes to long.
	* i386/i386/trap.c (kernel_trap, user_trap): Fix formats.
	* kern/ast.h (ast_t): Set type to long.
	* kern/boot_script.c (create_task, resume_task, prompt_resume_task,
	boot_script_set_variable): Use long types.
	* kern/boot_script.h (boot_script_set_variable): Use long type.
	* kern/bootstrap.c (bootstrap_create): Pass long type.
	* kern/lock.c (simple_lock, simple_lock_try): Use long type.
	* linux/dev/kernel/softirq.c (linux_soft_intr): Fix format.

	Complain about Xen console smash only once at a time
	* xen/console.c (hypputc): Warning only once per console write about console
	ring smash.

	Make xchgl arch-neutral
	* i386/i386/xen.h (xchgl): Use xchg instruction instead of xchgl, so the
	assembler can detect unsigned long size.

2012-03-20  Guillem Jover  <guillem@debian.org>

	Use compiler defined __i386__ symbol instead of use defined i386
	* i386/configfrag.ac (i386): Remove definition.
	* i386/intel/pmap.c (pmap_update_interrupt): Rename i386 to __i386__.
	* i386/intel/pmap.h: Likewise.
	* kern/debug.c (Debugger): Likewise.
	* kern/lock.c (simple_lock, simple_lock_try, db_show_all_slocks): Likewise.

2012-03-20  Guillem Jover  <guillem@debian.org>

	Change types holding cpu flags from int to long
	On amd64 the cpu flags is a 64-bit word, and long on 32-bit systems is
	32-bit wide anyway.

	* linux/dev/glue/kmem.c (linux_kmalloc, linux_kfree, __get_free_pages,
	free_pages): Use unsigned long instead of unsigned.
	* linux/dev/include/asm-i386/system.h (__save_flags, __restore_flags):
	Likewise.
	* linux/dev/kernel/printk.c (printk): Likewise.
	* linux/src/drivers/scsi/advansys.c (DvcEnterCritical, DvcLeaveCritical,
	advansys_queuecommand, advansys_abort, advansys_reset, advansys_interrupt,
	interrupts_enabled, AdvISR): Likewise.
	* linux/src/drivers/scsi/aha152x.c (aha152x_intr): Likewise.
	* linux/src/drivers/scsi/aha1542.c (aha1542_intr_handle): Likewise.
	* linux/src/drivers/scsi/aic7xxx.c (aic7xxx_done_cmds_complete): Likewise.
	* linux/src/drivers/scsi/ultrastor.c (log_ultrastor_abort,
	ultrastor_queuecommand, ultrastor_abort): Likewise.

2012-03-20  Guillem Jover  <guillem@debian.org>

	Match type for count with tty_get_status and tty_set_status
	* i386/i386at/com.c (comgetstat): Use natural_t instead of `unsigned int'.
	(comsetstat): Likewise.
	* i386/i386at/kd.c (kdgetstat, kdsetstat): Likewise.
	* i386/i386at/lpr.c (lprgetstat, lprsetstat): Likewise.

2012-03-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use unsigned int for ELF 32bit values
	* i386/include/mach/i386/exec/elf.h (Elf32_Addr, Elf32_Off, Elf32_Sword,
	Elf32_Word): Use int type instead of long.

2012-03-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix assembly snippet portability
	* xen/evt.c (hyp_c_callback): Do not set assembly instruction suffixes,
	using 1UL constant instead.

	Use unsigned long types for addresses
	* i386/include/mach/i386/vm_param.h (i386_btop, i386_ptob, i386_round_page,
	i386_trunc_page): Cast to unsigned long.

	Use unsigned long for registers
	* i386/i386/proc_reg.h (get_eflags, get_esp, get_eflags, get_cr0, get_cr2,
	get_cr3, get_cr4): Return unsigned long type.
	(set_eflags, set_cr0, set_cr3, set_cr4): Take unsigned long type.

	Do not hardcode structure offset
	* i386/i386/i386asm.sym (R_EDI): Define macro.
	* i386/i386/locore.S (t_page_fault): Use R_CR2-R_EDI instead of hardcoded
	12.

2012-03-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Set Xen kernel virtual address to 0xC0000000
	That makes the virtual addressing equal to linear addressing, thus optimizing
	some computations away.

	* i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS) [MACH_XEN]: Set to
	0xC0000000UL.
	* i386/xen/Makefrag.am (gnumach_LINKFLAGS): Set _START to 0xC0000000.
	* i386/xen/xen_boothdr.S (VIRT_BASE, ELF_PADDR_OFFSET): Set to 0xC0000000.

2012-03-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix access above 4GiB in bootstrap page table
	* i386/intel/pmap.c (pmap_set_page_readonly_init) [PAE]: Access the bootstrap
	dirbase with PTEMASK (1 page) instead of PDEMASK (4 pages) through pmap_pde.

2012-03-15  Thomas Schwinge  <thomas@schwinge.name>

	Fix build error introduced in 5f701793f63f16d111db3e3d2e91134fcc179c5b.
	* linux/src/include/linux/interrupt.h (intr_count): Declare as unsigned int.

2012-03-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Simplify splx
	* i386/i386/spl.S (splx): Use S_ARG0 instead of reimplementing it.

	Fix variable types according to assembly use
	* linux/dev/arch/i386/kernel/irq.c (intr_count): Set to int type.
	* linux/dev/kernel/softirq.c (bh_active, bh_mask): Likewise.
	(linux_soft_intr: active, mask, left): Likewise
	* linux/src/include/linux/interrupt.h (bh_active, bh_mask): Likewise.
	* linux/src/kernel/softirq.c (intr_count, bh_active, bh_mask): Likewise.
	(do_bottom_half: active, mask, left): Likewise

	Stick to binutils ELF scripts
	* i386/ldscript: Reformat to follow binutils version

	Fix PAE page frame number mask.
	* i386/intel/pmap.h (INTEL_PTE_PFN): Keep only 47bits, others are not usable.

	Fix Xen bootstrap at virtual address above 1GiB
	* i386/intel/pmap.h (lin2pdpnum): New macro.
	* i386/intel/pmap.c (pmap_set_page_readonly_init): Use lin2pdpnum macro
	instead of hardcoding 0.

	Simplify i386at_init
	* i386/i386at/model_dep.c (i386at_init): Do not copy linear into virtual kernel
	mapping when they are equal, and do not drop the former either. Use the
	function `i' variable.

	Simplify kvtophys
	* i386/i386/phys.c (kvtophys): Use pte_to_pa macro instead of reimplementing
	it.

2012-03-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Use unsigned long for addresses and sizes
	TODO: remonter formats

	* i386/include/mach/i386/vm_types.h (vm_offset_t): Define to unsigned long.
	(signed32_t): Define to signed int.
	(unsigned32_t): Define to unsigned int.
	* i386/include/mach/sa/stdarg.h (__va_size): Use sizeof(unsigned long)-1
	instead of 3.
	* include/mach/port.h (mach_port_t): Define to vm_offset_t instead of
	natural_t.
	* include/sys/types.h (size_t): Define to unsigned long instead of
	natural_t.
	* linux/src/include/asm-i386/posix_types.h (__kernel_size_t): Define to
	unsigned long.
	(__kernel_ssize_t): Define to long.
	* linux/src/include/linux/stddef.h (size_t): Define to unsigned long.

	* device/dev_pager.c (dev_pager_hash): Cast port to vm_offset_t insted of
	natural_t.
	(device_pager_data_request): Fix format.

	* device/ds_routines.c (ds_no_senders): Fix format.
	* i386/i386/io_map.c (io_map): Likewise.
	* i386/i386at/autoconf.c (take_dev_irq): Likewise.
	* i386/i386at/com.c (comattach): Likewise.
	* i386/i386at/lpr.c (lprattach): Likewise.
	* i386/i386at/model_dep.c (mem_size_init, mem_size_init, c_boot_entry):
	Likewise.
	* i386/intel/pmap.c (pmap_enter): Likewise.
	* ipc/ipc_notify.c (ipc_notify_port_deleted, ipc_notify_msg_accepted,
	ipc_notify_dead_name): Likewise.
	* ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Likewise.
	* kern/ipc_kobject.c (ipc_kobject_destroy): Likewise.
	* kern/slab.c (kalloc_init): Likewise.
	* vm/vm_fault.c (vm_fault_page): Likewise.
	* vm/vm_map.c (vm_map_pmap_enter): Likewise.
	* xen/block.c (device_read): Likewise.

	* device/net_io.c (bpf_match): Take unsigned long * instead of unsigned int
	*.
	(bpf_do_filter): Make mem unsigned long instead of long.
	* i386/i386/ktss.c (ktss_init): Cast pointer to unsigned long instead of
	unsigned.
	* i386/i386/pcb.c (stack_attach, switch_ktss): Cast pointers to long instead of
	int.
	* i386/i386/trap.c (dump_ss): Likewise.
	* ipc/ipc_hash.c (IH_LOCAL_HASH): Cast object to vm_offset_t.
	* ipc/mach_msg.c (mach_msg_receive, mach_msg_receive_continue): Cast kmsg to
	vm_offset_t instead of natural_t.
	* kern/pc_sample.c (take_pc_sample): Cast to vm_offset_t instead of
	natural_t.
	* kern/boot_script.c (sym, arg): Set type of `val' field to long instead of int.
	(create_task, builtin_symbols, boot_script_parse_line,
	boot_script_define_function): Cast to long instead of int.
	* kern/bootstrap.c (bootstrap_create): Likewise.
	* kern/sched_prim.c (decl_simple_lock_data): Likewise.
	* kern/printf.c (vsnprintf): Set size type to size_t.
	* kern/printf.h (vsnprintf): Likewise.
	* vm/vm_map.h (kentry_data_size): Fix type to vm_size_t.
	* vm/vm_object.c (vm_object_pmap_protect_by_page): Fix size parameter type
	to vm_size_t.

2012-03-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Move kentry_data_size initial value to header
	* vm/vm_map.h (KENTRY_DATA_SIZE): Define macro.
	* vm/vm_map.c (kentry_data_size): Initialize to KENTRY_DATA_SIZE.

2012-03-03  Gabriele Giacone  <1o5g4r8o@gmail.com>

	Set default serial parameters to 8N1 instead of 7E1
	* i386/i386at/com.c (comcninit): Set LINE_CTL register to i8BITS instead of
	i7BITS|iPEN.

2012-02-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix format for string print
	* linux/src/drivers/net/3c505.c (elp_sense): Use %s format for printing a mere
	string, not the string.

	Fix format for string print
	* linux/src/drivers/net/8390.c: Use %s format for printing a mere string, not
	the string.

	Fix format for string print
	* linux/src/drivers/net/3c503.c (el2_probe1): Use %s format for printing a mere
	string, not the string.

	Fix format for string print
	* linux/src/drivers/scsi/aha1542.c (aha1542_setup): Use %s format for printing a
	mere string, not the string.

	Fix format for string print
	* linux/src/drivers/scsi/advansys.c (asc_prt_line): Use %s format for
	printing a mere string, not the string.

	Fix format for string print
	* i386/i386at/model_dep.c (c_boot_entry): Use %s format for printing a mere
	string, not the string.

2012-01-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' into master-slab

2012-01-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build on 64bit host
	When stealing the memset function from the 32bit host libc on a 64bit host
	system, glibc tends to bring unwanted references to _Unwind_Resume,
	__gcc_personality_v0, etc. So let's stop stealing memset.

	* kern/strings.c (memset): New function.
	* Makefile.am (clib_routines): Remove memset.

2012-01-09  Richard Braun  <rbraun@sceen.net>

	Improve ipc hash/marequest init readability
	Use macros instead of raw numeric values.

	* ipc/ipc_hash.h (IPC_HASH_GLOBAL_SIZE): New macro.
	* ipc/ipc_hash.c (ipc_hash_init): Directly set the global hash table
	size to IPC_HASH_GLOBAL_SIZE.
	* ipc/ipc_marequest.h (IPC_MAREQUEST_SIZE): New macro.
	* ipc/ipc_marequest.c (ipc_marequest_init): Directly set the marequest
	hash table size to IPC_MAREQUEST_SIZE.

2011-12-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Cope with dom0s which do not respect feature-no-csum-offload
	Event with feature-no-csum-offload=1, some dom0s (such as Debian Squeeze's
	2.6.32) send packets with a blank checksum. Recompute them before givin the
	packet to pfinet.

	* xen/net.c (recompute_checksum): New function.
	(hyp_net_intr): Call recompute_checksum when the checksum is blank but the
	data is validated.

2011-12-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix typo

	Upgrade number of event queues
	* kern/sched_prim.c (NUMQUEUES): Increase to 1031

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Remove arbitrary limits used by the zone system
	The zone allocator could limit the size of its zones to an arbitrary
	value set at zinit() time. There is no such parameter with the slab
	module. As a result of removing those limits, the kern/mach_param.h
	header becomes empty, and is simply removed altogether.

	* Makefrag.am (libkernel_a_SOURCES): Remove kern/mach_param.h.
	* i386/i386/fpu.c: Remove #include <kern/mach_param.h>.
	* i386/i386/machine_task.c: Likewise.
	* i386/i386/pcb.c: Likewise.
	* ipc/ipc_init.c: Likewise.
	(ipc_space_max): Remove variable.
	(ipc_tree_entry_max): Likewise.
	(ipc_port_max): Likewise.
	(ipc_pset_max): Likewise.
	* ipc/ipc_init.h (IPC_ZONE_TYPE): Remove macro.
	(ipc_space_max): Remove extern declaration.
	(ipc_tree_entry_max): Likewise.
	(ipc_port_max): Likewise.
	(ipc_pset_max): Likewise.
	* ipc/ipc_hash.c (ipc_hash_init): Don't use ipc_tree_entry_max to
	compute ipc_hash_global_size.
	* ipc/ipc_marequest.c: Remove #include <kern/mach_param.h>.
	(ipc_marequest_max): Remove variable.
	(ipc_marequest_init): Don't use ipc_marequest_max to compute
	ipc_marequest_size.
	(ipc_marequest_info): Return (unsigned int)-1 in maxp.
	* kern/act.c: Remove #include <kern/mach_param.h>.
	* kern/mach_clock.c: Likewise.
	* kern/priority.c: Likewise.
	* kern/task.c: Likewise.
	* kern/thread.c: Likewise.
	* vm/memory_object_proxy.c: Likewise.
	* vm/vm_fault.c: Likewise.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Remove the defunct kernel_task_create() function
	The kmem_suballoc() function, which has been replaced with
	kmem_submap(), is called by kernel_task_create(). Rather than update it,
	remove this now unused function.

	* kern/task.c (kernel_task_create): Remove function.
	* kern/task.h (kernel_task_create): Remove prototype.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Fix kern/kalloc.h includes
	* device/dev_pager.c: Remove #include <kern/kalloc.h>.
	* i386/i386/io_perm.c: Add #include <kern/kalloc.h>.
	* kern/bootstrap.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/pc_sample.c: Likewise.
	* kern/processor.c: Likewise.
	* kern/server_loop.ch: Likewise.
	* kern/thread.c: Likewise.
	* linux/dev/glue/block.c: Likewise.
	* linux/dev/glue/net.c: Likewise.
	* vm/vm_map.c: Likewise.
	* xen/block.c: Likewise.
	* xen/net.c: Likewise.
	* xen/store.c: Likewise.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Adjust VM initialization
	Unlike the zone allocator, the slab code can't be fed with an initial
	chunk of memory. Some VM objects used early during startup now have to
	be statically allocated, and kernel map entries need a special path
	to avoid recursion when being allocated.

	* vm/vm_map.c (vm_submap_object_store): New variable.
	(vm_submap_object): Point to vm_submap_object_store.
	(kentry_data_size): Initialize to arbitrary value.
	(kentry_count): Remove variable.
	(kentry_pagealloc): New function.
	(vm_map_setup): Likewise.
	(vm_map_create): Replace initialization with a call to vm_map_setup().
	* vm/vm_map.h (vm_map_setup): New prototype.
	* vm/vm_kern.c (kernel_map_store): New variable.
	(kernel_map): Point to kernel_map_store.
	(kmem_suballoc): Remove function. Replaced with...
	(kmem_submap): New function.
	(kmem_init): Call vm_map_setup() instead of vm_map_create().
	* vm/vm_kern.h (kmem_suballoc): Remove prototype.
	(kmem_submap): New prototype.
	* vm/vm_object.c (kernel_object_store): New variable.
	(kernel_object): Point to kernel_object_store.
	(vm_object_template): Change type from vm_object_t to struct vm_object.
	(_vm_object_setup): New function.
	(_vm_object_allocate): Replace initialization with a call to
	_vm_object_setup().
	(vm_object_bootstrap): Don't allocate vm_object_template, and use it as
	a structure instead of a pointer. Initialize kernel_object and
	vm_submap_object with _vm_object_setup() instead of
	_vm_object_allocate().
	* vm/vm_resident.c (vm_page_bootstrap): Don't initialize
	kentry_data_size.
	* device/ds_routines.c (device_io_map_store): New variable.
	(device_io_map): Point to device_io_map_store.
	(mach_device_init): Call kmem_submap() instead of kmem_suballoc().
	* ipc/ipc_init.c (ipc_kernel_map_store): New variable.
	(ipc_kernel_map): Point to ipc_kernel_map_store.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Adjust the kernel to use the slab allocator
	* device/dev_lookup.c: Replace zalloc header, types and function calls
	with their slab counterparts.
	* device/dev_pager.c: Likewise.
	* device/ds_routines.c: Likewise.
	* device/io_req.h: Likewise.
	* device/net_io.c: Likewise.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/io_perm.c: Likewise.
	* i386/i386/machine_task.c: Likewise.
	* i386/i386/pcb.c: Likewise.
	* i386/i386/task.h: Likewise.
	* i386/intel/pmap.c: Likewise.
	* i386/intel/pmap.h: Remove #include <kernel/zalloc.h>.
	* include/mach_debug/mach_debug.defs (host_zone_info): Replace
	routine declaration with skip directive.
	(host_slab_info): New routine declaration.
	* include/mach_debug/mach_debug_types.defs (zone_name_t)
	(zone_name_array_t, zone_info_t, zone_info_array_t): Remove types.
	(cache_info_t, cache_info_array_t): New types.
	* include/mach_debug/mach_debug_types.h: Replace #include
	<mach_debug/zone_info.h> with <mach_debug/slab_info.h>.
	* ipc/ipc_entry.c: Replace zalloc header, types and function calls with
	their slab counterparts.
	* ipc/ipc_entry.h: Likewise.
	* ipc/ipc_init.c: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/ipc_table.c (kalloc_map): Remove extern declaration.
	* kern/act.c: Replace zalloc header, types and function calls with their
	slab counterparts.
	* kern/kalloc.h: Add #include <vm/vm_types.h>.
	(MINSIZE): Remove definition.
	(kalloc_map): Add extern declaration.
	(kget): Remove prototype.
	* kern/mach_clock.c: Adjust comment.
	* kern/processor.c: Replace zalloc header, types and function calls with
	their slab counterparts.
	* kern/startup.c: Remove #include <kernel/zalloc.h>.
	* kern/task.c: Replace zalloc header, types and function calls with
	their slab counterparts.
	* kern/thread.c: Likewise.
	* vm/memory_object_proxy.c: Likewise.
	* vm/vm_external.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_init.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_page.h: Remove #include <kernel/zalloc.h>.
	* vm/vm_pageout.c: Replace zalloc header, types and function calls with
	their slab counterparts.
	* vm/vm_resident.c: Likewise.
	(zdata, zdata_size): Remove declarations.
	(vm_page_bootstrap): Don't steal memory for the zone system.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Import the slab allocator
	As it is intended to completely replace the zone allocator, remove it on
	the way. So long to the venerable code !

	* Makefrag.am (libkernel_a_SOURCES): Add kern/slab.{c,h}, remove kern/kalloc.c
	and kern/zalloc.{c,h}.
	* configfrag.ac (SLAB_VERIFY, SLAB_USE_CPU_POOLS): Add defines.
	* i386/Makefrag.am (libkernel_a_SOURCES): Remove i386/i386/zalloc.h.
	* i386/configfrag.ac (CPU_L1_SHIFT): Remove define.
	* include/mach_debug/slab_info.h: New file.
	* kern/slab.c: Likewise.
	* kern/slab.h: Likewise.
	* i386/i386/zalloc.h: Remove file.
	* include/mach_debug/zone_info.h: Likewise.
	* kern/kalloc.c: Likewise.
	* kern/zalloc.c: Likewise.
	* kern/zalloc.h: Likewise.

2011-12-17  Richard Braun  <rbraun@sceen.net>

	Import utility files
	* Makefrag.am (libkernel_a_SOURCES): Add kern/list.h, kern/rbtree.c,
	kern/rbtree.h and kern/rbtree_i.h.
	* kern/list.h: New file.
	* kern/rbtree.c: Likewise.
	* kern/rbtree.h: Likewise.
	* kern/rbtree_i.h: Likewise.
	* kern/macro_help.h (MACRO_BEGIN): Use GNU C compound statement
	enclosed in parentheses.
	(MACRO_END): Likewise.

2011-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Keep frame pointer when debugger is enabled
	* Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-omit-frame-pointer.

2011-10-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of callisto:gnumach

2011-10-16  Samuel Thibault  <sthibaul@callisto.debian.net>

	Do not map xen driver pages
	* xen/block.c (hyp_block_init): Use vm_page_grab_phys_addr instead of
	kmem_alloc_wired to allocate driver pages.
	* xen/net.c (hyp_net_init): Likewise.

2011-10-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Increase kmem area for the Xen case.
	Kernel tacks are 4 pages in the Xen case, so we need more kmem space.

	* i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE) [MACH_XEN]: Increase to 224MiB.

2011-10-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Raise block device interrupt level to SPL6
	* linux/dev/drivers/block/genhd.c (device_setup): Set linux_intr_pri to
	SPL6.
	* linux/dev/glue/block.c (init_partition, device_open): Likewise.

	Raise Linux kmem memory size
	* linux/dev/glue/kmem.c (MEM_CHUNKS): Increase to 32.

2011-10-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Leave interrupts enabled in sym53c8xx driver
	The driver can work with them, and request_irq works fine with them.

	* linux/src/drivers/scsi/sym53c8xx.c (ncr_attach): Do not pass SA_INTERRUPT to
	request_irq().

2011-10-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Define BITS_PER_LONG for Linux code
	* linux/src/include/asm-i386/types.h (BITS_PER_LONG): Define to 32.

2011-10-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add sym53c8xx driver from linux 2.2
	This driver supports qemu's SCSI host device.
	Unfortunately it seems to be breaking the network device, so test with care.

	* linux/Makefrag.am (liblinux_a_SOURCES): Add
	linux/src/drivers/scsi/sym53c8xx{.c,_comm.h,.h,_defs.h}
	* linux/configfrag.ac: Add AC_Linux_DRIVER([sym53c8xx] to enable
	CONFIG_SCSI_SYM53C8XX.
	* linux/dev/glue/kmem.c (MEM_CHUNKS): Increase to 16.
	* linux/src/drivers/scsi/hosts.c [CONFIG_SCSI_SYM53C8XX]: Include "sym53c8xx.h".
	(builtin_scsi_hosts): include SYM53C8XX.

2011-09-28  Sergio Lopez  <slp@sinrega.org>

	fix copy out-of-line data when length >= 512MB
	* ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Change length type to
	unsigned64_t. Cast number to unsigned64_t.
	(ipc_kmsg_copyout_body): Likewise.

2011-09-28  Sergio López  <slpml@sinrega.org>

	Make thread_suspend honor the TH_UNINT flag
	Interrupting a thread without a continuation, puts it in a
	inconsistent state. This is the cause for the bug described in
	https://lists.gnu.org/archive/html/bug-hurd/2011-09/msg00148.html

	* kern/thread.c (thread_suspend): Fail with KERN_FAILURE if thread is
	uninterruptible.

2011-09-12  Guillem Jover  <guillem@hadrons.org>

	Remove unused [!MACH_KERNEL] driver code
	Use «unifdef -DMACK_KERNEL=1» as a starting point, but only remove
	the code not exposed on public headers, the rest is needed to build
	properly from userland.

	* device/cons.c [!MACH_KERNEL]: Remove includes.
	[!MACH_KERNEL] (constty): Remove variable.
	(cninit, cnmaygetc) [MACH_KERNEL]: Remove preprocessor conditionals.
	[!MACH_KERNEL] (cnopen, cnclose, cnread, cnwrite, cnioctl, cnselect)
	(cncontrol): Remove functions.
	* device/cons.h (struct consdev) [MACH_KERNEL]: Remove preprocessor
	conditional.
	* device/kmsg.h [MACH_KERNEL]: Likewise.
	* i386/i386at/autoconf.c [!MACH_KERNEL]: Remove includes.
	* i386/i386at/kd_event.c [!MACH_KERNEL]: Likewise.
	[!MACH_KERNEL] (kbd_sel, kbdpgrp, kbdflag): Remove variables.
	[!MACH_KERNEL] (KBD_COLL, KBD_ASYNC, KBD_NBIO): Remove macros.
	(kbdopen, kbdclose, kbd_enqueue) [!MACH_KERNEL]: Remove code.
	[!MACH_KERNEL] (kbdioctl, kbdselect, kbdread): Remove functions.
	[!MACH_KERNEL] (X_kdb_enter_init, X_kdb_exit_init: Likewise.
	* i386/i386at/kd_mouse.c [!MACH_KERNEL]: Remove includes.
	[!MACH_KERNEL] (mouse_sel, mousepgrp, mouseflag): Remove variables.
	[!MACH_KERNEL] (MOUSE_COLL, MOUSE_ASYNC, MOUSE_NBIO): Remove macros.
	(mouseopen, mouseclose, kd_mouse_read, mouse_enqueue) [!MACH_KERNEL]: Remove
	code.
	[!MACH_KERNEL] (mouseioctl, mouseselect, mouseread): Remove functions.
	* i386/i386at/lpr.c [!MACH_KERNEL]: Remove includes.
	(lpropen) [MACH_KERNEL]: Remove preprocessor conditionals.
	(lpropen, lprclose, lprstart) [!MACH_KERNEL]: Remove code.
	[!MACH_KERNEL] (lprwrite, lprioctl, lprstop): Remove functions.
	* i386/i386at/rtc.c (readtodc, writetodc) [!MACH_KERNEL]: Remove code.
	* kern/mach_factor.c [MACH_KERNEL]: Remove preprocessor conditional.
	* xen/time.c (readtodc) [!MACH_KERNEL]: Remove code.

2011-09-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2011-09-09  Guillem Jover  <guillem@hadrons.org>

	Do not take unused strpbrk() from libc
	* Makefile.am (clib_routines): Remove strpbrk.

2011-09-06  Thomas Schwinge  <thomas@schwinge.name>

	* .gitignore: Tighten some rules, and distribute others to... * doc/.gitignore: ... here; * i386/i386/.gitignore: ... here; * tests/.gitignore: ..., and here.

	* i386/i386/pcb.h (stack_attach): Parameterize the continuation parameter's parameter list. * i386/i386/pcb.c (stack_attach): Likewise.

	Move i386/i386/locore.S declarations.
	* i386/i386/trap.c (recover_table, recover_table_end, retry_table)
	(retry_table_end): Move declarations to...
	* i386/i386/locore.h: ... here.

2011-09-06  Thomas Schwinge  <thomas@schwinge.name>

	Further prototyping work for memory_object_proxy.c functions.
	* vm/memory_object_proxy.h: Add #includes.
	(memory_object_proxy_lookup): New declaration.
	* vm/memory_object_proxy.c: #include <vm/memory_object_proxy.h>.
	* vm/vm_user.c: Likewise.
	(memory_object_proxy_lookup): Drop declaration.

	Parts based on a patch by Fridolín Pokorný <fridolin.pokorny@gmail.com>.

2011-09-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop module memory free verbosity
	* kern/bootstrap.c (bootstrap_create): Do not show freed module memory.

	Free memory used by boot modules
	* vm/vm_resident.c (pmap_startup): Warn when some pages could not be included
	in the allocator due to bad estimation.
	* kern/bootstrap.c: Include <vm/pmap.h>.
	(bootstrap_create): Call vm_page_create on bootstrap modules content.

2011-09-03  Fridolín Pokorný  <fridolin.pokorny@gmail.com>

	Add prototypes for memory_object_proxy.c functions
	* vm/memory_object_proxy.h: Add file.
	* vm/vm_init.c: Include <vm/memory_object_proxy.h>.
	* kern/ipc_kobject.c: Likewise.
	* Makefile.am (libkernel_a_SOURCES): Add vm/memory_object_proxy.h.

2011-09-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

2011-09-02  Guillem Jover  <guillem@hadrons.org>

	Remove long obsolete RPC routines
	* kern/compat_xxx_defs.h: Remove file.
	* Makefrag.am (libkernel_a_SOURCES): Remove `kern/compat_xxx_defs.h'.

	* include/mach/mach_types.defs (xxx_emulation_vector_t): Remove type.

	* device/device.srv: Do not simport <kern/compat_xxx_defs.h>.
	* kern/mach.srv: Likewise.
	* kern/mach_host.srv: Likewise.

	* include/device/device.defs [MACH_KERNEL]: Do not simport
	<kern/compat_xxx_defs.h>.
	(xxx_device_set_status, xxx_device_get_status)
	(xxx_device_set_filter): Replace routine declarations with skip
	directives.
	* include/mach/mach.defs [MACH_KERNEL]: Do not simport
	<kern/compat_xxx_defs.h>.
	(xxx_memory_object_lock_request, xxx_task_get_emulation_vector)
	(xxx_task_set_emulation_vector, xxx_host_info, xxx_slot_info)
	(xxx_cpu_control, xxx_task_info, xxx_thread_get_state)
	(xxx_thread_set_state, xxx_thread_info): Replace routine declarations
	with skip directive.
	* include/mach/mach_host.defs [MACH_KERNEL]: Do not simport
	<kern/compat_xxx_defs.h>.
	(yyy_host_info, yyy_processor_info, yyy_processor_control)
	(xxx_processor_set_default_priv, yyy_processor_set_info): Replace
	routine declarations with skip directive.

	* kern/ipc_host.c (xxx_processor_set_default_priv): Remove function.
	* kern/machine.c (xxx_host_info, xxx_slot_info)
	(xxx_cpu_control): Likewise.
	* kern/syscall_emulation.c (xxx_task_set_emulation_vector)
	(xxx_task_get_emulation_vector): Likewise.
	* vm/memory_object.c (xxx_memory_object_lock_request): Likewise.

2011-09-02  Guillem Jover  <guillem@hadrons.org>

	Do not remap errno codes from E* to LINUX_E*
	Mach no longer uses any of the old and clashing errno E* codes, so
	it's safe to use them now w/o namespacing. This also means one less
	modification needed to the Linux code.

	* linux/dev/include/asm-i386/errno.h: Remove file.
	* linux/dev/kernel/dma.c (notifier_chain_unregister) [MACH_INCLUDE]: Remove
	code.
	* linux/dev/include/linux/notifier.h: Likewise.
	* linux/dev/arch/i386/kernel/irq.c (setup_x86_irq): Rename LINUX_EBUSY
	to EBUSY.
	(request_irq): Rename LINUX_EINVAL to EINVAL.
	* linux/dev/glue/block.c (register_blkdev): Rename LINUX_EBUSY to EBUSY
	and LINUX_EINVAL to EINVAL.
	(unregister_blkdev): Rename LINUX_EINVAL to EINVAL.
	(rdwr_partial) Rename LINUX_ENOMEM to ENOMEM and LINUX_EIO to EIO.
	* linux/dev/glue/misc.c (linux_to_mach_error): Rename LINUX_EPERM to
	EPERM, LINUX_EIO to EIO, LINUX_ENXIO to ENXIO, LINUX_EACCES to EACCES,
	LINUX_EFAULT to EFAULT, LINUX_EBUSY to EBUSY, LINUX_EINVAL to EINVAL,
	LINUX_EROFS to EROFS, LINUX_EWOULDBLOCK to EWOULDBLOCK and LINUX_ENOMEM
	to ENOMEM.
	(verify_area): Rename LINUX_EFAULT to EFAULT.
	* linux/dev/kernel/resource.c (check_region): Rename LINUX_EBUSY to
	EBUSY.
	* linux/dev/kernel/sched.c (__do_down): Rename LINUX_EINTR to EINTR.

2011-09-02  Guillem Jover  <guillem@hadrons.org>

	Use Mach native error codes instead of POSIX errno E* ones
	* device/errno.h: Remove file.
	* Makefrag.am (libkernel_a_SOURCES): Remove `device/errno.h'.
	* i386/i386at/com.c: Include <device/device_types.h> instead of
	<device/errno.h>.
	(comopen): Replace ENXIO with D_NO_SUCH_DEVICE.
	* i386/i386at/kd_event.c: Include <device/device_types.h> instead of
	<device/errno.h>.
	* i386/i386at/kd_mouse.c: Likewise.
	(mouseopen): Replace ENODEV with D_NO_SUCH_DEVICE and EBUSY with
	D_ALREADY_OPEN.
	* i386/i386at/lpr.c: Include <device/device_types.h> instead of
	<device/errno.h>.
	(lpropen): Replace ENXIO with D_NO_SUCH_DEVICE and EBUSY with
	D_ALREADY_OPEN.

2011-09-02  Guillem Jover  <guillem@hadrons.org>

	Change argument name to match function body usage
	Otherwise the function wrongly uses the global symbol.

	* linux/src/drivers/scsi/ppa.c (ppa_nibble_in): Rename `str_p' argument
	to `base'.

2011-09-02  Guillem Jover  <guillem@hadrons.org>

	Disable set but unused variable
	* linux/src/drivers/scsi/gdth.c (gdth_detect): Conditionalize `b' on
	[LINUX_VERSION_CODE < 0x020000]. Do not preset it to 0, it's initialized
	later on when needed.

	Remove set but unused variables
	* linux/dev/drivers/block/floppy.c (setup_rw_floppy): Remove `dflags'.
	(floppy_eject): Remove `dummy'.
	* linux/src/drivers/net/8390.c (ethdev_init): Remove `ei_local'.
	* linux/src/drivers/scsi/ppa.c (ppa_detect): Remove `ppb'.

	Cast addr argument to vm_offset_t
	* linux/dev/glue/kmem.c (vfree): Cast `addr' argument on kfree_mem
	function to vm_offset_t.

	Add vsnprintf prototype
	* kern/printf.h (vsnprintf): New prototype.

	Add missing headers
	* linux/dev/init/main.c: Include <linux/pci.h>.
	* linux/dev/kernel/printk.c: Include <kern/printf.h>.

2011-09-01  Ludovic Courtès  <ludo@gnu.org>

	Add missing header file to the distribution.
	* linux/Makefrag.am (liblinux_a_SOURCES): Add `linux/dev/glue/glue.h',
	  which appeared in commit 2b4bff9914d57bff600ac70194b8b1aab3485bee
	  ("Fix declarations").

2011-09-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix documentation

	Close kernel stacks.
	* i386/i386/pcb.c (stack_attach): Initialize ebp to 0.

2011-09-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix PC sampling
	interrupt.S now saves the IRQ on the stack to acknowledge it later.

	* i386/i386/hardclock.c (hardclock): Add irq parameter.
	* i386/i386at/kd.c (kdintr, kdcheckmagic): Remove regs parameter.
	* i386/i386at/kd.h (kdintr): Likewise.

2011-08-31  Guillem Jover  <guillem@hadrons.org>

	Add silent rules support if available and disable it by default
	* configure.ac (AM_SILENT_RULES): Add silent rules support if available,
	and disable it by default.
	* Makefile.am (AWK_V, AWK_V_, AWK_V_0): New variables.
	(NM_V, NM_V_, NM_V_0): Likewise.
	(GZIP_V, GZIP_V_, GZIP_V_0): Likewise.
	(MIGCOM_V, MIGCOM_V_, MIGCOM_V_0): Likewise.
	(gnumach-undef): Use NM_V in front of NM.
	(gnumach-undef-bad): Use AM_V_GEN in front of sed.
	(clib-routines.o): Use AM_V_at in fron of undefined symbols check.
	Use AM_V_CCLD in front of CCLD.
	* Makefrag.am (gnumach.msgids): Use AM_V_GEN in front of cat.
	* Makerules.am (%.symc): Use AWK_V in front of AWK.
	(%.symc.o): Use AM_V_CC in front of COMPILE.
	(%.h): Use AM_V_GEN in front of sed.
	(%.gz): Use GZIP_V in front of GZIP.
	* Makerules.mig.am (%.user.defs.c): Use AM_V_GEN in front of command.
	(%.server.defs.c): Likewise.
	(%.user.h %.user.c %.user.msgids): Use MIGCOM_V in front of MIGCOM.
	(%.server.h %.server.c %.server.msgids): Likewise.

2011-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Optimize copyout path
	* i386/i386/locore.S (copyout): Remove RETRY() use from >=i486 variant. Move
	copyout_ret and copyout_fail.

	Fix copyout retry on lazy allocation on >= i486
	* i386/i386/locore.S (copyout): Add a >=i486 variant of copyout which uses
	no loop, but simply retries rep mov.

	Disable global page while writing in kernel space
	* i386/i386/db_interface.c (db_write_bytes): If CPU has PGE feature, disable
	CR4_PGE before enabling kernel page write access, and re-enable the former after
	disabling the latter.

2011-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Protect set_cr3 against compiler assignment optimizations
	This fixes the kdb `break' command.

	i386/i386/proc_reg.h (set_cr3): Add "memory" clobber.

2011-08-31  Guillem Jover  <guillem@hadrons.org>

	Fix undefined operation on assigning self pre-incremented variable
	* linux/src/drivers/scsi/wd7000.c (mail_out): Add `1' instead of
	pre-incrementing self assigned variable.
	* linux/src/drivers/net/de4x5.c (de4x5_sw_reset, de4x5_queue_pkt, de4x5_rx)
	(de4x5_tx, de4x5_rx_ovfc, set_multicast_list, ping_media, mii_get_phy)
	(de4x5_ioctl): Likewise.
	* linux/src/drivers/net/depca.c (depca_rx, depca_tx, load_packet): Likewise.

	Honour type promotion on variable argument handling
	* linux/dev/lib/vsprintf.c (linux_vsprintf): Use `int' when retrieving
	a `short' through `va_arg'.

	Correct MiG Mach types to fix compilation warnings
	* include/mach/mach_types.defs (thread_info_t): Change from array of
	natural_t to integer_t.
	(task_info_t): Likewise.
	(host_info_t): Likewise.
	(processor_info_t): Likewise.
	(processor_set_info_t): Likewise.

	Denote __exit symbols as used
	* linux/src/include/linux/init.h: Include <linux/compiler.h>.
	(__exitused): New macro.
	(__exit): Define to ` __exitused __cold notrace'.
	* linux/src/include/linux/kcomp.h (__exit): Remove.

	Move <linux/init.h> from linux/pcmcia-cs to linux/src
	* linux/pcmcia-cs/include/linux/init.h: Move to ...
	* linux/src/include/linux/init.h: ... here.

	Import Linux 3.1 compiler definitions
	* linux/src/include/linux/compiler.h: New file.
	* linux/src/include/linux/compiler-gcc.h: Likewise.
	* linux/src/include/linux/compiler-gcc3.h: Likewise.
	* linux/src/include/linux/compiler-gcc4.h: Likewise.
	* linux/dev/include/linux/kernel.h (barrier): Remove definition and
	include <linux/compiler.h> instead.

	Import Linux 3.1 ctype code
	* linux/src/include/linux/ctype.h: Update file.
	* linux/src/lib/ctype.c: Likewise.

	Remove unused and non-functional string specialization header
	* linux/src/include/asm-i386/string-486.h: Remove.

	Fix memcmp prototype
	* include/string.h (memcmp): Remove bogus `*' from return type.

2011-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix declarations
	* device/ds_routines.h (io_done_list): Add variable declaration.
	(device_io_map): Keep variable declaration and move definition to...
	* device/ds_routines.c: ... here.
	* i386/i386/fpu.c: Include <i386/pic.h>
	(curr_ipl): Remove declaration.
	(fpintr): Add int unit parameter.
	* linux/dev/glue/glue.h: New header.
	* i386/i386/fpu.h (fpintr): Add function prototype.
	* i386/i386/hardclock.c (clock_interrupt, linux_timer_intr): Remove prototypes.
	[LINUX_DEV]: Include <linux/dev/glue/glue.h>
	* i386/i386/ipl.h (curr_ipl): Add declaration.
	* i386/i386/pic.h (curr_pic_mask, pic_mask, prtnull, intnull): Add
	declarations.
	* i386/i386at/kd.h (kdintr): Add declaration.
	* i386/i386at/pic_isa.c: Include <i386/fpu.h> and <i386at/kd.h>
	(intnull, fpintr, hardclock, kdintr, prtnull): Remove prototypes.
	* i386/xen/xen.c: Include <kern/mach_clock.h>
	(clock_interrupt): Remove prototype.
	* linux/dev/arch/i386/kernel/irq.c: Include <linux/dev/glue/glue.h> and
	<machine/machspl.h>
	(linux_timer_intr, splhigh, spl0, curr_ipl, curr_pic_mask, pic_mask,
	get_options): Remove declarations.
	* linux/dev/drivers/block/floppy.c: Include <linux/dev/glue/glue.h>
	(issig, get_options): Remove declarations.
	* linux/dev/drivers/block/genhd.c: Include <linux/dev/glue/glue.h>
	(linux_intr_pri): Remove declaration.
	* linux/dev/glue/block.c: Include <devices/ds_routines.h> and
	<linux/dev/glue/glue.h>.
	(device_io_map, blksize_size): Remove declarations.
	* linux/dev/glue/kmem.c: Include <kern/printf.h> and <linux/dev/glue/glue.h>
	(alloc_contig_mem, printf): Remove declarations.
	* linux/dev/glue/misc.c: Include <printf.h> and <linux/dev/glue/glue.h>
	(vm_map_lookup_entry, printf): Remove prototypes.
	* linux/dev/glue/net.c: Include <kern/printf.h>, <device/ds_routines.h> and
	<linux/dev/glue/glue.h>.
	(linux_intr_pri, io_done_list): Remove declarations.
	* linux/dev/init/main.c: Include <machine/model_dep.h> and
	<linux/dev/glue/glue.h>.
	(phys_last_addr, alloc_contig_mem, free_contig_mem, init_IRQ,
	restore_IRQ, startrtclock, linux_version_init, linux_kmem_init, pci_init,
	linux_net_emulation_init, device_setup, linux_printk, linux_timer_intr, spl0,
	splhigh, form_pic_mask, linux_bad_intr, prtnull, intnull, linux_sched_init,
	pcmcia_init): Remove declarations.
	* linux/dev/kernel/sched.c: Include <kern/printf.h>, <machine/machspl.h> and
	<linux/dev/glue/glue.h>.
	(alloc_contig_mem, free_contig_mem, splhigh, splx, linux_soft_intr, issig,
	printf, linux_auto_config): Remove prototypes.
	* linux/dev/kernel/softirq.c: Include <linux/dev/glue/glue.h>.
	* linux/src/drivers/block/floppy.c: Include <linux/dev/glue/glue.h>.
	(get_options): Remove prototype.
	* linux/src/init/main.c: Include <linux/dev/glue/glue.h>
	(init_IRQ): Remove prototype.

2011-08-30  Guillem Jover  <guillem@hadrons.org>

	Add linux_timer_intr function declaration
	* i386/i386/hardclock.c [LINUX_DEV] (linux_timer_intr): New prototype.

	Add missing headers
	* device/dev_pager.c: Include <device/memory_object_reply.user.h>.
	* linux/pcmcia-cs/glue/wireless_glue.h: Include <kern/debug.h>.

	Remove unused variable
	* i386/i386at/rtc.c (rtc): Remove variable.

	Cast host_get_time() arguments to fix warnings
	* linux/dev/glue/misc.c (do_gettimeofday): Cast arguments to
	`host_get_time'.

	Cast function timeout() argument to fix a warning
	* kern/mach_clock.h (timer_func_t): New function type.
	(struct timer_elt): Change fcn type to timer_func_t.
	* i386/i386at/com.c (comstart): Cast `ttrstrt' to `timer_funct_t *' in
	`timeout' call.
	* i386/i386at/lpr.c (lprstart): Likewise,

	Return a value on non-void function
	* i386/i386at/com.c (comcnprobe, comcninit, comcnputc): Return 0.

2011-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix copyright assignment
	I have assigned copyright to the Free Software Foundation.

	* i386/i386/xen.h: Fix copyright assignment
	* i386/xen/xen.c: Likewise.
	* i386/xen/xen_boothdr.S: Likewise.
	* i386/xen/xen_locore.S: Likewise.
	* include/mach/xen.h: Likewise.
	* xen/block.c: Likewise.
	* 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.

2011-08-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Console declaration cleanup
	* device/cons.h: Add multiple inclusion _DEVICE_CONS_H macro protector.
	(struct consdev): Add function members prototypes.
	* i386/i386/xen.h: Include <mach/xen.h>.
	* i386/i386at/com.c (comcnprobe, comcninit, comcngetc, comcnputc): Move
	prototypes...
	* i386/i386at/com.h: ... here.  Include <device/cons.h>.
	* i386/i386at/cons_conf.c [MACH_HYP]: Include <xen/console.h>.
	[!MACH_HYP]: Include "kd.h".
	[!MACH_HYP && NCOM > 0]: Include "com.h".
	(hypcnprobe, hypcninit, hypcngetc, hypcnputc, kdcnprobe, kdcninit, kdcngetc,
	kdcnputc comcnprobe, comcninit, comcngetc, comcnputc): Remove prototypes.
	* i386/i386at/kd.c (kdcnputc): Make it return int, -1 on error, 0 on
	success.
	(kdcnprobe, kdcninit, kdcngetc, kdcnputc): Move prototypes...
	* i386/i386at/kd.h: ... here.  Include <device/cons.h>.
	* xen/console.c (hypcnprobe): Remove unused `my_console' local variable.
	* xen/console.h: Include <device/cons.h>
	(hypcnputc, hypcngetc, hypcnprobe, hypcninit): Add prototypes.

2011-08-30  Guillem Jover  <guillem@hadrons.org>

	Move Linux module macros to their original header
	* linux/pcmcia-cs/glue/wireless_glue.h (EXPORT_SYMBOL)
	(SET_MODULE_OWNER): Move to ...
	* linux/src/include/linux/module.h [!MODULE]: ... here.

	Move cdrom_sleep() definition to its original source file
	* linux/dev/kernel/sched.c (cdrom_sleep): Move to ...
	* linux/src/drivers/block/ide-cd.c [MACH]: ... here, make it static.
	Include <kern/sched_prim.h>.

2011-08-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make copyout run in 1 loop on >= i486
	* i386/i386/locore.S (copyout): On >= i486, skip WP-check loop split and just
	use byte count.

2011-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Skip kernel WP check on i486 and above
	* i386/i386/i386asm.sym (machine_slot.sub_type): Define.
	* i386/i386/locore.S (copyout_retry): Skip if machine_slot[0].cpu_type > 3.

	Enable >4GiB cr3
	* i386/xen/xen_boothdr.S (__xen_guest): Add [extended-cr3] to PAE
	(XEN_ELFNOTE_PAE_MODE): Likewise.

2011-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable (<i486)-only WP workaround on Xen & PAE
	i386 didn't support PAE anyway.

	* i386/i386/locore.S (copyout_retry) [MACH_HYP || PAE]: Remove.
	* xen/xen.c (hyp_invalidate_pte): Remove function.
	* xen/xen.h (hyp_invalidate_pte): Remove prototype.

2011-08-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix pmap_clear_bootstrap_pagetable with >4G mfns
	* i386/intel/pmap.c (pmap_clear_bootstrap_pagetable): Use pte_to_pa instead
	of atop.

	Rework memory mapping reservation
	* i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE): Define to 192MiB.
	* i386/i386at/model_dep.c (mem_size_init): Use VM_KERNEL_MAP_SIZE instead of
	1/6 factor.
	* i386/intel/pmap.c (morevm): Remove.
	(pmap_bootstrap): Use VM_KERNEL_MAP_SIZE instead of morevm.

	Move free_skbuffs declaration to the top
	* device/ds_routines.c (free_skbuffs): Move declaration to the top.

2011-08-27  Guillem Jover  <guillem@hadrons.org>

	Initialize the new map entry when it's a projected buffer
	* vm/vm_map.c (vm_map_fork): Call vm_map_entry_create for projected_on
	buffers too.

	Fix initialization from incompatible pointer type
	* linux/dev/glue/block.c (device_get_status): Cast `hg' to `unsigned long'
	in ioctl call.

	Match signedness of char pointer comparisons and assignments
	* linux/dev/drivers/block/genhd.c (msdos_partition): Cast `data' assignment
	to `unsigned char *'.
	* linux/src/drivers/block/ide-cd.c (cdrom_queue_request_sense): Cast
	`buffer' assignment to `unsigned char *'.
	(cdrom_transfer_packet_command): Change `cmd_buf' argument type to
	`unsigned char *'.
	(cdrom_read_capacity): Cast `pc.buffer' assignments to `unsigned char *'.
	Use temporary `model' and `fw_rev' `const char *' variables to compare
	against literal strings and characters.
	* linux/src/drivers/block/ide.c (execute_drive_cmd): Cast `args'
	assignment to `byte *'.
	(ide_open): Cast `rq.buffer' assignment to `char *'.
	(ide_release): Likewise.
	(ide_ioctl): Likewise.
	(do_identify): Cast variables being compared against literal string to
	`char *'.
	(probe_for_drive): Likewise.
	* linux/src/drivers/block/ide.h (struct packet_command): Change `buffer'
	type to `unsigned char *'.

	Always initialize A and X variables in BPF code
	* device/net_io.c (bpf_do_filter): Remove lint conditional.

	Disable unused variables
	* i386/i386at/com.c (comstart): Disable `i' variable.
	* linux/src/drivers/net/at1700.c (net_close): Disable `lp' variable.
	* linux/dev/include/linux/blk.h (end_request): Disable `nsect' variable
	on MACH.

	Remove unused variables
	* vm/memory_object_proxy.c (memory_object_create_proxy): Remove unused
	`kr' variable.
	* linux/dev/glue/block.c (free_buffer): Remove unused `i' variable.
	(register_blkdev): Remove unused `err' variable.
	(unregister_blkdev): Likewise.
	(bread): Likewise.
	(init_partition): Likewise.
	* linux/dev/glue/net.c (device_write): Likewise.

	Remove ident tags producing preprocessor warnings
	* linux/src/drivers/scsi/FlashPoint.c: Remove #ident tags.

	Add header for printf prototype
	* vm/memory_object_proxy.c: Include <kern/printf.h>.

	Add prototype for free_skbuffs function
	* device/ds_routines.c [LINUX_DEV && CONFIG_INET] (free_skbuffs): Add
	prototype.

	Add prototype for log function
	* kern/debug.h (log): New prototype.

2011-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* Makefile.am (AM_CFLAGS): Add -fno-builtin-log.

2011-08-27  Guillem Jover  <guillem@hadrons.org>

	Add prototypes for locore functions
	* i386/i386at/model_dep.c (discover_x86_cpu_type): Move ...
	* i386/i386/locore.h: ... here.
	(inst_fetch, cpu_shutdown): New prototypes.
	* i386/i386at/kd.c: Include <i386/locore.h>.

	Do not take obsolete and unused bcopy and bzero from libc
	* Makefile.am (clib_routines): Remove bcopy and bzero.

	Use AC_LANG_SOURCE inside AC_LANG_CONFTEST to fix autoconf warning
	* configure.ac (AC_LANG_CONFTEST): Wrap the source into a AC_LANG_SOURCE
	call.

	Add a .gitignore file
	* .gitignore: New file.

2011-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Make ipc_space_zone not exhaustible
	Users of ipc_space_create() actually assume that it succeeds.

	* ipc/ipc_init.c (ipc_bootstrap): Create ipc_space_zone without EXHAUSTIBLE
	flag.

2011-08-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add more details to "zone exhausted" panics.
	* kern/zalloc (zalloc): Add more details to "zone exhausted" panics.

2011-08-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add 8byte breakpoint macro
	* i386/i386/db_interface.h (I386_DB_LEN_8): Define macro.

2011-08-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add compiler barrier to update_mapped_time
	* kern/mach_clock.c (update_mapped_time): Add compiler barriers between
	writes to shared memory. Update comment: on SMP, write barriers are
	required.

2011-08-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not warn for cross-space spurious port deallocation
	These are harmless (the target is stopped) and difficult to fix anyway.

	* ipc/mach_port.c (mach_port_destroy): Do not warn about spurious port
	deallocation when SPACE is not equal to current_space().
	(mach_port_deallocate): Likewise.

2011-08-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add more spurious deallocation debugging
	* ipc/mach_port.c (mach_port_destroy): Print the current space and the
	target space on spurious deallocation.
	(mach_port_deallocate): Likewise.

2011-07-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Whitelist QEMU Hard-Drive for DMA.
	PIO has become very slow in Linux 2.6.35+, so we do not really have the
	choice any more.

	* linux/src/drivers/block/triton.c (good_dma_drives): Re-whitelist QEMU hard
	drive.

2011-05-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix gcc 4.6 build
	* linux/dev/include/linux/skbuff.h (skb_put, skb_push): Do not print the
	address of a local label, gcc 4.6 does not build this and the debugger can
	output it anyway.
	* linux/src/include/linux/skbuff.h (skb_put, skb_push): Likewise.

2011-05-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge two asm constraints
	* linux/src/drivers/scsi/ultrastor.c (find_and_clear_bit_16): Use + modifier
	instead of using both a read and a write constraint.

2011-05-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not warn on vm_map_enter with fixed address failing
	* vm/vm_map.c (vm_map_enter): Warn about missing room in map only if
	anywhere is set.

2011-04-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Update constants to nowadays standards
	Follow-up to fa6c711d

	* ipc/ipc_init.c (ipc_kernel_map_size): Increase to 8MiB.

2011-04-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Enable all caches
	* i386/i386at/model_dep.c (i386at_init): Set CR0_CD and CR0_NW in CR0
	register.

	Drop spurious warning
	* ipc/ipc_entry.c (ipc_entry_get): Do not warn when ipc_entry_get returns
	KERN_NO_SPACE.

2011-04-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Warn once when part of the kernel is lacking space
	* ipc/ipc_entry.c (ipc_entry_get, ipc_entry_grow_table): Warn when returning
	KERN_NO_SPACE.
	* vm/vm_map.c (vm_map_find_entry, vm_map_enter, vm_map_copyout,
	vm_map_copyout_page_list): Warn when returning KERN_NO_SPACE.

2011-04-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Update constants to nowadays standards
	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-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Warn once when part of the kernel is lacking memory
	* kern/printf.h (printf_once): New macro.
	* ipc/mach_port.c (mach_port_names, mach_port_get_set_status): Warn when
	returning KERN_RESOURCE_SHORTAGE.
	* vm/vm_kern.c: Include printf.h.
	(kmem_alloc, kmem_realloc, kmem_alloc_wired, kmem_alloc_aligned,
	kmem_alloc_pageable): Warn when failing.
	* vm/vm_resident.c (vm_page_grab_contiguous_pages): Warn when returning
	KERN_RESOURCE_SHORTAGE.

2011-04-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Close call stack on continuation
	* i386/i386/locore.S (call_continuation): Push dummy return address instead
	of letting the callee get a random one.

2011-04-18  Arne Babenhauserheide  <arne_bab@web.de>

	Removed deprecated LINTLIBRARY #ifdefs
	    mach/mach_traps.h: Removed LINTLIBRARY #ifdefs.
	    mach/message.h: Removed LINTLIBRARY #ifdefs.

2011-04-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix build with kdb from make dist-generated tarball
	* 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-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix typo
	* i386/i386at/kd.c (key_map): Fix K_PERIOD typo.

2011-03-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Clean kd.[ch]
	* 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-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Also warn about mach_port_destroy on invalid ports
	* ipc/mach_port.c (mach_port_destroy): Warn (and possibly call debugger) when
	ipc_right_lookup_write didn't find the port name.

2011-03-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix continuation after keyboard debugger invocation
	According to stack layout change in 5da1aea7

	* i386/i386/locore.S [!MACH_XEN] (RET_OFFSET): Define to 12 instead of 8.

2011-03-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Enable global pages after enabling paging
	* i386/i386at/model_dep.c (i386at_init): Enable CR4_PGE after enabling
	CR0_PG.

2011-03-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix temporary direct mapping during page table enabling
	* 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-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Keep supplementary L1 pages read-only
	* 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-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Refuse to share IRQs at different interrupt levels
	* linux/dev/arch/i386/kernel/irq.c (setup_x86_irq): Return -LINUX_EBUSY when
	trying to share an IRQ between two different interrupt levels.

2011-02-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Re-enable updating pvlist for kernel_pmap
	This partially reverts 0744feb6

	* i386/intel/pmap.c (pmap_remove_range): Update pvlist for kernel_pmap too.

2011-02-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Acknoledge interrupt after handler call
	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-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Detect interrupt overflow
	* i386/i386/locore.S (int_from_instack): Check %esp against _intstack, issue
	ud2 on stack overflow.

	Add x86 debug register Xen support
	* 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.

	Add prototypes for x86 debug registers
	* 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.

	Fix for kdb watch command
	* i386/intel/pmap.c (pmap_remove_range): Do not update pvlist for
	kernel_map.
	[MACH_KBD] (pmap_enter): Allow physical memory remapping.

2011-02-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add console=comN boot option to enable serial console
	* 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-02-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	xen block: Add more legacy hd* name support
	* xen/block.c (hyp_block_init): Add IDE 3-10 device number recognition. Skip
	  unknown block device numbers.

2011-02-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Defer Xen device initialization to device_service_create
	* device/device_init.c (device_service_create) [MACH_HYP]: Call
	hyp_dev_init.
	* xen/xen.c (hyp_init): Do not call hyp_block_init and hyp_net_init, now
	called in ...
	(hyp_dev_init): New function.
	* xen/xen.h (hyp_dev_init): New declaration.

	Add rx-copy support to netfront
	* xen/net.c (net_data): Add rx_copy field.
	(enqueue_rx_buf): When rx_copy != 0, give grant on buffer to domD instead of
	issuing a transfer from domD.
	(hyp_net_intr): When rx_copy != 0, take back grant on buffer instead of
	finishing transfer. Do not panic on packet error, free kmsg on error.
	(hyp_net_init): Check for feature-rx-copy in backend, write 1 to
	request-rx-copy in such case. Wait for Connected state before continuing.
	Only unmap buffer when rx_copy is 0.

2011-01-31  Diego Nieto Cid  <dnietoc@gmail.com>

	* doc/mach.texi (device_set_filter): Document filter header.
	Acked-by: Richard Braun <rbraun@sceen.net>

2011-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Enable pae_extended_cr3 in pmap_bootstrap
	* 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.

	Enable Xen >4GiB physical memory support
	* 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.

	Drop kbd device on xen
	* 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-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid dropping kd_intr when RCLINE is >= 0
	* 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-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Move -d and -H parse to kern/startup.c
	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-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	memcpy operands are not supposed to overlap
	* include/string.h (memmove): Add prototype.
	* i386/i386at/immc.c (immc_cnputc): Replace memcpy with memmove.

2010-10-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Avoid harmless warning
	* i386/i386at/kd.c (kd_setleds1): Only display unexpected state warning when
	debugging is enabled.

2010-10-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add prototype for strstr
	* include/string.h (strstr): Add prototype.

	Add prototype for discover_x86_cpu_type
	* i386/i386at/model_dep.c (discover_x86_cpu_type): Add prototype.

	Warn on unknown CPU family
	* i386/i386at/model_dep.c (c_boot_entry): Warn in the default case for
	cpu_type.

	Recognize P4 and Opteron-like as pentium pro
	* i386/i386at/model_dep.c (c_boot_entry): Treat cpu_type 15 as Pentium pro.

2010-09-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix device_get/set_status ABI for NET_FLAGS
	* linux/dev/glue/net.c (device_get_status): Compare count with 1 instead
	of sizeof(short).  Access *status instead of *(short *) status.
	(device_set_status): Likewise.

2010-09-14  Thomas Schwinge  <thomas@schwinge.name>

	Merge branch 'typo-print'

2010-09-14  Thomas Schwinge  <schwinge@nic-nac-project.de>

	Typo fix.
	* i386/i386/trap.c (user_trap): Call printf, not print.

2010-09-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix ifunc entries
	* 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-09-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Fix non-contiguous PCI functions
	* linux/src/drivers/pci/pci.c (scan_bus): Do not set `is_multi' to 0
	when a hole is encountered. Detect 0000:ffff and ffff:0000 vendor ID as
	holes too.

2010-08-27  Guillem Jover  <guillem@hadrons.org>

	Fix "make dist"
	* 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-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Do not advice to install libc0.3-xen on 4gb_segment trap
	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-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable 4gb segment emulation notification on first notification
	i386/i386/trap.c [MACH_XEN] (user_trap): Disable
	VMASST_TYPE_4gb_segments_notify on trap 15.

	Report Xen 4gb segment emulation
	* 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-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix unexpected irq + irq timeout on write
	* linux/src/drivers/block/ide.c (do_rw_disk): Set IRQ handler before
	issuing write command.

	Move read-only sections to after text section

2010-07-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Un-whitelist the QEMU harddisk for DMA support
	* linux/src/drivers/block/triton.c (good_dma_drives): Remove "QEMU HARDDISK".

	Put a name on the 16MiB magic number
	* linux/dev/glue/kmem.c (MEM_DMA_LIMIT): New macro
	(linux_kmem_init): Replace 16 * 1024 * 1024 occurrences with
	MEM_DMA_LIMIT.

2010-06-25  Jeremie Koenig  <jk@jk.fr.eu.org>

	Route BLKRRPART to partitions layer
	* linux/dev/glue/block.c (device_set_status): New function
	(linux_block_emulation_ops): Set set_status field to device_set_status.

2010-04-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add memory clobbers to segment selector loaders
	* 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-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix bootstrap additional mapping
	* i386/intel/pmap.c (pmap_bootstrap): Use pt_entry_t type
	instead of vm_offset_t to map additional kernel space.

	Extend machine addresses to 64bit for PAE
	* 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-04-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Fix crash on Xen when no module is provided
	* kern/bootstrap.c (bootstrap_create): Iterate over bmods only
	if is not NULL.

2010-03-15  Thomas Schwinge  <thomas@schwinge.name>

	Require GNU Automake 1.10.2.
	9ff49d9648debffbe42d18863c739d37bcdb50b4's config.status.dep.patch is fit for
	1.10.2 (released in November 2008) and later, and is no longer suitable for
	1.10.1.

	* configure.ac (AM_INIT_AUTOMAKE): Require 1.10.2.

2010-03-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix Xen build without kdb
	* xen/console.c (hypcnintr): Use #if MACH_KDB instead of #ifdef
	MACH_KDB.

	Add mem device
	* 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.

2010-03-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	whitelist the QEMU harddisk for DMA support
	* linux/src/drivers/block/triton.c (good_dma_drives): Add
	"QEMU HARDDISK".

2010-01-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	ignore bogus FDPT information from BIOS

2009-12-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Align mach_port_deallocate debug flag with usage
	* ipc/mach_port.c (debug_mach_port_deallocate): Rename to...
	(mach_port_deallocate_debug): ... new name, and set volatile
	to permit live changes from ddb.

	Do not systematically debug buggy port deallocation
	* ipc/mach_port.c (debug_mach_port_deallocation): New variable,
	set to 0.
	(mach_port_deallocate): Only call SoftDebugger if
	debug_mach_port_deallocation is not 0.

	Merge branch 'master' of debhurd0:xen/gnumach

2009-12-22  root  <root@phys.ethz.ch>

	Fix debugger trigger
	* 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-21  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Invoke debugger on duplicate port deallocation
	* ipc/mach_port.c (mach_port_deallocate): Call SoftDebugger if
	ipc_right_lookup_write was not succcessful and `name' is not
	MACH_PORT_NULL or MACH_PORT_DEAD.

	Add a SoftDebugger function
	* 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-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Document kdb_kintr stack manipulation
	* i386/i386/locore.S: Document kdb_kintr stack manipulation.

2009-12-19  root  <root@phys.ethz.ch>

	Fix debugger trigger
	* 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-18  Guillem Jover  <guillem@hadrons.org>

	Add missing casts
	* vm/vm_resident.c (vm_page_grab_contiguous_pages): Cast `prevmemp'
	assignement to vm_page_t.

	Add missing function prototypes
	* i386/i386/pcb.c (Load_context): New prototype.
	* i386/i386at/lpr.c (lprpr_addr): Likewise.

	Use `unsigned char *' for byte buffers
	* linux/src/drivers/net/apricot.c (struct i596_tbd): Change `data'
	member type to `unsigned char *'.
	(struct i596_rfd): Change `data' member type to `unsigned char'.
	(print_eth): Change argument type to `unsigned char'. Remove
	unneeded casts.
	(set_multicast_list): Change cast for print_eth to `unsigned char *'.

	Mark macro arguments as used
	* 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.

	Missing `*' in assembler indirect lcall
	* linux/src/arch/i386/kernel/bios32.c (bios32_service): Add `*'
	in indirect lcall.
	(check_pcibios, pci_bios_find_class, pci_bios_find_device): Likewise.
	(pci_bios_read_config_byte, pci_bios_read_config_word): Likewise.
	(pci_bios_read_config_dword, pci_bios_write_config_byte): Likewise.
	(pci_bios_write_config_word, pci_bios_write_config_dword): Likewise.

	Interrupt handlers do not return any value
	* 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.

	Use selector definitions from Mach for Linux code
	* linux/src/include/asm-i386/segment.h [MACH]: Include <machine/gdt.h>
	and <machine/ldt.h>.
	[MACH && MACH_HYP] (KERNEL_CS, KERNEL_DS): Remove macros.
	[MACH && !MACH_HYP] (KERNEL_CS, KERNEL_DS): Likewise.
	[MACH] (USER_CS, USER_DS): Likewise.

	Move linux/dev/include/asm-i386/segment.h to src tree
	* linux/dev/include/asm-i386/segment.h: Move to ...
	* linux/src/include/asm-i386/segment.h: ... here.

	Match function types with `struct tty' member functions
	* i386/i386at/com.c (comstart): Change return type to `void'.
	* i386/i386at/lpr.c (lprstop): Likewise.

	Use explicit type int when defining register variables
	* linux/src/drivers/scsi/aha1542.c (WAIT, WAITd): Define variables
	with explicit type `register int' and not just `register'.

2009-12-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add Xen support
	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-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add stack-protector support
	* kern/debug.c (__stack_chk_guard): New variable
	(__stack_chk_fail): New function.

	Use gcc builtins for stdarg.h when available
	* 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-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix commit d088a062
	* vm/memory_object_proxy.c: New file.

2009-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add memory object proxies
	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-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add -H option to halt on panic
	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-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add sis900 driver
	2005-05-01  Andreas B. Mundt  <andi.mundt@web.de>

	* i386/README-Drivers: Likewise.
	* i386/linux/Makefile.in (linux-net-files): Added 'sis900'.
	* i386/linux/configure.ac (sis900): New driver.
	* linux/dev/drivers/net/Space.c: Add conditional probes 'sis900'
	driver.
	* linux/src/drivers/net/sis900.c: New file.
	* linux/src/drivers/net/sis900.h: Likewise.

2009-11-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add XMM FPU registers save/restore support.
	* 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.

	Fix debugging message
	* i386/i386/fpu.c (fphandleerr): Fix debugging message.

	Add native FPU error support
	* i386/i386/fpu.c (init_fpu): Enable CR0_NE when processor is at
	least i486.
	(fpintr): Move code handling the FPU state to...
	(fphandleerr): New function.
	(fpexterrflt): Rename into...
	(fpastintr): New function.
	(fpexterrflt): Reintroduce function, calls fphandleerr then
	raises exception.
	* i386/i386/fpu.h (fpastintr): Add prototype.
	* i386/i386/trap.c (i386_astintr): Call fpastintr instead of
	fpexterrflt.

	Panic when no FPU is available
	* i386/i386/fpu.c (init_fpu): Panic if no FPU is available.

	Initialize FPU in MS-DOS compatibility mode
	* i386/i386/fpu.c (init_fpu): Make sure CR0_NE is dropped.

2009-11-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Declare memcmp function
	* include/string.h (memcmp): New prototype.

	Do not fail if no PTE maps virtual address 0
	        * i386/intel/pmap.c (pmap_unmap_page_zero): Do not fail if no PTE maps
	        virtual address 0.

	Remove (vm_offset_t) casts from constants
	        * i386/i386/vm_param.h (VM_MIN_KERNEL_ADDRESS, VM_MAX_KERNEL_ADDRESS,
	        LINEAR_MIN_KERNEL_ADDRESS, LINEAR_MAX_KERNEL_ADDRESS): Remove
	        (vm_offset_t) cast, use UL suffix instead.
	* i386/include/mach/i386/vm_param.h (VM_MIN_ADDRESS,
	VM_MAX_ADDRESS): Remove (vm_offset_t) cast, use UL suffix instead.

	Really call startrtclock() with an active thread.
	* kern/startup.c (cpu_launch_first_thread): Call startrtclock
	really after starting at least one thread.

	Add pmap parameter to INVALIDATE_TLB
	* i386/intel/pmap.c (INVALIDATE_TLB): Add pmap parameter.
	(PMAP_UPDATE_TLBS): Pass pmap parameter.
	(process_pmap_updates): Likewise.
	(pmap_unmap_page_zero): Use INVALIDATE_TLB instead of hardcoding
	it.

	Add phys_first_addr and phys_last_addr declaration
	* i386/i386/model_dep.h (phys_first_addr, phys_last_addr): New
	declarations.
	* i386/i386/trap.c: Include <i386/model_dep.h>
	(user_trap): Remove extern declaration of phys_last_addr.
	* i386/intel/pmap.c: Include <i386/model_dep.h>
	(phys_first_addr, phys_last_addr): Remove extern declaration.

	Use typeof(boot_info)
	* i386/i386at/model_dep.c (i386at_init): Use typeof(boot_info)
	instead of hardcoding struct multiboot_info*.

	Fix early interrupt crash
	* i386/i386at/model_dep.c (i386at_init): Move int_stack_high
	assignation to before setting up interrupts.

	Add missing phystokv/kvtophys conversions
	* i386/i386/mp_desc.c (interrupt_stack_alloc): Apply phystokv to
	stack_start.
	* i386/i386at/model_dep.c (i386at_init): Apply phystokv to
	memory allocated to duplicate multiboot information.  Apply
	_kvtophys before calling set_cr3.  Apply phystokv to
	phys_last_addr before assigning to int_stack_high.
	* i386/intel/pmap.c (pmap_bootstrap): Apply phystokv to
	phys_last_addr, use kernel_virtual_start instead of
	phys_last_addr.  Apply phystokv to allocated bootstrap page
	table pages.  Apply _kvtophys to page table pointers before
	writing into page table.
	(pmap_enter): Apply phystokv to allocated page table page, apply
	kvtophys to deallocated page table page.

	Show command lines in task list
	* Makefile.am (clib_routines): Add memcmp.
	* i386/i386/db_machdep.h (DB_GNUMACH_TASK_NAME): New macro.
	* i386/i386/db_interface.c (GNU): New macro.
	[GNU] (looks_like_command): New function.
	(db_task_name): When task map is kernel_pmap, return
	DB_GNUMACH_TASK_NAME.
	[GNU] (db_task_name): Use a GNU/Hurd-specific heuristic to get
	argv[] of a task.

	Replace phys_mem_va with VM_MIN_KERNEL_ADDRESS
	* i386/i386/vm_param.h (phystokv): Use VM_MIN_KERNEL_ADDRESS
	instead of phys_mem_va.
	(_kvtophys): New macro.
	* i386/i386at/model_dep.c (phys_mem_va): Remove variable.

	Avoid confusion between global and local ldt vars
	* i386/i386/pcb.c (switch_ktss): Rename ldt variable into tldt.

	Do not assume that VM_MIN_KERNEL_ADDRESS is 0
	* i386/i386/vm_param.h (VM_MAX_KERNEL_ADDRESS): Add
	VM_MIN_KERNEL_ADDRESS.
	(kvtolin): Subtract VM_MIN_KERNEL_ADDRESS.
	(lintokv): Add VM_MIN_KERNEL_ADDRESS.
	* i386/i386at/model_dep.c (mem_size_init): Subtract
	VM_MIN_KERNEL_ADDRESS in computation of phys_last_addr.
	(i386at_init): Use VM_MIN_KERNEL_ADDRESS instead of 0 as
	argument of lin2pdenum.

	Rewamp spl.h
	* i386/i386/spl.h (splnet, splbio, spl7, splx_cli): Add
	prototypes.

	Do not assume that VM_MIN_KERNEL_ADDRESS is 0
	* i386/i386/gdt.c (gdt_init): Subtract VM_MIN_KERNEL_ADDRESS
	from LINEAR_MIN_KERNEL_ADDRESS to avoid assuming the former
	being 0.

	Fix db_search_null loop
	* i386/i386/db_interface.c (db_search_null): Do not decrease
	vaddr twice.

	Introduce KERNEL_RING
	* i386/i386/seg.h (KERNEL_RING): New macro, set to 0.
	        (ACC_PL_K, SEL_PL_K): Use KERNEL_RING instead of assuming 0.
	        * i386/i386/gdt.h (KERNEL_CS, KERNEL_DS): Likewise.
	        * i386/i386/db_interface.c (kdb_trap, kdb_kentry): Likewise.
	        * i386/i386/kttd_interface.c (kttd_trap, kttd_netentry): Likewise.
	* i386/i386/i386asm.sym: Add KERNEL_RING expression.

	Rename kd_atoi into mach_atoi
	* i386/i386at/kd.c: Include <util/atoi.h>
	(DEFAULT): Remove, replaced by MACH_ATOI_DEFAULT.
	        (kd_parserest): Use mach_atoi instead of kd_atoi and MACH_ATOI_DEFAULT
	        instead of DEFAULT.
	(kd_atoi): Move and rename function to...
	* util/atoi.c: ... mach_atoi in new file.
	* i386/i386at/kd.h (kd_atoi): Move and rename declaration to...
	* util/atoi.h: ... mach_atoi in new file.
	* Makefrag.am (libkernel_a_SOURCES): Add util/atoi.c

2009-11-16  Guillem Jover  <guillem@hadrons.org>

	Update dependency patch for Automake 1.10.2, 1.11, and thereabouts.
	* config.status.dep.patch: Refresh.

2009-11-11  Zheng Da  <zhengda1936@gmail.com>

	Fix a bug in vm_page_grab_contiguous_pages.
	* vm/vm_resident.c (vm_page_grab_contiguous_pages): Maintain the free vm page queue correctly.

2009-11-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Show EATA probing progression
	* linux/src/drivers/scsi/eata.c (port_detect): Print the port being
	probed.

2009-10-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix VM_MAX_ADDRESS default
	* i386/include/mach/i386/vm_param.h (VM_MAX_ADDRESS): Set back to 0xc0000000 by
	default.

	Make tuning VM_MAX_ADDRESS trivial
	* i386/i386/vm_param.h (LINEAR_MIN_KERNEL_ADDRESS): Set to
	VM_MAX_ADDRESS instead of hardcoding to 0xc0000000.
	(VM_MAX_KERNEL_ADDRESS): Set to LINEAR_MAX_KERNEL_ADDRESS -
	LINEAR_MIN_KERNEL_ADDRESS instead of hardcoding to 0x40000000.
	* i386/include/mach/i386/vm_param.h: Document how it may be tuned.

	Fix build
	* i386/i386at/com.h (comtimer): Fix prototype of comtimer.

2009-10-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix warning
	* i386/i386at/autoconf.c: Include <i386/pic.h> even when [!LINUX_DEV].

	Fix warning
	* i386/i386/trap.h: Include <mach/mach_types.h>

	Fix warning
	* i386/i386/pcb.c (thread_setstatus): Comment out state variable
	declaration.

	Fix warning
	* device/net_io.c (net_set_filter): Cast filter into bpf_insn_t for
	bpf_eq call.

	Fix warning
	* i386/i386/locore.S (TIME_INT_ENTRY): Fix comment.

	Fix warning
	* i386/intel/pmap.c (i): Declare only when [NCPUS > 1].

2009-10-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix warnings
	* devices/io_reqs.h (io_req): Set type of io_alloc_size field to
	vm_size_t.
	* device/ds_routines.c (device_write_dealloc): Remove cast of
	io_alloc_size field.
	* device/subrs.c (brelse): Likewise.

	Fix warnings
	* device/chario.c (ttypush): Set parameter type to void * instead of
	struct tty *, and implicitly cast the former into the latter instead.
	* i386/i386at/com.c: Include <kern/mach_clock.h>.
	(timeout, ttrstrt): Remove declarations.
	(comtimer): Add unused void * parameter.
	(comopen): Pass NULL to comtimer function.
	* i386/i386at/kd.h (kd_belloff): Add unused void * parameter.
	* i386/i386at/kd.c (timeout): Remove declaration.
	(kd_belloff): Add unused void * parameter.
	(feep, kdsetbell): Pass NULL to kd_belloff function.
	* i386/i386at/lpr.c: Include <mach_clock.h>.
	(timeout, ttrstrt): Remove declarations.
	* kern/mach_clock.c (softclock, timeout, untimeout): Set parameter
	type of fcn function pointer to void * instead of char *. Set type
	of param to void * instead of char *.
	* kern/mach_clock.h (timer_elt): Set parameter type of fcn member
	to void * instead of char *. Set time of param member to void * instead
	of char *.
	(timeout): Set parameter type of fcn function pointer parameter to void
	* instead of char *.
	(untimeout): Likewise, set type of param parameter to void * instead of
	char *.
	* kern/sched_prim.c (sched_init): Remove cast of recompute_priorities.
	Replace (char *)0 with NULL.
	(thread_timeout): Set parameter type to void * instead of thread_t, and
	implicitly cast the former into the latter instead.
	(thread_timeout_setup): Remove cast of thread_timeout, cast
	thread_depress_timeout into (void (*) (void*)). Remove cast of thread.
	(thread_recompute_priorities): Add unused void * parameter.

	Fix warnings
	* device/tty.h (tty): Set type of t_ispeed and t_ospeed members to
	unsigned char instead of (potentially signed) char.

	Fix warnings
	* vm/vm_resident.c (vm_page_grab_contiguous_pages): Remove unused
	count_zeroes and not_found_em labels.

	Fix warning
	* vm/vm_pageout.c (vm_pageout_scan): Remove unused Restart label.

	Fix warning
	* vm/vm_map.c (vm_map_lookup): Add braces to fix readability.

	Fix warning
	* kern/thread.c (_s_): Remove unused variable.

	Fix warnings
	* kern/bootstrap.c (task_insert_send_right): Remove spurious cast of
	port into ipc_object_t.
	(load_protect_text, load_fault_in_text, boot_map,
	load_bootstrap_symbols): Comment out unused variables and function.
	(read_exec): Comment out unused user_map variable.

	Fix boot from grub2 with more than 800MiB memory
	* i386/i386at/model_dep.c (init_alloc_aligned): Add declaration.
	(i386at_init): Use init_alloc_aligned to allocate memory to save the
	content pointed by boot_info: cmdline, mods_addr, mod_start, and string.
	Set kernel_cmdline to the newly allocated string.
	(c_boot_entry): Do not set kernel_cmdline.

	Better estimate avail_remaining
	* i386/i386at/model_dep.c (mem_size_init): Move avail_remaining computation to
	after all phys_last_addr corrections.

2009-10-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Revert "Fix multiboot compliancy concerning x86 D flag"
	This reverts commit de00e82b8c4491a4ff3320c0ddd80ac91ed0977b.

	Flags already get cleared using push/pop a few instructions later.

2009-10-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix multiboot compliancy concerning x86 D flag
	i386/i386at/boothdr.S (boot_entry): Clear D flag.

2009-10-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach

	Update constants to nowadays standards
	kern/zalloc.c (zone_map_size): Increase to 64MiB.
	i386/i386at/model_dep.c (mem_size_init): Reduce cap to 1/6 of memory
	space to save room for zalloc area.
	linux/src/drivers/block/ide.h (INITIAL_MULT_COUNT): Set to 16.
	vm/vm_map.h (VM_MAP_COPY_PAGE_LIST_MAX): Set to 64.
	vm/vm_object.c (vm_object_cached_max): Set to 4000.

2009-10-14  Thomas Schwinge  <schwinge@nic-nac-project.de>

	Merge branch 'master-zhengda'

2009-10-14  Zheng Da  <zhengda1936@gmail.com>

	Apply patch #6851: fix a bug in BPF * net_io.c (net_filter): Correct the amount of data of a packet accepted by BPF.

2009-10-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix yet more allocation failures during gc
	kern/zalloc.c (zone_gc): Allocate and free two vm_map_kentry_zone elements to
	make sure the gc will be able to allocate two in vm_map_delete.

	Revert spurious part of 909c941d

	Fix db kernel memory access
	i386/i386/db_interface.c (db_read_bytes): Also check addr against
	VM_MAX_KERNEL_ADDRESS.

	Fix macro escapes
	i386/intel/pmap.c (INVALIDATE_TLB): Fix macro escapes

	Fix allocation failure during gc
	kern/zalloc.c (zone_gc): Allocate and free a vm_map_kentry_zone element to make
	sure the gc will be able to allocate one for vm_map_delete.

	More restrictive requirements on zone alignment
	kern/zalloc.c (zinit): Panic if requested alignment doesn't match page
	size and list elements.

	Fix return with lock held
	vm/vm_map.c (vm_map_copy_overwrite): Unlock dst_map before returning.

	Fix return with lock held
	vm/vm_map.c (vm_map_enter): Use RETURN instead of return to unlock the
	map before returning.

	Make local variable static
	kern/lock.c (lock_wait_time): Add static qualifier.

	Advertise memory size truncations
	i386/i386at/model_dep.c (mem_size_init): Advertise memory size
	truncations.

2009-09-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Disable CMD-640 support
	It messes too much with probing and brings hang issue.

	* i386/linux/dev/include/linux/autoconf.h
	(CONFIG_BLK_DEV_CMD640, CONFIG_BLK_DEV_CMD640_ENHANCED):
	Undefine macros.

2009-07-11  Thomas Schwinge  <tschwinge@gnu.org>

	Switch to the new ChangeLog style.
	* ChangeLog: Wipe out content, and add instructions about how to get it back.
	* ChangeLog.0: Remove file.
	* ChangeLog.00: Likewise.

2009-02-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/prog_reg.h (invlpg_linear): Rename macro into...
	(invlpg_linear_range): ... this.
	(invlpg_linear): New macro.
	* i386/intel/pmap.c (INVALIDATE_TLB): Call invlpg_linear instead
	of flush_tlb when e - S is compile-time known to be PAGE_SIZE,
	instead of run-time known to be less than 32 * PAGE_SIZE.

2009-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/gdt.h (LINEAR_DS): New macro.
	* i386/i386/gdt.c (gdt_init): Initialize LINEAR_DS descriptor.
	* i386/i386/proc_reg.h (invlpg_user): Rename macro into...
	(invlpg_linear): ... this.  Use movw instead of movl to set KERNEL_DS
	selector.  Use LINEAR_DS selector instead of USER_DS selector.
	* i386/intel/pmap.c (INVALIDATE_TLB): Call invlpg_linear instead of
	invlpg_user.  For now, disable use of invlpg.

2008-12-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/proc_reg.h [__ASSEMBLER__ && __GNUC__]: Include
	<i386/gdt.h> and <i386/ldt.h>
	(invlpg_user): New macro.
	* i386/intel/pmap.c (INVALIDATE_TLB): Call invlpg_user instead
	of invlpg.
	(pmap_remove, pmap_page_protect, pmap_protect, pmap_enter,
	pmap_collect, phys_attribute_clear): Call PMAP_UPDATE_TLBS
	after pde update instead of before.

2008-12-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/intel/pmap.c (pmap_bootstrap): Extend kernel virtual memory to
	at least the size of the physical memory.

2008-12-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* vm/vm_fault.c (vm_fault_page): Print value returned
	memory_object_data_request as %x instead of %d.

2008-11-15  Shakthi Kannan  <shakshurd@gmail.com>

	* device/ds_routines.h (device_reference, device_deallocate): Add
	function prototypes.
	* kern/task.c (task_create): Moved unused i variable inside FAST_TAS.  
	* vm/vm_map.h (vm_map_copy_page_discard): Add function prototype.
	* vm/vm_kern.c (projected_buffer_deallocate): Give &map->hdr
	instead of map to _vm_map_clip_start and _vm_map_clip_end functions.

2008-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* device/device_emul.h (device_emulation_ops): Turn back reference,
	dealloc, dev_to_port, write_trap and writev_trap into taking a void*,
	as they do not always take a mach_device_t.
	* device/ds_routines.c (mach_device_emulation_ops): Cast
	mach_device_reference, mach_device_deallocate,
	mach_convert_device_to_port, device_write_trap and device_writev_trap
	to (void*) to make them accept a void* argument.
	* linux/pcmcia-cs/glue/ds.c (device_deallocate): Rename function
	into...
	(ds_device_deallocate): ... this.
	(dev_to_port): Call ds_device_deallocate instead of device_deallocate.
	(linux_pcmcia_emulation_ops): Use ds_device_deallocate instead of
	device_deallocate, cast mach_device_reference to (void*) to make it
	accept a void* argument.

2008-11-28  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/Makefrag.am: Only advertize updating the web pages on
	gnumach-1-branch.

2008-11-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/proc_reg.h (invlpg): New macro.
	* i386/intel/pmap.c (INVALIDATE_TLB): If portion to be flushed is less
	than 32 pages, use calls to invlpg instead of flush_tlb.

2008-11-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/proc_reg.h (get_cr0, get_cr2, get_cr3, get_cr4, get_tr,
	get_ldt): Add volatile qualifier to asm statement to prevent gcc from
	optimizing it away since there seems to be no way to clobber these
	properly in the set_* macros.

2008-11-17  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.am (install_sh, INSTALL): Point to `build-aux/install-sh'.
	Make use of its `-C' option.

	* configure.ac: Require GNU Automake 1.10.1.
	* Makefile.am: Adapt.
	* Makefile.correct_output_files_for_.S_files.patch: Remove.

2008-07-19  Barry deFreese  <bdefreese@debian.org>

	* device/device_emul.h (struct device_emulation_ops): Make members
	reference, dealloc, dev_to_port, write_trap, and writev_trap take
	mach_device_t parameter instead of void *.
	* i386/i386at/autoconf.c: Make forward declarations for comintr()
	and lprintr() match prototype. Add brackets around initialization
	members for bus_ctlr and bus_device structs.
	* i386/i386at/conf.c (dev_name_list): Pass nomap instead of nulldev
	for map field.
	* i386/i386at/pic_isa.c (intnull, fpintr, hardclock, kdintr,
	prtnull): Declare the type of the value returned by functions to void.

2008-11-13  Thomas Schwinge  <tschwinge@gnu.org>

	[task #8135 -- PAE for GNU Mach]
	* i386/configfrag.ac (enable_pae): Add checks: this is ix86-only.
	* doc/mach.texi (Configuration): Document the new option.

2008-11-11  Shakthi Kannan  <shakshurd@gmail.com>

	* kern/eventcount.c (evc_wait_clear): Remove unused variable 'ret'.

2008-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[task #8135 -- PAE for GNU Mach]
	* i386/configfrag.ac: Add --enable-pae option, which defines PAE.
	* i386/i386/i386asm.sym (PDPSHIFT, PDEMASK, PTE_SIZE): New assembly
	macros.
	* i386/i386/locore.S (copyout_retry) [PAE]: Use page directory pointer
	bits, take PTE_SIZE into account.
	* i386/i386at/model_dep.c (i386at_init) [PAE]: Set second initial 2MB
	page.  Enable PAE bit.  Set cr3 to page directory pointer table instead
	of page directory.
	* i386/intel/pmap.c (pmap_bootstrap, pmap_create) [PAE]: Allocate 4
	pages for dirbase.  Setup pdpbase.
	(pmap_destroy) [PAE]: Free 4 pages from dirbase.  Free pdpbase.
	* i386/intel/pmap.h (pt_entry_t) [PAE]: Typedef to unsigned long long.
	(PDPSHIFT, PDPNUM, PDPMASK) [PAE]: New macros.
	(PDESHIFT, PDEMASK, PTEMASK) [PAE]: Set to PAE values.
	(lin2pdenum, NPDES) [PAE]: Make them take the page directory pointer
	index into account too.
	(struct pmap) [PAE]: Add `pdpbase' member.
	(set_dirbase): Remove macro, replaced by...
	(set_pmap): New macro, taking a pmap instead of the dirbase.
	(PMAP_ACTIVATE_USER): Use set_pmap instead of set_dirbase.

2008-11-05  Shakthi Kannan  <shakshurd@gmail.com>

	* ipc/mach_port.c (mach_port_insert_right): Cast poly into
	(ipc_object_t) to fix compiler warning when calling
	ipc_object_copyout_name.

2008-08-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/trap.c (user_trap): On page fault, raise exception instead
	of asserting that cr2 is below LINEAR_MIN_KERNEL_ADDRESS.

2008-07-29  Zheng Da  <zhengda1936@gmail.com>
            Manuel Menal <mmenal@hurdfr.org>

	* include/device/net_status.h (NET_FLAGS): New macro.
	* linux/dev/glue/net.c (device_get_status): Handle NET_FLAGS case.
	(device_set_status): Likewise, calls dev_change_flags.
	* linux/dev/include/linux/netdevice.h (dev_change_flags): Declare
	function.
	* linux/dev/net/core/dev.c (dev_change_flags): Add function.

2008-08-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/lock.h (_simple_lock_xchg_, bit_lock, bit_unlock): Add
	memory clobbers.
	* i386/include/mach/i386/cthreads.h (spin_unlock, spin_try_lock): Add
	memory clobbers.

2008-07-23  Barry deFreese  <bddebian@comcast.net>

	* device/chario.c (ttyinput_many): Change chars param to char *.
	* device/tty.h (ttyinput_many): Likewise.
	* i386/i386/pcb.h: Include <mach/exec/exec.h>.
	* i386/i386at/autoconf.h: Include <chips/busses.h>.
	* i386/i386at/model_dep.c (inittodr): Cast &new_time.seconds to u_int *.
	* ipc/mach_port.c (mach_port_insert_right): Cast poly to ipc_object_t.
	* ipc/mach_debug.c (host_ipc_hash_info): Initialize size to 0 to make
	the compiler believe that there is no bug.
	* ipc/mach_debug.c (mach_port_space_info): Likewise for tree_size and 
	table_size.
	* i386/i386at/com.c (commctl): Likewise for b.
	* i386/i386/trap.c (user_trap): Likewise for exc.
	* i386/i386/user_ldt.c (i386_set_ldt): Likewise for old_copy_object.
	* i386/i386at/com.c (comintr): Check line_stat&iOR instead of line&iOR.

2008-07-23  Barry deFreese  <bddebian@comcast.net>

	* i386/i386/locore.h (copyinmsg, copyoutmsg): 
	Make parameters const void* and void* instead of vm_offset_t.
	* i386/i386at/com.c (comportdeath): Cast port as ipc_port_t in 
	tty_portdeath call.
	* i386/i386at/kd.c (kdportdeath): Likewise.
	* i386/i386at/lpr.c (lprportdeath): Likewise.
	* i386/i386at/kd_mouse.c (mouse_handle_byte): Cast param to wakeup() as 
	vm_offset_t.
	* i386/intel/pmap.c (pmap_destroy): Cast arg 2 of kmem_free() to 
	vm_offset_t.
	* i386/intel/pmap.h: Cast all arg 1 params to kvtophy() to vm_offset_t.
	* ipc/ipc_kmsg.c: Remove casts from params to copyinmsg and 
	copyoutmsg calls.
	* ipc/mach_msg.c: Likewise.
	* kern/exceptions.c: Likewise.
	* ipc/mach_msg.c: Remove casts from params to copyout calls.
	* ipc/bootstrap.c: Likewise.
	* kern/ipc_tt.c (mach_ports_register): Cast memory[i] as ipc_port_t in 
	assignment.

2008-07-19  Barry deFreese  <bddebian@comcast.net>

	* chips/busses.h (bus_ctlr, bus_device): Make intr return void instead
	of int.
	* device/tty.h (tty): Make t_start and t_stop return void instead of
	int.
	* i386/i386/ipl.h (ivect[]): return void instead of int.
	* i386/i386at/pic_isa.h (ivect[]): Likewise.
	* i386/i386at/kd_mouse.c (mouseintr): Likewise.
	* i386/i386at/com.c (comintr, comstop): Likewise.
	* i386/i386at/kd.c (kdcnputc, kdstart, kdstop, kdintr): Likewise.
	* i386/i386/trap.c (exception, thread_exception_return, i386_exception):
	 Add __attribute__ ((noreturn)).
	* i386/i386at/kd.c (kdcnprobe): Return 0 at end of function.
	* i386/i386at/lpr.c (lprintr, lprstart): Return void instead of int.
	(lprstart): Don't return numeric values any longer.
	* kern/eventcount.c (evc_wait_clear): Return a value.
	* kern/exceptions.c (exception, exception_try_task, exception_no_server, 
	exception_raise, exception_raise_continue, exception_raise_continue_slow, 
	exception_raise_continue_fast): Add __attribute__ ((noreturn)).
	(exception, exceptio_try_task, exception_raise, 
	exception_raise_continue_slow, exception_raise_continue_fast): 
	Remove spurious returns.
	(exception_no_server): Add panic() on return from thread_halt_self().

2008-07-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/pcmcia-cs/glue/wireless_glue.h (schedule_task): Add parameter
	to Debugger() call.
	* kern/lock_mon.c (retry_simple_lock, retry_bit_lock): Likewise.
	* kern/machine.c (Debugger): Remove declaration.
	* device/net_io.c (net_deliver): Fix parenthesis to really round up.
	* kern/mach_clock.c (timeout): Make the `fcn' parameter take a void *
	instead of char *.
	* kern/mach_clock.h (timeout): Likewise.
	* device/net_io.c (net_set_filter): Reference the proper member
	instead of casting pointers.
	* device/subrs.c (ether_sprintf): Set type of `i' to `int'.
	* i386/i386/trap.c (kernel_trap): Pass page fault address to printf.
	* i386/i386at/rtc.c (rtcget): Fix parenthesis to really test the bit.
	* linux/src/include/linux/tqueue.h (queue_task_irq,
	queue_task_irq_off, queue_task, run_task_queue): Turn into static
	inlines.

2008-07-19  Barry deFreese  <bddebian@comcast.net>

	* device/dev_hdr.h (dev_name_lookup, dev_set_indirection): Add
	prototypes.
	* device/dev_pager.c: Include <vm/vm_user.h>.
	* device/ds_routines.c: Likewise.
	* device/subrs.c: Likewise.
	* device/device_init.c: Include <device/tty.h>.
	* device/ds_routines.h (iowait): Add prototype.
	* device/net_io.h (net_kmsg_collect): Add prototype.
	* device/net_io.c (hash_ent_remove, net_free_dead_infp,
	net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info,
	bpf_match): Add forward declarations.
	* device/subrs.h: New header.
	* i386/i386/fpu.h: Include <sys/types.h>.
	Change <i386/thread.h> include to <kern/thread.h>.
	(fp_save, fp_load, fp_free, fpu_module_init, fpu_set_state, 
	fpu_get_state, fpnoextflt, fpextovrflt, fpexterrflt, init_fpu):
	Add prototypes.
	* i386/i386/gdt.h (gdt_init): Add prototype.
	* i386/i386/io_map.c: Include <vm/pmap.h>.
	* vm/vm_kern.c: Likewise.
	* i386/i386/ktss.h (ktss_init): Add prototype.
	* i386/i386/ldt.h (ldt_init): Add prototype.
	* i386/i386/loose_ends.h: New header.
	* i386/i386/loose_ends.c (delay): Complete prototype.
	* i386/i386/model_dep.h (startrtclock): Add prototype.
	* i386/i386/pcb.h (load_context, stack_attach, stack_detach, 
	switch_ktss): Add prototypes.
	* i386/i386/pic.h (form_pic_mask, picinit): Add prototypes.
	* i386/i386/pit.c: Include <i386/pic.h>.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386/pit.h (clkstart): Add prototype.
	* i386/i386/trap.c: Include <i386/fpu.h>, <intel/read_fault.h>,
	<vm/vm_fault.h>.
	* i386/i386/trap.h (interrupted_pc): Add prototype.
	* i386/i386/user_ldt.c: Include <i386/pcb.h>.
	* i386/i386at/autoconf.h: New header.
	* i386/i386at/com.h: New header.
	* i386/i386at/com.c: Include <i386at/autoconf.h>, <i386at/com.h>.
	* i386/i386at/idt.h (idt_init): Add prototype.
	* i386/i386at/int_init.h: New header.
	* i386/i386at/kd.c: Include <i386/loose_ends.h>.
	* kern/debug.c: Likewise.
	* i386/i386at/kd_event.c: Include <device/ds_routines.h>.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/kd_mouse.c: Include <device/subrs.h>, <i386at/com.h>.
	* i386/i386at/lpr.c: Include <i386at/autoconf.h>
	* i386/i386at/model_dep.c: Include: <i386/fpu.h>, <i386/gdt.h>, 
	<i386/ktss.h>, <i386/ldt.h>, <i386/pic.h>, <i386/pit.h>, 
	<i386at/autoconf.h>, <i386at/idt.h>, <i386at/int_init.h>, 
	<i386at/kd.h>, <i386at/rtc.h>.
	* i386/i386at/rtc.h (readtodc, writetodc): Add prototypes.
	* i386/intel/pmap.h: Include <mach/vm_prot.h>.
	(pmap_bootstrap, pmap_unmap_page_zero, pmap_zero_page, pmap_copy_page,
	kvtophys): Add prototypes.
	* i386/intel/read_fault.h: New header.
	* kern/ast.h (ast_init, ast_check): Add prototypes.
	* kern/debug.c (Debugger): Move prototype to...
	* kern/debug.h (Debugger): ... here.
	* kern/eventcount.h (evc_notify_abort): Add prototype.
	* kern/ipc_mig.c: Include <kern/syscall_subr.h>, <kern/ipc_tt.h>, 
	<device/ds_routines.h>
	* kern/ipc_mig.h: New header.
	* kern/ipc_tt.h (mach_reply_port): Add prototype.
	* kern/machine.h: New header.
	* kern/processor.h (pset_sys_bootstrap): Move prototype outside of
	MACH_HOST check.
	* kern/sched_prim.h (thread_bind, compute_priority,
	thread_timeout_setup): Add prototypes.
	* kern/startup.c: Include <kern/machine.h>, <machine/pcb.h>.
	* kern/syscall_subr.c: Include <kern/syscall_subr.h>.
	(thread_depress_abort): Remove prototype.
	* kern/syscall_subr.h: Include <sys/types.h>, <mach/mach_types.h>
	(thread_depress_abort): Add prototype.
	* kern/syscall_sw.c: Include: <kern/debug.h>.
	* kern/task.h (consider_task_collect): Add prototype.
	* kern/thread.c: Include <kern/eventcount.h>, <kern/ipc_mig.h>, 
	<kern/syscall_subr.h>.
	* kern/thread.h (stack_collect): Add prototype.
	* linux/pcmcia-cs/glue/pcmcia_glue.h (Debugger): Remove prototype.
	* util/putchar.c: Include <device/cons.h>.
	* util/putchar.h: New header.
	* util/puts.c: Include <device/cons.h>, <util/putchar.h>.
	* vm/memory_object.c: Include <vm/vm_map.h>.
	(memory_object_data_provided): Move function below
	memory_object_data_supply definition.
	* vm/vm_init.c: Include <vm/vm_fault.h>.
	* vm/vm_kern.h (projected_buffer_in_range): Add prototype.
	* vm/vm_map.c: Include <vm/pmap.h>, <vm/vm_resident.h>.
	(vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard):
	Add forward declaration.
	* vm/vm_map.h (vm_map_copyin_object, vm_map_submap,
	_vm_map_clip_start, _vm_map_clip_end): Add prototypes.
	* vm/vm_pageout.c: Include <device/net_io.h>, <kern/task.h>, 
	<machine/locore.h>.
	* vm/vm_resident.h: New header.
	* vm/vm_user.c: Include <vm/vm_kern.h>.
	* vm/pmap.h (pmap_pageable, pmap_map_bd): Add prototype.

2008-07-18  Andrei Barbu  <andrei@0xab.com>

	* i386/i386/db_disasm.c (Iba): New macro.
	(db_inst_table): Use Iba for aam and aad instructions.
	(db_disasm): Decode operands for Iba case.
	* i386/i386/db_interface.c (db_read_bytes): Do not increment the
	address before printing it.
	* include/sys/types.h (int8_t, uint8_t, u_int8_t, int16_t, uint16_t,
	u_int16_t, int32_t, uint32_t, u_int32_t, int64_t, uint64_t,
	u_int64_t): New types.
	* ddb/db_sym.c (db_task_printsym): Do not print empty symbols.
	* ddb/db_break.c (db_set_breakpoint): Add db_breakpoint_t return type,
	return the breakpoint in non-ddb case.
	* ddb/db_break.h (BKPT_EXTERNAL): New macro.
	(db_set_breakpoint): Add declaration.
	* (ddb/db_sym.h): Add _DDB_DB_SYM_H_ header protection.
	(db_find_sym_and_offset, db_find_xtrn_sym_and_offset,
	db_find_task_sym_and_offset, db_find_xtrn_task_sym_and_offset): Call
	db_free_symbol.
	(db_free_symbol): New declaration.
	(db_sym_switch): New `free_symbol' member.
	(X_db_free_symbol): New macro.
	* ddb/db_sym.c (db_value_of_name, db_lookup, db_name_is_ambiguous,
	db_search_task_symbol, db_search_in_task_symbol, db_task_printsym):
	Call db_free_symbol.
	(db_free_symbol): New function.
	(dummy_db_free_symbol): New empty function.
	(x_db): Initialize `free_symbol' memberi with dummy_db_free_symbol.
	* i386/i386/db_trace.c (db_i386_stack_trace): Call db_free_symbol.
	* kern/lock_mon.c (print_lock_info): Likewise.
	* include/sys/types.h (quad): Remove type.

2008-07-15  Barry deFreese  <bddebian@comcast.net>

	* device/cons.c (cnputc): Turn parameter `c' into a char.
	* device/cons.h (cninit, cngetc, cnmaygetc, cnputc): Add prototypes.
	* i386/i386at/model_dep.c: Include <device/cons.h>
	* kern/printf.c: Include <device/cons.h>
	(cnputc): Remove prototype.
	(vprintf, iprintf): Explicitely cast cnputc into the type _doprnt
	expects.
	* linux/dev/kernel/printk.c: Include <device/cons.h>
	(cnputc): Remove prototype.
	* device/ds_routines.c: Include <machine/locore.h>
	* ipc/ipc_kmsg.c: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/exception.c: Likewise.
	* kern/ipc_mig.c: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/time_stamp.c: Likewise.
	* vm/vm_kern.c: Likewise.
	* device/ds_routine.h (ds_notify): Add prototype.
	* kern/ipc_kobject.c: Include <device/ds_routines.h>
	* device/net_io.h (net_ast): Add prototype.
	* ipc/ipc_kmsg.c: Include <device/net_io.h>
	* kern/ast.c: Include <device/net_io.h>
	* i386/i386at/kd.h (kd_isupper, kd_islower, kd_senddata, kd_sendcmd,
	kd_cmdreg_write, kd_mouse_drain, set_kd_state, kd_setleds1, kd_setleds2,
	cnsetleds, kdreboot, kd_putc, kd_parseesc, kd_down, kd_up, kd_cr,
	kd_tab, kd_left, kd_right, kd_scrollup, kd_scrolldn, kd_cls, kd_home,
	kd_atoi, kd_insch, kd_cltobcur, kd_cltopcur, kd_cltoecur, kd_clfrbcur,
	kd_eraseln, kd_insln, kd_delln, kd_delch, kd_erase, kd_bellon,
	kd_belloff, kdinit, kdsetkbent, kdgetkbent, kdsetbell, kd_resend,
	kd_handle_ack, kd_kbd_magic, kdstate2idx, kd_parserest, kdcnmaygetc,
	kd_slmwd, kd_slmscu, kd_slmscd): Add prototypes.
	* i386/i386at/kd.c (do_modifier): Add prototype.
	* kern/ipc_kobject.c: Include <vm/vm_object.h>
	* vm/vm_object.h: Include <sys/types.h> and <ipc/ipc_types.h>.
	(vm_object_coalesce, vm_object_pager_wakeup): Add prototypes.
	* kern/priority.c: Include <kern/sched_prim.h>.
	* kern/sched_prim.c (recompute_priorities, update_priority): Remove
	prototypes.
	* kern/sched_prim.h (update_priority, compute_my_priority): Add
	prototypes.
	* kern/time_stamp.h (timestamp_init): Add prototype.
	* kern/startup.c: Include <kern/time_stamp.h>.
	* ipc/ipc_kmsg.c: Include <vm/vm_user.h> and <ipc/ipc_hash.h>.
	* ipc/ipc_mqueue (ipc_mqueue_copyin): Add prototype.
	* kern/bootstrap.c: Include <vm/vm_user.h>.
	* kern/exceptions.c: Include <ipc/ipc_notify.h>.
	* kern/ipc_kobject.h (ipc_kobject_notify): Add prototype.
	* kern/ipc_mig.c: Include <device/dev_hdr.h>.
	* kern/pc_sample.c: Include <machine/trap.h>.
	* kern/printf.h (safe_gets): Add prototype.
	* kern/processor.c: Include <kern/ipc_tt.h>.
	* kern/queue.h (insque): Add prototype.
	* kern/startup.c: Include <kern/mach_factor.h> and <kern/xpr.h>.
	* kern/thread.h (thread_start, kernel_thread, thread_priority,
	thread_set_own_priority, thread_max_priority, thread_policy,
	consider_thread_collect, stack_privilege): Add prototypes.
	* kern/timer.h (timer_normalize, timer_init, init_timers): Add
	prototypes.
	* vm/vm_map.h (vm_map_lookup_entry, vm_map_entry_delete): Add
	prototypes.
	* device/chario.c: Include <vm/vm_user.h>
	* device/device_init.c (chario_init): Remove prototype.
	* device/tty.h (ttyinput_many, tty_cts, tty_get_status,
	tty_set_status, tty_flush, ttrstrt, ttstart, ttyclose, tty_portdeath,
	chario_init): Add prototypes.
	* i386/i386/model_dep.h: New header.
	* i386/i386at/model_dep.c: Include <i386/model_dep.h>.
	* kern/debug.c: Include <machine/model_dep.h>.
	* kern/mach_clock.c: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/startup.c: Likewise.
	* kern/machine.c: Likewise.
	(halt_cpu): Remove prototype.
	* vm/pmap.h (pmap_grab_page): Add prototype.
	* ipc/mach_port.h: New header.
	* ipc/mach_port.c: Include <ipc/mach_port.h>.
	(mach_port_get_receive_status): Add forward declaration.
	* kern/bootstrap.c: Include <ipc/mach_port.h>.
	* kern/ipc_mig.c: Likewise.
	* kern/syscall_sw.c: Likewise.
	* device/dev_pager.c (device_pager_data_request,
	device_pager_data_request_done, device_pager_init_pager): Fix printf
	formats.
	* i386/i386/debug_i386.c (dump_ss): Likewise.
	* i386/i386/trap.c (user_trap): Likewise.
	* i386/i386at/com.c (comtimer): Likewise.
	* ipc/ipc_notify (ipc_notify_port_deleted, ipc_notify_msg_accepted,
	ipc_notify_port_destroyed, ipc_notify_no_senders,
	ipc_notify_send_once, ipc_notify_dead_name): Likewise.
	* kern/ipc_kobject.c (ipc_kobject_destroy): Likewise.
	* kern/sched_prim.c (do_runq_scan): Likewise.
	* linux/pcmcia-cs/clients/smc91c92_cs.c (smc_start_xmit): Likewise.
	* linux/src/drivers/net/sundance.c (start_tx): Likewise.
	* vm/vm_fault.c (vm_fault_page): Likewise.
	* vm/vm_map.c (vm_map_pmap_enter): Likewise.
	* vm/vm_object.c (vm_object_collapse): Likewise.

2008-07-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/src/drivers/net/rtl8139.c (rtl8129_open): Move IRQ
	initialization after ring initialization.

2008-07-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/dev/include/asm/segment.h (__put_user, __get_user): Add
	always_inline attribute.

2008-06-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/fpu.c (fpintr): Do not panic if the we receive the
	interrupt twice in the same thread.

2008-05-28  Thomas Schwinge  <tschwinge@gnu.org>

	[bug #23417, patch #6508 -- Building with -g3]
	* Makefile.am (MIGCOM): Revert the 2008-05-19 change.

2008-05-25  Andrei Barbu <teval0@gmail.com>

	* ddb/db_aout.c (aout_db_symbol_values): Add stab parameter.
	* ddb/db_sym.h (db_sym_switch): Add stab parameter to symbol_values
	member.
	(X_db_symbol_values): Pass stab parameter to symbole_values function.

2008-05-19  Thomas Schwinge  <tschwinge@gnu.org>

	[patch #6508 -- Building with -g3]
	* Makefile.am (MIGCOM): Let it filter through CPP again.
	Suggested by Andrei Barbu <teval0@gmail.com>.

2008-05-09  Andrei Barbu  <teval0@gmail.com>

	* i386/i386/loose_ends.c (DELAY): Use volatile qualifier instead of
	register to prevent optimization.

2008-03-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* doc/Makefrag.am: Fix typo.

2008-03-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/locore.S (syscall): Clear direction flag at entry.

2008-02-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/src/drivers/block/triton.c (ide_init_triton): Enable Bus
	Mastering if not enabled by BIOS.

2007-12-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* kern/debug.c (panic) [MACH_KDB]: Don't wait before running the
	debugger.
	* linux/dev/glue/block.c (MAX_BUF): Set to sane stack-friendly 8
	instead of blindly following VM_MAP_COPY_PAGE_LIST_MAX.
	(rdwr_full): increment blk by cc >> bshift instead of nb.

2007-12-11  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/include/linux/nfs.h: Remove unused file.
	* linux/src/include/linux/nfs.h: Likewise.

2007-12-10  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/Makefrag.am (i386/i386at/boothdr.o, i386/i386at/interrupt.o)
	(i386/i386/cswitch.o, i386/i386/locore.o): Remove targets.
	* configure.ac <Dependency tracking for `.S' files>: Add a hack to
	re-add the four targets with have been removed above for the (legacy)
	case only where they are actually needed.

2007-12-05  Guillem Jover  <guillem@hadrons.org>

	* i386/Makefrag.am (i386/i386at/interrupt.o): New target, depends on
	i386/i386/i386asm.h
	(i386/i386/cswitch.o): Likewise.
	(i386/i386/locore.o): Likewise.

2007-11-18  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/intel/pmap.c (pmap_map_bd): Use
	INTEL_PTE_NCACHE|INTEL_PTE_WTHRU.  Get pmap lock.

2007-11-15  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* ddb/db_examine.c (db_strcpy): Add extra parentheses around
	assignment used as boolean.
	* ddb/db_sym.c (db_qualify, db_lookup): Likewise.

2007-11-08  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/mach.texi: Do the copyright and licensing things as suggested by
	the GNU Texinfo manual.

2007-10-09  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/glue/net.c (device_open) <LINUX_IFF_ALLMULTI>: Comment.

2007-10-08  Stefan Siegl  <stesie@brokenpipe.de>

	* linux/dev/glue/net.c (device_open): Set LINUX_IFF_ALLMULTI flag
	on device and propagate.

2007-10-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* kern/zalloc.c (zget_space): Fix last change.

2007-09-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* kern/zalloc.c (zget_space): Align zalloc_next_space again after
	calling kmem_alloc_wired (which may sleep).

2007-08-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* Makefile.am (clib_routines): Add udivdi3, __udivdi3 and _end. Fix
	edata into _edata.
	(gnumach-undef): Do not remove heading _s.
	(clib-routines.o): Add -lgcc.

2007-07-09  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/db_interface.c (int_regs): Drop gs and fs fields.
	(kdb_kentry): Get fs and gs from struct i386_interrupt_state instead of
	struct int_regs.
	* i386/i386/kttd_interface.c (int_regs, kttd_netentry): Likewise.
	* i386/i386/locore.S (all_intrs): Save fs and gs and set them to kernel
	segment too.
	(return_to_iret): Restore fs and gs too.
	(return_to_iret_i): Likewise.
	(ast_from_interrupt): Set fs and gs to kernel segment too.
	(kdb_from_iret): Don't save/restore fs and gs either.
	(ttd_from_iret): Likewise.
	* i386/i386/thread.h (i386_interrupt_state): Add gs and fs fields.
	* linux/src/include/asm-i386/irq.h (SAVE_ALL): Set gs to kernel
	segment too.

2007-08-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/locore.S (TIME_TRAP_UENTRY, TIME_TRAP_SENTRY)
	(TIME_TRAP_UEXIT): Use TH_SYSTEM_TIMER instead of old TH_SYS_TIMER.
	(current_tstamp, TIME_TRAP_UENTRY, TIME_TRAP_SENTRY, TIME_TRAP_UEXIT)
	(TIME_INT_ENTRY, TIME_INT_EXIT, timer_switch, start_timer): Use
	EXT(current_tstamp) and EXT(current_timer) instead of _current_tstampt
	and _current_timer.
	* i386/i386/io_perm.c (i386_io_perm_create): Lock io_perm->port, not
	inexistent device->port.
	* i386/i386at/model_dep.c: Make init_alloc_aligned() extern.
	* i386/i386/mp_desc.c: Include <machine/vm_param.h>
	(interrupt_stack_alloc): Call init_alloc_aligned() instead of
	init_alloc().
	(cpu_control, interrupt_processor, cpu_start, start_other_cpus): New
	functions.
	* i386/i386/mp_desc.h: Include <i386at/idt.h> instead of "idt.h"
	* i386/i386/cswitch.S: Use EXT(interrupt_stack) instead of
	_interrupt_stack.
	* i386/i386/i386asm.sym (MP_GDT, MP_IDT): Remove macros.
	* i386/i386/lock.h: Don't include_next "lock.h".
	* i386/linux/dev/include/linux/autoconf.h [NCPUS > 1]: Define
	CONFIG_SMP.
	* linux/dev/include/asm-i386/smp.h: New file.
	* linux/dev/init/main.c [__SMP__ && __i386] (smp_loops_per_tick):
	Restore variable.
	* linux/pcmcia-cs/modules/cs_internal.h: Use __SMP__ instead of
	USE_SPIN_LOCKS.
	* linux/pcmcia-cs/modules/i82365.c: Likewise.
	* linux/pcmcia-cs/modules/rsrc_mgr.c: Likewise.
	* linux/dev/include/asm-i386/system.h: Update to Linux 2.2 for SMP.
	* configfrag.ac (mach_ncpus): Define to 1.
	(NCPUS): Set to $mach_ncpus.
	[$mach_ncpus > 1] (MULTIPROCESSOR): Set to 1.
	* linux/configfrag.ac [$mach_ncpus > 1] (__SMP__): Define.
	* linux/dev/arch/i386/kernel/irq.c: Include <asm/hardirq.h>.
	(local_bh_count, local_irq_count, global_irq_holder, global_irq_lock)
	(global_irq_count, check_smp_invalidate, show, wait_on_bh)
	(wait_on_irq, synchronize_bh, synchronize_irq, get_irqlock)
	(__global_cli, __global_sti, __global_save_flags)
	(__global_restore_flags): New variables and functions from Linux 2.2
	* linux/src/drivers/net/3c515.c (test_and_set_bit): Remove macro.
	* linux/src/drivers/net/de4x5.c (test_and_set_bit): Remove macro.
	* linux/src/drivers/net/eth16i.c (test_and_set_bit): Remove macro.
	* linux/src/drivers/net/kern_compat.h (test_and_set_bit): Remove macro.
	* linux/src/drivers/net/pcnet32.c (test_and_set_bit): Remove macro.
	* linux/src/include/linux/compatmac.h (test_and_set_bit)
	(test_and_clear_bit): Remove macro.
	* linux/src/include/asm-i386/atomic.h (atomic_read): New macro.
	* linux/src/include/asm-i386/bitops.h (test_and_set_bit)
	(test_and_clear_bit, test_and_change_bit): New inline functions.
	* linux/src/include/asm-i386/hardirq.h (local_bh_count): New
	declaration.
	* linux/src/include/linux/tasks.h (NR_CPUS): Set to NCPUS.
	(NO_PROC_ID): New macro.

2007-07-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/seg.h (SZ_64): New macro.
	* i386/i386/user_ldt.c (selector_check, i386_set_gdt): Check
	user-provided descriptor against SZ_64.

2007-07-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/intel/pmap.c (pmap_enter): Use INTEL_PTE_NCACHE|INTEL_PTE_WTHRU
	when cpu >= 486 and physical address is after memory end.

2007-06-23  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/trap.c (user_trap): Read faulting linear address before
	using it.

2007-06-02  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.mig.am: New file, factored out of code of...
	* Makefrag.am: ... this file and...
	* Makerules.am: ... this file.
	* i386/Makefrag.am: Update comment.

	* Makefile.am (MIGFLAGS): Remove.
	(MIGCOM): Add ``-n''.
	* Makerules.am: Adapt to that.

2007-05-09  Thomas Schwinge  <tschwinge@gnu.org>

	* include/mach/mach_types.defs (userprefix, serverprefix): Set, if
	requested (by setting USERPREFIX respective SERVERPREFIX).

2007-05-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/fpu.c (fpu_set_state): Set fp_valid to TRUE.  Free the
	unused ifps.

2007-05-07  Thomas Schwinge  <tschwinge@gnu.org>

	[bug #15295 -- Mach lets processes write to I/O ports]

	* i386/Makefrag.am (libkernel_a_SOURCES): Add `i386/i386/io_perm.c',
	`i386/i386/io_perm.h', `i386/i386/machine_task.c', `i386/i386/task.h'
	and remove `i386/i386/io_port.h', `i386/i386/iopb.c',
	`i386/i386/iopb.h'.

	* i386/i386/io_port.h: Remove file.
	* i386/i386at/kd.c: Don't include <i386/io_port.h>.
	(vga_port_list, kd_io_device, kd_io_map_open, kd_io_map_close): Don't
	define and don't use anymore.

	* include/stddef.h: New file.

	* i386/i386/io_perm.c: Include <string.h>, <device/device_emul.h>,
	<ipc/ipc_space.h> and don't include <oskit/ds_oskit.h>.
	(io_perm_device_emulation_ops): New variable.
	(dev_open_alloc, setup_no_senders): Remove declarations.
	(convert_io_perm_to_port, convert_port_to_io_perm, io_perm_deallocate):
	Rewrite.
	(no_senders): New function.
	(i386_io_perm_create, i386_io_perm_modify): Rewrite partially, to adapt
	to the GNU Mach environment.
	* i386/i386/io_perm.h: Include <device/dev_hdr.h> and
	<ipc/ipc_types.h>.
	(io_perm, io_perm_t): New structure and accompanying type definition.
	(IO_PERM_NULL): Define.
	* i386/i386/locore.S (ktss): Move variable to...
	* i386/i386/ktss.c: ... here, make it a ``struct task_tss''.
	(ktss_init): Initialize the `task_tss' structure and the i/o permission
	bit map.
	* i386/i386/ktss.h: Adapt to that.
	* i386/i386/machine_task.c (machine_task_module_init): Adapt the `zinit'
	call to the GNU Mach environment.
	* i386/i386/mp_desc.c: Include <machine/ktss.h>.
	* i386/i386/tss.h: Include <machine/io_perm.h>.
	(task_tss): New structure, equivalent to the OSKit-Mach one.
	* i386/include/mach/i386/mach_i386.defs: Don't include
	<device/device_types.defs>.
	(device_list_t): Remove type.
	* i386/include/mach/i386/mach_i386_types.h (device_list_t): Remove type
	definition.

2007-05-07  Marcus Brinkmann  <marcus@gnu.org>

	[bug #15295 -- Mach lets processes write to I/O ports]

	* i386/i386/iopb.h, i386/i386/iopb.c: Obsolete files removed.

	* i386/i386/pcb.c (switch_context): Update the I/O permission
	bitmap from stack_handoff() here (not only in stack_handoff()).

	* i386/i386/machine_task.c (machine_task_module_init): Set
	ZONE_COLLECTABLE and ZONE_EXHAUSTIBLE flags for the iopb zone.
	Requested by Roland McGrath <roland@frob.com>.

	* i386/i386/io_perm.h: New file.
	* i386/i386/io_perm.c: New file.
	* i386/i386/machine_task.c: New file.
	* i386/i386/mp_desc.h: (struct mp_desc_table): Change type of ktss to
	struct task_tss.
	(mp_ktss): Likewise for array of pointers to the struct.
	* i386/i386/mp_desc.c: Include `machine/tss.h' and `machine/io_perm.h'.
	(mp_ktss): Change type to array of struct task_tss.
	(mp_desc_init): Cast pointer to x86_tss into pointer to task_tss,
	and use size of struct task_tss instead size of struct x86_tss.
	Initialize the task_tss structure.
	* i386/i386/pcb.c: Include `stddef.h' and `machine/tss.h'.
	(iopb_create, iopb_destroy): Prototypes removed.
	(curr_ktss): Cast pointer to base_tss to pointer to struct
	task_tss.
	(switch_ktss): Always use kernel TSS.
	(update_ktss_iopb): New function.
	(stack_handoff): Call update_ktss_iopb.
	(pcb_module_init): Do not call iopb_init.
	(pcb_terminate): Do not call iopb_destroy.
	(thread_setstatus): Remove local variable tss.
	(thread_getstatus): Rewrite i386_ISA_PORT_MAP_STATE case handler.
	* i386/i386/task.h: New file.
	* i386/i386/thread.h: Do not include `i386/iopb.h'.
	(struct i386_machine_state): Remove member io_tss.
	* i386/include/mach/i386/mach_i386.defs [KERNEL_SERVER]: Include
	`machine/io_perm.h'.  Define intran, outtran and destructor.
	(io_port_t): New type.
	(io_perm_t): Likewise.
	(i386_io_port_add): Interface removed.
	(i386_io_port_remove): Likewise.
	(i386_io_port_list): Likewise.
	(i386_io_perm_create): New interface.
	(i386_io_perm_modify): Likewise.
	* i386/include/mach/i386/mach_i386_types.h [MACH_KERNEL]: Include
	`i386/io_perm.h'.
	[!MACH_KERNEL]: Define types io_port_t and io_perm_t.
	* kern/task.c (task_init): Call machine_task_module_init.
	(task_create): Call machine_task_init.
	(task_deallocate): Call machine_task_terminate.
	(task_collect_scan): Call machine_task_collect.
	* task.h: Include `machine/task.h'.
	(struct task): Add member machine.

2007-05-06  Thomas Schwinge  <tschwinge@gnu.org>

	* device/kmsg.c: Include <device/ds_routines.h>.
	(kmsg_lock): Use `decl_simple_lock_data'.
	(kmsgread, kmsg_read_done): Add two typecasts.

	* device/buf.h (minphys): Add return type.
	* device/device_types_kernel.h: We're not in the eighties anymore...
	* device/io_req.h: Likewise.

2007-05-05  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/i386at/model_dep.c (halt_cpu, halt_all_cpus): Call
	`machine_idle' to avoid busy-looping.

	* i386/intel/read_fault.c (intel_read_fault): Remove the last parameter
	from the calls of `vm_map_lookup'.

	We're not in the eighties anymore.  List arguments in function
	prototypes and definitions for a lot of symbols.  Also drop some unused
	prototypes.  I refrain from listing every changed symbol.
	* vm/memory_object.c: Do as described.
	* vm/memory_object.h: Likewise.
	* vm/pmap.h: Likewise.
	* vm/vm_external.c: Likewise.
	* vm/vm_external.h: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_fault.h: Likewise.
	* vm/vm_kern.h: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_map.h: Likewise.
	* vm/vm_pageout.h: Likewise.
	* vm/vm_user.h: Likewise.
	* vm/memory_object.h: Include <ipc/ipc_types.h>.
	* vm/pmap.h: Include <kern/thread.h>.
	* vm/vm_fault.h: Include <mach/vm_prot.h>, <vm/vm_map.h> and
	<vm/vm_types.h>.
	* vm/vm_map.h: Include <mach/vm_attributes.h> and <vm/vm_types.h>.
	(vm_map_t, VM_MAP_NULL): Remove type and definition.
	* vm/vm_object.h (vm_object_t, VM_OBJECT_NULL): Remove type and
	definition.
	* vm/vm_page.h: Include <vm/vm_types.h>.
	(vm_page_t, VM_PAGE_NULL): Remove type and definition.
	* vm/vm_user.h: Include <mach/std_types.h>.
	* kern/task.h: Include <vm/vm_types.h> instead of <vm/vm_map.h>.
	* vm/vm_types.h: New file: the above-removed types and definitions.

2007-05-02  Thomas Schwinge  <tschwinge@gnu.org>

	* configure.ac (--disable-default-device-drivers): Transform into...
	(--enable-device-drivers): ... this new option and extend it.
	* i386/configfrag.ac (--enable-lpr): Adapt to that.
	* linux/configfrag.ac (AC_OPTION_Linux_ix86_at, AC_Linux_DRIVER):
	Likewise.
	(AC_Linux_DRIVER_qemu): New definition.  Use it for the `floppy', `ide'
	and `ne' device drivers.
	* doc/mach.texi: Document all that.

2007-05-01  Thomas Schwinge  <tschwinge@gnu.org>

	* assigns: Remove file.  See `copyright.list' on the GNU server instead.

2007-04-30  Thomas Schwinge  <tschwinge@gnu.org>

	We're not in the eighties anymore.  List arguments in function
	prototypes and definitions for a lot of symbols.  Also drop some unused
	prototypes.  I refrain from listing every changed symbol.
	* chips/busses.h: Do as described.
	* ddb/db_break.c: Likewise.
	* ddb/db_break.h: Likewise.
	* ddb/db_command.c: Likewise.
	* ddb/db_command.h: Likewise.
	* ddb/db_lex.c: Likewise.
	* ddb/db_lex.h: Likewise.
	* ddb/db_output.c: Likewise.
	* ddb/db_output.h: Likewise.
	* ddb/db_sym.h: Likewise.
	* ddb/db_task_thread.c: Likewise.
	* ddb/db_task_thread.h: Likewise.
	* ddb/db_variables.h: Likewise.
	* ddb/db_watch.c: Likewise.
	* ddb/db_watch.h: Likewise.
	* device/buf.h: Likewise.
	* device/conf.h: Likewise.
	* device/dev_hdr.h: Likewise.
	* device/ds_routines.h: Likewise.
	* device/if_ether.h: Likewise.
	* device/io_req.h: Likewise.
	* device/net_io.h: Likewise.
	* i386/i386/io_port.h: Likewise.
	* i386/i386/lock.h: Likewise.
	* i386/i386/mp_desc.c: Likewise.
	* i386/i386/mp_desc.h: Likewise.
	* i386/i386/proc_reg.h: Likewise.
	* i386/i386/user_ldt.h: Likewise.
	* i386/i386at/kd_queue.h: Likewise.
	* i386/i386at/kdsoft.h: Likewise.
	* i386/intel/pmap.c: Likewise.
	* i386/intel/pmap.h: Likewise.
	* include/mach/mach_traps.h: Likewise.
	* ipc/ipc_entry.h: Likewise.
	* ipc/ipc_hash.h: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_marequest.h: Likewise.
	* ipc/ipc_mqueue.h: Likewise.
	* ipc/ipc_notify.h: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_pset.h: Likewise.
	* ipc/ipc_right.h: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/ipc_table.h: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_msg.h: Likewise.
	* kern/ast.c: Likewise.
	* kern/ast.h: Likewise.
	* kern/debug.c: Likewise.
	* kern/debug.h: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/ipc_tt.h: Likewise.
	* kern/mach_factor.c: Likewise.
	* kern/mach_factor.h: Likewise.
	* kern/printf.c: Likewise.
	* kern/printf.h: Likewise.
	* kern/queue.h: Likewise.
	* kern/sched.h: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/syscall_subr.h: Likewise.
	* kern/task.h: Likewise.
	* kern/thread_swap.c: Likewise.
	* kern/thread_swap.h: Likewise.
	* kern/timer.h: Likewise.
	* kern/xpr.c: Likewise.
	* kern/xpr.h: Likewise.
	* kern/zalloc.c: Likewise.
	* kern/zalloc.h: Likewise.
	* ipc/ipc_port.h: Don't include <ipc/ipc_space.h>.
	* device/dev_hdr.h: Include <ipc/ipc_types.h>.
	* device/net_io.h: Include <device/if_hdr.h> and <device/io_req.h>.
	* ipc/ipc_entry.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
	* ipc/ipc_kmsg.h: Include <ipc/ipc_object.h>, <ipc/ipc_types.h> and
	<vm/vm_map.h>.
	* ipc/ipc_marequest.h: Include <mach_debug/hash_info.h> and
	<ipc/ipc_types.h>.
	* ipc/ipc_object.h: Include <ipc/ipc_types.h>.
	* ipc/ipc_right.h: Include <ipc/ipc_entry.h>.
	* ipc/ipc_space.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
	* kern/ipc_tt.h: Include <mach/mach_types.h>.
	* kern/sched.h: Include <kern/kern_types.h>.
	* kern/syscall_subr.h: Include <kern/kern_types.h>.
	* ipc/ipc_hash.c (ipc_hash_index_t): Move type definition...
	* ipc/ipc_hash.h: ... into here.

2007-04-25  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT: Add url.

	[task #5878 -- Backport code from GNU Mach's trunk to
	gnumach-1-branch: i386_set_gdt, i386_get_gdt]
	* i386/include/mach/i386/mach_i386.defs (i386_set_gdt, i386_get_gdt):
	Shift by two to maintain rpc id compatibility with OSKit-Mach.

	* linux/dev/glue/kmem.c (vmalloc_list_remove): Cast the first argument
	in the `kfree' call to what is expected.

	* linux/pcmcia-cs/glue/ds.c (kmalloc, kfree): Call `linux_kmalloc',
	respective `linux_kfree' instead.

	* kern/kalloc.h (kalloc, kget, kfree, kalloc_init): List the arguments.

2007-04-24  Michael Casadevall  <sonicmctails@gmail.com>

	* linux/src/drivers/net/ne.c (bad_clone_list): Add the RealTek 8029 PCI
	card's signature.
	<http://lists.gnu.org/archive/html/bug-hurd/2007-04/msg00039.html>

2007-04-24  Thomas Schwinge  <tschwinge@gnu.org>

	* ipc/ipc_port.h: Include <ipc/ipc_space.h>.

2007-04-11  Thomas Schwinge  <tschwinge@gnu.org>

	* config.status.dep.patch: Update to match more files.  This fixes
	building GNU Mach with ``make -j2'' and higher.  The problem was
	reported by Michael Casadevall <sonicmctails@gmail.com>.

2007-04-02  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/i386/io_emulate.c: Remove file.
	* i386/i386/io_emulate.h: Likewise.
	* i386/i386at/iopl.c: Likewise.
	* i386/Makefrag.am (libkernel_a_SOURCES): Remove the aforementioned
	files.
	* i386/i386/trap.c: Don't include <i386/io_emulate.h>.
	(v86_assist, check_io_fault): Remove functions.
	(user_trap): Remove the code referencing the above functions.
	* i386/i386at/conf.c (dev_name_list): Remove the `iopl' device.
	* DEVELOPMENT: Document this.

2007-03-30  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.am (gnumach_o_LINK): Remove ``--start-group''.

2007-03-27  Thomas Schwinge  <tschwinge@gnu.org>

	Unconditionally use the device driver multiplexing.  Suggested by
	Gianluca Guida <glguida@gmail.com>.
	* i386/i386at/dev_hdr.h: Merge into `device/dev_hdr.h' and remove.
	* i386/i386at/device_emul.h: Rename to `device/device_emul.h'.  Adapt
	all users.
	* i386/i386at/i386at_ds_routines.c: Merge into `device/ds_routines.c'
	and remove.
	* i386/linux/dev/include/linux_emul.h: Remove file.
	* Makefrag.am (libkernel_a_SOURCES): Add `device/device_emul.h'.
	* i386/Makefrag.am (libkernel_a_SOURCES): Remove
	`i386/i386at/dev_hdr.h', `i386/i386at/device_emul.h' and
	`i386/i386at/i386at_ds_routines.c'.
	* i386/linux/Makefrag.am (liblinux_a_SOURCES): Remove
	`i386/linux/dev/include/linux_emul.h'.
	* dev/dev_hdr.h: Adapt all users of `i386' as if it were always
	defined.
	* device/dev_lookup.c: Likewise.
	* device/ds_routines.c: Likewise.
	* device/device_init.c (ds_init): Rename to `mach_device_init'.
	* device/ds_routines.c (ds_init): Likewise.
	(ds_trap_init): Rename to `mach_device_trap_init'.
	(mach_device_trap_init): Make it `static'.
	* linux/dev/glue/block.c: Don't include <linux_emul.h>, but instead
	include <device/device_emul.h> and <i386at/disk.h>.
	* linux/dev/glue/net.c: Don't include <linux_emul.h>, but instead
	include <device/device_emul.h>.
	* linux/pcmcia-cs/glue/ds.c: Likewise.

	* kern/pcsample.h: Remove the automatic cvs log appending machinery.
	* linux/dev/drivers/scsi/g_NCR5380.c: Likewise.
	* linux/src/drivers/net/sk_g16.h: Likewise.
	* linux/src/drivers/scsi/AM53C974.c: Likewise.
	* linux/src/drivers/scsi/AM53C974.h: Likewise.
	* linux/src/drivers/scsi/NCR5380.c: Likewise.
	* linux/src/drivers/scsi/NCR5380.h: Likewise.
	* linux/src/drivers/scsi/aha152x.c: Likewise.
	* linux/src/drivers/scsi/aha1542.h: Likewise.
	* linux/src/drivers/scsi/g_NCR5380.c: Likewise.
	* linux/src/drivers/scsi/g_NCR5380.h: Likewise.
	* linux/src/drivers/scsi/gdth.c: Likewise.
	* linux/src/drivers/scsi/qlogicisp.c: Likewise.
	* linux/src/drivers/scsi/qlogicisp.h: Likewise.
	* linux/src/drivers/scsi/t128.c: Likewise.
	* linux/src/drivers/scsi/t128.h: Likewise.

2007-03-24  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/i386at/conf.c (block_io_mmap): Remove declaration.

	* doc/mach.texi: Fix a typo and the url for GNU GRUB.

	* device/kmsg.h: Include <sys/types.h>, <device/device_types.h> and
	<device/io_req.h>.

	* Makefrag.am (libkernel_a_SOURCES): Move `device/kmsg.h' into
	[enable_kmsg].

2007-03-23  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.am (%.server.msgids, %.user.msgids): Merge into the
	existing ``%.h %.c'' rules.
	Comment out the currently unused rpc stub rules.
	* Makefrag.am (gnumach.msgids): Rewrite.
	(nodist_libkernel_a_SOURCES): Add all ``.msgids'' files.
	* i386/Makefrag.am (nodist_libkernel_a_SOURCES): Likewise.

2007-03-19  Tim Retout  <tim@retout.co.uk>

	* i386/ldscript: Correct 'LINKFLAGS_gnumach' in comment.

2007-03-06  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386/user_ldt.c (i386_set_gdt): Call switch_ktss() if target is
	current thread.

2007-03-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[bug #18349 -- ``General Protection Trap'' in `ipc_kmsg_enqueue']
	* linux/dev/glue/net.c (device_write): Call net_packet() with splimp
	held.

2007-03-04  Thomas Schwinge  <tschwinge@gnu.org>

	* tests/configfrag.ac (MBCHK): Remove check.
	* tests/test-mbchk.in: Fail correctly if `mbchk' is not available.

2007-03-01  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/glue/block.c (free_buffer): Use `VM_PAGE_FREE'.
	* vm/vm_object.c (vm_object_collapse, vm_object_page_remove)
	(vm_object_page_map): Likewise.

2007-02-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/dev/glue/block.c (free_buffer): Fix
	vm_page_lock_queues/vm_page_unlock_queues pair.

	Fix ddb's trace command.
	* i386/i386/db_trace.c (db_find_trace_symbols): Drop _ prefix on ELF
	targets.
	(db_i386_stack_trace): Check that adresses of known functions were
	really found.

2007-02-19  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.am (gnumach_LINKFLAGS): New variable.
	(gnumach_LINK): Use that one instead of the previously used
	`LINKFLAGS_gnumach'.
	* i386/Makefrag.am (LINKFLAGS_gnumach): Rename to `gnumach_LINKFLAGS',
	move into [PLATFORM_at] and pass `_START'.
	* i386/ldscript: Don't hardcode a _start address of 0x100000, but make
	it configurable via `_START'.

	Add a `--enable-platform' option for future use.  Allow building
	without any Linux code.
	* Makefile.am: Don't include `linux/Makefrag.am' in there...
	* Makefrag.am: ... but rather in here.
	* configfrag.ac (MACH_MACHINE_ROUTINES): AC_DEFINE_UNQUOTED based on
	then shell variable `mach_machine_routines'.
	(--disable-default-device-drivers): Don't define in there...
	* configure.ac: ... but rather in here.
	(--enable-platform): New option.
	(host_platform): New variable.
	(HOST_i386): Don't define there...
	* i386/configfrag.ac (HOST_ix86): ... but rather here, rename it and
	adapt all users.
	(PLATFORM_at): New conditional.
	(MACH_MACHINE_ROUTINES): Don't AC_DEFINE, but rather set a shell
	variable `mach_machine_routines'.
	* linux/Makefrag.am (noinst_LIBRARIES, gnumach_o_LDADD): Only enhance
	``if CODE_linux'' or ``if device_driver_group_pcmcia''.
	* linux/configfrag.ac (AC_OPTION): Rename to `AC_OPTION_Linux_ix86_at'
	and rework a bit.  Adapt all users.
	(AC_OPTION_nodef): Rename to `AC_OPTION_Linux_ix86_at_nodef' and rework
	a bit.  Adapt all users.
	(CODE_linux): New conditional.
	* i386/Makefrag.am (LINKFLAGS_gnumach): Don't evaluate $(systype).

	* Makefile.am: Update the FSF's postal address.
	* doc/Makefrag.am: Likewise.
	* i386/linux/Makefrag.am: Likewise.
	* linux/Makefrag.am: Likewise.
	* tests/Makefrag.am: Likewise.
	* tests/configfrag.ac: Move to GPL.

2007-02-05  Thomas Schwinge  <tschwinge@gnu.org>

	* kern/mach_clock.c: Don't include <kern/time_out.h>.

	* i386/i386/hardclock.c: Include <kern/mach_clock.h> instead of
	<kern/time_out.h>.
	* i386/i386/pit.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/i386at/rtc.c: Likewise.
	* kern/ipc_sched.c: Likewise.
	* kern/mach_factor.c: Likewise.
	* kern/priority.c: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/startup.c: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/thread.h: Likewise.
	* kern/zalloc.c: Likewise.

	* kern/host.c: Include <kern/mach_clock.h>.
	(tick): Remove declaration.
	* kern/pc_sample.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/sched_prim.c (hz): Remove declaration.
	* kern/syscall_subr.c (hz): Likewise.
	* linux/dev/init/main.c (hz): Likewise.

	* kern/time_out.h: Remove file after having installed the missing bits
	in...
	* kern/mach_clock.h: ... here.

	* configfrag.ac: Enhance comments.

	* vm/vm_debug.c (MACH_VM_DEBUG): Correctly place conditional.

2007-02-04  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/mach.texi (thread_switch): Enhance a bit.

	* doc/Makefrag.am ($(web)): Use ``mkdir -p''.

	* doc/mach.texi: Fix unusual hyphens.

	* i386/i386/hardclock.c: Don't check for the `SYMMETRY' platform.

	* kern/timer.h: Add some comments from...
	* i386/i386/timer.h: ... here and remove this file.

2007-01-26  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/mach.texi: Fix the last change.

2007-01-22  Thomas Schwinge  <tschwinge@gnu.org>

	* COPYING: Update via GNU automake 1.10.
	* doc/fdl.texi: Update from <http://www.gnu.org/licenses/fdl.texi>.
	* doc/gpl.texi: Update from <http://www.gnu.org/licenses/gpl.texi>.
	* doc/mach.texi: Use the GFDL 1.2.

2007-01-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/mach.texi: Many typos fixed.

2007-01-11  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT (LAYOUT OF THE SOURCE TREE): New section.

	These following files are regenerated by running ``autoreconf -i'' and
	``make info''.
	* INSTALL: Remove file.
	* Makefile.in: Likewise.
	* aclocal.m4: Likewise.
	* build-aux/compile: Likewise.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/depcomp: Likewise.
	* build-aux/install-sh: Likewise.
	* build-aux/mdate-sh: Likewise.
	* build-aux/missing: Likewise.
	* build-aux/texinfo.tex: Likewise.
	* config.h.in: Likewise.
	* configure: Likewise.
	* doc/mach.info: Likewise.
	* doc/mach.info-1: Likewise.
	* doc/mach.info-2: Likewise.
	* doc/stamp-vti: Likewise.
	* doc/version.texi: Likewise.

2007-01-06  Thomas Schwinge  <tschwinge@gnu.org>

	* ddb/db_break.c (db_delete_thread_breakpoint): Don't declare
	`db_cond_free'.
	* ddb/db_run.c: Include <ddb/db_cond.h>.
	(db_stop_at_pc): Don't declare `db_cond_check'.
	* ddb/db_input.c: Include <ddb/db_input.h>.
	* ddb/db_macro.c: Include <ddb/db_macro.h>.
	* ddb/db_trap.c: Include <ddb/db_trap.h>.
	* i386/i386/db_interface.h: Include <machine/thread.h>.
	* i386/i386/db_interface.c: Include <machine/db_interface.h>.
	* i386/i386/db_machdep.h: Include <machine/db_interface.h>.
	(db_check_access, db_phys_eq, db_task_name): Remove declarations.

2007-01-06  Barry deFreese  <bddebian@comcast.net>

	* ddb/db_aout.c: Include <ddb/db_output.h>.
	* ddb/db_break.c: Include <ddb/db_cond.h>, <ddb/db_expr.h> and
	<ddb/db_output.h>.
	(db_delete_cmd, db_breakpoint_cmd): Explicitly define untyped variables
	as `int'.
	* ddb/db_command.c: Include <ddb/db_examine.h>, <ddb/db_expr.h> and
	<ddb/db_macro.h>.
	* ddb/db_command.h (db_exec_cmd_nest): New declaration.
	* ddb/db_cond.c: Include <ddb/db_cond.h>, <ddb/db_expr.h> and
	<ddb/db_output.h>.
	(db_cond_cmd): Explicitly define untyped variable as `int'.
	* ddb/db_cond.h: New file.
	* ddb/db_examine.c: Include <machine/db_interface.h>,
	<ddb/db_examine.h> and <ddb/db_expr.h>.
	(db_strcpy, db_examine): Remove forward declarations.
	(db_xcdump): Explicitly define untyped variables as `int'.
	* ddb/db_examine.h: New file.
	* ddb/db_expr.c: Include <ddb/db_expr.h>, <ddb/db_output.h>,
	<ddb/db_sym.h> and <ddb/db_variables.h>.
	* ddb/db_input.c: Include <ddb/db_command.h>.
	* ddb/db_input.h: New file.
	* ddb/db_lex.c: Include <ddb/db_command.h>, <ddb/db_examine.h>,
	<ddb/db_input.h> and <ddb/db_output.h>.
	(db_skip_to_eol, db_lex): Explicitly define untyped variables as `int'.
	* ddb/db_lex.h (db_lex): New declaration.
	* ddb/db_macro.c: Include <ddb/db_examine.h>, <ddb/db_expr.h> and
	<ddb/db_output.h>.
	(db_def_macro_cmd, db_exec_macro): Explicitly define untyped variables
	as `int'.
	* ddb/db_macro.h: New file.
	* ddb/db_output.c: Include <ddb/db_command.h>.
	* ddb/db_output.h (db_putchar): New declaration.
	* ddb/db_print.c: Include <machine/db_interface.h>, <ddb/db_command.h>
	and <ddb/db_output.h>.
	(db_show_regs): Explicitly define untyped variables as `int'.
	* ddb/db_run.c: Include <ddb/db_command.h>, <ddb/db_examine.h>,
	<ddb/db_output.h> and <ddb/db_watch.h>.
	* ddb/db_run.h: Include <kern/task.h> and <machine/db_machdep.h>.
	(db_single_step, db_single_step_cmd, db_in_single_step): New
	declarations.
	* ddb/db_sym.c: Include <ddb/db_command.h> and <ddb/db_output.h>.
	(db_sym_parse_and_lookup): Explicitly define untyped variables as
	`int'.
	* ddb/db_sym.h (db_line_at_pc): New declaration.
	* ddb/db_task_thread.c: Include <ddb/db_command.h>, <ddb/db_expr.h>,
	<ddb/db_lex.h> and <ddb/db_output.h>.
	(db_lookup_task, db_lookup_task_thread, db_lookup_thread)
	(db_lookup_task_id, db_lookup_thread_id): Explicitly define untyped
	variables as `int'.
	* ddb/db_trap.c: Include <ddb/db_examine.h> and <ddb/db_output.h>.
	* ddb/db_trap.h: New file.
	* ddb/db_variables.c: Include <ddb/db_command.h>, <ddb/db_examine.h>,
	<ddb/db_expr.h> and <ddb/db_output.h>.
	(db_get_suffix, db_cmp_variable_name): Explicitly define untyped
	variables as `int'.
	* ddb/db_variables.h (db_get_variable): New declaration.
	* ddb/db_watch.c: Include <ddb/db_command.h>, <ddb/db_expr.h>,
	<ddb/db_output.h> and <ddb/db_run.h>.
	* ddb/db_write_cmd.c: Include <ddb/db_expr.h> and <ddb/db_output.h>.
	* i386/i386/db_interface.c: Include <kern/printf.h>, <ddb/db_access.h>,
	<ddb/db_command.h>, <ddb/db_output.h>, <ddb/db_run.h> and
	<ddb/db_trap.h>.
	(kdbprinttrap): Add `void' return type.
	(db_user_to_kernel_address, db_task_name): Explicitly define untyped
	variables as `int'.
	* i386/i386/db_interface.h: New file.
	* i386/i386/db_trace.c (db_i386_reg_value): Add `int' return type.
	* i386/i386/trap.c [MACH_KDB]: Include <ddb/db_run.h> and
	<ddb/db_watch.h>.
	* ipc/ipc_kmsg.c [MACH_KDB]: Include <ddb/db_output.h>.
	* kern/lock.c [MACH_KDB]: Include <ddb/db_output.h>.

2007-01-06  Thomas Schwinge  <tschwinge@gnu.org>

	* configure.ac (AM_INIT_AUTOMAKE): Add ``-Wall -Wno-portability''.

2007-01-05  Richard Braun  <syn@hurdfr.org>

	Add alignment support in the zone allocator.
	* kern/zalloc.c (ALIGN_SIZE_UP): New macro.
	(zinit): New `align' parameter.
	(zget_space): Likewise.
	(zalloc): Updated call to zget_space() with the zone alignment.
	* kern/zalloc.h (zone): New member `align'.
	(zinit): Declaration updated as required.
	* device/dev_lookup.c (dev_lookup_init): Updated call to zinit() with
	alignment of 0.
	* device/dev_pager.c (dev_pager_hash_init): Likewise.
	(device_pager_init): Likewise.
	* device/ds_routines.c (ds_init): Likewise.
	(ds_trap_init): Likewise.
	* device/net_io.c (net_io_init): Likewise.
	* i386/i386/fpu.c (fpu_module_init): Likewise.
	* i386/i386/pcb.c (pcb_module_init): Likewise.
	* i386/intel/pmap.c (pmap_init): Likewise.
	* ipc/ipc_init.c (ipc_bootstrap): Likewise.
	* ipc/ipc_marequest.c (ipc_marequest_init): Likewise.
	* kern/act.c (global_act_init): Likewise.
	* kern/kalloc.c (kalloc_init): Likewise.
	* kern/processor.c (pset_sys_init): Likewise.
	* kern/task.c (task_init): Likewise.
	* kern/thread.c (thread_init): Likewise.
	* kern/zalloc.c (zone_bootstrap): Likewise.
	* vm/vm_external.c (vm_external_module_initialize): Likewise.
	* vm/vm_fault.c (vm_fault_init): Likewise.
	* vm/vm_map.c (vm_map_init): Likewise.
	* vm/vm_object.c (vm_object_bootstrap): Likewise.
	* vm/vm_resident.c (vm_page_module_init): Likewise.

2007-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix translation of port into device in the "no sender" notification.
	* i386/i386at/i386at_ds_routines.c (ds_notify): Use dev_port_lookup()
	for translating the remote port.

	Fix loop indexing.
	* i386/intel/pmap.c (pmap_change_wiring): Increment pte in the
	unwiring loop.

	Drop old and broken support for Olivetti XP7 & XP9
	* i386/intel/pmap.c [ORC] (OLIVETTICACHE): Remove macro.
	[OLIVETTICACHE] (pstart): Remove declaration.
	(CACHE_LINE, CACHE_SIZE, CACHE_PAGE, WRITE_PTE, WRITE_PTE_FAST): Remove
	macros.
	[OLIVETTICACHE] (write_pte): Remove function.
	* DEVELOPMENT: Document the removal.

2006-12-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Add support for global pages.
	* i386/i386at/model_dep.c: Include <i386/locore.h>.
	(i386at_init): Set CR4_PGE if available.
	(c_boot_entry): Call discover_x86_cpu_type() before i386at_init().
	* i386/intel/pmap.c: Include <i386/locore.h>.
	(pmap_map_bd): Use INTEL_PTE_GLOBAL if available.
	(pmap_bootstrap): Likewise.

	Add support for cr3/cr4 flags.
	* i386/i386/proc_reg.h (CR3_PCD, CR3_PWT, CR4_VME, CR4_PVI, CR4_TSD)
	(CR4_DE, CR4_PSE, CR4_PAE, CR4_MCE, CR4_PGE, CR4_PCE, CR4_OSFXSR)
	(CR4_OSXMMEXCPT, get_cr4, set_cr4): New macros.
	* i386/intel/pmap.h (INTEL_PTE_GLOBAL): New macro.

	Add support for querying x86 features.
	* i386/i386/locore.h (cpu_features): New variable declaration.
	(CPU_FEATURE_FPU, CPU_FEATURE_VME, CPU_FEATURE_DE, CPU_FEATURE_PSE)
	(CPU_FEATURE_TSC, CPU_FEATURE_MSR, CPU_FEATURE_PAE, CPU_FEATURE_MCE)
	(CPU_FEATURE_CX8, CPU_FEATURE_APIC, CPU_FEATURE_SEP, CPU_FEATURE_MTRR)
	(CPU_FEATURE_PGE, CPU_FEATURE_MCA, CPU_FEATURE_CMOV, CPU_FEATURE_PAT)
	(CPU_FEATURE_PSE_36, CPU_FEATURE_PSN, CPU_FEATURE_CFLSH)
	(CPU_FEATURE_DS, CPU_FEATURE_ACPI, CPU_FEATURE_MMX, CPU_FEATURE_FXSR)
	(CPU_FEATURE_SSE, CPU_FEATURE_SSE2, CPU_FEATURE_SS, CPU_FEATURE_HTT)
	(CPU_FEATURE_TM, CPU_FEATURE_PBE, CPU_HAS_FEATURE): New macros.
	* i386/i386/locore.S (cpu_features): New variable.
	(discover_x86_cpu_type): Record CPUID feature word 0.

2006-12-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Drop useless and broken FPE support.
	* i386/configfrac.ac (FPE): Don't define.
	* i386/i386/gdt.h (FPE_CS, USER_FPREGS): Remove macros.
	* i386/i386/fpu.c (init_fpu, fpu_set_state, fpu_get_state): Remove FPE
	support.
	* i386/i386/fpu.h: Likewise.
	* i386/i386/trap.c (user_trap, i386_exception): Likewise.
	* i386/i386/fpe_linkage.c: Remove file.
	* i386/Makefrag.am: Remove i386/i386/fpe_linkage.c.
	* Makefile.in: Regenerate.

2006-12-03  Thomas Schwinge  <tschwinge@gnu.org>

	[patch #5019 -- Remove checks for continuations]

	* DEVELOPMENT: Document the removal.

	* i386/configfrag.ac (CONTINUATIONS): Don't define.

2006-12-03  Leonardo Lopes Pereira  <leonardolopespereira@gmail.com>

	[patch #5019 -- Remove checks for continuations]
	* ipc/mach_msg.c: Adapt all users of CONTINUATIONS as if it were always
	defined.
	* kern/eventcount.c: Likewise.
	* kern/ipc_sched.c: Likewise.
	* kern/syscall_subr.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_pageout.c: Likewise.
	* vm/vm_resident.c: Likewise.

2006-12-03  Thomas Schwinge  <tschwinge@gnu.org>

	[patch #5017 -- Remove obsolete IPC interfaces]

	* DEVELOPMENT: Document the removal.

	* configfrag.ac (MACH_IPC_COMPAT): Don't define.

2006-12-03  Leonardo Lopes Pereira  <leonardolopespereira@gmail.com>

	[patch #5017 -- Remove obsolete IPC interfaces]
	* kern/act.c [MIGRATING_THREADS]: Don't include <mach_ipc_compat.h>.
	* kern/act.h: Likewise.
	* i386/include/mach/i386/machine_types.defs: Adapt all users of
	MACH_IPC_COMPAT as if it were always defined to `0'.
	* include/mach/mach.defs: Likewise.
	* include/mach/mach_param.h: Likewise.
	* include/mach/mach_traps.h: Likewise.
	* include/mach/message.h: Likewise.
	* include/mach/mig_errors.h: Likewise.
	* include/mach/notify.h: Likewise.
	* include/mach/port.h: Likewise.
	* include/mach/std_types.defs: Likewise.
	* include/mach/syscall_sw.h: Likewise.
	* include/mach/task_special_ports.h: Likewise.
	* include/mach/thread_special_ports.h: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_notify.h: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_right.c: Likewise.
	* ipc/ipc_right.h: Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/mach_debug.c: Likewise.
	* ipc/mach_msg.c: Likewise
	* ipc/mach_msg.h: Likewise.
	* ipc/mach_port.c: Likewise.
	* kern/act.c: Likewise.
	* kern/act.h: Likewise.
	* kern/ipc_host.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/syscall_sw.c: Likewise.
	* kern/thread.h: Likewise.

2006-12-03  Thomas Schwinge  <tschwinge@gnu.org>

	[bug #17120 -- GNU Mach debian dir]
	* debian/README.Debian: Remove file.
	* debian/changelog: Likewise.
	* debian/control: Likewise.
	* debian/copyright: Likewise.
	* debian/postinst: Likewise.
	* debian/prerm: Likewise.
	* debian/rules: Likewise.

	[bug #18015 -- GNU Mach: `make dist' and friends]
	* Makefile.am (DISTCLEANFILES): New variable.

2006-11-30  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in: Regenerate.
	* configure: Likewise.

2006-11-30  Barry deFreese  <bddebian@comcast.net>
	    Thomas Schwinge  <tschwinge@gnu.org>

	[bug #18015 -- GNU Mach: `make dist' and friends]
	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
	(EXTRA_DIST): Enhance with the patches and documentation files.
	(dist-hook): New target to remove the `CVS' directories.
	* Makefrag.am (libkernel_a_SOURCES, EXTRA_DIST): Add header and `mig'
	input files.
	(DISTCHECK_CONFIGURE_FLAGS): Enable the kernel debugger.
	* i386/Makefrag.am: Likewise.  Also add `i386/i386/i386asm.sym',
	`i386/ldscript' and `i386/README-Drivers'.
	* i386/linux/Makefrag.am (liblinux_a_SOURCES): Add the header files
	from `i386/linux/'.
	* linux/Makefrag.am (liblinux_a_SOURCES, EXTRA_DIST)
	(liblinux_pcmcia_cs_modules_a_SOURCES)
	(liblinux_pcmcia_cs_clients_a_SOURCES)
	(liblinux_pcmcia_cs_wireless_a_SOURCES): Add header and other included
	files.
	(dist-hook): Depend on `dist-hook-linux'.
	(dist-hook-linux): New phony target to remove the `asm' symbolic links.
	* Makerules.am (EXTRA_DIST): Add `gensym.awk'.
	* doc/Makefrag.am (EXTRA_DIST): Add `$(mach_TEXINFOS)'.
	* configure.ac (AC_CONFIG_LINKS): Move instantiation to...
	* configfrag.ac: ... here and change quotation.
	* linux/configfrag.ac (AC_CONFIG_LINKS): Change quotation.

2006-11-29  Thomas Schwinge  <tschwinge@gnu.org>

	* configure: Regenerate.
	* Makefile.in: Likewise.

	* configure.ac (disable_smashing_stack_protector): New conditional, set
	depending on the compiler accepting `-fstack-protector' or not.
	* Makefile.am (CFLAGS): Add `-fno-stack-protector' if
	`disable_smashing_stack_protector' is set.

2006-11-28  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/Makefrag.am ($(srcdir)/doc/version.texi): Oppress a potential
	error message from grep.

2006-11-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[bug #17346 -- GNU mach can't handle 4GB memory]
	* i386/i386at/model_dep.c (mem_size_init): Truncate memory size to
	4GiB.

2006-11-21  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/Makefrag.am (doc/web, html-local, ps-local, pdf-local)
	($(srcdir)/doc/version.texi): New targets to faciliate keeping the web
	pages of the GNU Mach Reference Manual updated.

2006-11-20  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[patch #5328 -- GNU Mach asm statements tidy]
	* i386/i386/fpe_linkage.c (disable_fpe): Gather dependent asm
	statements, add `ax' clobber.
	(fpe_exception_fixup): Drop bogus cast from input parameter of lcall
	asm statement.
	* i386/i386/pio.h (inw, outw): Drop 0x66 prefix an just use the w
	instruction variant.
	* i386/i386/proc_reg.h: (get_eflags, get_tr, get_ldt): Drop
	useless "volatile" from asm statement.
	(get_esp): Use direct asm register specification.
	* i386/include/mach/i386/cthreads.h (cthread_sp): Likewise.
	* i386/intel/pmap.c (pmap_unmap_page_zero): Fix asm clobber into `eax'.

	[patch #5375 -- Fix de4x5 probe]
	* linux/src/drivers/net/de4x5.c (pci_probe): Make probe loop stop on
	any error, not only device not found.

2006-11-17  Constantine Kousoulos  <wuwei@freemail.gr>
	    Thomas Schwinge  <tschwinge@gnu.org>

	[bug #18010 -- GNU Mach: update i386/README-Drivers and doc/mach.texi]
	* i386/README-Drivers: Move most of the text into...
	* doc/mach.texi: ... here and update a number of things.
	(UPDATED): Don't override.

2006-11-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386at/iopl.c (ioplmmap): Add `int' return type.
	* i386/i386at/model_dep.c (halt_all_cpus): Fix typo in declaration.
	* kern/assert.h (Assert): Add __attribute__ ((noreturn)) to
	declaration.
	* kern/debug.c (Debugger): Add __attribute__ ((noreturn)) to
	declaration.
	(Debugger): Add call to panic().
	* kern/debug.h (panic): Add __attribute__ ((noreturn)) to declaration.
	* util/putchar.c (putchar): Return printed char.

2006-11-13  Barry deFreese  <bddebian@comcast.net>

	* device/chario.c (tty_cts): Add `void' return type.
	* device/cons.c (cninit, cnputc): Add `void' return type.
	(cngetc, cnmaygetc): Add `int' return type.
	* device/net_io.c (net_del_q_info, net_free_dead_infp)
	(net_free_dead_entp): Add `void' return type.
	* i386/i386/fpu.c (fpnoextflt, fpextovrflt, fpexterrflt, fp_save)
	(fp_load, fpintr): Add `void' return type.
	* i386/i386/ktss.c (ktss_init): Add `int' type to `exception_stack'.
	* i386/i386/loose_ends.c (delay): Add `void' return type.
	* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys)
	(copy_from_phys): Add `void' return type.
	* i386/i386/pic.c (picinit, form_pic_mask, intnull, prtnull): Add
	`void' return type.
	* i386/i386/pit.c (clkstart): Add `void' return type.
	* i386/i386at/com.c (comparm, comtimer, fix_modem_state)
	(commodem_intr): Add `void' return type.
	(comintr, commctl, comstop): Add `int' return type.
	* i386/i386at/iopl.c (ioplclose): Add `int' return type.
	* i386/i386at/kd.c (kd_io_map_openn, kd_io_map_close, feep, pause)
	(kd_debug_put, cnpollc, kdclose, kd_handle_ack, kd_resend, kdinit)
	(kd_belloff, kd_bellon, kd_putc, kd_setpos, kd_scrollup, kd_scrolldn)
	(kd_parseesc, kd_parserest, kd_tab, kd_cls, kd_home, kd_up, kd_down)
	(kd_right, kd_left, kd_cr, kd_cltobcur, kd_cltopcurn, kd_cltoecur)
	(kd_clfrbcur, kd_delln, kd_insln, kd_delch, kd_erase, kd_eraseln)
	(kd_insch, kd_senddata, kd_sendcmd, kd_cmdreg_write, kd_mouse_drain)
	(set_kd_state, kd_setleds1, kd_setleds2, cnsetleds, kdreboot): Add
	`void' return type.
	(kdopen, kdread, kdwrite, kdportdeath, kdsetbell, kdgetkbent, kdintr)
	(do_modifier, kdstate2idx, kdstart, kdstop, kd_kbd_magic): Add `int'
	return type.
	(kd_isupper, kd_islower): Add `boolean_t' return type.
	(kd_cmdreg_read): Add `unsigned char' return type.
	* i386/i386at/kd_event.c (kbdinit, kbdclose, kdb_in_out, X_kdb_enter)
	(X_kdb_exit, X_kdb_enter_init, X_kdb_exit_init): Add `void' return
	type.
	(kbdopen, kbdioctl, kbdselect, kbdread): Add `int' return type.
	* i386/i386at/kd_mouse.c (init_mouse_hw, serial_mouse_open)
	(kd_mouse_open, mouseclose, serial_mouse_close, kd_mouse_close)
	(mouse_handle_byte, mouse_packet_mouse_system_mouse)
	(mouse_packet_microsoft_mouse, ibm_ps2_mouse_open)
	(ibm_ps2_mouse_close, mouse_packet_ibm_ps2_mouse, mouse_moved)
	(mouse_button): Add `void' return type.
	(mouseopen, mouseioctl, mouseselect, mouseread, mouseintr): Add `int'
	return type.
	* i386/i386at/lpr.c (lprclose, lprpr_addr): Add `void' return type.
	(lprprobe, lpropen, lprread, lprwrite, lprportdeath, lprstop, lprpr):
	Add `int' return type.
	* i386/i386at/model_dep.c (i386at_init, startrtclock): Add `void'
	return type.
	(timemmap): Add `int' return type.
	* i386/i386at/rtc.c (rtcinit, rtcput): Add `void' return type.
	(yeartoday, hexdectodec, readtodc, writetodc): Add `int' return type.
	* i386/intel/pmap.c (pmap_pageable): Add `void' return type.
	* kern/eventcount.c (simpler_thread_setrun): Add `int' type to
	`whichrq' variable.

2006-11-13  Barry deFreese  <bddebian@comcast.net>

	* i386/i386/locore.h: New file.
	* i386/i386/pcb.h: New file.
	* i386/i386/pcb.c: Include `pcb.h'.
	* i386/i386/pit.c (clkstart): Fix type of s into unsigned long.
	* i386/i386/spl.h (spl0, splsched, splx, splsoftclock, splon, sploff)
	(splhigh, splimp, spltty, splclock, setsoftclock): Add prototype.
	* i386/i386at/kd_event.h: New file.
	* i386/i386at/kd_event.c: Include `kd_event.h'.
	* i386/i386at/kd_mouse.h: New file.
	* i386/i386at/kd_mouse.c: Include `kd_mouse.h'.
	(mouseclose): Fix call of `serial_mouse_close' function.
	* i386/i386at/kd.c: Include `kd_event.h' and `kd_mouse.h'.
	* i386/i386at/kd.h (splx, spltty): Remove prototypes.h
	* i386/i386at/lpr.c: Likewise.
	* ipc/mach_msg.c: Include `machine/locore.h' and `machine/pcb.h'.
	* kern/mach_clock.h: New file.
	* kern/mach_clock.c: Include `kern/queue.h', `kern/timer.h' and
	`mach_clock.h'.
	* kern/mach_factor.h: New file.
	* kern/mach_factor.c: Include `mach_factor.h'.
	* kern/sched_prim.c: Include `kern/mach_factor.h'.
	* kern/thread.c: Include `machine/pcb.h'.

2006-11-11  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.am (gnumach-undef-bad): Depend on the Makefile.

2006-11-11  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	Fix I/O port type.
	* i386/i386/pic.c (master_icq, master_ocw, slaves_icq, slaves_ocw):
	Change variables type from char * to unsigned short.
	(picinit): Remove now-useless cast.
	* i386/i386at/kd_mouse.c (init_mouse_hw, serial_mouse_close)
	(mouseintr): Change variable type from caddr_t to unsigned short,
	remove now-useless cast.

	[task #5726 -- GCC built-in functions]
	* kern/machine.c: Include `string.h'.

	Fix ``assignment used as truth value'' warnings.
	* device/cons.c (cninit): Add parenthesis.
	* kern/bootstrap.c (copy_bootstrap): Likewise.
	* kern/printf.c (_doprnt): Likewise.
	* vm/vm_map.c (vm_map_lookup): Likewise.

	Fix a bunch of ``unused variable'' warnings.
	* device/ds_routines.c (ds_device_open): Remove unused `namebuf'
	variable.
	* device/kmsg.c (kmsgread): Remove unused `err' variable.
	* device/net_io.c (net_set_filter): Remove unused `j' variable.
	* i386/i386/pcb.c (curr_gdt, curr_ktss): Artificially use parameter of
	macro.
	* i386/i386/pic.c (picinit): Remove unused `i' variable.
	* i386/i386/pit.c (clkstart): Remove unused `flags' variable.
	* i386/i386/trap.c (kernel_trap): Remove unused `exc' variable.
	(user_trap): Remove unused `map' and `result' variables.
	(v86_assist): Remove unused `size' variable.
	* i386/i386at/i386at_ds_routines.c (ds_device_open): Remove unused
	`dev' variable.
	* i386/i386at/kd.c (kdintr): Remove unused `o_pri' variable.
	(kdcngetc): Remove unused `i' variable.
	* i386/i386at/kd_event.c (kbdgetstat, kbdsetstat): Remove unused
	`result' variable.
	* i386/i386at/kd_mouse.c (mousegetstat): Likewise.
	* i386/i386at/lpr.c (lprattach): Remove unused `tp' variable.
	(lprsetstat): Remove unused `dev_addr' and `s' variables.
	* i386/intel/pmap.c (pmap_bootstrap): Remove unused `pteva' variable.
	(SPLVM, SPLX): Artificially use parameter of macro.
	* ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Remove unused `mr' variable.
	* kern/bootstrap.c (boot_script_exec_cmd): Remove unused
	`boot_exec_info' and `user_map' variables.
	* vm/vm_kern.c (projected_buffer_map): Remove unused `object'
	variable.

2006-11-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* kern/sched_prim.h (thread_syscall_return): Replace old `volatile'
	function qualifier with __attribute__((__noreturn__)).

2006-11-09  Barry deFreese  <bddebian@comcast.net>

	[task #5726 -- GCC built-in functions]
	* include/printf.h: Move file...
	* kern/printf.h: ... here.
	* kern/debug.h (panic_init, panic): Add prototypes.
	* chips/busses.c: Don't include `printf.h', include `kern/printf.h'
	and `kern/debug.h' for panic().
	* ddb/db_command.c: Likewise.
	* ddb/db_cond.c: Likewise.
	* ddb/db_output.c: Likewise.
	* device/cirbuf.c: Likewise.
	* device/cons.c: Likewise.
	* device/dev_name.c: Likewise.
	* device/dev_pager.c: Likewise.
	* device/device_init.c: Likewise.
	* device/dk_label.c: Likewise.
	* device/ds_routines.c: Likewise.
	* device/net_io.c: Likewise.
	* device/subrs.c: Likewise.
	* i386/i386/debug_i386.c: Likewise.
	* i386/i386/fpe_linkage.c: Likewise.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/io_map.c: Likewise.
	* i386/i386/kttd_interface.c: Likewise.
	* i386/i386/mp_desc.c: Likewise.
	* i386/i386/pcb.c: Likewise.
	* i386/i386/pic.c: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386at/autoconf.c: Likewise.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/i386at_ds_routines.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/kd_event.c: Likewise.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/lpr.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* ipc/ipc_entry.c: Likewise.
	* ipc/ipc_hash.c: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_mqueue.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_pset.c: Likewise.
	* ipc/ipc_right.c: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_port.c: Likewise.
	* ipc/mach_rpc.c: Likewise.
	* kern/act.c: Likewise.
	* kern/ast.c: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/debug.c: Likewise.
	* kern/eventcount.c: Likewise.
	* kern/exception.c: Likewise.
	* kern/host.c: Likewise.
	* kern/ipc_host.c: Likewise.
	* kern/ipc_kobject.c: Likewise.
	* kern/ipc_mig.c: Likewise.
	* kern/ipc_sched.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/kalloc.c: Likewise.
	* kern/lock.c: Likewise.
	* kern/mach_clock.c: Likewise.
	* kern/machine.c: Likewise.
	* kern/pc_sample.c: Likewise.
	* kern/printf.c: Likewise.
	* kern/processor.c: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/server_loop.ch: Likewise.
	* kern/startup.c: Likewise.
	* kern/task.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/thread_swap.c: Likewise.
	* kern/xpr.c: Likewise.
	* kern/zalloc.c: Likewise.
	* vm/memory_object.c: Likewise.
	* vm/vm_debug.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_kern.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_object.h: Likewise.
	* vm/vm_pageout.c: Likewise.
	* vm/vm_resident.c: Likewise.

2006-11-08  Thomas Schwinge  <tschwinge@gnu.org>

	* aclocal.m4: Regenerate using GNU Autoconf 2.60 and GNU Automake 1.10.
	* INSTALL: Likewise.
	* Makefile.in: Likewise.
	* configure: Likewise.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/depcomp: Likewise.
	* build-aux/install-sh: Likewise.
	* build-aux/missing: Likewise.
	* build-aux/texinfo.tex: Likewise.

	* Makefrag.am (gnumach.msgids): Remove temporary files.

2006-11-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[task #5726 -- GCC built-in functions]
	* include/printf.h (iprintf): Fix prototype.
	(vprintf): Add prototype.
	* kern/printf.c: Include `printf.h'.
	(vprintf, printf): Fix prototype and return a dumb value.
	* kern/startup.c: Include `printf.h'.

2006-11-07  Barry deFreese  <bddebian@comcast.net>

	[task #5726 -- GCC built-in functions]
	* include/printf.h: New file.
	(printf_init, _doprnt, printnum, sprintf, printf, indent, iprint): New
	declarations.
	* include/string.h (strchr, strcmp, strcpy, strlen, strncmp, strncpy)
	(strrchr, strsep): New extern declarations.
	* kern/strings.c: Don't include `kern/strings.h', include `string.h'.
	(strncmp, strncpy, strlen): Fix prototypes into using size_t.
	* kern/strings.h: Removed file.
	* kern/debug.c: Include `printf.h'.
	(do_cnputc): New function.
	(panic, log): Use do_cnputc instead of cnputc.
	* chips/busses.c: Don't include `kern/strings.h', include `printf.h' and
	`string.h'.
	(_doprnt): Remove extern declaration.
	(indent): Remove extern declaration.
	* ddb/db_aout.c: Likewise.
	* ddb/db_command.c: Likewise.
	* ddb/db_lex.c: Likewise.
	* ddb/db_macro.c: Likewise.
	* ddb/db_output.c: Likewise.
	* ddb/db_print.c: Likewise.
	* ddb/db_sym.c: Likewise.
	* device/dev_name.c: Likewise.
	* device/dev_pager.c: Likewise.
	* device/dk_label.c: Likewise.
	* device/ds_routines.c: Likewise.
	* device/net_io.c: Likewise.
	* device/subrs.c: Likewise.
	* i386/i386/db_trace.c: Likewise.
	* i386/i386/debug_i386.c: Likewise.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/io_map.c: Likewise.
	* i386/i386/kttd_interface.c: Likewise.
	* i386/i386/pic.c: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386at/autoconf.c: Likewise.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/i386at_ds_routines.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/kd_event.c: Likewise.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/lpr.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* ipc/ipc_entry.c: Likewise.
	* ipc/ipc_hash.c: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_pset.c: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_port.c: Likewise.
	* ipc/mach_rpc.c: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/eventcount.c: Likewise.
	* kern/ipc_kobject.c: Likewise.
	* kern/pc_sample.c: Likewise.
	* kern/printf.c: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/zalloc.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_resident.c: Likewise.

2006-11-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* include/string.h: Fix copyright assignment to FSF, keep author's
	name.

2006-11-05  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/README: New file.

	* config.h.in: Regenerate.
	* configure: Likewise.

	[task #5956 -- Automake'ify GNU Mach's code base]
	* configure.ac <AM_INIT_AUTOMAKE>: Add `no-define' and `1.9'.

2006-11-05  Barry deFreese  <bddebian@comcast.net>

	[task #5878 -- Backport code from GNU Mach's trunk to
	gnumach-1-branch: i386_set_gdt, i386_get_gdt'']
	[sync from HEAD, 2002-10-03]
	* i386/include/mach/i386/mach_i386.defs (i386_set_gdt, i386_get_gdt):
	New routines.
	* i386/i386/user_ldt.c (i386_set_gdt, i386_get_gdt): New functions.
	* i386/i386/gdt.h (USER_GDT, USER_GDT_SLOTS): New macros.
	(GDTSZ): Compute it from USER_GDT and USER_GDT_SLOTS.
	* i386/i386/thread.h: Include `gdt.h'.
	(struct i386_machine_state): New member `user_gdt'.
	* i386/i386/pcb.c (switch_ktss): Copy those slots into the GDT.
	* linux/src/include/linux/head.h (idt,gdt): Remove extern declaration.

2006-11-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	FPU, CPU and IO stubs cleanup.
	* i386/i386/fpu.h (fstcw): New macro.
	* i386/i386/locore.S (_fninit, _fstcw, _fldcw, _fnstsw, _fnclex)
	(_clts, _fpsave, _fprestore, set_cr3, get_cr3, flush_tlb, get_cr2)
	(get_ldt, set_ldt, get_tr, set_tr, _setts, outb, inb, outw, inw, outl)
	(inl, loutb, loutw, linb, linw): Remove functions.
	* i386/i386/proc_reg.h (flush_tlb): New macro.
	* i386/i386/db_interface.c: Include `i386/proc_reg.h'.
	* i386/intel/pmap.c: Likewise.
	* i386/intel/pmap.h: Likewise.
	* i386/i386/fpu.c: Include `i386/pio.h'.
	* i386/i386/pic.c: Likewise.
	* i386/i386/pit.c: Likewise.
	* i386/i386at/iopl.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/kd_event.c: Likewise.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/rtc.c: Likewise.

2006-11-05  Barry deFreese  <bddebian@comcast.net>

	[task #5726 -- GCC built-in functions]
	* include/string.h: New file.
	* include/mach/mig_support.h: Include `string.h'.
	[MACH_KERNEL] (bcopy): Remove extern declaration.
	[MACH_KERNEL] (memcpy): Remove macro.
	* device/cirbuf.c: Include `string.h'.
	(q_to_b, b_to_q): Replace bcopy() with memcpy() and bzero() with
	memset(), clean memcpy() and memset() invocation.
	* device/cons.c (cnputc): Likewise.
	* device/dev_pager.c (device_pager_data_request_done): Likewise.
	* device/ds_routines.c (device_write_get, ds_read_done): Likewise.
	* device/kmsg.c: Likewise.
	* device/net_io.c (net_filter, net_set_filter, net_getstat): Likewise.
	* i386/i386/fpu.c (fpu_set_state, fpu_get_state, fp_load)
	(fp_state_alloc): Likewise.
	* i386/i386/iopb.c (io_tss_init, i386_io_port_list): Likewise.
	* i386/i386/mp_desc.c (mp_desc_init): Likewise.
	* i386/i386/pcb.c (pcb_init, thread_setstatus)
	(thread_getstatus): Likewise.
	* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys)
	(copy_from_phys): Likewise.
	* i386/i386/trap.c (v86_assist): Likewise.
	* i386/i386/user_ldt.c (i386_set_ldt, i386_get_ldt): Likewise.
	* i386/i386at/immc.c (immc_cnputc): Likewise.
	* i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Likewise.
	* i386/intel/pmap.c (pmap_init, pmap_page_table_page_alloc)
	(pmap_create): Likewise.
	* ipc/ipc_entry.c (ipc_entry_grow_table): Likewise.
	* ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel)
	(ipc_kmsg_put_to_kernel): Likewise.
	* ipc/ipc_object.c (ipc_object_alloc, ipc_object_alloc_name): Likewise.
	* ipc/ipc_port.c (ipc_port_dngrow): Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/mach_debug.c (mach_port_space_info)
	(mach_port_space_info): Likewise.
	* kern/act.c (act_create): Likewise.
	* kern/boot_script.c: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/eventcount.c (evc_init): Likewise.
	* kern/host.c (host_info, host_processor_sets): Likewise.
	* kern/lock.c (lock_init): Likewise.
	* kern/lock_mon.c (lock_info_clear): Likewise.
	* kern/mach_clock.c (mapable_time_init): Likewise.
	* kern/pc_sample.c (get_sampled_pcs): Likewise.
	* kern/processor.c (processor_set_things): Likewise.
	* kern/syscall_emulation.c (task_set_emulation_vector_internal)
	(task_get_emulation_vector, xxx_task_get_emulation_vector): Likewise.
	* kern/task.c (task_threads): Likewise.
	* kern/xpr.c (xprbootstrap): Likewise.
	* kern/zalloc.c (host_zone_info): Likewise.
	* vm/vm_debug.c (mach_vm_object_pages): Likewise.
	* vm/vm_kern.c (projected_buffer_allocate, copyinmap)
	(copyoutmap): Likewise.
	* vm/vm_object.c (vm_object_bootstrap): Likewise.
	* vm/vm_resident.c (vm_page_grab_contiguous_pages): Likewise.

2006-11-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* DEVELOPMENT: Document the following removals.

	Drop MB1/MB2/EXL architecture support.
	* i386/i386/pit.h (PITCTR0_PORT, PITCTR1_PORT, PITCTR2_PORT)
	(PITCTL_PORT, CLKNUM): Remove MB1/MB2/EXL cases.
	[EXL] (time_latch): Remove structure and type.
	[EXL] (intr_disable, intr_restore): Remove functions.

	Drop iPSC architecture support.
	* i386/i386/hardclock.c: Remove iPSC386 from #if.
	* i386/i386/locore.S: Remove iPSC386 delays.
	* i386/i386/pic.c: Remove iPSC386 support.
	(SLAVEMASK): Rmove iPSC386 case.
	* i386/i386/pic.h (ADDR_PIC_BASE, OFF_ICW, OFF_OCW, SIZE_PIC)
	(PICM_VECTBASE, PICS_VECTBASE): Remove iPSC386 cases.
	[iPSC386] (I_AM_A_SLAVE, I_AM_A_MASTR): Remove macros.
	* i386/i386/pit.h: Remove iPSC386 from #if.
	[iPSC386] (CLKNUM): Remove macro.
	* kern/machine.c (host_get_boot_info): Remove iPSC386 support.
	* vm/vm_map.h (VM_MAP_COPY_PAGE_LIST_MAX): Remove iPSC case.

	Drop i860 architecture support.
	* i386/i386/pmap.h: Remove i860 comment.
	* i386/intel/pmap.c: Remove i860 comments.
	[i860]: Don't include `i860ipsc/nodehw.h'.
	(INVALIDATE_TLB): Remove i860 case.
	(paging_enabled): Remove variable.
	(pmap_map): Remove setting INTEL_PTE_NCACHE.
	(pmap_bootstrap): Remove i860 support.
	(pmap_page_table_page_alloc): Remove setting INTEL_PTE_NCACHE.
	(pmap_enter): Remove call to flush function.
	(set_dirbase): Remove function.
	* i386/intel/pmap.h: Remove i860 comments.
	(INTEL_PGBYTES, INTEL_PGSHIFT, intel_btop, intel_ptob)
	(intel_round_page, intel_trunc_page, trunc_intel_to_vm)
	(round_intel_to_vm, vm_to_intel, INTEL_PTE_VALID, set_dirbase): Remove
	i860 cases.
	(INTEL_PTE_valid): Remove macro.
	* i386/intel/read_fault.c: Remove i860 comment.

	Drop PS2 architecture support.
	* i386/i386/fpu.c (fpintr): Remove PS2 from #if.
	* i386/i386/gdt.c [PS2] (abios_int_return, abios_th_return, intstack):
	Remove extern declarations.
	* i386/i386/gdt.h [PS2] (ABIOS_INT_RET, ABIOS_TH_RET, ABIOS_INT_SS)
	(ABIOS_TH_SS, ABIOS_FIRST_AVAIL_SEL): Remove macros.
	(GDTSZ): Remove PS2 case.
	* i386/i386/hardclock.c [PS2]: Don't include `i386/pic.h' and
	`i386/pio.h'.
	(hardclock): Remove PS2 prototype and code.
	* i386/i386/locore.S (RET_OFFSET): Remove PS2 stack layout.
	* i386/i386/pic.c (picinit): Remove #ifdef PS2.
	* i386/i386/pic.h: Remove PS2 from #if.
	* i386/i386/pit.c [PS2] (clock_int_handler): Remove extern declaration.
	Don't include `sys/types.h' and `i386ps2/abios.h'.
	(clock_request_block, clock_flags, cqbuf): Remove variables.
	(clkstart): Remove call to abios_clock_start function.
	(COUNT): Don't define.
	(abios_clock_start, ackrtclock): Remove functions.
	* i386/i386/pit.h: Remove PS2 from #if.

2006-10-26  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in: Regenerate.

	[task #5956 -- Automake'ify GNU Mach's code base]

	* Makefrag.am (gnumach.msgids): Remove repetition.
	* Makerules.am (%.server.msgids, %.user.msgids): Targets renamed from
	`%.msgids'.  Also consider MIGCOMSFLAGS respective MIGCOMUFLAGS.
	Thanks to Guillem Jover and Leonardo Lopes Pereira for reporting this.

	The Automake build system wants us to have these files in the rcs, so
	do that.
	* doc/mach.info: New file, generated.
	* doc/mach.info-1: Likewise.
	* doc/mach.info-2: Likewise.
	* doc/stamp-vti: Likewise.
	* doc/version.texi: Likewise.

2006-10-18  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in: Regenerate.

	Install `PREFIX/share/msgids/gnumach.msgids'.
	* Makerules.am (%.msgids): Two new rules.
	* Makefrag.am (MOSTLYCLEANFILES): Add `gnumach.msgids'.
	(gnumach.msgids): New rule.
	(exec_msgidsdir, exec_msgids_DATA): New variables.

2006-10-16  Thomas Schwinge  <tschwinge@gnu.org>

	* configure: Regenerate.

	[bug #18011 -- `make install-data' will build the
	``to-be-generated files'']
	* config.status.dep.patch: Do an educated guess instead of using the
	`Makefile'.
	* configure.ac <config.status.dep.patch>: Update description.

2006-10-15  Thomas Schwinge  <tschwinge@gnu.org>

	* configure: Regenerate.

	* configure.ac: Update texts snippets: GNU Automake 1.10 has just been
	released.

	* i386/include/Makefile.in: Remove unused file.  Thanks to Guillem
	Jover for spotting this.

	[task #5956 -- Automake'ify GNU Mach's code base]

	* configure: Regenerate.

	* configure.ac <config.status.dep.patch>: Point to [bug #18011 --
	`make install-data' will build the ``to-be-generated files''].

	* Makefile.in: Regenerate.

	* Makefrag.am (include_mach_exec): Rename to `include_mach_eXec'.

	* Makefile.in: New file, generated by `autoreconf'.
	* config.h.in: Likewise.
	* configure: Updated file, generated by `autoreconf'.

	* INSTALL: File updated, thanks to `autoreconf'.
	* aclocal.m4: Likewise.

	* build-aux/compile: New file, thanks to `autoreconf'.
	* build-aux/config.guess: Likewise.
	* build-aux/config.sub: Likewise.
	* build-aux/depcomp: Likewise.
	* build-aux/install-sh: Likewise.
	* build-aux/mdate-sh: Likewise.
	* build-aux/missing: Likewise.
	* build-aux/texinfo.tex: Likewise.

	* AUTHORS: New file, copy from the MIG repository.

	* kern/bootstrap.c: Don't include `bootstrap_symbols.h'.
	* ddb/db_command.c: Don't include `cpus.h'.
	* ddb/db_mp.c: Likewise.
	* i386/i386/ast_check.c: Likewise.
	* i386/i386/cswitch.S: Likewise.
	* i386/i386/db_interface.c: Likewise.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/fpu.h: Likewise.
	* i386/i386/i386asm.sym: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/mp_desc.c: Likewise.
	* i386/i386/mp_desc.h: Likewise.
	* i386/i386/pcb.c: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* include/mach/machine.h: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* kern/ast.c: Likewise.
	* kern/ast.h: Likewise.
	* kern/cpu_number.h: Likewise.
	* kern/debug.c: Likewise.
	* kern/eventcount.c: Likewise.
	* kern/host.c: Likewise.
	* kern/ipc_sched.c: Likewise.
	* kern/lock.c: Likewise.
	* kern/lock.h: Likewise.
	* kern/lock_mon.c: Likewise.
	* kern/mach_clock.c: Likewise.
	* kern/mach_factor.c: Likewise.
	* kern/machine.c: Likewise.
	* kern/priority.c: Likewise.
	* kern/processor.c: Likewise.
	* kern/processor.h: Likewise.
	* kern/sched.h: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/startup.c: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/timer.c: Likewise.
	* kern/timer.h: Likewise.
	* vm/vm_resident.c: Likewise.
	* kern/sched_prim.c: Don't include `fast_tas.h'.
	* kern/task.c: Likewise.
	* kern/task.h: Likewise.
	* kern/sched_prim.c: Don't include `hw_footprint.h'.
	* kern/thread.c: Likewise.
	* kern/thread.h: Likewise.
	* kern/counters.c: Don't include `mach_counters.h'.
	* kern/counters.h: Likewise.
	* ddb/db_ext_symtab.c: Don't include `mach_debug.h'.
	* i386/i386/pcb.c: Likewise.
	* kern/ipc_kobject.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/zalloc.c: Likewise.
	* kern/ast.c: Don't include `mach_fixpri.h'.
	* kern/processor.c: Likewise.
	* kern/processor.h: Likewise.
	* kern/sched.h: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/thread.h: Likewise.
	* kern/host.c: Don't include `mach_host.h'.
	* kern/ipc_sched.c: Likewise.
	* kern/machine.c: Likewise.
	* kern/processor.c: Likewise.
	* kern/processor.h: Likewise.
	* kern/sched_prim.c: Likewise.
	* kern/startup.c: Likewise.
	* kern/task.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/thread.h: Likewise.
	* include/mach/mach.defs: Don't include `mach_ipc_compat.h'.
	* include/mach/mach_param.h: Likewise.
	* include/mach/mach_traps.h: Likewise.
	* include/mach/message.h: Likewise.
	* include/mach/mig_errors.h: Likewise.
	* include/mach/notify.h: Likewise.
	* include/mach/port.h: Likewise.
	* include/mach/std_types.defs: Likewise.
	* include/mach/task_special_ports.h: Likewise.
	* include/mach/thread_special_ports.h: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_notify.h: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_right.c: Likewise.
	* ipc/ipc_right.h: Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/mach_debug.c: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_msg.h: Likewise.
	* ipc/mach_port.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/syscall_sw.c: Likewise.
	* kern/thread.h: Likewise.
	* include/mach_debug/mach_debug.defs: Don't include `mach_ipc_debug.h'.
	* ipc/ipc_hash.c: Likewise.
	* ipc/ipc_hash.h: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_marequest.h: Likewise.
	* kern/ipc_kobject.c: Don't include `mach_ipc_test.h'.
	* ddb/db_access.c: Don't include `mach_kdb.h'.
	* ddb/db_aout.c: Likewise.
	* ddb/db_break.c: Likewise.
	* ddb/db_command.c: Likewise.
	* ddb/db_command.h: Likewise.
	* ddb/db_cond.c: Likewise.
	* ddb/db_examine.c: Likewise.
	* ddb/db_expr.c: Likewise.
	* ddb/db_ext_symtab.c: Likewise.
	* ddb/db_input.c: Likewise.
	* ddb/db_lex.c: Likewise.
	* ddb/db_macro.c: Likewise.
	* ddb/db_mp.c: Likewise.
	* ddb/db_output.c: Likewise.
	* ddb/db_print.c: Likewise.
	* ddb/db_run.c: Likewise.
	* ddb/db_sym.c: Likewise.
	* ddb/db_task_thread.c: Likewise.
	* ddb/db_trap.c: Likewise.
	* ddb/db_variables.c: Likewise.
	* ddb/db_watch.c: Likewise.
	* ddb/db_watch.h: Likewise.
	* ddb/db_write_cmd.c: Likewise.
	* i386/i386/db_disasm.c: Likewise.
	* i386/i386/db_interface.c: Likewise.
	* i386/i386/db_trace.c: Likewise.
	* i386/i386/i386asm.sym: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* include/mach_debug/mach_debug.defs: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_pset.c: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/debug.c: Likewise.
	* kern/exception.c: Likewise.
	* kern/lock.c: Likewise.
	* kern/xpr.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_resident.c: Likewise.
	* kern/lock.h: Don't include `mach_ldebug.h'.
	* kern/lock_mon.c: Don't include `mach_lock_mon.h'.
	* kern/ipc_kobject.c: Don't include `mach_machine_routines.h'.
	* kern/lock_mon.c: Don't include `mach_mp_debug.h'.
	* vm/memory_object.c: Don't include `mach_pagemap.h'.
	* vm/vm_fault.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_object.h: Likewise.
	* vm/vm_pageout.c: Likewise.
	* i386/i386/trap.c: Don't include `mach_pcsample.h'.
	* kern/mach4.srv: Likewise.
	* kern/mach_clock.c: Likewise.
	* kern/pc_sample.c: Likewise.
	* kern/task.c: Likewise.
	* kern/thread.c: Likewise.
	* vm/vm_fault.c: Likewise.
	* device/net_io.c: Don't include `mach_ttd.h'.
	* i386/i386/kttd_interface.c: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386at/autoconf.c: Likewise.
	* include/mach_debug/mach_debug.defs: Don't include `mach_vm_debug.h'.
	* vm/vm_debug.c: Likewise.
	* vm/vm_page.h: Likewise.
	* vm/vm_resident.c: Likewise.
	* kern/sched_prim.c: Don't include `power_save.h'.
	* kern/sched.h: Don't include `simple_clock.h'.
	* kern/sched_prim.c: Likewise.
	* kern/thread.c: Likewise.
	* kern/mach_clock.c: Don't include `stat_time.h'.
	* i386/i386/i386asm.sym: Likewise.
	* i386/i386/locore.S: Likewise.
	* kern/sched.h: Likewise.
	* kern/timer.c: Likewise.
	* kern/timer.h: Likewise.
	* kern/startup.c: Don't include `xpr_debug.h'.
	* kern/xpr.h: Likewise.
	* i386/i386at/autoconf.c: Don't include `com.h'.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/conf.c: Likewise.
	* i386/i386at/cons_conf.c: Likewise.
	* i386/i386/fpe_linkage.c: Don't include `fpe.h'.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/fpu.h: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386at/autoconf.c: Don't include `lpr.h'.
	* i386/i386at/conf.c: Likewise.
	* i386/i386at/lpr.c: Likewise.
	* i386/i386/cswitch.S: Don't include `platforms.h'.
	* i386/i386/fpu.c: Likewise.
	* i386/i386/gdt.c: Likewise.
	* i386/i386/hardclock.c: Likewise.
	* i386/i386/i386asm.sym: Likewise.
	* i386/i386/io_emulate.c: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/pic.c: Likewise.
	* i386/i386/pic.h: Likewise.
	* i386/i386/pit.c: Likewise.
	* i386/i386/pit.h: Likewise.
	* i386/i386/seg.h: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/i386at/com.c: Don't include `rc.h'
	* i386/i386at/cons_conf.c: Likewise.
	* i386/i386at/pic_isa.c: Likewise.
	* device/ds_routines.c: Don't include <i386/linux/device-drivers.h>.
	* i386/i386at/i386at_ds_routines.c: Likewise.
	* i386/linux/dev/include/linux/autoconf.h: Likewise.
	* linux/dev/arch/i386/kernel/setup.c: Likewise.
	* linux/dev/init/main.c: Likewise.
	* linux/pcmcia-cs/glue/pcmcia_glue.h: Likewise.
	* linux/pcmcia-cs/glue/wireless_glue.h: Likewise.
	* kern/lock_mon.c: Don't include <time_stamp.h>.
	* device/cons.c: Include <device/cons.h> instead of <cons.h>.
	* i386/i386at/com.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/cons_conf.c: Likewise.
	* i386/i386at/i386at_ds_routines.c: Include <device/device.server.h>
	instead of "device_interface.h".
	* device/chario.c: Include <device/device_reply.user.h> instead of
	"device_reply.h".
	* device/ds_routines.c: Likewise.
	* linux/dev/glue/block.c: Likewise.
	* linux/dev/glue/net.c: Likewise.
	* linux/pcmcia-cs/glue/ds.c: Likewise.
	* device/cons.c: Include <device/kmsg.h> instead of <kmsg.h>.
	* device/kmsg.c: Likewise.
	* i386/i386/cswitch.S: Include <i386/cpu_number.h> instead of
	"cpu_number.h".
	* i386/i386/locore.S: Likewise.
	* i386/intel/pmap.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* i386/i386/i386asm.sym: Include <i386/gdt.h> instead of "gdt.h".
	* i386/i386/idt.c: Likewise.
	* i386/i386at/int_init.c: Likewise.
	* i386/i386/cswitch.S: Include <i386/i386asm.h> instead of "i386asm.h".
	* i386/i386/locore.S: Likewise.
	* i386/i386at/boothdr.S: Likewise.
	* i386/i386at/interrupt.S: Likewise.
	* i386/i386at/idt.h: Include <i386/idt-gen.h> instead of "idt-gen.h".
	* i386/i386at/interrupt.S: Include <i386/ipl.h> instead of "ipl.h".
	* i386/i386/i386asm.sym: Include <i386/ldt.h> instead of "ldt.h".
	* i386/i386/locore.S: Likewise.
	* i386/i386/i386asm.sym: Include <i386/mp_desc.h> instead of
	"mp_desc.h".
	* i386/i386at/interrupt.S: Include <i386/pic.h> instead of "pic.h".
	* i386/i386/cswitch.S: Include <i386/proc_reg.h> instead of
	"proc_reg.h".
	* i386/i386/locore.S: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/i386/i386asm.sym: Include <i386/seg.h> instead of "seg.h".
	* i386/i386/idt.c: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/locore.S: Include <i386/trap.h> instead of "trap.h".
	* i386/i386/i386asm.sym: Include <i386/tss.h> instead of "tss.h".
	* i386/i386/i386asm.sym: Include <i386/vm_param.h> instead of
	"vm_param.h".
	* i386/i386/idt.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/intel/pmap.c: Likewise.
	* i386/i386/i386asm.sym: Include <i386at/idt.h> instead of "idt.h".
	* i386/i386/idt.c: Likewise.
	* i386/i386at/int_init.c: Likewise.
	* ipc/ipc_target.c: Include <kern/sched_prim.h> instead of
	"sched_prim.h".
	* vm/memory_object.c: Include <vm/memory_object_default.user.h> instead
	of "memory_object_default.h".
	* vm/vm_object.c: Likewise.
	* vm/vm_pageout.c: Likewise.
	* vm/memory_object.c: Include <vm/memory_object_user.user.h> instead of
	"memory_object_user.h".
	* vm/vm_fault.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_pageout.c: Likewise.

	* Makefile.am: New file.
	* Makerules.am <configure's findings, System dependent Makerules>
	<Compilation flags, Dependency generation, Autoconf support>: Remove
	sections.
	<Building from foo.cli, Building from foo.srv>: Rewrite:
	(%.server.defs.c, %.user.defs.c, %.server.h %.server.c)
	(%.user.h %.user.c, %.server.defs, %.user.defs): New targets.
	(%.h %_user.c %.cli.d, %_interface.h %_server.c %.srv.d): Remove
	targets.
	(echo-%): New target.
	* Makefrag.am <configure's findings, Rules, Kernel Image, Installation>
	<Building the distribution, Autoconf support, Makerules>: Remove
	sections.
	(enable_kdb, enable_kmsg): Adapt.
	<All the source in each directory>
	<Header files installed for user use>: Rewrite to adapt to how things
	are to be done now.
	<Automatically generated source files>: New section.
	(i386/Makefrag.am): Include file if appropriate.
	* i386/Makefrag.am <configure's findings, Rules, Installation>
	<Autoconf support, Makerules>: Remove sections.
	(enable_lpr): Adapt.
	<Source files for any i386 kernel>: Rewrite to adapt to how things are
	to be done now.
	* i386/linux/Makefrag.am: New file.
	* linux/Makefrag.am: Likewise.

	* Makefile.in: Move file...
	* Makefrag.am: ... here.
	* i386/Makefile.in: Move file...
	* i386/Makefrag.am: ... here.
	* i386/linux/Makefile.in: Remove file.

	* doc/Makefile.in: Remove file.
	* doc/Makefrag.am: New file.
	* tests/Makefrag.am: Likewise.
	* tests/test-mbchk.in: Likewise.

	* configfrag.ac: New file.
	* tests/configfrag.ac: Likewise.
	* Makerules.am (DEFINES): Convert those into...
	* configfrag.ac: ... AC_DEFINE instantiations.
	* i386/Makerules.in (DEFINES): Convert those into...
	* i386/configfrag.ac: ... AC_DEFINE instantiations.
	* i386/Makerules.in: Remove file.
	* i386/configfrag.ac (AC_PREREQ, AC_INIT, AC_CONFIG_SRCDIR)
	(AC_CONFIG_SUBDIRS, AC_CONFIG_FILES, AC_OUTPUT): Don't invoke.
	(../version.m4): Don't include.
	(--disable-lpr): Rework configuration option.
	(--disable-default-device-drivers): Move configuration option to...
	* configfrag.ac: ... here.
	* configure.ac (AC_CONFIG_AUX_DIR, AM_INIT_AUTOMAKE): Instantiate.
	(AC_PREFIX_DEFAULT, AC_CONFIG_SUBDIRS): Don't invoke.
	<Output variable `systype'>: Rework the whole section.
	<Options> (--enable-kdb, --disable-kmsg): Move into `configfrag.ac' and
	adapt.
	<Programs> (AM_PROG_AS, AM_PROG_CC_C_O): Instantiate.
	(AC_CHECK_PROG): Move instantiation searching for a `mbchk' program
	into `tests/configfrag.ac'.
	(AC_CHECK_PROG): Instantiate to search for a `patch' program.
	<configure fragments> (tests/configfrag.ac, configfrag.ac)
	(linux/configfrag.ac): Include files.
	(i386/configfrag.ac): Include file if appropriate.
	(AC_CONFIG_HEADER): Instantiate for `config.h'.
	(AC_CONFIG_FILES): Remove `Makerules' and `doc/Makefile'.
	(AC_CONFIG_COMMANDS_POST): Instantiate for `config.status.dep.patch'.
	(AC_CONFIG_COMMANDS): Instantiate for
	`Makefile.correct_output_files_for_.S_files.patch' and (the
	nonexistent) `Makefile.dependency_tracking_for_.S_files.patch'.
	* Makefile.dependency_tracking_for_.S_files.patch: New file.
	* config.status.dep.patch: Likewise.
	* bogus/bootstrap_symbols.h: Remove file.
	* configfrag.ac: AC_DEFINE `BOOTSTRAP_SYMBOLS' to `0'.
	* bogus/cpus.h: Remove file.
	* configfrag.ac: AC_DEFINE `NCPUS' to `1'.  AH_TEMPLATE
	`MULTIPROCESSOR'.
	* bogus/fast_tas.h: Remove file.
	* configfrag.ac: AC_DEFINE `FAST_TAS' to `0'.
	* bogus/hw_footprint.h: Remove file.
	* configfrag.ac: AC_DEFINE `HW_FOOTPRINT' to `0'.
	* bogus/mach_counters.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_COUNTERS' to `0'.
	* bogus/mach_debug.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_DEBUG' to `1'.
	* bogus/mach_fixpri.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_FIXPRI' to `1'.
	* bogus/mach_host.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_HOST' to `0'.
	* bogus/mach_ipc_compat.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_IPC_COMPAT' to `1'.
	* bogus/mach_ipc_debug.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_IPC_DEBUG' to `1'.
	* bogus/mach_ipc_test.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_IPC_TEST' to `0'.
	* bogus/mach_kdb.h: Remove file.
	* configfrag.ac (--disable-kdb): AC_DEFINE `MACH_KDB' to `0'.
	* bogus/mach_ldebug.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_LDEBUG' to `0'.
	* bogus/mach_lock_mon.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_LOCK_MON' to `0'.
	* bogus/mach_machine_routines.h: Remove file.
	* configfrag.ac: Add comment about not AC_DEFINEing
	`MACH_MACHINE_ROUTINES' to `0'.
	* bogus/mach_mp_debug.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_MP_DEBUG' to `0'.
	* bogus/mach_pagemap.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_PAGEMAP' to `1'.
	* bogus/mach_pcsample.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_PCSAMPLE' to `1'.
	* bogus/mach_ttd.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_TTD' to `0'.
	* bogus/mach_vm_debug.h: Remove file.
	* configfrag.ac: AC_DEFINE `MACH_VM_DEBUG' to `1'.
	* bogus/power_save.h: Remove file.
	* configfrag.ac: AC_DEFINE `POWER_SAVE' to `1'.
	* bogus/simple_clock.h: Remove file.
	* configfrag.ac: AC_DEFINE `SIMPLE_CLOCK' to `0'.
	* bogus/stat_time.h: Remove file.
	* configfrag.ac: AC_DEFINE `STAT_TIME' to `1'.
	* bogus/xpr_debug.h: Remove file.
	* configfrag.ac: AC_DEFINE `XPR_DEBUG' to `1'.
	* i386/bogus/com.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `NCOM' to `4'.
	* i386/bogus/fpe.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `FPE' to `0'.
	* i386/bogus/lpr.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `NLPR' to `1'.
	* i386/bogus/mach_machine_routines.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `MACH_MACHINE_ROUTINES' to `1'.
	* i386/bogus/platforms.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `AT386' to `1'.
	* i386/bogus/rc.h: Remove file.
	* i386/configfrag.ac: AC_DEFINE `RCLINE' to `-1' and `RCADDR' to `0x3f8'.

	* Makerules.in: Move file...
	* Makerules.am: ... here.

	* linux/configfrag.ac (AC_PREREQ, AC_INIT, AC_CONFIG_SRCDIR)
	(AC_CONFIG_HEADER, AC_CANONICAL_HOST, hurd_SYSTYPE, AC_CONFIG_FILES)
	(AC_OUTPUT): Don't invoke.
	(../../version.m4, ../../Drivers.macros, ../../aclocal.m4): Don't
	include.
	<case "$host_cpu">: Only evaluate for i386.
	(--disable-default-device-drivers): Remove configuraion option.
	(LINUX_DEV, __KERNEL__): AC_DEFINE these.
	(scsi, net, pcmcia, wireless): Remove AC_DRIVER_CLASS instantiations.
	(device_driver_group): New shell function.
	(AC_OPTION, AC_OPTION_nodef): New functions.
	(linux_DRIVER): Rename function to AC_Linux_DRIVER and adapt.
	(linux_DRIVER_nodef): Likewise to AC_Linux_DRIVER_nodef.
	<Configuration options>: Adapt to the new functions introduced above
	and re-position parts.
	<Process device driver groups>: Adapt to the changes related to device
	driver groups.
	* linux/configure.in <AC_CONFIG_LINKS>: Move to...
	* linux/configfrag.ac: ... here.
	* linux/configure.in: Remove file.
	* linux/configure: Likewise.
	* i386/linux/Makerules.in: Likewise.
	* Drivers.macros: Likewise.

	* i386/linux/configure.ac: Move file...
	* linux/configfrag.ac: ... here.
	* i386/linux/configure: Remove file.
	* i386/linux/device-drivers.h.in: Likewise.

	* i386/configure.in: Move file...
	* i386/configfrag.ac: ... here.
	* i386/configure: Remove file.

	* config.guess: Remove file.
	* config.sub: Likewise.
	* install-sh: Likewise.

	* i386/Files: Remove file.
	* i386/Subdirs: Likewise.
	* linux/Files: Likewise.
	* linux/Subdirs: Likewise.

2006-10-13  Thomas Schwinge  <tschwinge@gnu.org>

	* configure.in: Move file...
	* configure.ac: ... here.

	* Makerules.in (ASFLAGS): Don't define `ASSEMBLER'.
	* i386/i386/cpu_number.h: Check for `__ASSEMBLER__' instead of
	`ASSEMBLER'.
	* i386/i386/debug.h: Likewise.
	* i386/i386/ipl.h: Likewise.
	* i386/i386/ldt.h: Likewise.
	* i386/i386/proc_reg.h: Likewise.
	* i386/i386/seg.h: Likewise.
	* i386/i386/trap.h: Likewise.
	* i386/include/mach/i386/kern_return.h: Likewise.
	* i386/include/mach/i386/vm_types.h: Likewise.
	* i386/intel/pmap.h: Likewise.
	* include/mach/boolean.h: Likewise.
	* include/mach/boot.h: Likewise.
	* include/mach/error.h: Likewise.
	* kern/syscall_emulation.h: Likewise.

	* configure: Regenerate.
	* i386/configure: Likewise.
	* i386/linux/configure: Likewise.
	* linux/configure: Likewise.

2006-10-12  Thomas Schwinge  <tschwinge@gnu.org>

	* version.m4 (AC_PACKAGE_VERSION): Let's name it `1.3.99'.

	* configure: Regenerate.
	* i386/configure: Likewise.
	* i386/linux/configure: Likewise.
	* linux/configure: Likewise.

	* version.m4: Rewrite.
	* configure.in: Adapt to the above.
	* i386/configure.in: Likewise.
	* i386/linux/configure.ac: Likewise.
	* linux/configure.in: Likewise.

2006-10-09  Thomas Schwinge  <tschwinge@gnu.org>

	* ddb/tr.h: Insert the content of `bogus/mach_assert.h' instead of
	including it.
	* i386/i386/loose_ends.c: Likewise.
	* bogus/mach_assert.h: Remove file.

	* bogus/panic.c: Remove file.

	* linux/src/drivers/scsi/in2000.c (in2000_proc_info) [PROC_INTERFACE]:
	Don't consider `__DATE__' and `__TIME__'.

2006-10-08  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/drivers/scsi/scsi.h: Move file...
	* linux/src/drivers/scsi/scsi.h: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/seagate.c: Move file...
	* linux/src/drivers/scsi/seagate.c: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/aha152x.c: Move file...
	* linux/src/drivers/scsi/aha152x.c: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/sr.c: Move file...
	* linux/src/drivers/scsi/sr.c: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/sd_ioctl.c: Move file...
	* linux/src/drivers/scsi/sd_ioctl.c: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/sd.c: Move file...
	* linux/src/drivers/scsi/sd.c: ... here, overwriting the old file.

	* linux/dev/drivers/scsi/hosts.c: Remove file.
	* linux/dev/drivers/scsi/scsi.c: Likewise.

	* linux/dev/drivers/block/ide.c: Move file...
	* linux/src/drivers/block/ide.c: ... here, overwriting the old file.

	* linux/dev/drivers/block/ide-cd.c: Remove file.
	* linux/src/drivers/block/ide-cd.c (cdrom_sleep): Don't define function
	`#ifndef MACH'.

2006-10-07  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/linux/configure: Regernerate.
	* i386/linux/device-drivers.h.in: Likewise.

	* Drivers.macros (AC_DRIVER, AC_DRIVER_nodef): Rewrite to allow options
	with dashes in them, make it usable more universally and enhance the
	generated comments in header files.
	* i386/linux/configure.ac (linux_DRIVER, linux_DRIVER_nodef): Enhance
	DESCRIPTION.
	(u1434f): Rename to `u14-34f'.
	(smcultra): Rename to `smc-ultra'.
	(smcultra32): Rename to `smc-ultra32'.
	(hpplus): Rename to `hp-plus'.
	(ne2kpci): Rename to `ne2k-pci'.
	(viarhine): Rename to `via-rhine'.
	(intelgige): Rename to `intel-gige'.
	(winbond840): Rename to `winbond-840'.
	(AC_PCMCIA_OPTION): Remove function.
	(pcmcia-isa): Use `AC_DRIVER' instead of `AC_PCMCIA_OPTION'.
	* i386/README-Drivers: Update accordingly.

2006-10-03  Thomas Schwinge  <tschwinge@gnu.org>

	[task #5941 -- Linker script for GNU Mach]

	* Makefile.in (kernel.o): Remove `$(systype)-objfiles-prepend' hackery.
	* i386/Makefile.in (sysdep.a): Likewise.
	* i386/Makerules.in: Likewise.
	(LDFLAGS-kernel): Point to the linker script.
	* i386/i386at/boothdr.S (_start): Don't put into `.text', but into
	`.text.start' instead.
	* i386/ldscript: Change to put `.text' at 0x100000 and put
	`.text.start' first into `.text'.

	* i386/ldscript: New file, copied from `/lib/ldscripts/elf_i386.x' of a
	GNU Binutils 2.16.1 installation.

2006-09-25  Stefan Siegl  <stesie@brokenpipe.de>

	* linux/dev/glue/net.c (device_get_status): Reworked to not read
	from STATUS.  Fill `struct iw_point' correctly if necessary.

2006-09-23  Stefan Siegl  <stesie@brokenpipe.de>

	* i386/linux/configure: Regenerate.
	* i386/linux/device-drivers.h.in: Likewise.

	* i386/linux/configure.ac (AC_PCMCIA_OPTION): New function.
	(--disable-pcmcia-isa): New configuration option to disable ISA-bus
	support in the pcmcia core, which is otherwise enabled now by default.
	* doc/mach.texi (Configuration): Briefly document the new configuration
	option.
	* i386/README-Drivers: Likewise.

2006-09-20  Thomas Schwinge  <tschwinge@gnu.org>

	* configure: Regenerate.
	* i386/configure: Likewise.
	* i386/linux/configure: Likewise.
	* i386/linux/device-drivers.h.in: Likewise.

	* Drivers.macros (AC_DRIVER_ALIAS): Remove definition.
	(AC_DRIVER): Extend to take a `description' parameter and consider
	`$enable_default_device_drivers'.
	(AC_DRIVER_nodef): New definition.
	* configure.in (options kdb, kmsg): Remove redundancy.
	* i386/configure.in (option default-device-drivers): New option.
	(option lpr): Consider `$enable_default_device_drivers'.
	* i386/linux/configure.ac: Rework substantially.  Remove all aliases.
	Rename some of the device driver options.
	(option default-device-drivers): New option.
	(linux_DRIVER): Take care about a `description' parameter and don't
	invoke AC_DRIVER_ALIAS.
	(linux_DRIVER_nodef): New definition.
	Adapt all usages of AC_DRIVER and linux_DRIVER to provide a
	`description' parameter.
	(g_NCR5380, NCR53c406a, eata_dma, wavelan, atp): Change from AC_DRIVER
	to AC_DRIVER_nodef to have these device drivers disabled by default.
	* doc/mach.texi: Add a note about the outdatedness to the configuration
	option table.
	* i386/README-Drivers: Update.

2006-09-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[bug #17338 -- GNU Mach vs. GCC 4.1]
	* i386/i386/seg.h (struct pseudo_descriptor): Pack structure and
	move the padding field to the end.
	(lgdt): Pass the whole structure to the lgdt assembly command.
	(lidt): Likewise.

2006-08-06  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT: Update.

2006-07-31  Stefan Siegl  <stesie@brokenpipe.de>

	* doc/mach.texi (Configuration): Document the new PCMCIA drivers a bit
	more.
	* i386/README-Drivers: Likewise.

2006-07-27  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/linux/configure: Regenerate.

	* i386/linux/configure.ac: Pull in the pcmcia code only if really
	needed.

	* doc/mach.texi (Configuration): Very briefly document the new drivers.
	* i386/README-Drivers: Likewise.

	* linux/dev/include/linux/types.h (_MACH_SA_SYS_TYPES_H_): Define.

	* i386/linux/configure: Regenerate.
	* i386/linux/device-drivers.h.in: Likewise.

2006-07-27  Stefan Siegl  <stesie@brokenpipe.de>

	* i386/linux/configure.ac (pcmcia, wireless): New driver classes.
	(i82365, 3c574_cs, 3c589_cs, axnet_cs, fmvj18x_cs, nmclan_cs, pcnet_cs)
	(smc91c92_cs, xirc2ps_cs, orinoco_cs): New drivers.
	* i386/linux/Makefile.in (linux-pcmcia-cs-modules-files)
	(linux-pcmcia-cs-clients-files, linux-pcmcia-cs-wireless-files): New
	variables.  Add `vpath's to the files locations.
	(all-linux-files): Add the three new variables.
	(linux-pcmcia-cs-modules-flags, linux-pcmcia-cs-clients-flags)
	(linux-pcmcia-cs-wireless-flags): New variables.
	(linux-flags): Add code to handle the above files and flags.

	* i386/i386at/i386at_ds_routines.c (emulation_list)
	[LINUX_DEV && CONFIG_INET && CONFIG_PCMCIA]: Add the Linux pcmcia
	emulation structure.
	* linux/dev/glue/net.c: Include <linux/wireless.h>.
	(device_get_status): Rewrite function.
	(device_set_status): New function.
	(linux_net_emulation_ops): Add `device_set_status' at the appropriate
	position.
	* linux/dev/init/main.c (linux_init) [CONFIG_PCMCIA]: Call pcmcia_init.

	* linux/pcmcia-cs/glue/ds.c: New file.
	* linux/pcmcia-cs/glue/pcmcia.c: Likewise.
	* linux/pcmcia-cs/glue/pcmcia_glue.h: Likewise.
	* linux/pcmcia-cs/glue/wireless_glue.h: Likewise.

	* linux/pcmcia-cs/clients/xirc2ps_cs.c (busy_loop): Replace the code by
	a call to __udelay.
	* linux/pcmcia-cs/include/linux/init.h: Adapt to our Linux environment.
	* linux/pcmcia-cs/include/linux/slab.h: Use `#include', not
	`#include_next'.
	* linux/pcmcia-cs/include/pcmcia/mem_op.h: Adapt to our Linux
	environment and fix GCC 4.0 complaints.
	* linux/pcmcia-cs/include/pcmcia/version.h: Always assume that
	CONFIG_PCMCIA is not defined.
	* linux/pcmcia-cs/modules/cs.c (init_pcmcia_cs): Don't make it static.
	* linux/pcmcia-cs/modules/ds.c: Use some magic to avoid duplicate
	definition `io_req_t'.
	(ds_open, ds_release, ds_read, ds_write, ds_select, ds_poll, ds_fops):
	Hide functions if MACH is defined.
	Likewise for the module handling code.
	(ds_ioctl): Use plain `memcpy' if MACH is defined.
	(init_pcmcia_ds): Don't register charcater devices if MACH is defined.
	Include "../glue/ds.c".
	* linux/pcmcia-cs/modules/i82365.c (test_irq): Adapt to GNU Mach.
	(init_i82365): Don't make it static.
	* linux/pcmcia-cs/modules/pci_fixup.c (pci_devices): Don't define if
	MACH is defined.
	* linux/pcmcia-cs/wireless/orinoco.c: Adapt to our Linux environment.

2006-07-27  Thomas Schwinge  <tschwinge@gnu.org>

	Import a number of files from the pcmcia-cs package, version 3.2.8,
	available from <http://pcmcia-cs.sourceforge.net/>.

	* linux/pcmcia-cs/clients/3c574_cs.c: Import file.
	* linux/pcmcia-cs/clients/3c589_cs.c: Likewise.
	* linux/pcmcia-cs/clients/ax8390.h: Likewise.
	* linux/pcmcia-cs/clients/axnet_cs.c: Likewise.
	* linux/pcmcia-cs/clients/fmvj18x_cs.c: Likewise.
	* linux/pcmcia-cs/clients/nmclan_cs.c: Likewise.
	* linux/pcmcia-cs/clients/ositech.h: Likewise.
	* linux/pcmcia-cs/clients/pcnet_cs.c: Likewise.
	* linux/pcmcia-cs/clients/smc91c92_cs.c: Likewise.
	* linux/pcmcia-cs/clients/xirc2ps_cs.c: Likewise.
	* linux/pcmcia-cs/include/linux/crc32.h: Likewise.
	* linux/pcmcia-cs/include/linux/init.h: Likewise.
	* linux/pcmcia-cs/include/linux/slab.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/bulkmem.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/bus_ops.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/ciscode.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/cisreg.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/cistpl.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/cs.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/cs_types.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/driver_ops.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/ds.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/mem_op.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/ss.h: Likewise.
	* linux/pcmcia-cs/include/pcmcia/version.h: Likewise.
	* linux/pcmcia-cs/modules/bulkmem.c: Likewise.
	* linux/pcmcia-cs/modules/cirrus.h: Likewise.
	* linux/pcmcia-cs/modules/cistpl.c: Likewise.
	* linux/pcmcia-cs/modules/cs.c: Likewise.
	* linux/pcmcia-cs/modules/cs_internal.h: Likewise.
	* linux/pcmcia-cs/modules/ds.c: Likewise.
	* linux/pcmcia-cs/modules/ene.h: Likewise.
	* linux/pcmcia-cs/modules/i82365.c: Likewise.
	* linux/pcmcia-cs/modules/i82365.h: Likewise.
	* linux/pcmcia-cs/modules/o2micro.h: Likewise.
	* linux/pcmcia-cs/modules/pci_fixup.c: Likewise.
	* linux/pcmcia-cs/modules/ricoh.h: Likewise.
	* linux/pcmcia-cs/modules/rsrc_mgr.c: Likewise.
	* linux/pcmcia-cs/modules/smc34c90.h: Likewise.
	* linux/pcmcia-cs/modules/ti113x.h: Likewise.
	* linux/pcmcia-cs/modules/topic.h: Likewise.
	* linux/pcmcia-cs/modules/vg468.h: Likewise.
	* linux/pcmcia-cs/modules/yenta.h: Likewise.
	* linux/pcmcia-cs/wireless/hermes.c: Likewise.
	* linux/pcmcia-cs/wireless/hermes.h: Likewise.
	* linux/pcmcia-cs/wireless/hermes_rid.h: Likewise.
	* linux/pcmcia-cs/wireless/ieee802_11.h: Likewise.
	* linux/pcmcia-cs/wireless/orinoco.c: Likewise.
	* linux/pcmcia-cs/wireless/orinoco.h: Likewise.
	* linux/pcmcia-cs/wireless/orinoco_cs.c: Likewise.

2006-07-24  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.in (%.h %_user.c): Add `%.cli.d' to the target list.
	Create these files by specifying `-MD' as a flag for mig and rename the
	resulting files as needed.
	Include these `*.cli.d' files instead of `*.migu.d' files.
	(%_interface.h %_server.c): Likewise for `%.srv.d' / `*.migs.d'.
	(%.migs.d, %.migu.d): Remove targets.
	* Makefile.in (clean): Adapt to the above.
	* i386/Makefile.in (clean): Likewise.

2006-06-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/i386at/kd_mouse.c (mouse_char_in, mouse_char) Remove variables.
	(mouse_char_index) New variable.
	(mouse_handle_byte, kd_mouse_read): Use MOUSEBUF instead of MOUSE_CHAR
	for storing incoming command characters.
	(kd_mouse_read_reset): New function.
	(ibm_ps2_mouse_open, ibm_ps2_mouse_close): Call new kd_mouse_read_reset
	function.

2006-06-09  Stefan Siegl  <stesie@brokenpipe.de>

	* linux/dev/include/asm-i386/uaccess.h: New dummy file.
	* linux/dev/include/linux/pm.h: Likewise.
	* linux/dev/include/linux/threads.h: Likewise.
	* linux/src/include/linux/symtab_begin.h: New file from Linux 2.0.40.
	* linux/src/include/linux/symtab_end.h: Likewise.
	* linux/src/include/linux/module.h: Update from Linux 2.0.40 with minor
	changes.
	* linux/src/include/linux/list.h: New file from Linux 2.2.26.
	* linux/src/include/linux/kcomp.h: Likewise with minor changes.
	* linux/src/include/linux/wait.h: Update from Linux 2.2.26.
	* linux/src/include/linux/wireless.h: Likewise.
	* linux/src/include/asm-i386/bitops.h [__KERNEL__] (ffs, hweight32)
	(hweight16, hweight8): Copy from Linux 2.2.26.

	* kern/printf.c (_doprnt): Support printing of pointer addresses.

2006-05-14  Roland McGrath  <roland@frob.com>

	[sync from HEAD, 2002-06-17]
	* device/if_hdr.h: Replace ancient UCB copyright terms with current
	approved UCB terms.
	* include/sys/reboot.h: Likewise.
	* include/device/disk_status.h: Likewise.
	* include/device/tape_status.h: Likewise.
	* device/net_io.c: Remove advertising clause from UCB copyright terms.
	* include/device/audio_status.h: Likewise.
	* include/device/bpf.h: Likewise.

2006-05-14  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/i386at/autoconf.c (bus_device_init) <lpr> [! LINUX_DEV]: Depend
	on `MACH_LPR' instead.
	* i386/i386at/lpr.c: Fix obsolescent `#else' / `#endif' syntax.

2006-05-12  Stefan Siegl  <stesie@brokenpipe.de>

	* linux/dev/glue/kmem.c (vfree): Panic if `vmalloc_list_lookup' did
	NOT succeed.

2006-05-08  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT: Document Samuel's patch.

2006-05-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[bug #7118 -- GNU Mach can't handle 1G memory]
	* i386/i386at/model_dep.c (mem_size_init): Limit memory to what can
	actually be used (minus a little extra for virtual mappings).
	* i386/intel/pmap.c (pmap_bootstrap): Extend the virtual mapping area
	according to memory size for at least being able to manage it.  But
	look out for wrap and limit it to kernel adresses.  Remove duplicate
	computing.

2006-04-27  Richard Braun  <syn@hurdfr.org>
	    Manuel Menal  <mmenal@hurdfr.org>

	* device/if_hdr.h (struct ifnet): Added new members `if_snd_port_list'
	and `if_snd_port_list_lock'.
	* device/net_io.c: Reworked to improve BPF support.  Filters can be
	applied to ingress packets, egress packets, or both.
	* device/subrs.c: Initialize the `if_snd_port_list' and
	`if_snd_port_list_lock'.
	* include/device/bpf.h [0]: Enable unconditionally.
	Include <sys/types.h>.
	(BPF_IN, BPF_OUT): New macros.
	* include/device/net_status.h (NETF_TYPE_MASK, NETF_IN, NETF_OUT): New
	macros.
	(struct net_rcv_msg): New member `sent'.
	* linux/dev/glue/net.c: Mark ingress packets as received and inject
	egress packets into the packet filters.

2006-04-26  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in: Replace `make' with `$(MAKE)'.
	* i386/Makefile.in: Likewise.
	Reported by Leonardo Lopes Pereira <leonardolopespereira@gmail.com>.

2006-04-08  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/Makefile.in (INCLUDES): Don't add `$(srcdir)/bogus'.
	* i386/Makerules.in (INCLUDES): Add
	`$(abs_top_srcdir)/$(systype)/bogus'.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.

2006-04-02  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.in (%_user.c, %_server.c): Those are `.PRECIOUS'.
	(%.migs.d, %.migu.d): New targets.
	(%.migs_d, %.migu_d, %.migsh_d, %.miguh_d): Remove targets.
	Adapt the `include's to the renamed targets.
	* Makefile.in (clean): Adapt to the renamed targets.
	* i386/Makefile.in (clean): Likewise.

	* i386/Makefile.in (boothdr.o): New target.

2006-03-21  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in (clean): Also remove `kernel.gz', `kernel.stripped' and
	`kernel.stripped.gz'.

	* Makefile.in (kernel.o): Handle `$(systype)-objfiles-prepend'.
	* i386/Makefile.in (sysdep.a): Likewise.
	* i386/Makerules.in (kernel-objfiles-prepend): Transform variable into
	`$(systype)-objfiles-prepend'.
	(kernel.o): Remove target.

2006-03-20  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT: Document the NORMA removal.

2006-03-20  Leonardo Lopes Pereira  <leonardolopespereira@gmail.com>

	Remove unused and unsupported code.  Consult the file `DEVELOPMENT'
	for details.

	[patch #4982 -- remove of unused / unsuported functions of
	gnumach-1-branch]
	* bogus/norma_device.h: Remove file.
	* bogus/norma_ether.h: Likewise.
	* bogus/norma_ipc.h: Likewise.
	* bogus/norma_task.h: Likewise.
	* bogus/norma_vm.h: Likewise.
	* include/mach/mach_norma.defs: Likewise.
	* include/mach/norma_task.defs: Likewise.
	* include/mach/norma_special_ports.h: Likewise.
	* Makefile.in (bogus-files): Remove `norma_device.h', `norma_ether.h',
	`norma_ipc.h', `norma_task.h' and `norma_vm.h'.
	(mach-headers): Remove `mach_norma.defs', `norma_task.defs' and
	`norma_special_ports.h'.
	* device/ds_routines.c: Don't include <norma_device.h> anymore and
	adapt all users of NORMA_DEVICE as if it were always defined to `0'.
	* device/net_io.c: Likewise for <norma_ether.h>, NORMA_ETHER.
	* kern/machine.c: Likewise.
	* ddb/db_command.c: Likevise for <norma_ipc.h>, NORMA_IPC.
	* ipc/ipc_init.c: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_mqueue.c: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/mach_msg.c: Likewise.
	* kern/ast.c: Likewise.
	* kern/debug.c: Likewise.
	* kern/exception.c: Likewise.
	* kern/startup.c: Likewise.
	* vm/memory_object.c: Likewise.
	* vm/vm_map.c: Likewise.
	* kern/ipc_kobject.c: Likewise for <norma_task.h>, NORMA_TASK.
	* kern/task.c: Likewise.
	* kern/task.h: Likewise.
	* ddb/db_command.c: Likewise for <norma_vm.h>, NORMA_VM.
	* device/dev_pager.c: Likewise.
	* include/mach/mach_types.defs: Likewise.
	* include/mach/mach_types.h: Likewise.
	* include/mach/memory_object_default.defs: Likewise.
	* include/mach/memory_object.defs: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* kern/ipc_kobject.c: Likewise.
	* kern/ipc_mig.c: Likewise.
	* kern/startup.c: Likewise.
	* vm/memory_object.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_object.h: Likewise.
	* vm/vm_pageout.c: Likewise.

2006-03-19  Thomas Schwinge  <tschwinge@gnu.org>

	* DEVELOPMENT: Document the FIPC removal.

2006-03-19  Leonardo Lopes Pereira  <leonardolopespereira@gmail.com>

	Remove unused and unsupported code.  Consult the file `DEVELOPMENT'
	for details.

	[patch #4982 -- remove of unused / unsuported functions of
	gnumach-1-branch]
	* ipc/fipc.c: Remove file.
	* ipc/fipc.h: Likewise.
	* Makefile.in (ipc-cfiles): Remove `fipc.c'.
	(ipc-files): Remove `fipc.h'.
	* device/device_init.c [FIPC]: Remove code.
	* device/net_io.c [FIPC]: Likewise.
	* include/mach/syscall_sw.h [FIPC]: Likewise.
	* kern/syscall_sw.c [FIPC]: Likewise.

2006-03-15  Thomas Schwinge  <tschwinge@gnu.org>

	* configure.in: Check for strip and gzip.
	* configure: Regenerated.
	* Makerules.in (GZIP, STRIP): New variables.
	(%.gz, %.stripped): New targets.

2006-03-04  Roland McGrath  <roland@frob.com>

	* Makefile.in (DEFS): Substitute once and use the variable elsewhere.

2006-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	[patch #4737 -- User TSS fixup]
	* i386/i386/iopb.c: Include "vm_param.h".
	(io_tss_init): Fix address and limit of user TSS.

2006-03-04  Thomas Schwinge  <tschwinge@gnu.org>

	Remove unused and unsupported code.  Consult the file
	`DEVELOPMENT' for details.  Partly based on suggestions by
	Gianluca Guida <glguida@gmail.com>.

	* i386/bogus/par.h: Remove file.
	* i386/i386at/if_par.c: Likewise.
	* i386/i386at/if_par.h: Likewise.
	* i386/i386at/conf.c: Don't include <par.h> anymore and adapt all users
	of NPAR as if it were always defined to `0'.
	* i386/i386at/lpr.c: Likewise.

	* i386/bogus/de6c.h: Remove file.
	* i386/i386at/if_de6c.c: Likewise.
	* i386/i386at/if_de6c.h: Likewise.
	* i386/i386at/if_de6s.S: Likewise.
	* i386/i386at/conf.c: Don't include <de6c.h> anymore and adapt all
	users of NDE6C as if it were always defined to `0'.
	* i386/i386at/lpr.c: Likewise.

2006-02-20  Thomas Schwinge  <tschwinge@gnu.org>

	Remove unused and unsupported code.  Consult the file
	`DEVELOPMENT' for details.  Partly based on suggestions by
	Gianluca Guida <glguida@gmail.com>.

	* i386/bogus/blit.h: Remove file.
	* i386/i386at/blit.c: Likewise.
	* i386/i386at/blitreg.h: Likewise.
	* i386/i386at/blituser.h: Likewise.
	* i386/i386at/blitvar.h: Likewise.
	* i386/i386at/conf.c: Don't include <blit.h> anymore and adapt all
	users of NBLIT as if it were always defined to `0'.
	* i386/i386at/kd.c: Likewise.
	(blit_init): Remove definition.
	(blit_present): Likewise and adapt all users as if it were always
	defined to `FALSE'.
	* i386/Makefile.in (i386at-files): Remove `blit.c'.

	* bogus/net_atm.h: Remove file.
	* Makefile.in (bogus-files): Remove `net_atm.h'.
	* kern/syscall_sw.c: Don't include <net_atm.h> anymore and adapt all
	users of NET_ATM as if it were always defined to `0'.
	* kern/task.c: Likewise.
	* kern/task.h: Likewise.
	* kern/thread.c: Likewise.
	* kern/thread.h: Likewise.

	* util/about_to_die.c: Remove file.
	* util/config.h: Likewise.
	* util/cpu.c: Likewise.
	* util/cpu.h: Likewise.
	* util/cpu_init.c: Likewise.
	* util/cpu_subs.h: Likewise.
	* util/debug.h: Likewise.
	* util/die.c: Likewise.
	* util/phys_mem.h: Likewise.
	* util/ref_count.h: Likewise.
	* util/cpus.h: Move from here...
	* bogus/cpus.h: ... to here.
	* Makefile.in (bogus-files): Add `cpus.h'.
	(util-cfiles): Only contain `putchar.c' and `puts.c'.
	(util-files): Only contain `$(util-cfiles)'.

	* i386/util/NOTES: Remove file.
	* i386/util/anno.c: Likewise.
	* i386/util/anno.h: Likewise.
	* i386/util/cpu.h: Likewise.
	* i386/util/cpu_subs.h: Likewise.
	* i386/util/cpu_tables_init.c: Likewise.
	* i386/util/cpu_tables_load.c: Likewise.
	* i386/util/crtn.S: Likewise.
	* i386/util/debug.h: Likewise.
	* i386/util/gdt.c: Likewise.
	* i386/util/gdt.h: Likewise.
	* i386/util/gdt_sels.h: Likewise.
	* i386/util/i16/debug.h: Likewise.
	* i386/util/i16/i16.h: Likewise.
	* i386/util/i16/i16_die.c: Likewise.
	* i386/util/i16/i16_gdt_init_temp.c: Likewise.
	* i386/util/i16/i16_nanodelay.c: Likewise.
	* i386/util/i16/i16_puts.c: Likewise.
	* i386/util/i16/i16_writehex.c: Likewise.
	* i386/util/i386_asm.sym: Likewise.
	* i386/util/idt.c: Likewise.
	* i386/util/idt.h: Likewise.
	* i386/util/idt_inittab.S: Likewise.
	* i386/util/idt_inittab.h: Likewise.
	* i386/util/ldt.h: Likewise.
	* i386/util/trap.h: Likewise.
	* i386/util/trap_asm.sym: Likewise.
	* i386/util/trap_dump.c: Likewise.
	* i386/util/trap_dump_die.c: Likewise.
	* i386/util/trap_handler.S: Likewise.
	* i386/util/trap_return.S: Likewise.
	* i386/util/tss.c: Likewise.
	* i386/util/tss.h: Likewise.
	* i386/util/tss_dump.c: Likewise.
	* i386/util/vm_param.h: Likewise.

	* i386/pc/NOTES: Remove file.
	* i386/pc/debug.h: Likewise.
	* i386/pc/exit.c: Likewise.
	* i386/pc/gdt.h: Likewise.
	* i386/pc/gdt_sels.h: Likewise.
	* i386/pc/i16/i16_a20.c: Likewise.
	* i386/pc/i16/i16_a20.h: Likewise.
	* i386/pc/i16/i16_bios.h: Likewise.
	* i386/pc/i16/i16_exit.c: Likewise.
	* i386/pc/i16/i16_ext_mem.c: Likewise.
	* i386/pc/i16/i16_init.c: Likewise.
	* i386/pc/i16/i16_main.c: Likewise.
	* i386/pc/i16/i16_pic.c: Likewise.
	* i386/pc/i16/i16_putchar.c: Likewise.
	* i386/pc/i16/i16_raw.c: Likewise.
	* i386/pc/i16/i16_raw_test_a20.S: Likewise.
	* i386/pc/i16/i16_real_int.S: Likewise.
	* i386/pc/i16/i16_switch.h: Likewise.
	* i386/pc/i16/phys_mem_collect.c: Likewise.
	* i386/pc/i16/phys_mem_sources.h: Likewise.
	* i386/pc/i16/raw_exit.c: Likewise.
	* i386/pc/i16/raw_real_int.c: Likewise.
	* i386/pc/ipl.h: Likewise.
	* i386/pc/irq.h: Likewise.
	* i386/pc/irq_list.h: Likewise.
	* i386/pc/pc_asm.sym: Likewise.
	* i386/pc/phys_mem.h: Likewise.
	* i386/pc/phys_mem_add.c: Likewise.
	* i386/pc/pic.c: Likewise.
	* i386/pc/pic.h: Likewise.
	* i386/pc/putchar.c: Likewise.
	* i386/pc/real.h: Likewise.
	* i386/pc/real_tss.c: Likewise.
	* i386/pc/real_tss.h: Likewise.
	* i386/pc/real_tss_def.S: Likewise.
	* i386/pc/rv86/config.h: Likewise.
	* i386/pc/rv86/gdt_sels.h: Likewise.
	* i386/pc/rv86/idt_irq_init.c: Likewise.
	* i386/pc/rv86/rv86_real_int.c: Likewise.
	* i386/pc/rv86/rv86_real_int_asm.S: Likewise.
	* i386/pc/rv86/rv86_reflect_irq.S: Likewise.
	* i386/pc/rv86/rv86_trap_handler.S: Likewise.
	* i386/pc/rv86/trap_handler.S: Likewise.

	* i386/imps/Makefile.in: Remove file.
	* i386/imps/apic.h: Likewise.
	* i386/imps/cpu_number.h: Likewise.
	* i386/imps/cpus.h: Likewise.
	* i386/imps/imps.c: Likewise.
	* i386/imps/impsasm.sym: Likewise.

	* i386/dos/dos_buf.c: Remove file.
	* i386/dos/dos_check_err.c: Likewise.
	* i386/dos/dos_close.c: Likewise.
	* i386/dos/dos_fstat.c: Likewise.
	* i386/dos/dos_gettimeofday.c: Likewise.
	* i386/dos/dos_io.h: Likewise.
	* i386/dos/dos_open.c: Likewise.
	* i386/dos/dos_read.c: Likewise.
	* i386/dos/dos_rename.c: Likewise.
	* i386/dos/dos_seek.c: Likewise.
	* i386/dos/dos_tcgetattr.c: Likewise.
	* i386/dos/dos_unlink.c: Likewise.
	* i386/dos/dos_write.c: Likewise.
	* i386/dos/i16/gdt.h: Likewise.
	* i386/dos/i16/gdt_sels.h: Likewise.
	* i386/dos/i16/i16_crt0.S: Likewise.
	* i386/dos/i16/i16_crt0.h: Likewise.
	* i386/dos/i16/i16_dos.h: Likewise.
	* i386/dos/i16/i16_dos_mem.c: Likewise.
	* i386/dos/i16/i16_exit.c: Likewise.
	* i386/dos/i16/i16_main.c: Likewise.
	* i386/dos/i16/i16_putchar.c: Likewise.
	* i386/dos/i16/i16_vcpi.c: Likewise.
	* i386/dos/i16/i16_xms.c: Likewise.
	* i386/dos/i16/idt.h: Likewise.
	* i386/dos/i16/phys_mem_sources.h: Likewise.
	* i386/dos/putchar.c: Likewise.

	* chips/atm.c: Remove file.
	* chips/atmreg.h: Likewise.
	* chips/audio.c: Likewise.
	* chips/audio_config.h: Likewise.
	* chips/audio_defs.h: Likewise.
	* chips/bt431.c: Likewise.
	* chips/bt431.h: Likewise.
	* chips/bt455.c: Likewise.
	* chips/bt455.h: Likewise.
	* chips/bt459.c: Likewise.
	* chips/bt459.h: Likewise.
	* chips/bt478.c: Likewise.
	* chips/bt478.h: Likewise.
	* chips/build_font.c: Likewise.
	* chips/cfb_hdw.c: Likewise.
	* chips/cfb_misc.c: Likewise.
	* chips/dc503.c: Likewise.
	* chips/dc503.h: Likewise.
	* chips/dtop.h: Likewise.
	* chips/dtop_handlers.c: Likewise.
	* chips/dtop_hdw.c: Likewise.
	* chips/dz_7085.h: Likewise.
	* chips/dz_defs.h: Likewise.
	* chips/dz_hdw.c: Likewise.
	* chips/eccreg.h: Likewise.
	* chips/fb_hdw.c: Likewise.
	* chips/fb_misc.c: Likewise.
	* chips/fdc_82077.h: Likewise.
	* chips/fdc_82077_hdw.c: Likewise.
	* chips/frc.c: Likewise.
	* chips/ims332.c: Likewise.
	* chips/ims332.h: Likewise.
	* chips/isdn_79c30.h: Likewise.
	* chips/isdn_79c30_hdw.c: Likewise.
	* chips/kernel_font.c: Likewise.
	* chips/kernel_font.data: Likewise.
	* chips/lance.c: Likewise.
	* chips/lance.h: Likewise.
	* chips/lance_mapped.c: Likewise.
	* chips/lk201.c: Likewise.
	* chips/lk201.h: Likewise.
	* chips/mc_clock.c: Likewise.
	* chips/mc_clock.h: Likewise.
	* chips/mouse.c: Likewise.
	* chips/nc.c: Likewise.
	* chips/nc.h: Likewise.
	* chips/nw.h: Likewise.
	* chips/nw_mk.c: Likewise.
	* chips/nw_mk.h: Likewise.
	* chips/pm_defs.h: Likewise.
	* chips/pm_hdw.c: Likewise.
	* chips/pm_misc.c: Likewise.
	* chips/scc_8530.h: Likewise.
	* chips/scc_8530_hdw.c: Likewise.
	* chips/screen.c: Likewise.
	* chips/screen.h: Likewise.
	* chips/screen_defs.h: Likewise.
	* chips/screen_switch.c: Likewise.
	* chips/screen_switch.h: Likewise.
	* chips/serial_console.c: Likewise.
	* chips/serial_defs.h: Likewise.
	* chips/sfb_hdw.c: Likewise.
	* chips/sfb_misc.c: Likewise.
	* chips/spans.c: Likewise.
	* chips/spans.h: Likewise.
	* chips/tca100.c: Likewise.
	* chips/tca100.h: Likewise.
	* chips/tca100_if.c: Likewise.
	* chips/tca100_if.h: Likewise.
	* chips/vs42x_rb.h: Likewise.
	* chips/xcfb_hdw.c: Likewise.
	* chips/xcfb_misc.c: Likewise.
	* chips/xcfb_monitor.h: Likewise.
	* Makefile.in (chips-files): Only contain `busses.c' and `busses.h'.
	* kern/syscall_sw.c: Don't include <chips/nw_mk.h> anymore.

	* i386/i386at/asm_startup.h: Remove file.
	* i386/i386at/phys_mem_grab_page.c: Likewise.
	* i386/Makefile.in (i386at-files): Remove `phys_mem_grab_page.c'.

	* i386/bogus/evc.h: Remove file.
	* i386/i386at/kd.c: Don't include <evc.h> anymore and adapt all	users
	of NEVC as if it were always defined to `0'.
	(evc1init): Remove definition and adapt all users as if it were always
	defined to `FALSE'.

	* i386/bogus/nscsi.h: Remove file.
	* i386/i386at/model_dep.c: Don't include <nscsi.h> anymore and adapt
	all users of NSCSI as if it were always defined to `0'.
	(use_all_mem): Don't define anymore and adapt all users as if it were
	always defined to `1'.
	(NBBY, NBPW, DMA_MAX): Remove macros.
	(alloc_dma_mem): Remove function.

	* i386/bogus/asc.h: Remove file.
	* i386/bogus/aha.h: Likewise.
	* i386/bogus/eaha.h: Likewise.
	* i386/bogus/sbic.h: Likewise.
	* i386/bogus/sci.h: Likewise.
	* i386/bogus/sii.h: Likewise.
	* i386/bogus/siop.h: Likewise.
	* i386/i386at/eisa.h: Likewise.
	* scsi/adapters/README: Likewise.
	* scsi/adapters/scsi_33C93.h: Likewise.
	* scsi/adapters/scsi_33C93_hdw.c: Likewise.
	* scsi/adapters/scsi_5380.h: Likewise.
	* scsi/adapters/scsi_5380_hdw.c: Likewise.
	* scsi/adapters/scsi_53C700.h: Likewise.
	* scsi/adapters/scsi_53C700_hdw.c: Likewise.
	* scsi/adapters/scsi_53C94.h: Likewise.
	* scsi/adapters/scsi_53C94_hdw.c: Likewise.
	* scsi/adapters/scsi_7061.h: Likewise.
	* scsi/adapters/scsi_7061_hdw.c: Likewise.
	* scsi/adapters/scsi_89352.h: Likewise.
	* scsi/adapters/scsi_89352_hdw.c: Likewise.
	* scsi/adapters/scsi_aha15.h: Likewise.
	* scsi/adapters/scsi_aha15_hdw.c: Likewise.
	* scsi/adapters/scsi_aha17_hdw.c: Likewise.
	* scsi/adapters/scsi_dma.h: Likewise.
	* scsi/adapters/scsi_user_dma.c: Likewise.
	* scsi/adapters/scsi_user_dma.h: Likewise.
	* scsi/compat_30.h: Likewise.
	* scsi/disk_label.c: Likewise.
	* scsi/mapped_scsi.c: Likewise.
	* scsi/mapped_scsi.h: Likewise.
	* scsi/pc_scsi_label.c: Likewise.
	* scsi/rz.c: Likewise.
	* scsi/rz.h: Likewise.
	* scsi/rz_audio.c: Likewise.
	* scsi/rz_cpu.c: Likewise.
	* scsi/rz_disk.c: Likewise.
	* scsi/rz_disk_bbr.c: Likewise.
	* scsi/rz_host.c: Likewise.
	* scsi/rz_labels.h: Likewise.
	* scsi/rz_tape.c: Likewise.
	* scsi/scsi.c: Likewise.
	* scsi/scsi.h: Likewise.
	* scsi/scsi2.h: Likewise.
	* scsi/scsi_alldevs.c: Likewise.
	* scsi/scsi_comm.c: Likewise.
	* scsi/scsi_cpu.c: Likewise.
	* scsi/scsi_defs.h: Likewise.
	* scsi/scsi_disk.c: Likewise.
	* scsi/scsi_endian.h: Likewise.
	* scsi/scsi_jukebox.c: Likewise.
	* scsi/scsi_optical.c: Likewise.
	* scsi/scsi_printer.c: Likewise.
	* scsi/scsi_rom.c: Likewise.
	* scsi/scsi_scanner.c: Likewise.
	* scsi/scsi_tape.c: Likewise.
	* scsi/scsi_worm.c: Likewise.
	* i386/i386at/autoconf.c: Don't include <aha.h> and <eaha.h> anymore
	and adapt all users of NAHA and NEAHA as if it were always defined to
	`0'.
	* i386/i386at/conf.c: Likewise.
	* Makefile.in (scsi-files): Remove variable and all users of it.

	* i386/bogus/wt.h: Remove file.
	* i386/i386at/autoconf.c: Don't include <wt.h> anymore and adapt all
	users of NWT as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/hpp.h: Remove file.
	* i386/bogus/ul.h: Likewise.
	* i386/bogus/wd.h: Likewise.
	* i386/i386at/gpl/if_hpp.c: Likewise.
	* i386/i386at/gpl/if_ns.c: Likewise.
	* i386/i386at/gpl/if_nsreg.h: Likewise.
	* i386/i386at/gpl/if_ul.c: Likewise.
	* i386/i386at/gpl/if_wd.c: Likewise.
	* i386/i386at/autoconf.c: Don't include <hpp.h>, <ul.h> and <wd.h>
	anymore and adapt all users of NHPP, NUL and NWD as if they were always
	defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/at3c501.h: Remove file.
	* i386/i386at/if_3c501.c: Likewise.
	* i386/i386at/if_3c501.h: Likewise.
	* i386/i386at/autoconf.c: Don't include <at3c501.h> anymore and adapt
	all users of NAT3C501 as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/ns8390.h: Remove file.
	* i386/i386at/ds8390.h: Likewise.
	* i386/i386at/if_3c503.h: Likewise.
	* i386/i386at/if_ns8390.c: Likewise.
	* i386/i386at/if_ns8390.h: Likewise.
	* i386/i386at/if_wd8003.h: Likewise.
	* i386/i386at/autoconf.c: Don't include <ns8390.h> anymore and adapt
	all users of NNS8390 as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/ne.h: Remove file.
	* i386/i386at/if_ne.c: Likewise.
	* i386/i386at/if_nereg.h: Likewise.
	* i386/i386at/autoconf.c: Don't include <ne.h> anymore and adapt all
	users of NNE as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/pc586.h: Remove file.
	* i386/i386at/i82586.h: Likewise.
	* i386/i386at/if_pc586.c: Likewise.
	* i386/i386at/if_pc586.h: Likewise.
	* i386/i386at/autoconf.c: Don't include <pc586.h> anymore and adapt all
	users of NPC586 as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/fd.h: Remove file.
	* i386/i386at/fd.c: Likewise.
	* i386/i386at/fdreg.h: Likewise.
	* i386/i386at/nfd.c: Likewise.
	* i386/i386at/nfdreg.h: Likewise.
	* i386/Makefile.in (i386at-files): Remove `fd.c'.
	* i386/i386at/autoconf.c: Don't include <fd.h> anymore and adapt all
	users of NFD as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* i386/bogus/hd.h: Remove file.
	* i386/i386at/nhd.c: Likewise.
	* i386/i386at/nhdreg.h: Likewise.
	* i386/i386at/autoconf.c: Don't include <hd.h> anymore and adapt all
	users of NHD as if it were always defined to `0'.
	* i386/i386at/conf.c: Likewise.

	* DEVELOPMENT: New file.

2006-02-05  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.in: Don't set no_deps to true if MAKECMDGOALS is empty.

2006-02-03  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.in: Set no_deps to true if we don't need the dependency
	files.
	* i386/linux/Makefile.in: Do care about linux-flags if no_deps is true;
	reverting the change from 2006-01-31.

	* Makefile.in: Include Makerules through top_builddir, so that it will
	automatically be rebuilt if needed.

	* Makerules.in (CFLAGS): Added -fno-strict-aliasing.
	* i386/linux/Makefile.in (linux-gen-flags): Likewise.

2006-02-02  Sergio Lopez  <koro@sinrega.org>

	* linux/src/drivers/scsi/eata_pio.c (eata_pio_detect): Fix a
	off-by-one error when probing.
	* linux/src/drivers/scsi/eata_dma.c (eata_detect): Likewise.
	* linux/dev/drivers/scsi/eata_dma.c (eata_detect): Likewise.

	* linux/src/drivers/net/apricot.c (apricot_probe): Increase eth_addr
	size to 8 so we do not trash the stack when reading from the io ports.

2006-02-02  Thomas Schwinge  <tschwinge@gnu.org>

	* Makerules.in: Move a comment ...
	* Makefile.in: ... here.

2006-02-01  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/dev/drivers/block/genhd.c (add_bsd_partition): Only define if
	both MACH and CONFIG_BSD_DISKLABEL are defined.
	Reported by Matheus Morais <matheus.morais@gmail.com>.

2006-01-31  Thomas Schwinge  <tschwinge@gnu.org>

	Cleanup of GNU Mach's build system.  The system dependent parts are now
	handled by the respective Makefile and no longer by the top-level one.

	* configure, i386/configure, i386/linux/configure, linux/configure:
	Regenerated.

	* Makefile.in: Various cleanups.
	(mach/machine, mach_machine): Targets removed.
	(AWK, CC, CFLAGS, CPPFLAGS, DEFINES, INCLUDES, INSTALL, INSTALL_DATA)
	(INSTALL_PROGRAM, LD, MIG, MIGFLAGS, NM): Variables moved into
	Makerules.in.
	Do not include $(sysdep)/Makefrag anymore.
	(all, check, clean, distclean, mostlyclean, maintainer-clean, install)
	(install-headers, install-kernel): Recurse into the system dependent
	subdirectory.
	(check): Add a basic test using mbchk.
	(clean, distclean): Be more explicit in what to delete.
	($(systype)/%): New target.
	(kernel.o): Incorporate the system dependent archive.
	(installed-sysdep-headers-names, $(installed-sysdep-headers-names)):
	Variable and target moved into the system dependent Makefile.in.
	(install-headers, mkheaderdirs): Don't care for the system dependent
	header files.
	(%.symc, %.symc.o, %.h, %_user.c, %_interface.h, %_server.c): Targets
	moved into Makerules.in.
	Inclusion of dependency files: Likewise.
	(%.migs_d, %.migu_d, %.migsh_d, %.miguh_d, make-deps, %.d): Likewise.
	Include Makerules.
	* Makerules.in: New file, mainly based on Makefile.in.
	* configure.in: Do not substitute cross_compiling and not explicitly
	substitute LDFLAGS.
	Check for cpp, ranlib, ar and mbchk.
	Care for the mach/machine symbolic link.
	Add Makerules as a config file.
	* i386/Makefile.in: Various cleanups.
	Merge i386/Makefrag and the system dependent stuff from Makefile.in
	into this file.
	(all, check, install, install-headers, install-kernel): Recurse into
	the system dependent subdirectory.
	(sysdep.o): transformed to the new target sysdep.a.
	(linux/linux.o): Target removed.
	(clean, distclean): Be more explicit in what to delete.
	(linux/%): New target.
	(install-headers): Install the system dependent header files.
	(mkheaderdirs): New target.
	Include the top-level Makerules.
	* i386/Makefrag: File removed.
	* i386/Makerules.in: New file.
	* i386/configure.in: Synchronize AC_INIT to the top-level definition.
	Do not check for ld and make.
	Add Makerules as a config file.
	* i386/linux/Makefile.in: Various cleanups.
	Replace linux-objs with objfiles.
	(check, install, install-headers, install-kernel): New empty targets.
	Don't care about linux-flags if no_deps is true.
	Inclusion of dependency files removed and instead...
	Include the top-level Makerules.
	* i386/linux/Makerules.in: New file.
	* i386/linux/configure.ac: Synchronize AC_INIT to the top-level
	definition.
	Do not check for gcc and ld.
	Do not explicitly substitute LDFLAGS.
	Add Makerules as a config file.
	* linux/configure.in: Synchronize AC_INIT to the top-level definition.
	Do not create directories using a dummy file.
	* linux/dummy.in: File removed.

	* ddb/db_access.h: Include <machine/vm_param.h> instead of
	"vm_param.h".
	* kern/bootstrap.c: Likewise.
	* kern/thread.c: Likewise.
	* vm/vm_kern.c: Likewise.
	* vm/vm_object.c: Likewise.
	* vm/vm_resident.c: Likewise.

2006-01-26  Thomas Schwinge  <tschwinge@gnu.org>

	* config.guess: Updated from the canonical source.
	* config.sub: Likewise.

2006-01-26  Jeroen Dekkers  <jeroen@dekkers.cx>

	* i386/i386/locore.S (trap_push_segs): Switch fs and gs to kernel
	data segment too.
	(syscall_entry_2): Likewise.
	* i386/i386/user_ldt.c (i386_set_ldt): Always copy the master LDT
	when there is no old user LDT.

2006-01-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* linux/dev/arch/i386/kernel/irq.c (linux_intr): Disable interrupts
	if the driver requested it through request_irq().

	* linux/dev/drivers/block/ide.c (read_intr): Set the IRQ handler before
	issuing a request.
	(write_intr): Likewise.
	(multwrite_intr): Likewise.

2006-01-26  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/linux/Makefile.in: Automatically recreate the `Makefile'.

2006-01-23  Thomas Schwinge  <tschwinge@gnu.org>

	* i386/linux/configure: Regenerated.

	* i386/linux/configure.ac: Only add a AC_DRIVER_ALIAS if it really is a
	alias.

2006-01-22  Thomas Schwinge  <tschwinge@gnu.org>

	* doc/mach.texi (Configuration): Document the recently added drivers.
	* i386/README-Drivers: Likewise.

	* configure, i386/configure, i386/linux/configure, linux/configure,
	i386/linux/device-drivers.h.in: Regenerated.

	* linux/src/drivers/net/ne2k-pci.c: Resolve conflicts.

2006-01-22  Guillem Jover  <guillem@hadrons.org>

	* i386/linux/configure.ac: Renamed winbond-840 driver to winbond_840.
	Enable the starfire, intel_gige and natsemi network drivers.  Remove
	"CONFIG_" from cb_chim, starfire, sundance, winbond840, hamachi,
	natsemi, myson803 and ns820 driver declarations.  Replace INTER_GIGE
	with INTEL_GIGE.
	* linux/dev/drivers/net/Space.c: Add conditional probes for natsemi,
	ns820, winbond840, hamachi, sundance, starfire, myson803 and intel-gige
	drivers.

	* linux/src/include/asm-i386/cache.h: New file from linux 2.2.26.
	* linux/dev/include/linux/malloc.h: Include <asm/cache.h>.

	* linux/src/drivers/net/ns820.c (netsami_drv_id): Renamed to ...
	(ns820_drv_id): ... this.  Fix all callers.
	* linux/src/drivers/net/intel-gige.c
	(skel_netdev_probe): Renamed to ...
	(igige_probe): ... this.
	* linux/dev/drivers/net/eepro100.c: Remove obsoleted file.
	* linux/src/drivers/net/eepro100.c (pci_id_tbl): Add PCI ID's from
	linux-2.6.14-rc4.

2006-01-22  Alfred M. Szmidt  <ams@gnu.org>

	* i386/linux/configure.ac: Added `pci-scan.o' to the network driver
	class.  (ns820, myson803, sundance, winbond-840, hamachi): New drivers.
	* i386/linux/Makefile.in (linux-net-files): Added `cb_shim.c',
	`hamachi.c', `intel-gige.c', `myson803.c', `natsemi.c', `ns820.c',
	`starfire.c', `sundance.c', `winbond-840.c' and `pci-scan.c'.

	* linux/dev/include/linux/modversions.h: New file.

	* linux/src/drivers/net/cb_shim.c, linux/src/drivers/net/hamachi.c,
	linux/src/drivers/net/intel-gige.c, linux/src/drivers/net/myson803.c,
	linux/src/drivers/net/natsemi.c, linux/src/drivers/net/ns820.c,
	linux/src/drivers/net/starfire.c, linux/src/drivers/net/sundance.c,
	linux/src/drivers/net/winbond-840.c,
	linux/src/drivers/net/kern_compat.h, linux/src/drivers/net/pci-scan.c,
	linux/src/drivers/net/pci-scan.h: New files from netdrivers 3.5 package
	(http://www.scyld.com/network).

	* linux/src/drivers/net/3c59x.c, linux/src/drivers/net/eepro100.c,
	linux/src/drivers/net/epic100.c, linux/src/drivers/net/ne2k-pci.c,
	linux/src/drivers/net/rtl8139.c, linux/src/drivers/net/tulip.c,
	linux/src/drivers/net/via-rhine.c, linux/src/drivers/net/yellowfin.c:
	Updated files from netdrivers 3.5 (http://www.scyld.com/network).

2006-01-22  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/src/drivers/net/ne2k-pci.c (ne_block_input, ne_block_output):
	Fix previous patch.

2005-07-12  Guillem Jover  <guillem@hadrons.org>

	* configure: Regenerated.
	* i386/configure: Regenerated.

	* Drivers.macros (AC_DRIVER_CLASS): Use AH_TEMPLATE.
	(AC_DRIVER): Set the value for the AC_DEFINE and AC_DEFINE_UNQUOTED
	to 1.

	* aclocal.m4 (AC_PROG_CC_LOCAL, AC_PROG_CC_WORKS_LOCAL): Removed.
	* version.m4: New file.
	* Makefile.in: Use PACKAGE_VERSION, not VERSION.
	* doc/Makefile.in: Likewise.
	* version.c.in: Likewise. Use PACKAGE_NAME, not "GNUmach".
	* i386/linux/Makefile.in (configure): Change its source to
	configure.ac.

	* aclocal.m4: Add missing quotations.
	* Drivers.macros: Likewise.
	* configure.in: Likewise. Include version.m4 and use PACKAGE and
	VERSION m4 macros from it.
	* i386/configure.in: Likewise.
	(AC_INIT): Use new syntax and move source check to AC_CONFIG_SRCDIR.
	* i386/linux/configure.ac: Likewise. Use m4_sinclude, not sinclude.
	* linux/configure.in: Likewise.

	* i386/configure.in: Update AC_DEFINE to the new three argument form.
	* i386/linux/configure.ac: Move AC_DEFINE inside AC_ARG_ENABLE.

	* configure.in: Use AC_CONFIG_LINKS, not AC_LINK_FILES.
	* linux/configure.in: Likewise.

	* i386/configure.in: Call AC_CONFIG_FILES and use the new form of
	AC_OUTPUT.
	* i386/linux/configure.ac: Likewise.
	* linux/configure.in: Likewise

	* configure.in: Use AS_HELP_STRING in AC_ARG_ENABLE help strings.
	* Drivers.macros: Likewise.
	* i386/configure.in: Likewise.
	* i386/linux/configure.ac: Likewise.

2005-07-12  Neal H. Walfield  <neal@cs.uml.edu>

	* configure.in: Update to use autoconf 2.57.
	Do not error out if host_os is not GNU.
	Update AC_DEFINEs to the required three argument form.
	Don't call AC_CHECK_TOOL(CC, gcc) and AC_PROG_CC_LOCAL, just use
	AC_PROG_CC.
	AC_SUBST(LDFLAGS).
	Refactor AC_CONFIG_SUBDIRS to not do variable substitution.
	Call AC_CONFIG_FILES and use the new form of AC_OUTPUT.
	* i386/configure.in: Require autoconf 2.57.
	* linux/configure.in: Likewise.
	* i386/linux/Drivers.in: Move from here...
	* i386/linux/configure.ac: ... to here to conform to the
	environment autoreconf expects.
	(hurd_host_CPU): New macro.
	Call AC_PROG_CC, not AC_PROG_CC_LOCAL.
	AC_SUBST(LD_FLAGS).
	(flashpoint): Update AC_DEFINE to the new three argument form.
	* Drivers.macros (AC_DRIVER): Update AC_DEFINE to the new three
	argument form.

2005-05-24  Alfred M. Szmidt  <ams@gnu.org>

	* i386/include/mach/i386/asm.h (END): New macro.

	* i386/include/mach/i386/syscall_sw.h (kernel_trap): Call END.

2005-05-28  Alfred M. Szmidt  <ams@gnu.org>

	* linux/src/drivers/scsi/u14-34f.c (ihdlr): Silence gcc 4.x
	errors.
	* linux/src/drivers/scsi/qlogicisp.h: Likewise.
	* linux/src/drivers/scsi/advansys.c: Likewise.
	(advansys_reset, advansys_interrupt, asc_scsi_done_list,
	(asc_enqueue, asc_dequeue, asc_dequeue_list, asc_rmqueue,
	(asc_isqueued): Likewise.
	* linux/src/drivers/scsi/53c78xx.c (NCR53c7xx_queue_command):
	Likewise.
	* linux/src/drivers/net/ne2k-pci.c (ne_block_input)
	(ne_block_output): Likewise.
	* linux/src/drivers/net/hp100.c (__initfunc): Likewise.
	* linux/src/drivers/net/3c507.c (el16_interrupt): Likewise.
	* linux/dev/drivers/scsi/seagate.c (seagate_st0x_queue_command):
	Likewise.

2005-05-26  Alfred M. Szmidt  <ams@gnu.org>

	* device/cons.h (cn_tab) [KERNEL]: Removed extern declaration.

	* linux/dev/include/linux/fs.h (super_blocks): Declare as an
	pointer.

2005-02-10  Guillem Jover  <guillem@hadrons.org>

	* linux/dev/glue/block.c (rdwr_partial): Remove leftover assert.

2005-01-22  Guillem Jover  <guillem@hadrons.org>

	* linux/dev/include/linux/skbuff.h (skb_put, skb_push): Fix errors
	for deprecated use of labels at end of compound statements.
	* i386/i386/fpe_linkage.c (enable_fpe): Declare prototype.

2005-01-22  Guillem Jover  <guillem@hadrons.org>

	* linux/src/drivers/scsi/qlogicisp_asm.c: Remove file with binary
	only firmware.
	* linux/src/drivers/scsi/qlogicisp.c: Do not include "qlogicisp_asm.c".
	(RELOAD_FIRMWARE): Set to 0.
	(risc_code_addr01): New variable from qlogicisp_asm.c.
	* linux/Files: Remove linux/src/drivers/scsi/qlogicisp_asm.c.

2004-09-08  Neal H. Walfield  <neal@cs.uml.edu>

	* linux/dev/kernel/printk.c: Include <kern/assert.h>.
	(printk): Use vsnprintf, not linux_vsprintf to avoid buffer
	overruns.

	* kern/printf.c (struct vsnprintf_cookie): New structure.
	(snputc): New function.
	(vsnprintf): Likewise.

2004-11-22  Guillem Jover  <guillem@hadrons.org>

	* bogus/mach_assert.h: Change #ifdef DEBUG to #ifndef NDEBUG
	for assert et al.
	* kern/assert.h: Likewise.
	* kern/debug.h: Likewise.
	* util/debug.h: Likewise.

	* i386/i386/debug.h: Move dump_ss definition out of [DEBUG].
	* linux/dev/glue/block.c (rdwr_full): Remove invalid assert.

2004-09-07  Neal H. Walfield  <neal@cs.uml.edu>

	* linux/dev/glue/block.c (__brelse): Unconditionally kfree BH.
	(getblk): Unconditionally kalloc BH.

	* kern/kalloc.c [!NDEBUG] (kalloc_init_called): New static
	variable.
	(kalloc_init): Assert that kalloc_init_called is zero.
	[! NDEBUG] Set kalloc_init_called to 1 on success.
	(kalloc): Assert that kalloc_init_called is non-zero.
	(kget): Likewise.
	(kfree): Likewise.

2004-11-22  Guillem Jover  <guillem@hadrons.org>

	* i386/i386/locore.S (discover_x86_cpu_type): Enable function.
	Enable ID flag for Cyrix CPU. Use %ebp to save the stack pointer.
	Restore EFLAGS just after its last usage.
	* i386/i386at/model_dep.c (c_boot_entry): Enable use of
	discover_x86_cpu_type. Remove hardcoded cpu_type assignment.
	* i386/include/mach/i386/eflags.h
	(EFL_VI, EFL_VIP): New bits.
	(EFL_AC, EFL_ID): Bits finally added.

2004-10-26  Guillem Jover  <guillem@hadrons.org>

	* i386/i386/fpe.b: Remove binary without source.
	* i386/i386/fpe.b_elf: Likewise.
	* i386/i386/fpe_linkage.c: Disable the code if [! FPE].
	* i386/bogus/fpe.h: Add comment about not having an fpe implementation.
	* i386/Makefrag (objfiles): Do not add fpe.o.
	Remove targets to generate fpe.o.

2004-02-29  Marcus Brinkmann  <marcus@gnu.org>

	* NEWS: Add things that changed so far since 1.3.

2004-02-02  Marco Gerards  <metgerards@student.han.nl>

	* i386/i386at/kd.c (kdinit): Initialize the input buffer.

	* i386/i386at/kd.h (KDSETLEDS): New macro.
	* i386/i386at/kd_event.c (kbdsetstat): Handle KDSETLEDS here to
	set the keyboard LEDs state.

2004-01-19  Marco Gerards  <metgerards@student.han.nl>

	* linux/dev/glue/block.c (init_partition): Don't check for BSD
	partitions if the DOS partition is too small.

2004-01-16  Marco Gerards  <metgerards@student.han.nl>

	* linux/dev/glue/block.c (device_get_status): Correctly calculate
	the number of blocks.

2004-01-15  Alfred M. Szmidt  <ams@kemisten.nu>

	* linux/dev/include/asm-i386/string.h (memscan): Don't use
	multi-line string literals for asm().
	* linux/dev/include/asm-i386/segment.h (__generic_memcpy_tofs)
	(__generic_memcpy_fromfs): Likewise.
	* linux/src/include/asm-i386/floppy.h (floppy_hardint): Likewise.
	* i386/i386/proc_reg.h (flush_instr_queue): Likewise.
	* i386/i386/gdt.c (gdt_init): Likewise.

	* linux/src/drivers/scsi/aic7xxx.c: Updated from Linux 2.0.39
	* linux/src/drivers/scsi/aic7xxx.h: Likewise.
	* linux/src/drivers/scsi/aic7xxx_proc.c: Likewise.
	* linux/src/drivers/scsi/scsicam.c: Likewise.
	* linux/src/include/linux/pci.h: Likewise.

	* linux/src/drivers/scsi/53c7,8xx.h (patch_dsa_32): Don't use
	token paste operator (##).

	* Makefile.in (kernel-undef): Match new output format from
	nm (binutils) 2.14.x.

2002-05-27  Roland McGrath  <roland@frob.com>

	* Version 1.3 released.

2002-05-23  Marcus Brinkmann  <marcus@gnu.org>

	* i386/i386at/model_dep.c: Include <kern/cpu_number.h> and
	<kern/assert.h>.
	(machine_idle): New function.
	* bogus/power_save.h (POWER_SAVE): Define to 1.

2002-05-22  Roland McGrath  <roland@frob.com>

	* configure.in (VERSION): New substituted variable: set to 1.3 now.
	(version.c): Add it to AC_OUTPUT.
	* configure: Regenerated.
	* Makefile.in (version): New variable, set from that.
	Remove vpath directive for version.c, not found in build dir.
	(topfiles): version.c -> version.c.in
	* doc/Makefile.in (mach-version): Substituted instead of constant.
	* version.c: File removed, replaced with ...
	* version.c.in: ... this new file.
	(version): Make it const.  Use @VERSION@ for the number.

	* Makefile.in (debian-files): Add postinst and prerm.
	(dist): Use gzip -9 instead of tar z.

	* linux/Files: Add missing files to the list:
		linux/dev/drivers/net/eepro100.c
		linux/src/include/asm-i386/hardirq.h
		linux/src/include/asm-i386/spinlock.h
		linux/src/include/linux/compatmac.h
		linux/src/include/linux/spinlock.h

	* linux/src/drivers/net/eth16i.c (eth16i_check_signature): Fix syntax:
	#ifdef 0 -> #if 0

	* Makefile.in (%.migs_d, %.migu_d): Fix sed substitution to match
	whatever target file name gcc comes up with.
	(%.migs_d, %.migu_d, %.symc.o, %_user.c, %_server.c):
	Depend on $(before-compile).

2002-04-24  Marcus Brinkmann  <marcus@gnu.org>

	* debian/rules (DOCDIR): Move to
	$(PREFIX)/share/doc/$(package-dev).

2002-04-23  Roland McGrath  <roland@frob.com>

	* i386/i386/ldt.c (ldt_init): Fix fencepost error in segment limits.

2002-04-19  Roland McGrath  <roland@frob.com>

	* gensym.awk: Emit \n\ at the end of lines inside strings.
	* Makefile.in (%.symc: %.sym): Depend on gensym.awk.

2002-03-29  Marcus Brinkmann  <marcus@g10code.de>

	* doc/mach.texi: End index entry with full stop.

2002-03-05  Roland McGrath  <roland@frob.com>

	* kern/bootstrap.c: Include <alloca.h>.

2002-03-04  Roland McGrath  <roland@frob.com>

	* Makefile.in (%_interface.h %_server.c: %.srv): Pass -sheader switch
	to mig, not -header.

2001-11-23  Roland McGrath  <roland@frob.com>

	* i386/i386at/i386at_ds_routines.c (device_deallocate): Do nothing if
	argument is DEVICE_NULL.

2001-10-21  Marcus Brinkmann  <marcus@gnu.org>

	* linux/src/arch/i386/lib/delay.c: Convert HTML entities.
	Reported by John Tobey <jtobey@john-edwin-tobey.org>.

2001-10-13  Marcus Brinkmann  <marcus@gnu.org>

	* debian/changelog: Update for next release.

2001-10-07  Roland McGrath  <roland@frob.com>

	* ddb/db_access.c: Fix obsolescent #else/#endif syntax.
	* device/dev_name.c: Likewise.
	* device/dev_pager.c: Likewise.
	* device/ds_routines.c: Likewise.
	* i386/i386/i386asm.sym: Likewise.
	* include/device/device_reply.defs: Likewise.
	* include/mach/memory_object.defs: Likewise.
	* include/mach/memory_object_default.defs: Likewise.

	* i386/i386/locore.S: Fix sloppy asm syntax to avoid warnings from
	newer assembler (%ecx -> %cl in byte insns).

	* kern/bootstrap.c (bootstrap_create): Fix inverted test logic for
	compatibility case.  Ignore trailing newlines after space for
	compatibility detection.
	Reported by Neal H Walfield <neal@cs.uml.edu>.

2001-10-06  Marcus Brinkmann  <marcus@gnu.org>

	* README: Replace `GNU mach' by `GNU Mach', and remove
	obsolete paragraph about kmsg device.

2001-10-06  Marcus Brinkmann  <marcus@gnu.org>

	* doc/mach.texi: Fix direntry.

2001-10-05  Marcus Brinkmann  <marcus@gnu.org>

	* doc/mach.texi: Replace `path name' by `file name' in one place.
	Replace `illegal' by `invalid' and `to to' by `to' everwhere.

	* debian/changelog: Prepare for next release.

2001-10-04  Marcus Brinkmann  <marcus@gnu.org>

	* doc: New directory.
	* doc/Makefile.in: New file.
	* doc/gpl.texi: Likewise.
	* doc/fdl.texi: Likewise.
	* doc/mach.texi: Likewise.
	* configure.in: Add doc/Makefile to AC_OUTPUT call.
	* configure: Regenerated.

	* Makefile.in (dist): Create directories doc and debian.
	(doc-files): New variable with documentation files.
	(debian-files): New variable with Debian packaging files.

	* debian/rules (stamp-build): Build documentation.
	(build-gnumach): Install the documentation into the gnumach
	package.
	* debian/postrm: New file to install info document.
	* debian/prerm: New file to install info document.

2001-10-01  Marcus Brinkmann  <marcus@gnu.org>

	* i386/i386/locore.S (tenmicrosec): Remove subroutine.
	* i386/i386/pit.c (delaycount): Remove global variable.
	(microdata): Likewise.
	(clkstart): Do not call findspeed() and microfind().
	(findspeed): Remove function.
	(spinwait): Likewise.
	(microfind): Likewise.  This function triggers a division by zero
	trap on AMD K6 350Mhz+ and Athlon 1.1GHz+ machines (and in general
	leads to bad results on fast cpus), and nothing uses this code anymore.

2001-09-30  Roland McGrath  <roland@frob.com>

	* kern/bootstrap.c (bootstrap_create): Ignore trailing spaces when
	checking boot module string for containing none.

2001-09-18  Marcus Brinkmann  <marcus@gnu.org>

	* linux/dev/glue/misc.c: Do not include <linux/types.h> and
	<linux/string.h>.
	Remove global variable ___strtok.
	Remove implementation of strspn, strpbrk, strtok and strstr.
	* Makefile.in: Add strpbrk and strtok.

2001-08-24  Roland McGrath  <roland@frob.com>

	* kern/bootstrap.c (bootstrap_create): Make setting of boot-args and
	root-device no longer conditional on [! OSKIT_MACH].
	(bootstrap_create) [! OSKIT_MACH]: Parse FOO=BAR words out of the
	multiboot command line and turn those into boot script variables.

	* Makefile.in (clib-routines): Add strsep.
	* kern/strings.h (strsep, strchr): Declare them.

2001-08-23  Roland McGrath  <roland@frob.com>

	* kern/bootstrap.c (bootstrap_create, user_bootstrap,
	boot_script_exec_cmd, boot_script_task_resume): Add printfs at
	various stages of startup.

2001-08-21  Roland McGrath  <roland@frob.com>

	* i386/i386at/model_dep.c (use_all_mem): Turn variable into macro.
	(init_alloc_aligned): Make this function static.
	Initially skip memory < 16MB and then wrap around to get it last.

2001-08-20  Roland McGrath  <roland@frob.com>

	Support "boot script" functionality in multiboot module strings.
	* kern/bootstrap.c: Rewrite merged from oskit-branch.
	* kern/boot_script.c, kern/boot_script.h: New files,
	copied from boot/ directory in Hurd sources.
	* Makefile.in (kern-cfiles): Add boot_script.c here.
	(kern-files): Add boot_script.h here.
	* NEWS: Mention the new feature.

2001-08-18  Roland McGrath  <roland@frob.com>

	* i386/i386at/model_dep.c (boot_info): Define a struct, not a pointer.
	(c_boot_entry): Copy the contents into it rather than setting the ptr.
	(c_boot_entry, init_alloc_aligned, pmap_valid_page, mem_size_init):
	Update uses.
	(init_alloc_aligned): Don't need to skip the boot_info memory.
	* kern/bootstrap.c (boot_info): Update decl.
	(bootstrap_create): Update uses.

2001-08-18  Marcus Brinkmann  <marcus@gnu.org>

	* linux/src/drivers/net/eepro100.c: File updated to version in
	Linux 2.2.19.  This time for real.

2001-08-18  Marcus Brinkmann  <marcus@gnu.org>

	* debian/changelog: Update for next package upload.
	* debian/control: Add gnumach-dbg package.
	* debian/rules: New targets to build gnumach-dbg package.
	Fix various bugs.

2001-08-18  Marcus Brinkmann  <marcus@gnu.org>

	* i386/i386at/kd.c (kdintr): In event mode, make it so that
	0xE0 scancodes are received.
	From Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.

	* i386/i386at/kd.h: New constants KAX_REVERSE, KAX_UNDERLINE,
	KAX_BLINK, KAX_BOLD, KAX_DIM, KAX_INVISIBLE, KAX_COL_UNDERLINE,
	KAX_COL_DIM.
	* i386/i386at/kd.c: Increase K_MAXESC to 32.
	New global variable color_table to map color values.
	New globals kd_color and kd_attrflags.
	(kdinit): Initialize these variables.
	(kd_update_kd_attr): New function.
	(kd_parserest): Redone to support more terminal attributes,
	including colors.

2001-08-18  Marcus Brinkmann  <marcus@gnu.org>

	* linux/src/drivers/net/eepro100.c: File updated to version in
	Linux 2.2.19.
	* linux/src/include/asm-i386/spinlock.h: New file from Linux 2.2.19.
	* linux/src/include/asm-i386/hardirq.h: Likewise.
	* linux/src/include/linux/spinlock.h: Likewise.
	* linux/src/include/linux/compatmac.h: Likewise.
	* linux/dev/drivers/net/eepro100.c: New file, modified version from
	the above to glue it in gnumach.
	Submitted by Kapil H. Paranjape <kapil@imsc.ernet.in>.

2001-08-17  Roland McGrath  <roland@frob.com>

	* Makefile.in (clib-routines): Add strchr.
	(kernel-undef-bad): Depend on Makefile.

	* Makefile.in ($(srcdir)/configure, $(srcdir)/config.h.in):
	Use $(srcdir) in deps.
	(Makefile, config.h, config.status): Likewise.

2001-07-29  Marcus Brinkmann  <marcus@gnu.org>

	* NEWS: Add items for this and other changes.
	* configure.in: Define MACH_KMSG by default and document this in
	the help output.
	* configure: Regenerated.
	* debian/rules: Do not enable kmsg explicitely.

2001-07-18  Marcus Brinkmann  <marcus@gnu.org>

	* debian/rules: Add -isp to dpkg-gencontrol invocation.
	Move documentation to /share/doc.
	* debian/changelog: Update.

2001-06-28  Marcus Brinkmann  <marcus@gnu.org>

	* linux/dev/drivers/block/ide.c (lba_capacity_is_ok): Do not
	attempt to correct id->cyls, it is a short and for large disks the
	number of cylinders necessary would not fit.  Subsequent checks
	for lba support would fail.
	(current_capacity): Likewise for drive->cyl.
	(do_identify): Store value returned by current_capacity in
	CAPACITY.  The check which corrects the number of bios cylinders
	is not aggressive enough.  Update it with the check in linux
	kernel-2.2.19.

2001-06-25  Marcus Brinkmann  <marcus@gnu.org>

	* i386/bogus/fpe.h (FPE): Define FPE to 0, as the floating point
	emulation is broken anyway and blows up plex86.

2001-06-17  Marcus Brinkmann  <marcus@gnu.org>

	* debian/rules: Update to current version.

2001-06-13  Roland McGrath  <roland@frob.com>

	* linux/dev/glue/block.c (device_get_status: DEV_GET_RECORDS):
	Always return 512 for DEV_GET_SIZE_RECORD_SIZE as DEV_GET_SIZE does.

2001-05-27  Marcus Brinkmann  <marcus@gnu.org>

	* debian/rules: Add --enable-ncr53c8xx to configure.

1999-10-06  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linux/src/drivers/scsi/tmscsiw.c: Removed.
	* linux/src/drivers/scsi/tmscsiw.h: Likewise.
	* linux/src/drivers/scsi/dc390w.h: Likewise.
	* i386/linux/device-drivers.h.in (CONFIG_SCSI_DC390W): Deleted.
	* i386/linux/Drivers.in: Remove linux_DRIVER(dc390w, ...). Now
	dc390w, dc390u, and dc390f are aliases to ncr53c8xx.
	* i386/linux/configure: Regenerated.
	* linux/Files: Likewise.
	* i386/linux/Makefile.in (linux-scsi-files): Delete tmscsiw.c.
	* linux/dev/drivers/scsi/hosts.c: Do not include dc390w.h.
	Reported by Andreas Voegele <andreas.voegele@nikocity.de>.

2001-05-20  Roland McGrath  <roland@frob.com>

	* kern/sched_prim.c (state_panic): New function, panic with some
	info when a thread's state is bogus.
	(thread_wakeup_prim): Use that instead of uninformative panic.
	(thread_invoke): Likewise.
	(thread_dispatch): Likewise.

2001-05-12  Marcus Brinkmann  <marcus@gnu.org>

	* ipc/ipc_object.c (ipc_object_alloc): Remove initialization of
	*namep, which was without effect.

2001-04-29  Marcus Brinkmann  <marcus@gnu.org>

	* debian/changelog: New entries for past Debian uploads.
	* debian/rules: Disable eatdma driver (breaks AMD K7), do
	not enable com, lpr (com is redundant, lpr doesn't work),
	move enabling of kmsg in its own line.
	* debian/control: Add build dependency on mig and sharutils.

2001-04-29  Marcus Brinkmann  <marcus@gnu.org>

	* device/chario.c: Set number of elements of tthiwat and ttlowat
	to NSPEEDS rather than 16. Initialize the two new elements.
	(chario_init): Initialize pdma_timeouts and pdma_water_mark for
	B57600 and B115200.

2001-04-27  Marcus Brinkmann  <marcus@gnu.org>

	* include/device/tty_status.h: New macros B57600 and B115200,
	increase NSPEED accordingly.
	* i386/i386at/com.c (divisorreg): New divisor 1.

2001-04-04  Roland McGrath  <roland@frob.com>

	* ddb/db_access.h: Fix obsolescent #else/#endif syntax.
	* ddb/db_aout.c: Likewise.
	* ddb/db_break.c: Likewise.
	* ddb/db_break.h: Likewise.
	* ddb/db_command.c: Likewise.
	* ddb/db_command.h: Likewise.
	* ddb/db_cond.c: Likewise.
	* ddb/db_examine.c: Likewise.
	* ddb/db_expr.c: Likewise.
	* ddb/db_ext_symtab.c: Likewise.
	* ddb/db_input.c: Likewise.
	* ddb/db_lex.c: Likewise.
	* ddb/db_macro.c: Likewise.
	* ddb/db_mp.c: Likewise.
	* ddb/db_output.c: Likewise.
	* ddb/db_print.c: Likewise.
	* ddb/db_run.c: Likewise.
	* ddb/db_sym.c: Likewise.
	* ddb/db_task_thread.c: Likewise.
	* ddb/db_task_thread.h: Likewise.
	* ddb/db_trap.c: Likewise.
	* ddb/db_variables.c: Likewise.
	* ddb/db_watch.c: Likewise.
	* ddb/db_watch.h: Likewise.
	* ddb/db_write_cmd.c: Likewise.
	* device/dev_pager.c: Likewise.
	* device/device_port.h: Likewise.
	* device/device_types_kernel.h: Likewise.
	* device/ds_routines.h: Likewise.
	* device/errno.h: Likewise.
	* device/if_ether.h: Likewise.
	* device/if_hdr.h: Likewise.
	* device/io_req.h: Likewise.
	* device/net_io.c: Likewise.
	* device/net_io.h: Likewise.
	* i386/i386/ast_check.c: Likewise.
	* i386/i386/cswitch.S: Likewise.
	* i386/i386/db_disasm.c: Likewise.
	* i386/i386/db_interface.c: Likewise.
	* i386/i386/db_trace.c: Likewise.
	* i386/i386/debug.h: Likewise.
	* i386/i386/debug_i386.c: Likewise.
	* i386/i386/debug_trace.S: Likewise.
	* i386/i386/eflags.h: Likewise.
	* i386/i386/gdt.h: Likewise.
	* i386/i386/hardclock.c: Likewise.
	* i386/i386/idt-gen.h: Likewise.
	* i386/i386/ipl.h: Likewise.
	* i386/i386/ktss.h: Likewise.
	* i386/i386/kttd_interface.c: Likewise.
	* i386/i386/ldt.h: Likewise.
	* i386/i386/lock.h: Likewise.
	* i386/i386/locore.S: Likewise.
	* i386/i386/mp_desc.h: Likewise.
	* i386/i386/pic.c: Likewise.
	* i386/i386/pic.h: Likewise.
	* i386/i386/pio.h: Likewise.
	* i386/i386/pit.h: Likewise.
	* i386/i386/seg.h: Likewise.
	* i386/i386/thread.h: Likewise.
	* i386/i386/trap.c: Likewise.
	* i386/i386/trap.h: Likewise.
	* i386/i386/vm_param.h: Likewise.
	* i386/i386/vm_tuning.h: Likewise.
	* i386/i386at/autoconf.c: Likewise.
	* i386/i386at/blit.c: Likewise.
	* i386/i386at/conf.c: Likewise.
	* i386/i386at/fd.c: Likewise.
	* i386/i386at/idt.h: Likewise.
	* i386/i386at/immc.c: Likewise.
	* i386/i386at/kd.c: Likewise.
	* i386/i386at/kd_event.c: Likewise.
	* i386/i386at/kd_mouse.c: Likewise.
	* i386/i386at/model_dep.c: Likewise.
	* i386/i386at/rtc.c: Likewise.
	* i386/include/mach/i386/asm.h: Likewise.
	* i386/include/mach/i386/eflags.h: Likewise.
	* i386/include/mach/i386/mach_i386.defs: Likewise.
	* i386/include/mach/i386/multiboot.h: Likewise.
	* i386/include/mach/i386/trap.h: Likewise.
	* i386/include/mach/i386/vm_types.h: Likewise.
	* i386/include/mach/sa/stdarg.h: Likewise.
	* i386/intel/pmap.c: Likewise.
	* i386/intel/pmap.h: Likewise.
	* include/alloca.h: Likewise.
	* include/device/device_types.defs: Likewise.
	* include/device/device_types.h: Likewise.
	* include/device/disk_status.h: Likewise.
	* include/device/net_status.h: Likewise.
	* include/mach/mach.defs: Likewise.
	* include/mach/memory_object.defs: Likewise.
	* include/mach/std_types.defs: Likewise.
	* include/mach_debug/hash_info.h: Likewise.
	* include/mach_debug/ipc_info.h: Likewise.
	* include/mach_debug/mach_debug.defs: Likewise.
	* include/mach_debug/mach_debug_types.defs: Likewise.
	* include/mach_debug/mach_debug_types.h: Likewise.
	* include/mach_debug/vm_info.h: Likewise.
	* include/mach_debug/zone_info.h: Likewise.
	* include/sys/ioctl.h: Likewise.
	* include/sys/time.h: Likewise.
	* ipc/ipc_entry.h: Likewise.
	* ipc/ipc_hash.h: Likewise.
	* ipc/ipc_init.c: Likewise.
	* ipc/ipc_kmsg.c: Likewise.
	* ipc/ipc_kmsg.h: Likewise.
	* ipc/ipc_marequest.c: Likewise.
	* ipc/ipc_marequest.h: Likewise.
	* ipc/ipc_mqueue.c: Likewise.
	* ipc/ipc_mqueue.h: Likewise.
	* ipc/ipc_notify.c: Likewise.
	* ipc/ipc_notify.h: Likewise.
	* ipc/ipc_object.c: Likewise.
	* ipc/ipc_object.h: Likewise.
	* ipc/ipc_port.c: Likewise.
	* ipc/ipc_port.h: Likewise.
	* ipc/ipc_pset.c: Likewise.
	* ipc/ipc_pset.h: Likewise.
	* ipc/ipc_right.c: Likewise.
	* ipc/ipc_right.h: Likewise.
	* ipc/ipc_space.c: Likewise.
	* ipc/ipc_space.h: Likewise.
	* ipc/mach_debug.c: Likewise.
	* ipc/mach_msg.c: Likewise.
	* ipc/mach_msg.h: Likewise.
	* ipc/mach_port.c: Likewise.
	* kern/act.c: Likewise.
	* kern/assert.h: Likewise.
	* kern/ast.c: Likewise.
	* kern/ast.h: Likewise.
	* kern/bootstrap.c: Likewise.
	* kern/counters.c: Likewise.
	* kern/counters.h: Likewise.
	* kern/debug.h: Likewise.
	* kern/exception.c: Likewise.
	* kern/host.h: Likewise.
	* kern/ipc_host.c: Likewise.
	* kern/ipc_host.h: Likewise.
	* kern/ipc_kobject.c: Likewise.
	* kern/ipc_mig.c: Likewise.
	* kern/ipc_tt.c: Likewise.
	* kern/ipc_tt.h: Likewise.
	* kern/kalloc.h: Likewise.
	* kern/lock_mon.c: Likewise.
	* kern/mach_clock.c: Likewise.
	* kern/mach_factor.c: Likewise.
	* kern/mach_param.h: Likewise.
	* kern/machine.c: Likewise.
	* kern/processor.c: Likewise.
	* kern/profile.c: Likewise.
	* kern/queue.h: Likewise.
	* kern/sched.h: Likewise.
	* kern/startup.c: Likewise.
	* kern/syscall_emulation.h: Likewise.
	* kern/syscall_subr.c: Likewise.
	* kern/syscall_subr.h: Likewise.
	* kern/syscall_sw.c: Likewise.
	* kern/syscall_sw.h: Likewise.
	* kern/task.h: Likewise.
	* kern/thread_swap.h: Likewise.
	* kern/time_out.h: Likewise.
	* kern/time_stamp.c: Likewise.
	* kern/time_stamp.h: Likewise.
	* kern/timer.c: Likewise.
	* kern/timer.h: Likewise.
	* kern/xpr.c: Likewise.
	* kern/xpr.h: Likewise.
	* kern/zalloc.c: Likewise.
	* kern/zalloc.h: Likewise.
	* linux/dev/drivers/block/ide.c: Likewise.
	* linux/dev/include/linux/blk.h: Likewise.
	* linux/src/include/linux/cdrom.h: Likewise.
	* linux/src/include/linux/md.h: Likewise.
	* util/cpu.h: Likewise.
	* vm/memory_object.c: Likewise.
	* vm/memory_object.h: Likewise.
	* vm/pmap.h: Likewise.
	* vm/vm_debug.c: Likewise.
	* vm/vm_external.h: Likewise.
	* vm/vm_fault.c: Likewise.
	* vm/vm_fault.h: Likewise.
	* vm/vm_kern.h: Likewise.
	* vm/vm_map.c: Likewise.
	* vm/vm_map.h: Likewise.
	* vm/vm_object.h: Likewise.
	* vm/vm_pageout.c: Likewise.
	* vm/vm_pageout.h: Likewise.
	* vm/vm_user.h: Likewise.

2001-01-28  Roland McGrath  <roland@frob.com>

	* kern/zalloc.c (zalloc): Change panics for exhausted zone to include
	the zone name.

2001-01-09  Marcus Brinkmann  <marcus@gnu.org>

	* include/device/device_types.h: New get_status call
	DEV_GET_RECORDS to get the number of records of a device (rather
	than the number of bytes). Accordingly define
	DEV_GET_RECORDS_DEVICE_RECORDS, DEV_GET_RECORDS_RECORD_SIZE and
	DEV_GET_RECORDS_COUNT.

	* linux/dev/glue/block.c (device_get_status): Handle
	DEV_GET_RECORDS.

2000-11-26  David Welch  <david.welch@seh.ox.ac.uk>

	* i386/Makefrag (i386-installed-headers): Removed dead files
	from the list of headers to be installed

2000-11-26  Marcus Brinkmann  <marcus@gnu.org>

	* linux/src/drivers/net/tulip.c: Updated to version
	from Linux 2.2.17 (I am amazed that 2.2.x drivers work).
	Suggested by Jason Henry Parker <jasonp@uq.net.au>.

2000-10-29  Roland McGrath  <roland@frob.com>

	Remove numerous dead header files.
	Suggested by Igor Khavkine <i_khavki@alcor.concordia.ca>.
	* i386/include/mach/i386/bios.h: Dead file removed.
	* i386/include/mach/i386/code16.h: Dead file removed.
	* i386/include/mach/i386/debug_reg.h: Dead file removed.
	* i386/include/mach/i386/dpmi.h: Dead file removed.
	* i386/include/mach/i386/far_ptr.h: Dead file removed.
	* i386/include/mach/i386/paging.h: Dead file removed.
	* i386/include/mach/i386/pio.h: Dead file removed.
	* i386/include/mach/i386/pmode.h: Dead file removed.
	* i386/include/mach/i386/proc_reg.h: Dead file removed.
	* i386/include/mach/i386/seg.h: Dead file removed.
	* i386/include/mach/i386/time_stamp.h: Dead file removed.
	* i386/include/mach/i386/tss.h: Dead file removed.
	* i386/include/mach/i386/vcpi.h: Dead file removed.
	* i386/include/mach/proc_ops.h: Dead file removed.
	* i386/include/mach/sa/sys/varargs.h: Dead file removed.
	* i386/include/mach/setjmp.h: Dead file removed.
	* include/mach/proc_ops.h: Dead file removed.
	* Makefile.in (mach-headers): Remove proc_ops.h.
	* i386/Makefrag (i386-installed-headers): Likewise.
	(installed-headers): Don't touch this any more.
	* i386/Files: Update for removed files.

2000-09-29  Marcus Brinkmann  <marcus@gnu.org>

	* i386/i386at/conf.c (dev_name_list): Don't use MACH_COM to check
	if com support is enabled, but NCOM, as it used to be.

2000-09-24  OKUJI Yoshinori  <okuji@gnu.org>

	* linux/dev/glue/block.c: Reverted the changes at 2000-08-17.
	Reported by Brent Fulgham <brent.fulgham@xpsystems.com>.

2000-09-19  Marcus Brinkmann  <marcus@gnu.org>

	* linux/dev/glue/block.c (init_partition): Move initialization
	of MASK until it is asserted that gd is non-NULL.

2000-08-17  OKUJI Yoshinori  <okuji@gnu.org>

	* linux/dev/glue/block.c (rdwr_partial): Mask the minor device
	number with MINOR_SHIFT bits, when indexing the array of
	partitions. Reported by Marius Vollmer <mvo@zagadka.ping.de>.
	(init_partition): Likewise.
	(check_limit): Likewise.
	(device_get_status): Likewise.

2000-07-27  Marcus Brinkmann  <marcus@gnu.org>

	* Fix omissions in last change:
	* linux/src/arch/i386/lib/delay.S: Now really delete the file.
	* linux/src/arch/i386/lib/delay.c: Now really add the file.

2000-07-04  Marcus Brinkmann <marcus@gnu.org>

	* debian/changelog: Add entry for new Debian upload.
	* linux/dev/drivers/scsi/seagate.c (WRITE_CONTROL, WRITE_DATA):
	Added from linux 2.2.15.
	(__asm__ constructs): Replace with equivalent C code from linux 2.2.15
	to support gcc-2.95.
	* linux/src/drivers/scsi/in2000.h: Update asm code to linux 2.2.15.
	* linux/src/drivers/scsi/ppa.c: Replace asm code with equivalent
	C code from linux 2.2.15.

2000-02-06  Stefan Weil <stefan.weil@de.heidelberg.com>

	* device/subrs.c: Fixed compiler warning.
	* ddb/db_output.c, kern/bootstrap.c, kern/debug.c, kern/printf.c:
	Replaced varargs.h by stdarg.h. Fixed prototypes (const char *fmt).
	* ddb/db_output.h: Use prototype for db_printf.
	* i386/Files: removed varargs.h.
	* i386/i386/pit.h: Fixed compiler warning.
	* i386/i386at/model_dep.c: Tried to fix compiler warning.
	* i386/include/mach/sa/sys/varargs.h: Removed.
	* i386/linux/Makefile.in: Removed delay.S, added delay.c.
	* linux/dev/include/asm-i386/segment.h: Support gcc-2.95.
	* linux/dev/include/asm-i386/string.h,
	linux/src/include/asm-i386/string.h: Update from linux-2.2.14.
	* linux/dev/lib/vsprintf.c: Fixed compiler warning.
	* linux/src/include/asm-i386/delay.h: Update from linux-2.2.14.
	* linux/src/arch/i386/lib/delay.c: Copy from linux-2.2.14.
	* linux/src/include/asm-i386/string.h: Update from linux-2.2.14.

1999-10-08  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/src/drivers/net/3c59x.c: Updated to version 0.99L of the
	driver from ftp://cesdis.gsfc.nasa.gov/linux/drivers/3c59x.c, in
	order to support the 3c509c card, as requested by Jeff Bailey
	<jbailey@nisa.net>.

1999-09-17  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/dev/drivers/block/ide.c (do_request) [MACH]: In "bad
	access" printf, actually print the number of sectors of the
	partition.

1999-10-05  Roland McGrath  <roland@baalperazim.frob.com>

	* i386/intel/pmap.c (pmap_bootstrap): Use _start instead of start.
	* i386/i386/trap.c (kernel_trap): Likewise.

1999-10-04  Roland McGrath  <roland@baalperazim.frob.com>

	* configure.in: Remove AC_CHECK_TOOL(MAKE,...) check.
	* Makefile.in (MAKE): Variable removed.  We require GNU make anyway,
	and it always sets MAKE.
	* configure: Regenerated.

	* Makefile.in (clib-routines.o, check-clib-routines, clib-routines.d):
	Remove these rules, replace with:
	(kernel.o): New target, relocatable object linked from kernel objects.
	(kernel-undef, kernel-undef-bad): New targets, glean undefined symbols
	from kernel.o.
	(clib-routines.o): New target, use those to select symbols from libc.
	(clib-routines): Add some symbols; move defn to kernel linking page.
	This variable is now a list of symbols allowed to be undefined,
	rather than a prescriptive list of symbols always grabbed from libc.
	(kernel): Rewrite this rules to just link kernel.o and clib-routines.o
	together to make the kernel image.

1999-09-15  Mark Kettenis  <kettenis@gnu.org>

	* i386/i386/user_ldt.c: Fix user LDT management.
	(i386_set_ldt): Prevent thrashing the LDT for the current thread.
	Correctly calculate size of new LDT.  Set base adress of the LDT
	descriptor to the linear address of the LDT instead of the kernel
	virtual address.  Copy descriptors from the default LDT if there
	is no old LDT for the current thread.  Call switch_ktss if we are
	setting a new LDT for the current thread.
	(i386_get_ldt): Fix bug in copying out the descriptors.

1999-09-09  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/src/drivers/net/rtl8139.c (RX_BUF_LEN_IDX): Reduce from 3
	to 2.  (64K exceeds the limits in linux/dev/glue/kmem.c:kmalloc.)
	(rtl8129_open): If we fail to get the memory we need, then free
	the IRQ before returning.
	Reported by Daniel Kobras <daniel.kobras@student.uni-tuebingen.de>.

1999-09-07  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/src/drivers/net/yellowfin.c (yellowfin_probe): Return
	correct value.  Reported by Marcus Brinkmann
	<Marcus.Brinkmann@ruhr-uni-bochum.de>.

	* linux/dev/drivers/net/Space.c: Declare tc515_probe.  Reported by
	Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.

1999-09-04  Thomas Bushnell, BSG  <tb@mit.edu>

	* vm/vm_resident.c (vm_page_grab): Only block unprivileged
	allocations over vm_page_external_limit if they are actually
	external allocations.  Reported by Mark Kettenis
	(kettenis@wins.uva.nl>.

1999-08-10  Thomas Bushnell, BSG  <tb@mit.edu>

	* i386/i386at/model_dep.c (init_alloc_aligned): Revert previous
	change except for the one to AVAIL_NEXT.  All the rest of the
	previous code was correct.  Correction from Momchil Velikov
	(velco@fadata.bg).

1999-07-23  Roland McGrath  <roland@baalperazim.frob.com>

	* Drivers.macros (AC_DRIVER): Use `test' instead of `[ ... ]'.
	Reported by "Momchil 'Velco' Velikov" <velco@fadata.bg>.

1999-07-20  Roland McGrath  <roland@baalperazim.frob.com>

	* linux/dev/drivers/block/genhd.c (check_partition): Change message
	to say these are only the DOS partitions.
	* i386/linux/dev/include/linux/autoconf.h (CONFIG_BSD_DISKLABEL,
	CONFIG_SMD_DISKLABEL): #undef these.  The dev/glue/block.c code
	deals with BSD disklabels and expects the Linux genhd.c code to
	handle only the DOS partitions; having genhd.c do BSD disklabels
	too just confuses things.

	Force subdirectory targets so they get recompiled properly.
	* i386/Makefile.in (linux/linux.o): Depend on FORCE instead of linux.
	(FORCE): New target.
	* i386/Makefrag (i386/sysdep.o, FORCE): Likewise.

1999-07-11  Thomas Bushnell, BSG  <tb@mit.edu>

	* i386/i386at/model_dep.c (init_alloc_aligned): Make the checks
	correctly for addresses falling into skip regions.  Reported by
	Momchil Velikov (velco@fadata.bg).

1999-07-01  Thomas Bushnell, BSG  <tb@mit.edu>

	* i386/linux/Makefile.in: For each .o file in $(linux-objs)
	include a corresponding .d file, unless `no_deps' is `t'.
	(make-deps): New function.
	(%.d): New pattern rules for building %.d from %.c and %.S.

1999-06-29  Thomas Bushnell, BSG  <tb@mit.edu>

	* vm/vm_resident.c (vm_page_grab): Don't bounce requests when
	vm_page_external_count == vm_page_external_limit, so that before
	initialization is complete we can still allocate memory without
	relying on current_thread.
	(vm_page_wait): Also block if we are over the external page
	limit.
	* vm/vm_pageout.c (vm_pageout_scan): Rewrite the
	scan-for-pages-to-pageout loop to not crash when we hit the end of
	the inactive queue; instead jump back to the
	pause-for-a-little-while code.

1999-06-27  Thomas Bushnell, BSG  <tb@mit.edu>

	* vm/vm_resident.c (vm_page_external_count): Define variable.
	(vm_page_grab): New argument `external'.  All callers changed.
	Keep track of number of externally managed pages.  Don't let
	non-privileged threads exceed the externally-managed page limit.
	(vm_page_grab_contiguous_pages): New argument `external'.  All
	callers changed.  Keep track of number of externally managed
	pages.  Don't let non-privileged threads exceed the
	externally-managed page limit.
	(vm_page_convert): New argument `external', handed off to
	vm_page_grab.  All callers changed.
	(vm_page_release): New argument `external'.  All callers
	changed. Keep track of number of externally managed pages.
	(vm_page_bootstrap): Initialize M->external.
	(vm_page_external_limit): Define new variable.
	(vm_page_grab_phys_addr, vm_page_alloc): Add new arg for
	vm_page_grab.
	(vm_page_free): Provide new arg to vm_page_release.
	* vm/vm_page.h (vm_page_external_limit, vm_page_external_count):
	New variables.
	(struct vm_page): New members `external' and `extcounted'.
	(vm_page_grab, vm_page_release, vm_page_convert): Specify new
	argument.
	* vm/vm_pageout.c (vm_pageout): Initialize vm_page_external_limit
	and vm_page_external_target.
	(VM_PAGE_EXTERNAL_LIMIT, VM_PAGE_EXTERNAL_TARGET): New macro.
	(vm_page_external_target): New variable.
	(vm_pageout_scan): Regard "too many externally managed pages" as a
	reason to keep doing work, but if that's the only reason we're
	doing work, then the only thing we do is schedule cleaning of
	pages.  Help keep track of the number of externally managed pages
	that we care about.
	* i386/intel/pmap.c (pmap_page_table_page_alloc): Add new arg for
	vm_page_grab.
	* linux/dev/glue/block.c (alloc_buffer, device_read): Likewise.
	* vm/vm_map.c (vm_map_copy_steal_pages): Likewise.
	* vm/vm_fault.c (vm_fault_page): Add new args for vm_page_grab and
	vm_page_convert.

	* vm/vm_pageout.c (VM_PAGEOUT_BURST_WAIT): Reduce to 10ms/page.
	(VM_PAGEOUT_EMPTY_WAIT): Reduce to 75 ms.
	(VM_PAGE_FREE_RESERVED): Increase to 50 pages.
	(VM_PAGEOUT_RESERVED_INTERNAL): Adjust to `(reserve) - 25'.
	(VM_PAGEOUT_RESERVED_REALLY): Adjust to `(reserve) - 40'.

1999-06-21  Thomas Bushnell, BSG  <tb@mit.edu>

	* i386/Files: Don't mention i386/pc/Makerules,
	i386/include/Makerules, or i386/util/Makerules.

	* Makefile.in (all-real-archs): Delete variable.
	(dist): No longer make `machine' symlink.

	* Makefile.in (dist): Sanify file permissions before building tar
	file.

	* i386/Subdirs: Remove i386/i386at/boot.

Sun Jun 20 18:33:59 1999  Thomas Bushnell, BSG  <tb@mit.edu>

	* version.c (version): Updated to version 1.2.

	* i386/Files: Regenerated.
	* i386/Subdirs: Regenerated.

	* linux/Files: New file.
	* linux/Subdirs: New file.
	* Makefile.in (all-archs): Add `linux'.
	(all-real-archs): New variable.
	(dist): Create `machine' symlink only on
	$(all-real-archs).

	* Makefile.in (dist): Use `cp' instead of `ln'.

	* config.guess: Updated from autoconf 2.13.
	* config.sub: Likewise.

1999-06-16  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/dev/drivers/net/Space.c (ethif_probe): Probe tc59x_probe
	(CONFIG_VORTEX) after el3_probe (CONFIG_EL3), because the latter
	card matches the former probe, but the driver doesn't work with
	it.  Reported by Marcus Brinkmann <brinkmd@debian.org>.

	* Drivers.macros (AC_DRIVER): Only turn on driver if $enableval is
	not `no'.  Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>.

1999-06-15  Thomas Bushnell, BSG  <tb@mit.edu>

	* ipc/ipc_init.c (ipc_bootstrap): Don't make the IOT_PORT zone
	exhaustible, because allocation of ports for internal objects
	panics if zalloc fails.

1999-06-07  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linux/dev/drivers/block/genhd.c [MACH] (mach_minor): New variable.
	(add_bsd_partition): New function.
	(bsd_disklabel_partition) [MACH]: Call add_bsd_partition.
	(msdos_partition) [MACH]: Set mach_minor to MINOR before
	calling bsd_disklabel_partition.
	* linux/dev/drivers/block/ide.c (do_request) [MACH]: Fix "bad access"
	message.

1999-06-02  Roland McGrath  <roland@baalperazim.frob.com>

	* kern/bootstrap.c (build_args_and_stack): If kernel_cmdline is
	nonempty, give the bootstrap task an environment variable of
	"MULTIBOOT_CMDLINE=kernel command line" on its stack.

1999-05-29  Roland McGrath  <roland@baalperazim.frob.com>

	* kern/startup.c (start_kernel_threads): Call record_time_stamp to
	reset the kernel task's creation_time field, so it's not zero.

1999-05-24  Mark Kettenis  <kettenis@gnu.org>

	* i386/i386/fpu.c (fp_free): Clear task switch flag before calling
	fwait.
	(fpu_get_state): Only save FPU state info if the live FPU state
	belongs to our target, i.e. if THREAD is the current thread.
	(fp_load): Print warning if we try to load an invalid FPU state,
	and reset the FPU to some sane state instead.

1999-05-23  Roland McGrath  <roland@baalperazim.frob.com>

	* kern/task.c (task_info): Allow count for TASK_BASIC_INFO to be less
	two words, not just one.  The new member creation_time is two words.

1999-05-22  Roland McGrath  <roland@baalperazim.frob.com>

	* linux/configure: Regenerated.

1999-05-21  Roland McGrath  <roland@baalperazim.frob.com>

	* linux/configure.in: Fix names dummy -> dummy.in in AC_OUTPUT call.

1999-05-14  Roland McGrath  <roland@baalperazim.frob.com>

	* i386/linux/Drivers.in (linux_DRIVER): New macro, does AC_DRIVER and
	defines alias for Linux module name.  Use that for all single-module
	Linux drivers, so we don't forget to define any of the aliases for the
	Linux module names.
	* i386/linux/configure: Regenerated.

1999-04-28  OKUJI Yoshinori  <okuji@localhost>

	* linux/dev/drivers/block/genhd.c (bsd_disklabel_partition) [MACH]:
	Print BSD slices, using Mach device syntax instead of Linux extented
	partition syntax.

1999-05-01  Mark Kettenis  <kettenis@gnu.org>

	* linux/dev/glue/block.c (device_get_status): Always set
	status_count to DEV_GET_STATUS_COUNT if flavor is DEV_GET_SIZE.

1999-04-30  Roland McGrath  <roland@baalperazim.frob.com>

	* i386/linux/Drivers.in: Don't create asm-${systype} symlinks here.
	* linux/configure.in: New file.  Create them here instead.
	* linux/dummy.in: New file, used by configure.
	* linux/configure: New file (generated by autoconf).
	* configure.in: Configure in linux subdir.
	* configure: Regenerated.

	* i386/configure.in: Require only autoconf 2.12, not 2.13.
	* i386/configure: Regenerated.

	* aclocal.m4 (hurd_SYSTYPE): New macro.
	* i386/linux/Drivers.in: Use it.
	* i386/linux/configure: Regenerated.

Wed Apr 28 02:17:51 1999  Thomas Bushnell, BSG  <tb@mit.edu>

	* linux/src/drivers/net/3c59x.c: Upgrade to Linux 2.2.1 version.
	(vortex_start_xmit): Don't frob VP->stat.tx_bytes.
	(boomerang_start_xmit): Likewise.
	(vortex_rx): Don't frob VP->stats.rx_bytes.
	(boomerang_rx): Likewise.
	Requested by Jeff Bailey (jbailey@nisa.net).

Mon Apr 26 02:13:02 1999  Thomas Bushnell, BSG  <tb@mit.edu>

	* Makefile.in (objfiles): Don't add $(systype)/sysdep.o here.
	($(systype)/sysdep.o): Delete rule.
	(clean, distclean, mostlyclean, maintainerclean, install-headers,
	install-kernel): Don't do recursive make here.
	* i386/Makefrag (objfiles): Add i386/sysdep.o to the list.
	(i386/sysdep.o): New rule.
	(clean): Depend on i386-clean.
	(distclean): Depend on i386-distclean.
	(mostlyclean): Depend on i386-mostlyclean.
	(maintainerclean): Depend on i386-maintainerclean.
	(install-headers): Depend on i386-install-headers.
	(install-kernel): Depend on i386-install-kernel.
	(i386-clean, i386-distclean, i386-mostlyclean,
	i386-maintainerclean, i386-install-kernel, i386-install-headers):
	New rules.

1999-04-14  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* version.c (version): Update to 1.1.92.

Sun Mar 14 18:53:01 1999  Thomas Bushnell, BSG  <tb@mit.edu>

	* device/ds_routines.c (ds_read_done): When touching memory to
	mark it dirty, make sure we say "volatile" so the compiler doesn't
	optimize it out.

1999-04-12  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/linux/Drivers.in: Fix the source paths for `asm'	symbolic
	links. Reported by KONISHI Toru <sting@mb.infoweb.ne.jp>.

	* linux/dev/drivers/block/ide.c (init_hwif_data) [MACH]: Print Mach
	device name instead of Linux one.
	* linux/dev/drivers/block/genhd.c (disk_name): Likewise.
	* linux/dev/drivers/scsi/sd.c (sd_init_onedisk): Likewise.
	(sd_detect): Likewise.
	* linux/dev/drivers/sr.c (sr_detect): Likewise.
	(get_sectorsize): Likewise.

1999-03-01  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	Version 1.1.91.

	* version.c (version): Update to 1.1.91.

1999-03-01  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/linux/Drivers.in: Fix linking paths.
	* i386/linux/Makefile.in: Corrent include paths and fix
	Drivers.macros location.

1999-02-28  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* Makefile.in (clean): Don't move device-drivers.h, because it is
	not in the top directory any longer.
	(distclean): Remove config.cache and config.log.
	* i386/Makefile.in (distclean): Remove config.status, config.log
	and Makefile.
	* i386/linux/Makefile.in (distclean): Remove config.status,
	config.log, Makefile and device-drivers.h.

1999-02-27  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/linux/Drivers.in: Don't link dev/include/asm-i386 to
	dev/include/asm. Check if directories already exist before
	mkdir_p's. Link directories manually, because AC_LINK_FILES
	is weak in linking files from non-current directories.

	* i386/i386at/i386at_ds_routines.c: Include
	<i386/linux/device-drivers.h> instead of <linux/device-drivers.h>.
	* device/ds_routines.c [LINUX_DEV]: Likewise.
	* i386/linux/Makefile.in (linux-gen-flags): Fix an extra slash.
	(distclean): Remove asm links.
	* linux/src/COPYING: Copied from linux-2.0.36.

1999-02-27  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* Makefile.in: Omit to detect if com or lpr is used, and don't use
	linux.o.
	(objfiles): Add $(systype)/sysdep.o.
	(clean): Chain the target to $(systype).
	(distclean): Likewise.
	(mostlyclean): Likewise.
	(maintainer-clean): Likewise.
	(install-headers): Likewise.
	(install-kernel): Likewise.
	* configure.in: AC_CONFIG_SUBDIRS ${systype} instead of linux.
	(--disable-linuxdev): Deleted.
	(--disable-com): Likewise.
	(--enable-lpr): Likewise.
	* i386/Makefile.in: New file.
	* i386/configure.in: Likewise.
	* i386/Makefrag (DEFINES): Add -DLINUX_DEV.
	(objfiles): Always add com.o. If MACH_LPR is defined, then add lpr.o.
	* linux/Drivers.in: Moved to ...
	* i386/linux/Drivers.in: ... here. Include ../../aclocal.m4.
	(mkdir_p): New function to create the linux include dirs.
	* linux/Makefile.in: Moved to ...
	* i386/linux/Makefile.in: ... here, and modify so that paths
	are valid.
	(clean): New target.
	(distclean): Likewise.
	(mostlyclean): Likewise.
	(maintainer-clean): Likewise.
	* linux/src/include/linux/autoconf.h: Removed.
	* linux/dev/include/linux/autoconf.h: Moved to ...
	* i386/linux/dev/include/linux/autoconf.h: ... here.
	* linux/dev/arch/i386/linux_emul.h: Moved to ...
	* i386/linux/dev/include/linux_emul.h: ... here.
	* linux/device-drivers.h.in: Moved to ...
	* i386/linux/device-drivers.h.in: ... here.
	* linux/aclocal.m4: Removed.
	* linux/configure: Likewise.

1999-02-14  Gordon Matzigkeit  <gord@trick.fig.org>

	* Makefile.in (install-kernel): Be sure that $(bootdir) is
	created before installing the kernel.

1999-02-06  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* configure.in: Enable com by default, because current kbd and
	mouse can't be linked without com. Reported by M. Meiarashi
	<mes@st.rim.or.jp>.

1999-02-05  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	Version 1.1.90.

	* version.c (version): Update to 1.1.90.

1999-02-04  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* device/kmsg.c (kmsginit): Add a missing semicolon.
	(kmsggetstat): Fix typos,
	DEV_GET_DEVICE_SIZE -> DEV_GET_SIZE_DEVICE_SIZE and
	DEV_GET_RECORD_SIZE -> DEV_GET_SIZE_RECORD_SIZE.
	(kmsg_putchar): Fix a typo kmsg_done_init -> kmsg_init_done.
	* linux/dev/glue/block.c (device_get_status): Allocate a hd_geometry
	on the stack.
	* linux/dev/drivers/block/ide.c: New file.
	* linux/dev/drivers/scsi/sd_ioctl.c: New file.

1999-02-02  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/i386at/kd_event.c (kbdgetstat): Fix a typo
	DEV_GET_SIZES -> DEV_GET_SIZE.
	* i386/i386at/kd_mouse.c (mousegetstat): Likewise.
	* device/kmsg.c (kmsggetstat): Likewise.

1999-02-01  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linux/dev/glue/block.c (dev_getstat): Fix a missing `struct'.
	* device/cons.c (cninit): Don't call kmsginit.
	* kmsg.c (kmsg_buffer): Defined as static.
	(kmsg_write_offset): Likewise.
	(kmsg_read_offset): Likewise.
	(kmsg_read_queue): Likewise.
	(kmsg_in_use): Likewise.
	(kmsg_lock): Likewise.
	(kmsginit): Likewise, and call queue_init instead of setting
	PREV and NEXT manually.
	(kmsg_done_init): New variable.
	(kmsg_putchar): Call kmsginit if not initialized yet.
	(kmsggetstat): New function.
	* kmsg.h (kmsggetstat): Add the prototype.
	* i386/i386at/kd_event.c (kbdgetstat): Handle DEV_GET_SIZE.
	(kbdread): Check if the amount a user specify is a multiple
	of sizeof(kd_event).
	* i386/i386at/kd_mouse.c (mousegetstat): New function.
	(mouseread): Check if the amount a user specify is a multiple
	of sizeof(kd_event).
	* i386/i386at/conf.c (dev_name_list): Set the mouse getstat entry
	to mousegetstat and the kmsg getstat entry to kmsggetstat.
	Use MACH_COM instead of NCOM to determine if com is used.
	Use MACH_LPR instead of NLPR to determine if lpr is used.
	* configure.in (--enable-com): New option.
	(--enable-lpr): Likewise.
	* Makefile.in (enable_com): New variable.
	(enable_lpr): Likewise.
	* i386/Makefrag (i386at-files): Remove com.c.
	(objfiles): Add com.o if enable_com is yes, and lpr.o if enable_lpr
	is yes.

Tue Jan 26 21:36:10 1999  Thomas Bushnell, BSG  <tb@mit.edu>

	* kern/exception.c (exception_no_server): Correctly comment out
	the suspend code.  (This should have happened on 17 April 1997,
	but apparently I did it backwards.)

1999-01-26  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* device/kmsg.c (kmsgopen): Added simple_lock and simple_unlock.
	(ksmgclose): Likewise.

1999-01-25  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* Makefile.in (install-headers): New target for installing only
	the headers.
	(install-kernel): New target for installing only the kernel.
	(mkheaderdirs): New target for making the headers
	installation directories.
	(mkkerneldirs): New target for making the kernel
	installation directory.
	(install): Do nothing by itself, but depend on install-kernel
	and install-headers.

1999-01-24  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* device/kmsg.h (KMSGBUFSIZE): Deleted.
	* device/kmsg.c: Rewritten completely to provide stream interface.
	* linux/dev/glue/block.c (device_getstat): Added V_GETPARMS support.
	* config.guess: New version from automake-1.4.
	* config.sub: Likewise.
	* install-sh: Likewise.

	Some changes were merged from gnumach-m68k by
	Aymeric Vincent <vincent@emi.u-bordeaux.fr>.

	* Makefile.in (clean): Don't hang if device-drivers.h doesn't exist.
	* linux/Makefile.in (CPPFLAGS): Fix a typo.

1999-01-16  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* device/kmsg.c: Fixed the copyright notice.
	(MACH_KMSG): Removed.
	* Makefile.in (enable_kmsg): New variable.
	(objfiles): Add kmsg.o, if and only if enable_kmsg is yes.

1999-01-10  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/i386at/kd.c: Applied a keymap patch. Reported by
	Marcus Brinkmann <Marcus.Brikmann@ruhr-uni-bochum.de>.
	* i386/i386at/kd.h: Likewise.

1998-12-30  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linux/dev/glue/net.c (dev_alloc_skb): Change the skb arragement.
	(dev_kfree_skb): Free only skb.
	(device_write): Keep skb elements up-to-date.

1998-12-18  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* Makefile.in (objfiles): Add kmsg.o.
	* device/cons.c: Include <device/io_req.h>.
	* device/kmsg.c: Rewritten almost entirely.

1998-12-06  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	Add kmsg device.

	* Makefile.in (device-files): Add kmsg.c and kmsg.h.
	* configure.in (--enable-kmsg): New option.
	* device/cons.c: Include kmsg.h.
	(cninit): Call kmsginit if MACH_KMSG is defined.
	(cnputc): Call kmsg_putchar if MACH_KMSG is defined.
	* device/kmsg.c: New file.
	* device/kmsg.h: Likewise.
	* i386/i386at/conf.c (dev_name_list): Add kmsg entry.

1998-12-02  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* configure.in: Fix linuxdev option handling.
	* linux/Drivers.in: Remove linuxdev option and fix linking files.
	* linux/Makefile.in: Replace @DEFS@ with -DLINUX_DEV.
	* linux/dev/arch/i386/kernel/irq.c: Include missing header files.
	* linux/dev/arch/i386/kernel/setup.c: Include <device-drivers.h>.
	* linux/dev/glue/kmem.c: Add printf declaration.
	* linux/dev/glue/misc.c: Include <linux/types.h>.
	* linux/dev/init/main.c: Call linux_sched_init instead of sched_init.
	* linux/dev/kernel/sched.c: Add timer_bh declaration.
	(tqueue_bh): Fix the argument.
	(linux_sched_init): Renamed from sched_init.

1998-12-01  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/i386at/i386at_ds_routines.c: Include <linux/device-drivers.h>
	only if LINUX_DEV is defined. Reported by UCHIYAMA Yasushi
	<uch@nop.or.jp>.
	* device/ds_routines.c: Likewise.
	* configure.in: AC_CONFIG_SUBDIRS(linux) instead of linuxdev.
	(--disable-linuxdev): New option.
	* linux/Makefile.in (CPPFLAGS): Remove -DLINUX_DEV, and add @DEFS@.
	(objfiles): Add linux.o only if LINUX_DEV is defined.
	* linux/Drivers.in (--disable-linuxdev): New option.
	* i386/Makefrag (DEFINES): Remove -DLINUX_DEV.

1998-11-30  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	Clean up linux emulation code to make it architecture-independent
	as much as possible.

	* linux: Renamed from linuxdev.
	* Makefile.in (objfiles): Add linux.o instead of linuxdev.o.
	(MAKE): New variable. Used for the linux.o target.
	* configure.in: Add AC_CHECK_TOOL(MAKE, make).
	* i386/i386/spl.h: Include <i386/ipl.h>, for compatibility with
	OSF Mach 3.0. Suggested by Elgin Lee <ehl@funghi.com>.
	* linux/src: Renamed from linux/linux.
	* linux/dev: Renamed from linux/mach.
	* linux/Drivers.in (AC_INIT): Use dev/include/linux/autoconf.h,
	instead of mach/include/linux/autoconf.h.
	* Makefile.in (all): Target ../linux.o instead of ../linuxdev.o.
	* linux/dev/drivers/block/genhd.c: Include <machine/spl.h> instead
	of <i386/ipl.h>.
	* linux/dev/drivers/net/auto_irq.c: Remove unneeded header files,
	<i386/ipl.h> and <i386/pic.h>.
	* linux/dev/init/main.c: Many i386-dependent codes moved to ...
	* linux/dev/arch/i386/irq.c: ... here.
	* linux/dev/arch/i386/setup.c: New file.
	* linux/dev/arch/i386/linux_emul.h: Likewise.
	* linux/dev/arch/i386/glue/timer.c: Merged into sched.c.
	* linux/dev/arch/i386/glue/sched.c: Include <machine/spl.h> instead
	of <i386/ipl.h>, and moved to ...
	* linux/dev/kernel/sched.c: ... here.
	* linux/dev/arch/i386/glue/block.c: Include <machine/spl.h> and
	<linux_emul.h>, instead of i386-dependent header files, and
	moved to ...
	* linux/dev/glue/blocl.c: ... here.
	* linux/dev/arch/i386/glue/net.c: Include <machine/spl.h> and
	<linux_emul.h>, instead of i386-dependent header files, and
	moved to ...
	* linux/dev/glue/net.c: ... here.
	* linux/dev/arch/i386/glue/misc.c: Remove `x86' and moved to ...
	* linux/dev/glue/misc.c: ... here.
	* linux/dev/arch/i386/glue/kmem.c: Moved to ...
	* linux/dev/glue/kmem.c: ... here.

1998-11-25  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linuxdev/mach/init/main.c (linux_init): Call reserve_mach_irqs.
	* linuxdev/mach/arch/i386/kernel/irq.c (probe_irq_on): Fix ivect
	mishandling.
	(probe_irq_off): Disable unnecessary IRQs. Reported by
	UCHIYAMA Yasushi <uch@nop.or.jp>.
	(reserve_mach_irqs): New function.

1998-11-24  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linuxdev/arch/i386/linux_init.c (linux_init): Check ivect
	before set linux_bad_intr.
	* linuxdev/arch/i386/linux_irq.c (probe_irq_on): Allocate only
	if ivect is null, and set linux_intr_pri to intpri.

	* linuxdev: Heavily changed. It becomes more Linux-like file
	hierarchy as suggested by Roland McGrath <roland@frob.com>.
	* linuxdev/linux: Contain original Linux source files.
	* linuxdev/mach: Contain modified source files for Mach.
	* linuxdev/mach/arch/i386/glue: XXX Contain files that are
	not easy to segregate.
	* Makefile.in: Call `make -C linuxdev all', instead of include
	linuxdev/Makefrag.

1998-11-23  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linuxdev/arch/i386/linux_irq.c (linux_bad_intr): New function.
	(free_irq): Set linux_bad_intr into ivect[irq].
	* linuxdev/arch/i386/linux_init.c (linux_init):
	Set linux_bad_intr as the default interrupt handler.

	* linuxdev/include/asm-i386/string.h (strstr): Fix the
	egcs/gcc 2.8.x bug and a linkage problem. Reported by
	Roland McGrath <roland@frob.com>.

1998-11-18  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linuxdev/Drivers.in: Fix a typo.
	* linuxdev/Makefrag: Likewise.
	* linuxdev/arch/i386/linux_block.c (set_blocksize): Likewise.

	* linuxdev/arch/i386/linux_kmem.c (vfree): Cast void * to
	vm_offset_t.
	* linuxdev/drivers/net/wavelan.p.h: Include
	<linuxdev/drivers/net/i82586.h>, instead of <drivers/net/i82586.h>.
	* linuxdev/drivers/scsi/aha152x.c: Define AUTOCONF.
	* linuxdev/configure: Regenerate.

1998-11-17  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* linuxdev/arch/i386/linux_misc.c (strstr): New function.
	Because	inline version strstr is not used when use
	egcs/gcc 2.8.x.	Reported by UCHIYAMA Yasushi <uch@nop.or.jp>.

	* linuxdev/arch/i386/linux_irq.c (unmask_irq): Fix a typo.

1998-11-17  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/README-Drivers: Update to Linux 2.0.36 device drivers.
	* linuxdev/Drivers.in: Likewise.
	* linuxdev/Makefrag: Likewise.
	* linuxdev/arch/i386/linux_lib.S: Likewise.
	* linuxdev/device-drivers.h.in: Likewise.
	* linuxdev/drivers/block/floppy.c: Likewise.
	* linuxdev/drivers/block/ide.c: Likewise.
	* linuxdev/drivers/block/ide.h: Likewise.
	* linuxdev/drivers/net/3c505.h: Likewise.
	* linuxdev/drivers/net/3c509.c: Likewise.
	* linuxdev/drivers/net/3c515.c: Likewise.
	* linuxdev/drivers/net/3c59x.c: Likewise.
	* linuxdev/drivers/net/Space.c: Likewise.
	* linuxdev/drivers/net/apricot.c: Likewise.
	* linuxdev/drivers/net/de4x5.c: Likewise.
	* linuxdev/drivers/net/eepro.c: Likewise.
	* linuxdev/drivers/net/eepro100.c: Likewise.
	* linuxdev/drivers/net/eexpress.c: Likewise.
	* linuxdev/drivers/net/epic100.c: Likewise.
	* linuxdev/drivers/net/eth16i.c: Likewise.
	* linuxdev/drivers/net/hp100.c: Likewise.
	* linuxdev/drivers/net/lance.c: Likewise.
	* linuxdev/drivers/net/ne2k-pci.c: Likewise.
	* linuxdev/drivers/net/pcnet32.c: Likewise.
	* linuxdev/drivers/net/rtl8139.c: Likewise.
	* linuxdev/drivers/net/tlan.c: Likewise.
	* linuxdev/drivers/net/tulip.c: Likewise.
	* linuxdev/drivers/net/wavelan.c: Likewise.
	* linuxdev/drivers/pci/pci.c: Likewise.
	* linuxdev/drivers/scsi/BusLogic.c: Likewise.
	* linuxdev/drivers/scsi/FlashPoint.c: Likewise.
	* linuxdev/drivers/scsi/aha152x.c: Likewise.
	* linuxdev/drivers/scsi/aha1542.c: Likewise.
	* linuxdev/drivers/scsi/aic7xxx/sequencer.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx.c: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_proc.c: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_reg.h: Likewise.
	* linuxdev/drivers/scsi/dtc.c: Likewise.
	* linuxdev/drivers/scsi/eata.c: Likewise.
	* linuxdev/drivers/scsi/eata.h: Likewise.
	* linuxdev/drivers/scsi/eata_dma.c: Likewise.
	* linuxdev/drivers/scsi/gdth.c: Likewise.
	* linuxdev/drivers/scsi/gdth.h: Likewise.
	* linuxdev/drivers/scsi/gdth_proc.c: Likewise.
	* linuxdev/drivers/scsi/gdth_proc.h: Likewise.
	* linuxdev/drivers/scsi/hosts.c: Likewise.
	* linuxdev/drivers/scsi/in2000.c: Likewise.
	* linuxdev/drivers/scsi/in2000.h: Likewise.
	* linuxdev/drivers/scsi/ncr53c8xx.c: Likewise.
	* linuxdev/drivers/scsi/ppa.h: Likewise.
	* linuxdev/drivers/scsi/scsi.c: Likewise.
	* linuxdev/drivers/scsi/scsicam.c: Likewise.
	* linuxdev/drivers/scsi/sd.c: Likewise.
	* linuxdev/drivers/scsi/seagate.c: Likewise.
	* linuxdev/drivers/scsi/u14-34f.c: Likewise.
	* linuxdev/drivers/scsi/u14-34f.h: Likewise.
	* linuxdev/drivers/scsi/wd7000.c: Likewise.
	* linuxdev/drivers/scsi/wd7000.h: Likewise.
	* linuxdev/include/asm-i386/irq.h: Likewise.
	* linuxdev/include/asm-i386/processor.h: Likewise.
	* linuxdev/include/asm-i386/ptrace.h: Likewise.
	* linuxdev/include/asm-i386/system.h: Likewise.
	* linuxdev/include/asm-i386/unistd.h: Likewise.
	* linuxdev/include/linux/fs.h: Likewise.
	* linuxdev/include/linux/genhd.h: Likewise.
	* linuxdev/include/linux/interrupt.h: Likewise.
	* linuxdev/include/linux/ip.h: Likewise.
	* linuxdev/include/linux/pci.h: Likewise.
	* linuxdev/include/linux/version.h: Likewise.
	* linuxdev/include/linux/wireless.h: Likewise.

	* linuxdev/drivers/net/via-rhine.c: New file.
	* linuxdev/drivers/scsi/aic7xxx_seq.c: Likewise.
	* linuxdev/include/linux/rose.h: Likewise.

	* linuxdev/drivers/scsi/aic7xxx_seq.h: Removed.
	* linuxdev/configure: Regenerate.
	* linuxdev/include/asm-i386/string.h: Fix the egcs/gcc 2.8.x problem,
	according to http://www.suse.de/~florian/kernel+egcs.html.

1998-11-14  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* Makefile.in (clib-routines.o): Add -L option to search libc.a.
	Reported by TAKEUCHI Yoji <ytakeuch@po.iijnet.or.jp>.

	* linuxdev/drivers/pci/bios32.c: Moved to ...
	* linuxdev/arch/i386/linux_bios32.c: ... here. Because it is
	i386-specific code.
	* linuxdev/include/asm: Moved to ...
	* linuxdev/include/asm-i386: ... here.

	* i386/README-Drivers: Update to Linux 2.0.35 device drivers.
	* linuxdev/Drivers.in: Likewise.
	* linuxdev/configure: Likewise.
	* linuxdev/device-drivers.h.in: Likewise.
	* linuxdev/Makefrag: Likewise.
	* linuxdev/arch/i386/linux_autoirq.c: Likewise.
	* linuxdev/arch/i386/linux_block.c: Likewise.
	* linuxdev/arch/i386/linux_dma.c: Likewise.
	* linuxdev/arch/i386/linux_init.c: Likewise.
	* linuxdev/arch/i386/linux_irq.c: Likewise.
	* linuxdev/arch/i386/linux_kmem.c: Likewise.
	* linuxdev/arch/i386/linux_misc.c: Likewise.
	* linuxdev/arch/i386/linux_net.c: Likewise.
	* linuxdev/arch/i386/linux_port.c: Likewise.
	* linuxdev/arch/i386/linux_printk.c: Likewise.
	* linuxdev/arch/i386/linux_sched.c: Likewise.
	* linuxdev/arch/i386/linux_timer.c: Likewise.
	* linuxdev/arch/i386/linux_version.c: Likewise.
	* linuxdev/arch/i386/linux_vsprintf.c: Likewise.
	* linuxdev/drivers/block/cmd640.c: Likewise.
	* linuxdev/drivers/block/floppy.c: Likewise.
	* linuxdev/drivers/block/genhd.c: Likewise.
	* linuxdev/drivers/block/ide-cd.c: Likewise.
	* linuxdev/drivers/block/ide.c: Likewise.
	* linuxdev/drivers/block/ide.h: Likewise.
	* linuxdev/drivers/block/ide_modes.h: Likewise.
	* linuxdev/drivers/block/rz1000.c: Likewise.
	* linuxdev/drivers/block/triton.c: Likewise.
	* linuxdev/drivers/net/3c501.c: Likewise.
	* linuxdev/drivers/net/3c503.c: Likewise.
	* linuxdev/drivers/net/3c505.c: Likewise.
	* linuxdev/drivers/net/3c507.c: Likewise.
	* linuxdev/drivers/net/3c509.c: Likewise.
	* linuxdev/drivers/net/3c59x.c: Likewise.
	* linuxdev/drivers/net/8390.c: Likewise.
	* linuxdev/drivers/net/8390.h: Likewise.
	* linuxdev/drivers/net/Space.c: Likewise.
	* linuxdev/drivers/net/ac3200.c: Likewise.
	* linuxdev/drivers/net/apricot.c: Likewise.
	* linuxdev/drivers/net/at1700.c: Likewise.
	* linuxdev/drivers/net/atp.c: Likewise.
	* linuxdev/drivers/net/atp.h: Likewise.
	* linuxdev/drivers/net/de4x5.c: Likewise.
	* linuxdev/drivers/net/de4x5.h: Likewise.
	* linuxdev/drivers/net/de600.c: Likewise.
	* linuxdev/drivers/net/de620.c: Likewise.
	* linuxdev/drivers/net/depca.c: Likewise.
	* linuxdev/drivers/net/dev.c: Likewise.
	* linuxdev/drivers/net/e2100.c: Likewise.
	* linuxdev/drivers/net/eepro.c: Likewise.
	* linuxdev/drivers/net/eepro100.c: Likewise.
	* linuxdev/drivers/net/eexpress.c: Likewise.
	* linuxdev/drivers/net/eth16i.c: Likewise.
	* linuxdev/drivers/net/ewrk3.c: Likewise.
	* linuxdev/drivers/net/ewrk3.h: Likewise.
	* linuxdev/drivers/net/hp-plus.c: Likewise.
	* linuxdev/drivers/net/hp.c: Likewise.
	* linuxdev/drivers/net/hp100.c: Likewise.
	* linuxdev/drivers/net/hp100.h: Likewise.
	* linuxdev/drivers/net/i82586.h: Likewise.
	* linuxdev/drivers/net/lance.c: Likewise.
	* linuxdev/drivers/net/ne.c: Likewise.
	* linuxdev/drivers/net/net_init.c: Likewise.
	* linuxdev/drivers/net/ni52.c: Likewise.
	* linuxdev/drivers/net/ni52.h: Likewise.
	* linuxdev/drivers/net/ni65.c: Likewise.
	* linuxdev/drivers/net/ni65.h: Likewise.
	* linuxdev/drivers/net/seeq8005.c: Likewise.
	* linuxdev/drivers/net/seeq8005.h: Likewise.
	* linuxdev/drivers/net/sk_g16.c: Likewise.
	* linuxdev/drivers/net/sk_g16.h: Likewise.
	* linuxdev/drivers/net/smc-ultra.c: Likewise.
	* linuxdev/drivers/net/tulip.c: Likewise.
	* linuxdev/drivers/net/wavelan.c: Likewise.
	* linuxdev/drivers/net/wavelan.h: Likewise.
	* linuxdev/drivers/net/wd.c: Likewise.
	* linuxdev/drivers/net/znet.c: Likewise.
	* linuxdev/drivers/pci/pci.c: Likewise.
	* linuxdev/drivers/scsi/53c7,8xx.h: Likewise.
	* linuxdev/drivers/scsi/53c78xx.c: Likewise.
	* linuxdev/drivers/scsi/53c8xx_d.h: Likewise.
	* linuxdev/drivers/scsi/AM53C974.c: Likewise.
	* linuxdev/drivers/scsi/AM53C974.h: Likewise.
	* linuxdev/drivers/scsi/BusLogic.c: Likewise.
	* linuxdev/drivers/scsi/BusLogic.h: Likewise.
	* linuxdev/drivers/scsi/NCR53c406a.c: Likewise.
	* linuxdev/drivers/scsi/NCR53c406a.h: Likewise.
	* linuxdev/drivers/scsi/advansys.c: Likewise.
	* linuxdev/drivers/scsi/advansys.h: Likewise.
	* linuxdev/drivers/scsi/aha152x.c: Likewise.
	* linuxdev/drivers/scsi/aha152x.h: Likewise.
	* linuxdev/drivers/scsi/aha1542.c: Likewise.
	* linuxdev/drivers/scsi/aha1542.h: Likewise.
	* linuxdev/drivers/scsi/aha1740.c: Likewise.
	* linuxdev/drivers/scsi/aha1740.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx.c: Likewise.
	* linuxdev/drivers/scsi/aic7xxx.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_seq.h: Likewise.
	* linuxdev/drivers/scsi/constants.h: Likewise.
	* linuxdev/drivers/scsi/eata.c: Likewise.
	* linuxdev/drivers/scsi/eata.h: Likewise.
	* linuxdev/drivers/scsi/eata_dma.c: Likewise.
	* linuxdev/drivers/scsi/eata_dma.h: Likewise.
	* linuxdev/drivers/scsi/eata_generic.h: Likewise.
	* linuxdev/drivers/scsi/eata_pio.c: Likewise.
	* linuxdev/drivers/scsi/eata_pio.h: Likewise.
	* linuxdev/drivers/scsi/fdomain.c: Likewise.
	* linuxdev/drivers/scsi/fdomain.h: Likewise.
	* linuxdev/drivers/scsi/g_NCR5380.c: Likewise.
	* linuxdev/drivers/scsi/g_NCR5380.h: Likewise.
	* linuxdev/drivers/scsi/hosts.c: Likewise.
	* linuxdev/drivers/scsi/hosts.h: Likewise.
	* linuxdev/drivers/scsi/in2000.c: Likewise.
	* linuxdev/drivers/scsi/in2000.h: Likewise.
	* linuxdev/drivers/scsi/pas16.c: Likewise.
	* linuxdev/drivers/scsi/pas16.h: Likewise.
	* linuxdev/drivers/scsi/scsi.c: Likewise.
	* linuxdev/drivers/scsi/scsi.h: Likewise.
	* linuxdev/drivers/scsi/scsi_ioctl.c: Likewise.
	* linuxdev/drivers/scsi/scsi_proc.c: Likewise.
	* linuxdev/drivers/scsi/scsicam.c: Likewise.
	* linuxdev/drivers/scsi/sd.c: Likewise.
	* linuxdev/drivers/scsi/sd.h: Likewise.
	* linuxdev/drivers/scsi/sd_ioctl.c: Likewise.
	* linuxdev/drivers/scsi/seagate.c: Likewise.
	* linuxdev/drivers/scsi/seagate.h: Likewise.
	* linuxdev/drivers/scsi/sr.c: Likewise.
	* linuxdev/drivers/scsi/sr_ioctl.c: Likewise.
	* linuxdev/drivers/scsi/t128.c: Likewise.
	* linuxdev/drivers/scsi/t128.h: Likewise.
	* linuxdev/drivers/scsi/u14-34f.c: Likewise.
	* linuxdev/drivers/scsi/u14-34f.h: Likewise.
	* linuxdev/drivers/scsi/ultrastor.c: Likewise.
	* linuxdev/drivers/scsi/ultrastor.h: Likewise.
	* linuxdev/drivers/scsi/wd7000.c: Likewise.
	* linuxdev/drivers/scsi/wd7000.h: Likewise.
	* linuxdev/include/asm-i386/bitops.h: Likewise.
	* linuxdev/include/asm-i386/delay.h: Likewise.
	* linuxdev/include/asm-i386/dma.h: Likewise.
	* linuxdev/include/asm-i386/errno.h: Likewise.
	* linuxdev/include/asm-i386/fcntl.h: Likewise.
	* linuxdev/include/asm-i386/floppy.h: Likewise.
	* linuxdev/include/asm-i386/ioctl.h: Likewise.
	* linuxdev/include/asm-i386/floppy.h: Likewise.
	* linuxdev/include/asm-i386/irq.h: Likewise.
	* linuxdev/include/asm-i386/processor.h: Likewise.
	* linuxdev/include/asm-i386/ptrace.h: Likewise.
	* linuxdev/include/asm-i386/resource.h: Likewise.
	* linuxdev/include/asm-i386/segment.h: Likewise.
	* linuxdev/include/asm-i386/sigcontext.h: Likewise.
	* linuxdev/include/asm-i386/signal.h: Likewise.
	* linuxdev/include/asm-i386/socket.h: Likewise.
	* linuxdev/include/asm-i386/statfs.h: Likewise.
	* linuxdev/include/asm-i386/string.h: Likewise.
	* linuxdev/include/asm-i386/system.h: Likewise.
	* linuxdev/include/asm-i386/termios.h: Likewise.
	* linuxdev/include/asm-i386/types.h: Likewise.
	* linuxdev/include/asm-i386/unistd.h: Likewise.
	* linuxdev/include/linux/autoconf.h: Likewise.
	* linuxdev/include/linux/binfmts.h: Likewise.
	* linuxdev/include/linux/bios32.h: Likewise.
	* linuxdev/include/linux/blk.h: Likewise.
	* linuxdev/include/linux/blkdev.h: Likewise.
	* linuxdev/include/linux/cdrom.h: Likewise.
	* linuxdev/include/linux/config.h: Likewise.
	* linuxdev/include/linux/etherdevice.h: Likewise.
	* linuxdev/include/linux/fd.h: Likewise.
	* linuxdev/include/linux/fdreg.h: Likewise.
	* linuxdev/include/linux/fs.h: Likewise.
	* linuxdev/include/linux/genhd.h: Likewise.
	* linuxdev/include/linux/hdreg.h: Likewise.
	* linuxdev/include/linux/if.h: Likewise.
	* linuxdev/include/linux/if_arp.h: Likewise.
	* linuxdev/include/linux/if_ether.h: Likewise.
	* linuxdev/include/linux/if_tr.h: Likewise.
	* linuxdev/include/linux/igmp.h: Likewise.
	* linuxdev/include/linux/in.h: Likewise.
	* linuxdev/include/linux/inet.h: Likewise.
	* linuxdev/include/linux/interrupt.h: Likewise.
	* linuxdev/include/linux/ioport.h: Likewise.
	* linuxdev/include/linux/ip.h: Likewise.
	* linuxdev/include/linux/kernel.h: Likewise.
	* linuxdev/include/linux/locks.h: Likewise.
	* linuxdev/include/linux/major.h: Likewise.
	* linuxdev/include/linux/malloc.h: Likewise.
	* linuxdev/include/linux/mc146818rtc.h: Likewise.
	* linuxdev/include/linux/mm.h: Likewise.
	* linuxdev/include/linux/module.h: Likewise.
	* linuxdev/include/linux/mount.h: Likewise.
	* linuxdev/include/linux/net.h: Likewise.
	* linuxdev/include/linux/netdevice.h: Likewise.
	* linuxdev/include/linux/nfs.h: Likewise.
	* linuxdev/include/linux/notifier.h: Likewise.
	* linuxdev/include/linux/pagemap.h: Likewise.
	* linuxdev/include/linux/pci.h: Likewise.
	* linuxdev/include/linux/personality.h: Likewise.
	* linuxdev/include/linux/proc_fs.h: Likewise.
	* linuxdev/include/linux/quota.h: Likewise.
	* linuxdev/include/linux/route.h: Likewise.
	* linuxdev/include/linux/sched.h: Likewise.
	* linuxdev/include/linux/skbuff.h: Likewise.
	* linuxdev/include/linux/socket.h: Likewise.
	* linuxdev/include/linux/sockios.h: Likewise.
	* linuxdev/include/linux/string.h: Likewise.
	* linuxdev/include/linux/time.h: Likewise.
	* linuxdev/include/linux/timer.h: Likewise.
	* linuxdev/include/linux/tqueue.h: Likewise.
	* linuxdev/include/linux/tty.h: Likewise.
	* linuxdev/include/linux/types.h: Likewise.
	* linuxdev/include/linux/uio.h: Likewise.
	* linuxdev/include/linux/version.h: Likewise.
	* linuxdev/include/linux/wait.h: Likewise.
	* linuxdev/include/net/af_unix.h: Likewise.
	* linuxdev/include/net/ax25.h: Likewise.
	* linuxdev/include/net/ax25call.h: Likewise.
	* linuxdev/include/net/icmp.h: Likewise.
	* linuxdev/include/net/ip.h: Likewise.
	* linuxdev/include/net/ip_alias.h: Likewise.
	* linuxdev/include/net/ip_forward.h: Likewise.
	* linuxdev/include/net/ipx.h: Likewise.
	* linuxdev/include/net/netlink.h: Likewise.
	* linuxdev/include/net/netrom.h: Likewise.
	* linuxdev/include/net/nrcall.h: Likewise.
	* linuxdev/include/net/p8022.h: Likewise.
	* linuxdev/include/net/protocol.h: Likewise.
	* linuxdev/include/net/psnap.h: Likewise.
	* linuxdev/include/net/raw.h: Likewise.
	* linuxdev/include/net/route.h: Likewise.
	* linuxdev/include/net/sock.h: Likewise.
	* linuxdev/include/net/tcp.h: Likewise.
	* linuxdev/include/net/udp.h: Likewise.

	* linuxdev/arch/i386/linux_soft.c: Removed.
	* linuxdev/drivers/scsi/NCR5380.src: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_proc.src: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_reg.h: Likewise.
	* linuxdev/drivers/scsi/eata_dma_proc.src: Likewise.
	* linuxdev/drivers/scsi/eata_pio_proc.src: Likewise.
	* linuxdev/drivers/scsi/qlogic.c: Likewise.
	* linuxdev/drivers/scsi/qlogic.h: Likewise.
	* linuxdev/drivers/scsi/scsi_debug.c: Likewise.
	* linuxdev/drivers/scsi/scsi_debug.h: Likewise.
	* linuxdev/drivers/scsi/scsi_ioctl.h: Likewise.
	* linuxdev/include/linux/math_emu.h: Likewise.
	* linuxdev/include/linux/minix_fs.h: Likewise.
	* linuxdev/include/linux/minix_fs_sb.h: Likewise.
	* linuxdev/include/linux/scsi.h: Likewise.
	* linuxdev/include/linux/scsicam.h: Likewise.
	* linuxdev/include/linux/vm86.h: Likewise.

	* linuxdev/arch/i386/linux_ctype.c: New file.
	* linuxdev/arch/i386/linux_lib.S: Likewise.
	* linuxdev/arch/i386/linux_softirq.c: Likewise.
	* linuxdev/drivers/net/3c515.c: Likewise.
	* linuxdev/drivers/net/epic100.c: Likewise.
	* linuxdev/drivers/net/eth82586.h: Likewise.
	* linuxdev/drivers/net/fmv18x.c: Likewise.
	* linuxdev/drivers/net/ne2k-pci.c: Likewise.
	* linuxdev/drivers/net/pcnet32.c: Likewise.
	* linuxdev/drivers/net/rtl8139.c: Likewise.
	* linuxdev/drivers/net/smc-ultra32.c: Likewise.
	* linuxdev/drivers/net/smc9194.c: Likewise.
	* linuxdev/drivers/net/smc9194.h: Likewise.
	* linuxdev/drivers/net/tlan.c: Likewise.
	* linuxdev/drivers/net/tlan.h: Likewise.
	* linuxdev/drivers/net/wavelan.p.h: Likewise.
	* linuxdev/drivers/net/yellowfin.c: Likewise.
	* linuxdev/drivers/scsi/FlashPoint.c: Likewise.
	* linuxdev/drivers/scsi/NCR5380.c: Likewise.
	* linuxdev/drivers/scsi/NCR5380.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx/scsi_message.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx/sequencer.h: Likewise.
	* linuxdev/drivers/scsi/aic7xxx_proc.c: Likewise.
	* linuxdev/drivers/scsi/dc390.h: Likewise.
	* linuxdev/drivers/scsi/dc390w.h: Likewise.
	* linuxdev/drivers/scsi/dtc.c: Likewise.
	* linuxdev/drivers/scsi/dtc.h: Likewise.
	* linuxdev/drivers/scsi/eata_dma_proc.c: Likewise.
	* linuxdev/drivers/scsi/eata_pio_proc.c: Likewise.
	* linuxdev/drivers/scsi/gdth.c: Likewise.
	* linuxdev/drivers/scsi/gdth.h: Likewise.
	* linuxdev/drivers/scsi/gdth_ioctl.h: Likewise.
	* linuxdev/drivers/scsi/gdth_proc.c: Likewise.
	* linuxdev/drivers/scsi/gdth_proc.h: Likewise.
	* linuxdev/drivers/scsi/ncr53c8xx.c: Likewise.
	* linuxdev/drivers/scsi/ncr53c8xx.h: Likewise.
	* linuxdev/drivers/scsi/ppa.c: Likewise.
	* linuxdev/drivers/scsi/ppa.h: Likewise.
	* linuxdev/drivers/scsi/qlogicfas.c: Likewise.
	* linuxdev/drivers/scsi/qlogicfas.h: Likewise.
	* linuxdev/drivers/scsi/qlogicisp.c: Likewise.
	* linuxdev/drivers/scsi/qlogicisp.h: Likewise.
	* linuxdev/drivers/scsi/qlogicisp_asm.c: Likewise.
	* linuxdev/drivers/scsi/scripts.h: Likewise.
	* linuxdev/drivers/scsi/scsiio.c: Likewise.
	* linuxdev/drivers/scsi/scsiiom.c: Likewise.
	* linuxdev/drivers/scsi/tmscsim.c: Likewise.
	* linuxdev/drivers/scsi/tmscsim.h: Likewise.
	* linuxdev/drivers/scsi/tmscsiw.c: Likewise.
	* linuxdev/drivers/scsi/tmscsiw.h: Likewise.
	* linuxdev/include/asm-i386/atomic.h: Likewise.
	* linuxdev/include/asm-i386/checksum.h: Likewise.
	* linuxdev/include/asm-i386/ioctls.h: Likewise.
	* linuxdev/include/asm-i386/math_emu.h: Likewise.
	* linuxdev/include/asm-i386/posix_types.h: Likewise.
	* linuxdev/include/asm-i386/semaphore.h: Likewise.
	* linuxdev/include/asm-i386/sockios.h: Likewise.
	* linuxdev/include/asm-i386/string-486.h: Likewise.
	* linuxdev/include/asm-i386/termbits.h: Likewise.
	* linuxdev/include/asm-i386/unaligned.h: Likewise.
	* linuxdev/include/asm-i386/vm86.h: Likewise.
	* linuxdev/include/linux/affs_hardblocks.h: Likewise.
	* linuxdev/include/linux/atalk.h: Likewise.
	* linuxdev/include/linux/ax25.h: Likewise.
	* linuxdev/include/linux/compile.h: Likewise.
	* linuxdev/include/linux/ctype.h: Likewise.
	* linuxdev/include/linux/fddidevice.h: Likewise.
	* linuxdev/include/linux/icmp.h: Likewise.
	* linuxdev/include/linux/if_fddi.h: Likewise.
	* linuxdev/include/linux/ipx.h: Likewise.
	* linuxdev/include/linux/md.h: Likewise.
	* linuxdev/include/linux/netrom.h: Likewise.
	* linuxdev/include/linux/posix_types.h: Likewise.
	* linuxdev/include/linux/random.h: Likewise.
	* linuxdev/include/linux/ucdrom.h: Likewise.
	* linuxdev/include/linux/udp.h: Likewise.
	* linuxdev/include/linux/wireless.h: Likewise.
	* linuxdev/include/net/br.h: Likewise.
	* linuxdev/include/net/gc.h: Likewise.
	* linuxdev/include/net/ip_masq.h: Likewise.
	* linuxdev/include/net/p8022tr.h: Likewise.
	* linuxdev/include/net/p8022trcall.h: Likewise.
	* linuxdev/include/net/rose.h: Likewise.
	* linuxdev/include/net/rosecall.h: Likewise.
	* linuxdev/include/net/slhc_vj.h: Likewise.
	* linuxdev/include/net/spx.h: Likewise.
	* linuxdev/include/scsi/scsi.h: Likewise.
	* linuxdev/include/scsi/scsi_ioctl.h: Likewise.
	* linuxdev/include/scsi/scsicam.h: Likewise.

1998-11-06  OKUJI Yoshinori  <okuji@kuicr.kyoto-u.ac.jp>

	* i386/i386at/gpl/linux: Moved to ...
	* linuxdev: ... here.
	* i386/Makefrag: Linux drivers specific code moved to ...
	* linuxdev/Makefrag: ... here.
	* i386/Files: Recreated.
	* i386/Subdirs: Likewise.
	* linuxdev/drivers: New directory.
	* linuxdev/arch: Likewise.
	* linuxdev/arch/i386: Likewise.
	* linuxdev/{block,scsi,net,pci}: Moved to ...
	* linuxdev/drivers/{block,scsi,net,pci}: ... here.
	* i386/{Drivers.in,device-drivers.h.in,driverlist.in}: Moved to ...
	* linuxdev/{Drivers.in,device-drivers.h.in,driverlist.in}: ... here.
	* linuxdev/{linux_emul.h,linux_*.c}: Moved to ...
	* linuxdev/arch/i386/{linux_emul.h,linux_*.c}: ... here.
	* linuxdev/arch/i386/linux_block.c: Include <linux_emul.h>, instead
	of <i386at/gpl/linux/linux_emul.h>.
	* linuxdev/arch/i386/linux_init.c: Likewise.
	* linuxdev/arch/i386/linux_kmem.c: Likewise.
	* linuxdev/arch/i386/linux_misc.c: Likewise.
	* linuxdev/arch/i386/linux_net.c: Likewise.
	* linuxdev/arch/i386/linux_sched.c: Likewise.
	* device/ds_routines.c: Include <linuxdev/device-drivers.h>, instead
	of <i386/device-drivers.h>.
	* linuxdev/arch/i386/linux_init.c: Likewise.
	* linuxdev/include/linux/autoconf.h: Likewise.
	* Makefile.in: Include $(srcdir)/linuxdev/Makefrag.
	* linuxdev/Drivers.in (AC_INIT): Use include/linux/autoconf.h,
	instead of i386/i386asm.sym.

1998-10-28  Roland McGrath  <roland@baalperazim.frob.com>

	* include/mach/multiboot.h: Contents were doubled.

1998-10-24  Roland McGrath  <roland@baalperazim.frob.com>

	* Makefile.in (mach_machine): Don't depend on config.status, since it
	is always newer than the symlink target.

	* i386/Makefrag ($(systype)/device-drivers.h): Depend on
	$(systype)/driverlist, and have no commands.

	* configure.in (--enable-kdb): Fix help text; handle --disable-kdb.
	Remove BUILD_CC checks and lex/yacc checks (which were for mig).
	(installed_clib): Remove these checks.
	(LD, NM, MIG): Use AC_CHECK_TOOL for these.

	* Makefile.in (all, clean, mostlyclean, install, dist,
	%_interface.h rule, all *mig* rules): Remove all commands, deps,
	and rules related to mig, which is now in a separate distribution.

	* Makefile.in (before-compile): Add mach/machine.
	(mach/machine, mach_machine): New rules to make symlink so
	#include <mach/machine/foo.h> works.

	* Makefile.in (NM): New variable, substituted by configure.
	(check-clib-routines): Use $(NM) instead of literal "nm".
	Fix awk script to grok __ defns and weak defns of desired symbols.
	(clib-routines.o): Use $(CC) -r -nostartfiles -nostdlib -static
	instead of $(LD) -r.  Use -lc instead of $(installed-clib).
	(installed-clib): Variable removed.

	* i386/Makefrag: Use -include for linux-flags, so no warning.

	* device/chario.c: Add forward decl for ttstart.

	* i386/i386/db_trace.c: Use explicit int in decl.

	* device/ds_routines.c (device_write_trap, device_writev_trap,
	ds_trap_write_done): Cast arg to zfree.

	* kern/ipc_tt.c (mach_ports_lookup): Remove unnecessary cast.

1998-10-04  Roland McGrath  <roland@baalperazim.frob.com>

	* include/mach/message.h: Use __typeof instead of typeof.

1998-09-06  Roland McGrath  <roland@baalperazim.frob.com>

	* kern/time_out.h: Include <mach/time_value.h> for time_value_t defn.

1998-07-19  Roland McGrath  <roland@baalperazim.frob.com>

	* mig: Subdirectory removed, now in separate dist.

Fri Apr 24 14:24:15 1998  Thomas Bushnell, n/BSG  <tb@mit.edu>

	* i386/i386/pcb.c (thread_setstatus): Set STATE before validating
	segment registers.  Reported by UCHIYAMA Fasushi (uch@nop.or.jp).

Fri Apr 24 13:19:40 1998  Thomas Bushnell n/BSG  <thomas@melange.gnu.org>

	* kern/debug.c (panic): Increase "seconds" in delay to 1000; machines
	are faster now.

	* i386/i386at/gpl/linux/linux_kmem.c: Increase MEM_CHUNKS to 7.

Wed Aug 20 16:05:19 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* kern/thread.h (struct thread): New member `creation_time'.
	* include/mach/thread_info.h: New member `creation_time'.
	* kern/thread.c (thread_create): Set creation time stamp.
	(thread_info) [THREAD_BASIC_INFO]: Fill in new creation time
	field.  Carefully preserve compatibility with old callers.

	* kern/task.h (struct task): New member `creation_time'.
	* include/mach/task_info.h: New member `creation_time'.
	* kern/task.c (task_create): Set creation time stamp.
	(task_info) [TASK_BASIC_INFO]: Fill in new creation time field.
	Carefully preserve compatibility with old callers.

	* kern/mach_clock.c (record_time_stamp): New function.
	* kern/time_out.h (record_time_stamp): Add prototype.

Sun Aug  3 18:25:38 1997  Shantanu Goel  <goel@cs.columbia.edu>

	* i386/i386/thread.h (struct pcb): Added new field `data' used
	by Linux driver emulation.

	* i386/i386at/gpl/linux/include/linux/blk.h (end_request):
	Revamped Mach specific code.  Don't use `errors' field in request.
	Don't call driver's request function.

	* i386/i386at/gpl/linux/include/linux/fs.h (struct buffer_head):
	Deleted old Mach-specific definition.  Use original Linux defintion.

	* i386/i386at/gpl/linux/linux_block.c:  Rewritten extensively.
	(collect_buffer_pages): Deleted.
	(alloc_buffer, free_buffer): Rewritten to use Mach page allocator.
	(getblk, __brelse): Use Mach kernel allocator.
	(check_for_error): Deleted.
	(ll_rw_block): Allocate request structure on stack.
	(rdwr_partial, rdwr_full, do_rdwr) New routines.
	(block_read, block_write): Rewritten to use new routine do_rdwr.
	(find_name): New routine.
	(read_bsd_label, read_vtoc): New routines.
	(init_partition): New routine.
	(device_open): Rewritten for modularity.  Allocate Linux block
	variables on the stack.
	(check_limit): New routine.
	(device_read, device_write): Rewritten extensively.  Map user
	pages into kernel buffer before passing to driver.  This is in
	preparation for general Linux block driver support.  Allocate
	Linux block variables on the stack.

	* i386/i386at/gpl/linux/linux_kmem.c:
	(collect_buffer_pages): Deleted.

Fri Aug  1 16:15:33 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* kern/mach_clock.c (clock_interrupt): Test correct macro to see
	if PC sampling is configured: MACH_PCSAMPLE, not MACH_SAMPLE.

	* i386/i386/locore.S (discover_x86_cpu_type): Comment out routine
	for now.
	* i386/i386at/model_dep.c (c_boot_entry): Comment out use of
	discover_x86_cpu_type for now.

	* i386/include/mach/i386/eflags.h (EFL_AC, EFL_ID): New bits.

	* i386/i386/locore.S (discover_x86_cpu_type): Use correct opcode
	for right shift.  Use ENTRY macro correctly.

Mon Jul 28 17:01:19 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* COPYING: New file.
	* Makefile.in (topfiles): Add COPYING.

Mon Jul 21 14:20:39 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* kern/mach4.srv: Include <mach_pcsample.h> so the value of
	MACH_PCSAMPLE is made available for mach4.defs.

Thu Jul 10 13:51:20 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (install): Use `ln -sf' instead of `-ln -s'.
	Suggested by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).

Thu Jun 26 13:48:31 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386/locore.S (discover_x86_cpu_type): New function.
	* i386/i386at/model_dep.c (c_boot_entry): Fill in cpu type in
	MACHINE_SLOT using new function.

	* include/mach/machine.h (CPU_TYPE_I486, CPU_TYPE_PENTIUM,
	CPU_TYPE_PENTIUMPRO, CPU_TYPE_POWERPC): New CPU types.  These
	conform to current OSF Mach values, but note that some of the
	various subtypes are different.

Mon Jun 16 12:14:17 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386/loose_ends.c (ovbcopy): Delete function.  Suggested by
	Matthew Wilcox (willy@odie.barnet.ac.uk.)

Thu Jun 12 18:08:29 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	Version 1.1.3 released.

	* version.c (version): Update to 1.1.3.

Wed Jun 11 20:16:47 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/Drivers.in: Add el3.  How did this escape notice?
	* i386/device-drivers.h.in: Add CONFIG_EL3.

Tue Jun 10 13:33:37 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	Version 1.1.2 released.

	* Makefile.in (install): Install cross-migcom as `migcom', not as
	`mig'.

	* i386/Makefrag (objfiles += $(device_drivers)): Sort
	$(device_drivers) before adding to objfiles in order to remove
	duplicates.

Mon Jun  9 22:14:09 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/Drivers.in: Fix typos apt.o -> atp.o; 3c403.o -> 3c503.o.

	* Drivers.macros (AC_DRIVER): Test the class selected flag
	correctly.

Mon May 26 14:33:19 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* version.c (version): Update to version 1.1.2.

Fri May 23 10:08:48 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* kern/thread.c (thread_info): Set flags word correctly;
	TH_FLAGS_SWAPPED and TH_FLAGS_IDLE are not exclusive.

	* Makefile.in (topfiles): Add aclocal.m4.
	Reported by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).

Mon May 12 11:25:38 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	Version 1.1.1 released.

	* version.c (version): Update to version 1.1.1.

	* bogus/mach_kdb.h: Make sure MACH_KDB is always defined, to zero
	if necessary.  Bug report from Marcus Daniels
	(marcus@cathcart.sysc.pdx.edu).

Fri May  9 13:06:25 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/Files: Fix typo for _setjmp.S.
	Reflect 53c7,8xx.c -> 53c78xx.c change.

Wed May  7 15:32:08 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* version.c (version): Update to version 1.1.
	* NEWS: New file.
	* Makefile.in (topfiles): Add NEWS.

Mon May  5 11:34:01 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (enable_kdb): Use findstring instead of filter.
	Reported by Marcus Daniels (marcus@cathcart.sysc.pdx.edu).

Fri May  2 12:43:46 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (enable_kdb): New variable.
	(clib-routines): If enable_kdb, then add strstr.
	* i386/i386/_setjmp.S: New file, from UK22 libmach.
	* i386/Files: Add i386/i386/_setjmp.S.
	* i386/Makefrag (objfiles): Add _setjmp.o if enable_kdb.

1997-04-30  Marcus G. Daniels  <marcus@cathcart.sysc.pdx.edu>

	* Makefile.in (clib-routines): Add htons not because it is necessary,
	but because libc5 systems will bring it in.
	(check-clib-routines): Tolerate extra weak symbols.

Wed Apr 30 14:12:12 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in: Delete duplicate rule for cross-mig.

Mon Apr 28 12:09:53 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (check): New target.  Reported by
	xtest@postman.epa.go.jp.

	* i386/Drivers.in (ncr53c7xx): Change file name to 53c78xx.o.
	* i386/i386at/gpl/linux/scsi/53c7,8xx.c: Moved to ...
	* i386/i386at/gpl/linux/scsi/53c78xx.c: ... here.
	* i386/Makefrag (linux-scsi-files): Change file name here too.
	Reported by xtest@postman.epa.go.jp.

Wed Apr 23 14:35:44 1997  Miles Bader  <miles@gnu.ai.mit.edu>

	* ipc/ipc_entry.c [MACH_KDB]: Add include of <kern/task.h>.

Wed Apr 23 13:21:23 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* configure.in (BUILD_CC): Use AC_CHECK_PROGS, not AC_CHECK_PROG,
	since we are checking multiple names.

	* configure.in (kdb): New --enable option.
	* Makefile.in (DEFINES): Add @DEFS@.
	* bogus/mach_kdb.h: Make this file zero length; we get MACH_KDB
	from configure now.

	* Makefile.in (clean, distclean, mostlyclean, maintainter-clean):
	New targets.
	(all-archs-configures): New variable.
	(MIG): Change to ./local-mig.
	(./local-mig): Change to build this instead of ./mig
	(check-clib-routines): Use nm -g in case there are local symbols.
	Suggested by Matthew Wilcox (willy@odie.barnet.ac.uk).

Fri Apr 18 15:25:10 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* configure.in: Add AC_PREREQ for version 2.12.
	* i386/Drivers.in: Likewise.

Wed Apr 16 16:55:36 1997  Marcus G. Daniels  <marcus@cathcart.sysc.pdx.edu>

	* configure.in: Replace AC_PROG_CC with AC_PROG_CC_LOCAL.
	If cross compiling do Lex/Yacc checks with BUILD_CC.
	Check CC and BUILD_CC for libraries having the needed support,
	and substitute discovery in installed_clib.

	* aclocal.m4: New file.  These replacement macros are to handle
	the case where there is a cross compiler but no supporting files.

	* Makefile.in (installed-clib): Don't hardwire a Hurd libcrt.a.
	(cross_linkable): Only define cross-migcom variable when it will
	be possible to build it.
	(all, install): Use $(cross-migcom).
	(install): Install cross-migcom only if was to be built.
	(mkinstalldirs): Add $(bindir), $(includedir)/mach/exec
	(cross-lexxer.o lexxer.o): lexxer.o needs cpu.h.
	(./cross-migcom): Prevent dependency generation for cross-* MiG files
	unless they can actually be built.

Thu Apr 17 15:55:40 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* kern/exception.c (exception_no_server): Comment out the suspend
	code; it's useful for special case debugging, but causes problems
	in general.

Wed Apr 16 12:52:25 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (cross-lexxer.o lexxer.o): Add pump-priming
	dependency on cpu.h.  Reported by Marcus G. Daniels
	(marcus@cathcart.sysc.pdx.edu).

	* configure.in: Fail if configure target is not for GNU os.

	* i386/Drivers.in (com): Delete option.  It's required by
	kd_mouse.c.
	* i386/Makefrag (i386at-files): Add com.c.
	(driver-files): Delete variable.
	* i386/bogus/com.h: Revert change of March 10.
	* i386/device-drivers.h.in (CONFIG_MACH_COM): Delete option.
	Bug report from Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).

	* Makefile.in (./cross-mig): New rule.
	(mkinstalldirs): Add $(libexecdir).
	* configure.in: Recognize i686.
	Reported by Marcus G. Daniels (marcus@cathcart.sysc.pdx.edu).

Mon Apr 14 11:50:45 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Released version 1.0.

	* kern/exception.c (exception_no_server): Try and suspend the
	failing thread before killing the task.  Then a debugger can be
	used.

	* i386/Makefrag: Add rebuilding rules for configure subscript.

	* i386/Makefrag: Fix up copyright notice.
	* i386/Drivers.in: Likewise.
	* Makefile.in: Likewise.
	* Drivers.macros: Likewise.
	* configure.in: Likewise.

	* include/sys/time.h: New file, from include/mach/sa/sys/time.h.
	* include/sys/reboot.h: New file, from include/mach/sa/sys/reboot.h.
	* include/sys/ioctl.h: New file, from include/mach/sa/sys/ioctl.h.
	* include/alloca.h: New file, from include/mach/sa/alloca.h.
	* Makefile.in (other-sys-headers): Add time.h, ioctl.h, and reboot.h.
	(other-mach-headers): New variable.
	(mach-exec-headers): New variable.
	(other-headers): New variable.
	(installed-headers): Add mach-exec-headers.
	(dist): Distribute other-mach-headers, other-sys-headers,
	mach-exec-headers, and other-headers.
	(device-files): Add device.srv.

	* Makefile.in (check-clib-routines): Use more efficient rule.

Fri Apr 11 15:18:09 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (dist): Repair rule.
	(other-sys-headers): New variable.
	(dist): Install $(other-sys-headers).
	(INCLUDES): Remove -I$(srcdir)/include/mach/sa.
	(rules for mig-related .d files): Include MiG-specific -I flags.
	(mach-headers): Add inline.h.
	* include/sys/types.h: New file, from include/mach/sa/sys/types.h.

Mon Mar 24 16:23:21 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* version.c (version): Make that 1.0.  Whee.

Fri Mar 21 15:50:09 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386at/gpl/linux/scsi/aha1740.c (aha1740_test_port): Try
	and turn on PORTADDR_ENH before checking it.

	* vm/vm_object.c (vm_object_cached_max): Increase to 200.

Thu Mar 20 12:33:06 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile.in (dist): New target.  Reorganized some vars
	describing source.
	* i386/Subdirs: New file.
	* i386/Files: New file.

	* version.c (version): Push back to 0.1.

	* Makefile.in (cross_compiling, bindir, libexecdir): New
	variable.

	* Makefile.in (install): Depend on cross-mig and cross-migcom;
	install them.  New rules added to build mig, migcom, cross-mig,
	and cross-migcom.

	* configure.in (AC_PROG_LEX, AC_PROG_YACC): New tests.
	(BUILD_CC): New test to set these.

	* Makefile.in (%.h %_user.c): Depend on $(MIG) too.
	(%_interface.h %_server.c): Likewise.
	(MIG): Don't use @MIG@; hard code it to the one we build.
	(BUILD_CC, BUILD_CFLAGS, MIGCOM, LEX, YACC, LEXLIB): New variables.

Wed Mar 19 16:47:28 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386at/kd.c (BROKEN_KEYBOARD_RESET): Turn off this so that
	we attempt the keyboard resets.
	* i386/i386/locore.S (cpu_shutdown): Attempt to provide a more
	`robust' null_idtr.

Mon Mar 17 13:47:14 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386at/gpl/linux/scsi/hosts.c (scsi_init): Don't print out
	gratuitious obnoxiousness.
	* i386/i386at/gpl/linux/scsi/scsi.c (scsi_dev_init): Likewise.
	* i386/i386at/gpl/linux/block/triton.c (ide_init_triton):
	Likewise.
	(init_triton_dma): Likewise.
	* i386/i386at/gpl/linux/pci/pci.c (pci_init): Likewise.
	* i386/i386at/gpl/linux/pci/bios32.c (check_pcibios): Likewise.
	(pcibios_init): Likewise.
	* i386/i386at/gpl/linux/block/genhd.c (add_partition): Likewise.

	* i386/i386at/gpl/linux/net/8390.c (ei_debug): Make default value
	zero.

Wed Mar 12 14:50:46 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386at/com.c (comprobe): Turn off noisiness.

	* i386/i386at/gpl/linux/linux_block.c (check_disk_change): Don't
	print out gratuitous obnoxiousness.
	(device_open): Likewise.
	* kern/bootstrap.c (copy_bootstrap): Likewise.
	(user_bootstrap): Likewise.
	* i386/i386at/gpl/linux/block/genhd.c (msdos_partition): Likewise.
	(osf_partition): Likewise.
	(sun_partition): Likewise.
	(check_partition): Likewise.
	* i386/i386/pit.c (findspeed): Likewise.
	* vm/vm_resident.c (vm_page_bootstrap): Likewise.

Mon Mar 10 15:04:47 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/i386at/gpl/linux/linux_init.c (calibrate_delay): Don't
	print out gratuitous obnoxiousness.

	* i386/i386at/gpl/linux/linux_init.c (linux_init): Only call
	linux_net_emulation_init if CONFIG_INET.  Include
	<i386/device-drivers.h>.

	* i386/i386at/i386at_ds_routines.c: Include
	<i386/device-drivers.h>.  Don't mention linux_net_emulation_ops
	unless CONFIG_INET.

	* device/ds_routines.c (io_done_thread_continue): [i386]
	Conditionalize free_skbuffs also on CONFIG_INET.  Include
	<i386/device-drivers.h>.

	* i386/Drivers.in, i386/device-drivers.h.in, i386/driverlist.in:
	New files.
	* i386/Makefrag: Include i386/driverlist; don't include all device
	drivers in kernel image; instead use list from driverlist.
	* configure.in: Configure in $systype subdir too.

	* i386/i386at/gpl/linux/include/linux/autoconf.h: Damage severly
	to conform to device-drivers.h model.

	* i386/bogus/com.h: Include <i386/device-drivers.h>.
	Only turn on NCOM if CONFIG_MACH_COM is present.

Mon Mar  3 16:26:58 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* include/mach/message.h (__mach_msg, __mach_msg_trap): Add decls.

Tue Feb 25 15:42:23 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/Makefrag (INCLUDES): Find `include' directory in new
	location.
	* Makefile (INCLUDES): Find `include' directory in new location.
	(%.symc): Find gensym.awk in new location.

	* Reorganized directories into new layout and unified mach4 and
	mach4-i386 into a single tree.


Older changes in ChangeLog.00 (for i386 directory) and ChangeLog.0 (for
all other files).
