These calls are sent to VFS, and thus should be prefixed with VFS_.
Clean up the protocol and PM's main function a bit.
Since the protocol is substantially big and different from normal VFS
requests, this protocol retains its own numbering range for now.
Change-Id: Ia62104b5c5c929ed787144816d2e4cc70bed3b0b
The getsysinfo(2), getrusage(2), and svrctl(2) calls used the same
call number to different services. Since we want to give each service
its own call number ranges, this is no longer tenable. This patch
introduces per-service call numbers for these calls.
Note that the remainder of the COMMON_ range is left intact, as these
the remaining requests in it are processed by SEF and thus server-
agnostic. The range should really be prefixed with SEF_ now.
Change-Id: I80d728bbeb98227359c525494c433965b40fefc3
- move system calls for use by services from libminlib into libsys;
- move srv_fork(2) and srv_kill(2) from RS and into libsys;
- replace getprocnr(2) with sef_self(3);
- rename previous getnprocnr(2) to getprocnr(2);
- clean up getepinfo(2);
- change all libsys calls that used _syscall to use _taskcall, so as
to avoid going through errno to pass errors; this is already how
most calls work anyway, and many of the calls previously using
_syscall were already assumed to return the actual error;
- initialize request messages to zero, for future compatibility
(note that this does not include PCI calls, which are in need of a
much bigger overhaul, nor kernel calls);
- clean up more of dead DS code as a side effect.
Change-Id: I8788f54c68598fcf58e23486e270c2d749780ebb
The original delayed reply functionality was there to support swapping
in processes as they are unblocked, but swap support is long gone.
These days, this code only incurs overhead and hides bugs.
Change-Id: I4aebcd80719daa1bec45ac91975ddc9a460d74d4
When a process forks, VFS is informed on behalf of the child. This is
correct, because otherwise signals to the new child could get lost.
However, that means that the parent is not blocked from being killed
by a signal while the child is blocked on this VFS call. As a result,
by the time that the VFS reply comes in, the parent may already be
dead, and the child may thus have been assigned a new parent: INIT.
Previously, PM would blindly reply to the parent when the VFS reply
for the fork came in. Thus, it could end up sending a reply to INIT,
even though INIT did not issue the fork(2) call. This could end up
satisfying a different call from INIT (typically waitpid(2)) and then
cause an error when that other call was complete.
It would be possible to set VFS_CALL on both forking parent and child.
This patch instead adds a flag (NEW_PARENT) to note that a process's
parent has changed during a VFS call.
Change-Id: Iad930b2e441db54fe6f7d2fd011f0f6a26e2923d
- introduce PROC_STOPPED flag, which tracks whether the process is
stopped on PROC_STOP in the kernel, rather than implicitly deriving
this from PM_SIG_PENDING;
- make the process resumption test based on current state rather than
state transitions;
- add and clarify several flag checks in the signal handling code;
- add test79 to test signal handling robustness.
Change-Id: Ic8c7527095035b300b56f2ab1b9dd190bd4bf001
NetBSD libc implements these as wrappers around setitimer(2),
sigsuspend(2), and getrusage(2), respectively.
Change-Id: I0c5e725b3e1316bddd3a3ff7ef65d57d30afd10d
. add all sys/sys headers not already present to help compiling
. take netbsd dirent.h and struct dirent; main result is
introducing d_type and d_namlen that have to be set by getdents()
in all FS code implementing it
. d_off is gone
. alignment of the struct has become 8 bytes instead of 4
. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
. libminlib: cleanup unused yet duplicate code
. mfs: throw out the long-broken v1, v2 support
. new test for dirent contents filled by getdents()
Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e
- all TTY-related exceptions have now been merged into the regular
code paths, allowing non-TTY drivers to expose TTY-like devices;
- as part of this, CTTY_MAJOR is now fully managed by VFS instead of
being an ugly stepchild of the TTY driver;
- device styles have become completely obsolete, support for them has
been removed throughout the system; same for device flags, which had
already become useless a while ago;
- device map open/close and I/O function pointers have lost their use,
thus finally making the VFS device code actually readable;
- the device-unrelated pm_setsid has been moved to misc.c;
- some other small cleanup-related changes.
Change-Id: If90b10d1818e98a12139da3e94a15d250c9933da
This single function allows copying file descriptors from and to
processes, and closing a previously copied remote file descriptor.
This function replaces the five FD-related UDS backcalls. While it
limits the total number of in-flight file descriptors to OPEN_MAX,
this change greatly improves crash recovery support of UDS, since all
in-flight file descriptors will be closed instead of keeping them
open indefinitely (causing VFS to crash on system shutdown). With the
new copyfd call, UDS becomes simpler, and the concept of filps is no
longer exposed outside of VFS.
This patch also moves the checkperms(2) stub into libminlib, thus
fully abstracting away message details of VFS communication from UDS.
Change-Id: Idd32ad390a566143c8ef66955e5ae2c221cff966
- sendmsg: the accumulation of multiple in-flight file descriptors was
already described in the comments; now the code actually does what
the comments say :) -- also, added robustness in case of a failure;
- recvmsg: only create a socket rights message if there are file
descriptors pending at all;
- recvmsg: copy back the control message length;
- recvmsg: use CMSG_SPACE instead of CMSG_LEN to compute sizes.
Not sure if all of this is now working according to specification,
but at least tmux seems to be happy with it.
Change-Id: I8d076c14c3ff3220b7fea730e0f08f4b4254ede5
Well, make a start, anyway. Our copy was missing a legacy field from
the structure, that could very well cause applications to fail trying
to set, clear, or check it. As a consequence, SUN_LEN now yields the
same result as on NetBSD.
Change-Id: I80f6aff7769be402b3bd3959f64d314509ed138c
- move VFS calls to a separate source file;
- solve a few subtle bugs, mostly in error handling;
- simplify debug reporting code;
- make a few definitions more independent;
- restyle to something closer to KNF.
Change-Id: I7b0537adfccac8b92b5cc3e78dac9f5ce3c79f03
- remove non-PCI support, since all supported platforms with at_wini
devices also have PCI support by now;
- correspondingly, stop using information from the BIOS altogether;
- limit each driver instance to one controller, to be in line with
the general MINIX3 one-instance-per-controller driver model; this
limits the number of disks per at_wini instance to four;
- go through the controllers by the order of their occurrence in the
PCI table, thus removing the exception for compatibility devices;
- let the second at_wini instance shut down silently if there is only
one IDE controller;
- clean up some extra code we don't need anymore, and resolve some
WARNS=5 level warnings.
Overall, these changes should simplify automatic loading of the right
disk drivers at boot time in the future.
Change-Id: Ia64d08cfbeb9916abd68c9c2941baeb87d02a806
- change "vid/did" to "vid:did", old form still supported for now;
- allow "vid:did/subvid:subdid" specification in system.conf, in
which case a device will be visible to a driver if the subsystem
VID/DID also match.
Change-Id: I7aef54da1b0bc81e24b5d98f1a28416f38f8b266
GCC embeddeds in a string the configuration used when building itself,
this patches just updates that string to match the configuration
actually used.
Change-Id: Ife8f61570b94eb17ce5808b5b58cc5e75e9dc64f
* /usr/bin/strip would be replaced by a link, even when compiling
binutils.
* Updated minix-spec.h to use the correct dynamic linker, and removed
the previously used symlinks.
* Removed the patch to the builtin PATH of ld.elf_so.
Change-Id: I4dc8a7fb77a11638f5105a4e15b6c9be5add750e
As the situation is right now, importing one of the commands the
script replaces, requires a doc/UPDATING step.
By moving the script to a shared folder, and symlinking it once per
command, this allows for separatly installed files on the system,
instead of one file being symlinked multiple times.
Change-Id: I0dae96982bca5168b852ed70fff61442441b929f
* Remove static proto.dev
* Update releasetools/*image.sh not to use proto.dev, as well as
minor comments cleanup
* Add TOOL_TOPROTO
Change-Id: If7dc16d4ebb3b0c4e859786fad25d4af000c999f
Now that the keymaps can distinguish between the regular slash key
and the slash key on the numeric keypad, we can avoid localization
of the latter.
Change-Id: I20ead7d26a9baa82f5a522562524fd75d44efb42
This commit separates the low-level keyboard driver from TTY, putting
it in a separate driver (PCKBD). The commit also separates management
of raw input devices from TTY, and puts it in a separate server
(INPUT). All keyboard and mouse input from hardware is sent by drivers
to the INPUT server, which either sends it to a process that has
opened a raw input device, or otherwise forwards it to TTY for
standard processing.
Design by Dirk Vogt. Prototype by Uli Kastlunger.
Additional changes made to the prototype:
- the event communication is now based on USB HID codes; all input
drivers have to use USB codes to describe events;
- all TTY keymaps have been converted to USB format, with the effect
that a single keymap covers all keys; there is no (static) escaped
keymap anymore;
- further keymap tweaks now allow remapping of literally all keys;
- input device renumbering and protocol rewrite;
- INPUT server rewrite, with added support for cancel and select;
- PCKBD reimplementation, including PC/AT-to-USB translation;
- support for manipulating keyboard LEDs has been added;
- keyboard and mouse multiplexer devices have been added to INPUT,
primarily so that an X server need only open two devices;
- a new "libinputdriver" library abstracts away protocol details from
input drivers, and should be used by all future input drivers;
- both INPUT and PCKBD can be restarted;
- TTY is now scheduled by KERNEL, so that it won't be punished for
running a lot; without this, simply running "yes" on the console
kills the system;
- the KIOCBELL IOCTL has been moved to /dev/console;
- support for the SCANCODES termios setting has been removed;
- obsolete keymap compression has been removed;
- the obsolete Olivetti M24 keymap has been removed.
Change-Id: I3a672fb8c4fd566734e4b46d3994b4b7fc96d578
Due to the existence of /dev/console and /dev/log, and the new
"console=" setting, it is now possible that a single non-PTY object
(e.g. serial) is accessible through two different minor numbers. This
poses a problem when sending late select replies (CDEV_SEL2_REPLY),
because the object's minor number can not be used to identify the
device. Since selecting on such objects through translated minor
numbers is actually required, we now save the minor number used to
initiate the select query in order to send a late reply.
The solution is suboptimal, as it is not possible to use two different
minors to select on the same object at once. In the future, there
should be at least one select record for each minor that can be used
with each object.
Change-Id: I4d39681d2ffd68b4047daf933d45b7bafe3c885e
sysroot support was enabled only for cross versions of the binutils
tools.
This patch also activate it for the native tools which are installed
on the target system.
Change-Id: Ica5de7e20719a63f3b695477b767c30d0a93490c
Most systems provide the full version number in the
'release' field and the kernel version in 'version'.
Minix used to split the full version number between
release and version which caused problems for pkgsrc
and other applications. This patch brings Minix's
uname in line with other systems such as NetBSD.
It also brings the getty banner in line with NetBSD.
Old Minix uname:
sysname->Minix
nodename->10.0.2.15
release->3
version->2.1
machine->i686
New Minix uname:
sysname->Minix
nodename->10.0.2.15
release->3.2.1
version->Minix 3.2.1 (GENERIC)
machine->i686
Change-Id: I966633dfdcf2f9485966bb0d0d042afc45bbeb7d
The set of processes to which a SIGKMESS signal is sent whenever new
diagnostics messages are added to the kernel's message buffer, is now
no longer hardcoded. Instead, processes can (un)register themselves
to receive such notifications, by means of sys_diagctl().
Change-Id: I9d6ac006a5d9bbfad2757587a068fc1ec3cc083e
* Renamed struct timer to struct minix_timer
* Renamed timer_t to minix_timer_t
* Ensured all the code uses the minix_timer_t typedef
* Removed ifdef around _BSD_TIMER_T
* Removed include/timers.h and merged it into include/minix/timers.h
* Resolved prototype conflict by renaming kernel's (re)set_timer
to (re)set_kernel_timer.
Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
The tool has been changed heavily to match our VND driver model.
NetBSD is in the process of renaming it from vnconfig(8) to
vndconfig(8). To keep things in sync, we have to play along.
Change-Id: Ie86df184f03ab00573ea76b43c9caa0412e8321d
This call copies a file descriptor from a remote process into the
calling process. The call is for the VND driver only, and in the
future, ACLs will prevent any other process from using this call.
Change-Id: Ib16fdd1f1a12cb38a70d7e441dad91bc86898f6d
When installed, the test scripts lose their ".sh" suffix, causing them
to be skipped by the "run" script. With this patch, the tests are no
longer specified with ".sh" suffix in the run script, and the suffix
is added automatically as necessary.
LSC: Minor adaptation to keep track of history. As this patch has been
forward ported into mainline, a simple rebase would loose this
commit (cf commit 1f317d315c).
Change-Id: I0b72312e79992b9818559c6546a0e52cd95184c2
- fail SEF initialization if any of the subtests failed, so that the
party invoking the "service up" can tell whether the test succeeded;
- add "nocontig" option, because VM isn't particularly good at
allocating contiguous memory;
- add "silent" option, because it floods the console otherwise;
- allow the device size to be smaller than the maximum transfer size;
- install files to installed test directory.
Change-Id: I45c818f817c11d90c5f94ae26a2fc49e36e6761e