Commit graph

721 commits

Author SHA1 Message Date
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00
David van Moolenbroek 70abb127cc Add sys_vumap() kernel call
This new call is a vectored version of sys_umap(). It supports batch
lookups, non-contiguous memory, faulting in memory, and basic access
checks.
2012-03-24 19:51:13 +01:00
Ben Gras 6af9856d4a libcompat_minix-centric cleanup
remove some old minix-userland-specific stuff

	. /etc/ttytab as a file, and minix-compat function (fftyslot()),
	  replaced by /etc/ttys and new libc functions
	. also remove minix-specific nlist(), cuserid(), fttyslot(), v8 regex
	  functions and <compat/regex.h>
	. and remaining minix-only utilities that use them
	. also unused <compat/pwd.h> and <compat/syslog.h> and
	  redundant <sys/sigcontext.h>
2012-03-16 17:06:24 +01:00
David van Moolenbroek e8d2d2f6b6 libminc-related updates
- add files needed for acpi, ahci, fbd, vfs to libminc
- remove "-lc" from their respective makefiles
- remove setenv from libminc (requires initialization)
2012-03-12 23:16:45 +01:00
David van Moolenbroek d395035160 libddekit: resolve compiler warnings
Introduced by commit ca95f69.
2012-03-08 23:52:28 +01:00
David van Moolenbroek 21ed531c8f pci: remove pci_init1 API call 2012-03-07 23:56:08 +01:00
David van Moolenbroek ca95f69f25 drivers: resolve compiler warnings 2012-03-05 22:32:55 +01:00
Tomas Hruby fb31513b00 LWIP,NETSOCK - lwip uses asynchronous protocol
- libnetsock - internal implementation of a socket on the lwip
  server side. it encapsulates the asynchronous protocol

- lwip server - uses libnetsock to work with the asynchronous
  protocol
2012-03-02 15:44:48 +00:00
Tomas Hruby 72b7abd1a1 VFS - no CANCEL for async non-blocking operations
- if an operation (R, W, IOCTL) is non blocking, a flag is set
  and sent to the device.

- nothing changes for sync devices

- asyn devices should reply asap if an operation is non-blocking.
  We must trust the devices, but we had to trust them anyway to
  reply to CANCEL correctly

- we safe sending CANCEL commands to asyn devices. This greatly
  simplifies the protocol. Asynchronous devices can always reply
  when a reply is ready and do not need to deal with other
  situations

- currently, none of our drivers use the flags since they drive
  virtual devices which do not block
2012-03-02 15:44:48 +00:00
Ben Gras c543dcf205 fix for -lsys assert(): call panic()
. call panic() instead of abort() so that stacktraces are printed
	. also call printf(..) instead of fprintf(stderr, ..)
2012-02-24 13:09:39 +01:00
Ben Gras 5a645f22a8 gzip boot modules.
. import gzip
2012-02-17 12:32:35 +00:00
Ben Gras 39fea0a5b9 install library manpages
. harmonize bsd.lib.mk and bsd.man.mk with netbsd files
	. throw out minix section 3 (library calls) manpages,
	  replaced by netbsd ones that are now installed
2012-02-16 01:48:46 +00:00
Antoine Leca 3fb8cb760c More cleaning up 2012-02-15 19:04:58 +00:00
David van Moolenbroek 1ead18e447 libblockdriver: attribute usage bugfix 2012-02-15 14:23:30 +01:00
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00
Thomas Veerman bba63ef665 libmthread: fix typo in comments 2012-02-13 13:50:32 +00:00
Thomas Veerman accaae9b2c libmthread: add guard pages to stacks
Add guard pages to the top of the stack to catch overflow errors.
Moreover, fix a bug where libmthread would keep using a stack that was
just deallocated; a detached thread would deallocate its own stack after
it was finished running).
2012-02-13 13:50:31 +00:00
Thomas Veerman 0949f5b342 libmthread: don't free() user allocated stack space 2012-02-13 13:50:13 +00:00
David van Moolenbroek de89517711 libblockdriver: increase stack size to 8KB per thread 2012-02-11 15:16:22 +01:00
Thomas Veerman 4498750810 libchardriver: fix open reply for async devices 2012-02-09 14:17:54 +00:00
Thomas Veerman 71634240a0 libpuffs: make GCC happy 2012-02-01 13:23:33 +00:00
David van Moolenbroek 2c685f34e0 Cut PM out of the adddma/deldma/getdma call path 2012-01-14 00:27:06 +01:00
David van Moolenbroek 8cb7ba7951 Remove obsolete PROCSTAT/getsigset call. 2012-01-14 00:27:06 +01:00
Ben Gras 4668b84158 vm_remap_ro
- allows shared memory to be mapped in readonly

- ben@minix3.org & tom@minix3.org
2012-01-13 11:30:01 +00:00
David van Moolenbroek 3e46876a73 hgfs: fix atime/mtime attribute setting bug
Reported and investigated by Antoine Leca.
2011-12-23 19:02:57 +01:00
David van Moolenbroek 472a91708a Move hgfs.h to minix includes directory 2011-12-23 19:01:14 +01:00
Ben Gras 94715d8e54 import netbsd ext2fs fsck and newfs 2011-12-22 23:07:23 +01:00
Ben Gras 4d4057d8a2 netbsd fsck driver import
. fsck driver parses /etc/fstab and invokes sub-fscks
	. further simplifies fs handling in rc
2011-12-22 23:07:15 +01:00
Ben Gras 6b6d114a21 import netbsd libprop 2011-12-22 18:03:13 +01:00
David van Moolenbroek 84662ec4b3 libsys: unbreak getidle() 2011-12-16 16:06:09 +00:00
Raja Appuswamy 8ab7667da4 ahci: NCQ support 2011-12-12 14:13:05 +01:00
David van Moolenbroek e7db2d3588 Add fbd -- Faulty Block Device driver
This driver can be loaded as an overlay on top of a real block
device, and can then be used to generate block-level failures for
certain transfer requests. Specifically, a rule-based system allows
the user to introduce (overt and silent) data corruption and errors.

It exposes itself through /dev/fbd, and a file system can be mounted
on top of it. The new fbdctl(8) tool can be used to control the
driver; see ``man fbdctl'' for details. It also comes with a test
set, located in test/fbdtest.
2011-12-11 22:45:46 +01:00
David van Moolenbroek 4005bba437 libblockdriver: clear IPC only on stateful restart
This removes a race condition when the block driver performs a
complete restart after a crash (the new default). If any user of
the driver finds out its new endpoint and sends a request to the
new driver instance before this instance has had the chance to
initialize, then its initialization would clear all IPC state and
thereby erroneously cancel the incoming request. Clearing IPC
state is only desired upon a stateful restart (where the driver's
endpoint is retained). This information is now passed to and used
by libblockdriver accordingly.
2011-12-11 22:36:19 +01:00
David van Moolenbroek 6f374faca5 Add "expected size" parameter to getsysinfo()
This patch provides basic protection against damage resulting from
differently compiled servers blindly copying tables to one another.
In every getsysinfo() call, the caller is provided with the expected
size of the requested data structure. The callee fails the call if
the expected size does not match the data structure's actual size.
2011-12-11 22:34:14 +01:00
Thomas Veerman 5acd97c7e0 Enable GCOV always 2011-12-07 15:20:26 +00:00
Ben Gras 1c3c4d73ef add previous stat symbols as aliases
. renaming them causes fallout
	. only use the new ones though
2011-12-06 16:03:58 +01:00
David van Moolenbroek ed007ca416 libbdev: extended version
This version of libbdev support asynchronous communication,
recovery after driver restarts, and retrying of failed transfer
operations.
2011-12-05 16:28:09 +01:00
David van Moolenbroek 2f622b3a51 SEF: default to endpoint-changing restart 2011-12-05 16:28:07 +01:00
Raja Appuswamy f9d1614e6d libmthread: add mthread_event_fire_all 2011-12-01 14:53:20 +01:00
David van Moolenbroek 8a0b9de41a libblockdriver: allow for mixed sync/async replies 2011-11-30 19:07:04 +01:00
David van Moolenbroek db087efac4 VFS/FS: REQ_NEW_DRIVER now provides a label 2011-11-30 19:05:26 +01:00
Thomas Veerman 41e69065b9 Fix stat symbols 2011-11-30 11:17:13 +00:00
David van Moolenbroek c9ba1ad75d libpuffs: remove unused block device code 2011-11-29 16:56:52 +01:00
Raja Appuswamy 03a8d06668 adding rwlock and event support to mthread 2011-11-29 14:35:22 +01:00
David van Moolenbroek e2758c6759 libblockdriver: allow for not handling partitions
Each block driver now gets to specify whether it is a disk block
driver, which implies it wants the library to handle getting and
setting partitions for it.
2011-11-28 16:42:35 +01:00
Thomas Veerman fb50da9dad Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.

Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.

A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.

This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 10:12:44 +00:00
Thomas Veerman 92b61c816d Fix many more comiler warnings
Most warnings were harmless, some real bugs. Test set should now compile
cleanly with ack, gcc, and clang.
2011-11-28 10:07:55 +00:00
Thomas Veerman b4fb061802 Implement issetugid syscall
Implement issetugid syscall and provide a test. This gets rid of the
scary "Unsecure. Implement me" warning during compilation.
2011-11-28 10:03:43 +00:00
David van Moolenbroek fd4c2b74f3 Add block device tracing facility
The implementation is in libblockdriver, and works transparently for
all block drivers. The new btrace(8) tool can be used to control block
tracing; see ``man btrace'' for details.
2011-11-25 13:47:21 +01:00