Commit graph

4770 commits

Author SHA1 Message Date
Dirk Vogt 991c41db8f Fix up mtree.sh 2012-06-18 10:53:29 +00:00
Dirk Vogt eccb5d51f2 Also copy kernel into multiboot dir 2012-06-18 10:53:28 +00:00
Dirk Vogt 67ff0d71ed ext2 ramdisk: copy rc to correct destination 2012-06-18 10:53:28 +00:00
Dirk Vogt 56f6a77ead ramdisk: don't do anything at dependall 2012-06-18 10:53:27 +00:00
Dirk Vogt 7da8d39c06 Fix compiler check 2012-06-18 10:53:27 +00:00
Thomas Veerman 50e870c530 Make var overridable for cross compilation 2012-06-18 10:53:26 +00:00
Dirk Vogt ed4df03113 Include ext2 ramdisk in build and remove sync
As the ramdisk and ext2 ramdisk don't build anything for the install
and all targets, memory does not have to wait for them anymore.
2012-06-18 10:53:26 +00:00
Dirk Vogt bfacef76c5 Add ext2 ramdisk, intended for cross compilation 2012-06-18 10:53:25 +00:00
Dirk Vogt a8f6f3ebc9 Make ramdisk location configurable
Also, the ramdisk is now built when the memory driver is compiled.
2012-06-18 10:53:25 +00:00
Dirk Vogt 3baaafe113 When MKUNPRIV is set do not require root privilege 2012-06-18 10:53:24 +00:00
Dirk Vogt c735b0bb2c Makefile fixups for cross compilation 2012-06-18 10:53:24 +00:00
Dirk Vogt c2c39af6bb Make TTY cross-compilable 2012-06-18 10:53:23 +00:00
Dirk Vogt 25ae53b165 Make commands cross-compilable 2012-06-18 10:53:23 +00:00
Dirk Vogt 207e4d2a71 Let the kernel load figure out where to put mods
This patch makes the mkimage tool obsolete
2012-06-18 10:53:22 +00:00
Thomas Veerman d642d5508f Create cc symlink to clang 2012-06-18 10:53:22 +00:00
Ben Gras 0fb2f83da9 drop from segments physcopy/vircopy invocations
. sys_vircopy always uses D for both src and dst
	. sys_physcopy uses PHYS_SEG if and only if corresponding
	  endpoint is NONE, so we can derive the mode (PHYS_SEG or D)
	  from the endpoint arg in the kernel, dropping the seg args
	. fields in msg still filled in for backwards compatability,
	  using same NONE-logic in the library
2012-06-18 12:28:40 +00:00
Ben Gras 0e35eb0c6b drop segments from safemap/safeunmap invocations 2012-06-18 12:28:40 +00:00
Kees Jongenburger 7750657783 Add hot plugging infrastructure in rc file.
Adding hot plugging infrastructure in rc file. This includes
starting the devman service, mounting it's file system and
starting the corresponding devmand daemon.

This patch also provide error free shutdown of the USB sub-system.

The USB sub system needs to be shutdown in a certain order but also
consists of components living in /usr/pkg/. By checking the
existence of usbd we can stop it in the correct order.
2012-06-18 09:31:14 +02:00
Kees Jongenburger 6417d3e064 Add devmand configuration to /etc. 2012-06-18 09:30:45 +02:00
Kees Jongenburger 51a9903002 Add support in devmand for using config dirs.
Add support in devmand for using configuration directories to
allow 3rd party packages to add configuration items.
2012-06-18 09:29:53 +02:00
Kees Jongenburger ade7dc8ded Upgrade libddekit and introduce devmand.
Devmand (Device manager daemon) is the daemon that will
dynamically manage services based on events received from
the system.
2012-06-18 09:23:42 +02:00
Kees Jongenburger 6b8821515d Move setjmp and strnlen to common/lib.
Move setjmp and strnlen to common/lib to allow libddekit to use them.
2012-06-18 09:20:22 +02:00
Ben Gras 2bfeeed885 drop segment from safecopy invocations
. all invocations were S or D, so can safely be dropped
	  to prepare for the segmentless world
	. still assign D to the SCP_SEG field in the message
	  to make previous kernels usable
2012-06-16 16:22:51 +00:00
Ben Gras 85ff5a947e dumpcore: use ptrace function to trigger a coredump
. dumpcore currently relies on minix segments
	. also ptrace dumpcore fix
2012-06-15 12:13:50 +02:00
Ben Gras 5e38c802d8 pm: ignore notify() from unknown sender
. avoids annoying error message if e.g. buggy drivers
	  send pm notify()s that pm tries to reply() ENOSYS to
2012-06-14 15:36:38 +02:00
Ben Gras 769af57274 further libexec generalization
. new mode for sys_memset: include process so memset can be
	  done in physical or virtual address space.
	. add a mode to mmap() that lets a process allocate uninitialized
	  memory.
	. this allows an exec()er (RS, VFS, etc.) to request uninitialized
	  memory from VM and selectively clear the ranges that don't come
	  from a file, leaving no uninitialized memory left for the process
	  to see.
	. use callbacks for clearing the process, clearing memory in the
	  process, and copying into the process; so that the libexec code
	  can be used from rs, vfs, and in the future, kernel (to load vm)
	  and vm (to load boot-time processes)
2012-06-07 15:15:02 +02:00
Ben Gras 040362e379 exec() cleanup, generalization, improvement
. make exec() callers (i.e. vfs and rs) determine the
	  memory layout by explicitly reserving regions using
	  mmap() calls on behalf of the exec()ing process,
	  i.e. handling all of the exec logic, thereby eliminating
	  all special exec() knowledge from VM.
	. the new procedure is: clear the exec()ing process
	  first, then call third-party mmap()s to reserve memory, then
	  copy the executable file section contents in, all using callbacks
	  tailored to the caller's way of starting an executable
	. i.e. no more explicit EXEC_NEWMEM-style calls in PM or VM
	  as with rigid 2-section arguments
	. this naturally allows generalizing exec() by simply loading
	  all ELF sections
	. drop/merge of lots of duplicate exec() code into libexec
	. not copying the code sections to vfs and into the executable
	  again is a measurable performance improvement (about 3.3% faster
	  for 'make' in src/servers/)
2012-06-07 15:15:01 +02:00
Ben Gras 41b869d4d6 drop aout support
justification: soon we won't be able to execute sep I&D aouts at
all (because of the vanishing segments), which was the default mode
to generate them so most binaries will be sep I&D.

this makes the vfs/rs exec() unification work simpler.

after unification, common I&D aout could be added back quite simply.
2012-06-07 12:43:16 +02:00
Ben Gras ee4016155e vm: add third-party mmap() mode and PROCCTL
these two functions will be used to support all exec() functionality
going into a single library shared by RS and VFS and exec() knowledge
leaving VM.

	. third-party mmap: allow certain processes (VFS, RS) to
	  do mmap() on behalf of another process
	. PROCCTL: used to free and clear a process' address space
2012-06-07 12:43:16 +02:00
Ben Gras 1daf36038c kernel: compact utility functions 2012-06-07 11:25:32 +02:00
Ben Gras c2d5e01042 endianness compile fixes 2012-06-06 13:15:18 +02:00
Ben Gras 910a0e1093 kernel: make sure mpx.S is linked early
. for qemu multiboot detection
2012-06-01 16:58:00 +02:00
Ben Gras 8c434cf24f synctree compile fix
. rename CANCEL to ORDER_CANCEL so the CANCEL enum name doesn't
	  clash with a minix header file. also endianness test fix.
2012-05-31 22:42:49 +02:00
Ben Gras ad0db93247 no USE_BOOTPARAM 2012-05-31 01:13:27 +02:00
Ben Gras 3803c55856 kernel: neater arch-dependent split in Makefiles
. files in kernel/ references in kernel/Makefile, but
	  in kernel/arch/i386/ in kernel/arch/i386/Makefile.inc
2012-05-31 01:06:19 +02:00
Ben Gras cd47780252 only elf/multiboot images 2012-05-31 00:58:44 +02:00
Ben Gras c0ef4c4956 mthread: mmap returns MAP_FAILED on error 2012-05-31 00:54:11 +02:00
Ben Gras 73379f0be5 set major version of shlibs to 0
WARNING: this will break existing dynamically linked binaries if they
exist. If you have any:
	. re-build world statically first if necessary
	. remove libraries from /lib and /usr/lib
	. then build world

This change:
	. avoids possible future dismay when interfacing other
	  systems' binaries; done until they are abi-compatible

Thanks to Antoine Leca for pointing this out.
2012-05-10 16:38:24 +02:00
Ben Gras cfb2d7bca5 retire BIOS_SEG and umap_bios
. readbios call is now a physical copy with range check in
	  the kernel call instead of BIOS_SEG+umap_bios
	. requires all access to physical memory in bios range to go
	  through sys_readbios
	. drivers/dpeth: wasn't using it
	. adjusted printer
2012-05-09 19:03:59 +02:00
Ben Gras b611e4c226 brazilian keymap
contributed by David Augusto.
2012-05-04 13:56:04 +02:00
David van Moolenbroek 1817f7fc07 VFS: fix "process already free" panic on reboot
Reported by Claudiu Dan Gheorghe, debugged by Thomas and myself
2012-05-02 17:42:50 +02:00
David van Moolenbroek f004a0a980 test43: fix dangling-symlink case 2012-05-02 17:39:58 +02:00
Ben Gras 543adbed3a libarchive import
. clean and nbsd_ports managed import
	. also makes it shared
2012-05-02 13:31:48 +02:00
Thomas Veerman 76092ddf33 libmthread: don't always verify library initialization
This can be turned back on when the library is compiled with
-DMTHREAD_STRICT (which enables more sanity checks). However,
always performing this check shows up in system profiling results.
2012-05-01 09:55:06 +00:00
Thomas Veerman 068d443d12 VFS: unlock vmnt when out of vnodes 2012-04-27 08:51:13 +00:00
Thomas Veerman b6ff38065f VFS: release what can be released
Only attempt to release blocked processes that are blocked. There is
no use in trying to find more blocked processes than we know that are
blocked (on a pipe).
2012-04-27 08:51:02 +00:00
Thomas Veerman 7b81254069 VFS: simplify stat for pipes
According to POSIX the st_size field of struct stat is undefined for
fifos and anonymous pipes. Thus we can do anything we want. We save a
copy by not being accurate on pipe sizes.
2012-04-27 08:50:49 +00:00
Thomas Veerman db8198d99d VFS: use S_IS* macros 2012-04-27 08:49:38 +00:00
Thomas Veerman 96bbc5da3e VFS: I_PIPE is redundant
Also, use S_IS* macros instead of manual comparison.
2012-04-27 08:49:38 +00:00
Ben Gras 755102d67f AT_SUN_EXECNAME support
. vfs: pass execname in aux vectors
	. ld.elf_so: use this to expand $ORIGIN
	. this requires the executable to reserve more
	  space at exec() calling time
2012-04-26 13:32:39 +02:00