Commit graph

744 commits

Author SHA1 Message Date
Ben Gras 53f94f8ed4 dynamic executables on ramdisk support
See UPDATING about upgrading clang for dynamic linking.

	. allow executables on ramdisk to be dynamically linked; this means
	  putting a few required shared libraries and ld.elf_so on the ramdisk.
	. this makes the ramdisk (usage) smaller when they are dynamic, but
	  bigger when they're not.
	. also we can safely ditch newroot and call mount directly as that is
	  all newroot does.
	. create proto.common to share a bunch of entries between
	  small/nonsmall cases
2012-04-16 14:06:09 +02:00
Ben Gras 4b999f1962 build shared versions of libraries
building defaults to off until clang is updated.

current clang does not handle -shared, necessary to change the ld
invocation to build shared libraries properly. a new clang should be
installed and MKPIC defaults to no unless the newer clang is detected.

changes:

	. mainly small imports of a Makefile or two and small fixes
	  (turning things back on that were turned off in Makefiles)
	. e.g.: dynamic librefuse now depends on dynamic
	  libpuffs, so libpuffs has to be built dynamically too
	  and a make dependency barrier is needed in lib/Makefile
	. all library objects now have a PIC (for .so) and non-PIC
	  version, so everything is built twice.
	. generate PIC versions of the compat (un-RENAMEd) jump files,
	  include function type annotation in generated assembly
	. build progs with -static by default for now
	. also build ld.elf_so
	. also import NetBSD ldd
2012-04-16 05:21:20 +02:00
Thomas Veerman ca7a466f48 TTY: don't allow multiple readers on tty minor
TTY has no way of keeping track of multiple readers for a tty minor
device. Instead, it stores a read request for the last reader only.
Consequently, the first ("overwritten") reader gets stuck on a read
request that's never going to be finished. Also, the overwriting
causes a grant mismatch in VFS when TTY returns a reply for the
second reader.

This patch is a work around for the actual problem (i.e., keeping track
of multiple readers). It checks whether there is a read operation in
progress and returns an error if it is --preventing that reader from
getting overwritten and stuck. It fixes a bug triggered by executing
'top | more' and pressing the space bar for a while (easily reproducable
in a VM, not on hardware).
2012-04-13 13:22:13 +00:00
Ben Gras 511c977f93 retire bios_wini 2012-04-12 03:02:21 +02:00
David van Moolenbroek 6aa61efd09 VBOX: add host/guest communication interface
This interface can be used by other system processes by means of the
newly provided vbox API in libsys.
2012-04-09 15:56:20 +02:00
David van Moolenbroek fa805ebd1e Kernel/servers/drivers: resolve a few warnings
Flagged by clang 3.1.
2012-03-30 16:55:06 +02:00
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 186a4db672 ahci: use sys_vumap() instead of sys_umap()
This is only an optimization for CPU performance. Callers are
currently still required to supply contiguous memory.
2012-03-24 19:51:13 +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 457d3884a2 pci: apply ACLs to device reservations 2012-03-08 23:52:17 +01:00
David van Moolenbroek e21c21a31a pci: USER_SPACE cleanup 2012-03-08 23:52:13 +01:00
David van Moolenbroek 291ece0caa drivers: slightly better use of PCI constants
- introduce PCI_BAR_{IO|MEM}_MASK
- remove redundant PCI definitions from lance
- fix vbox BAR retrieval
2012-03-08 23:51:18 +01:00
David van Moolenbroek 5152cfd8bd drivers: remove redundant PCI ID tables
- remove PCI tables where system.conf suffices
- remove drivers' ability to mess up NIC order
- fix dp8390 PCI enumeration
- convert ti1225 to instance model
- add system.conf entry for ti1225
2012-03-07 23:58:00 +01:00
David van Moolenbroek de45264c74 dp8390,ti1225: reenable register memory mapping 2012-03-07 23:57:34 +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
David van Moolenbroek 831450aacc e1000: add support for 82545EM
Tested on VirtualBox and VMware.
2012-03-05 13:00:06 +01: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 25fae1d7da portugese keymap
contributed by ralxc
2012-02-18 02:05:04 +01:00
Antoine Leca ab0a67f7af Use objcopy to build ramdisk object
. during build, uses much less memory,
	  disk space, and time
	. lets us throw out bintoc
2012-02-17 12:56:38 +00:00
Arun Thomas ff56906879 Remove obsolete INSTALLFLAGS from makefiles 2012-02-16 23:26:38 +01:00
Thomas Veerman 0491126758 Don't update mtab upon mounting procfs
It causes an ugly error message when booting from cd and it gets
overwritten by `printroot >/etc/mtab` in /etc/rc anyway.
2012-02-14 17:23:36 +00: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
Evgeniy Ivanov 3dd49be938 Allow human readable name for the root device.
Instead of using rootdev= or ramimagedev= in the boot monitor
which are changed to numbers and cannot be used with other
loaders, rootdevname= or ramimagename= are (MINIX-style)
device names always stored as strings.

Patch by Antoine Leca.
2012-02-09 18:54:45 +01:00
Ben Gras cc1ae59c9b -lminixutil link fixes
. not available and not needed for clang
2012-02-06 16:08:29 +01:00
Evgeniy Ivanov 65f97ea344 Enlarge ramdisk size (blocks). 2012-02-06 16:07:55 +01:00
Thomas Veerman d5210e9bdd e1000: reset hardware before stopping 2012-01-30 16:47:11 +00:00
Erik van der Kouwe 4bee3cff2e Prevent the ramdisk makefile from failing if the last image is not ELF 2012-01-27 13:10:00 +01:00
David van Moolenbroek 2c685f34e0 Cut PM out of the adddma/deldma/getdma call path 2012-01-14 00:27:06 +01:00
Jan Wieck 2fe79d0b76 Implement AcpiOsStall, AcpiOsSleep, AcpiOsGetTimer
- change AcpiOsRemoveInterruptHandler() to print a warning
  instead of panic.

- we do the same in AcpiOsInstallInterruptHandler().

Signed-off-by: Tomas Hruby <thruby@few.vu.nl>
2012-01-13 18:57:53 +00:00
Arun Thomas fecaba7ff1 Increase ramdisk size for clang 2012-01-12 17:01:48 +01:00
Ben Gras 51de979ed9 fix for checking CLEAN-ness of ramdisk image
. pre-cleanflag ("old") mkfs generates without CLEAN flag,
	  causing boot not working because imgrd disappears after 1st
	  close
	. fixed sanity check for this situation
	. disable imgrd disappearing in memory driver so
	  readonly mount succeeds in case it happens anyway
2011-12-23 15:10:01 +01:00
Ben Gras 59ff5cbd87 mfs: clean flag
. also implement now-possible fsck -p option
    	. allows unconditional fsck -p invocation at startup,
    	  only checking each filesystem if not marked clean
    	. mounting unclean is allowed but is forced readonly
    	. updating the superblock while mounted is now not
    	  allowed by mfs - must be done (e.g. by fsck.mfs)
    	  on an unmounted fs
	. clean flag is unset by mfs on mounting, and set by
	  mfs on clean unmounting (if clean flag was set at
	  mount time)

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 16:53:32 +01:00
Tomas Hruby 71533c8a83 ACPI - fixed initialization of pci briges irqtable
- if no IRQ table is found, we report that ACPI cannot map IRQ
  correctly

- fixes mapping of IRQs in KVM because in this case we just fall
  through and use the IRQ configured by BIOS. PCI still reports
  that it failed to use ACPI. It is a hint if things go wrong.
2011-12-20 13:10:36 +00:00
Tomas Hruby b73089ce3e ACPI extended irq - fixed uninitialized variable 2011-12-20 13:08:45 +00:00
Ben Gras eccb2d685c tty timeout bugfix
. timeouts were always delivered to console
	. Fix by Lucio Tomarchio
2011-12-16 09:54:20 +01:00
David van Moolenbroek c5fae8a617 dec21140A: change debugging key to Shift+F7 2011-12-12 16:45:45 +01: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 c6459e8ec1 acpi: resolve warnings 2011-12-10 16:14:23 +01:00
David van Moolenbroek 67c012b3fc printer: perform probe on startup
This stops the printer driver from hanging the entire system when
/dev/lp is opened on systems that do not have a parallel port. With
this change, the printer driver shuts down immediately after loading
on such systems.
2011-12-05 16:28:10 +01:00
David van Moolenbroek e379e0936e Make block drivers restart with new endpoint 2011-12-05 16:28:08 +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
David van Moolenbroek 0aa01a2dce Add vbox -- VirtualBox time sync driver
Sets time forward to match the host time.

Started automatically if the corresponding device is present.
2011-11-23 18:15:43 +01:00
David van Moolenbroek 9874865a6f ahci: FUA (force-write) support 2011-11-23 15:40:38 +01:00
David van Moolenbroek b4d909d415 Split block/character protocols and libdriver
This patch separates the character and block driver communication
protocols. The old character protocol remains the same, but a new
block protocol is introduced. The libdriver library is replaced by
two new libraries: libchardriver and libblockdriver. Their exposed
API, and drivers that use them, have been updated accordingly.
Together, libbdev and libblockdriver now completely abstract away
the message format used by the block protocol. As the memory driver
is both a character and a block device driver, it now implements its
own message loop.

The most important semantic change made to the block protocol is that
it is no longer possible to return both partial results and an error
for a single transfer. This simplifies the interaction between the
caller and the driver, as the I/O vector no longer needs to be copied
back. Also, drivers are now no longer supposed to decide based on the
layout of the I/O vector when a transfer should be cut short. Put
simply, transfers are now supposed to either succeed completely, or
result in an error.

After this patch, the state of the various pieces is as follows:
- block protocol: stable
- libbdev API: stable for synchronous communication
- libblockdriver API: needs slight revision (the drvlib/partition API
  in particular; the threading API will also change shortly)
- character protocol: needs cleanup
- libchardriver API: needs cleanup accordingly
- driver restarts: largely unsupported until endpoint changes are
  reintroduced

As a side effect, this patch eliminates several bugs, hacks, and gcc
-Wall and -W warnings all over the place. It probably introduces a
few new ones, too.

Update warning: this patch changes the protocol between MFS and disk
drivers, so in order to use old/new images, the MFS from the ramdisk
must be used to mount all file systems.
2011-11-23 14:06:37 +01:00
Arun Thomas fa00de707c small ramdisk: install all password-related files 2011-11-23 10:28:00 +01:00
Arun Thomas ebdac755af ramdisk: install all password-related files 2011-11-22 19:58:45 +01:00
Arun Thomas 32aabfab40 ramdisk: build pwd_mkdb 2011-11-22 16:45:17 +01:00
Ben Gras cd107a5ac3 fxp: add device id in the right place 2011-11-22 11:17:49 +01:00
Ben Gras 81bdb22b0c fxp: add device id for LU82551IT
Contributed by Roman Ignatov
2011-11-22 11:09:42 +01:00
Ben Gras b1eba81b9d simplify build logic a bit
. always compile acpi, with clang, so never have
	  build/clean inconsistencies; can be enabled (i.e. run
	  at boot time) by setting acpi variable in the boot monitor
	. always strip binaries with the right strip cmd, so never
	  have ack/elf strip inconsistencies
2011-11-18 17:11:17 +01:00
Ben Gras 349a158056 base system hooks for pkgsrc drivers
. rc script and service know to look in /usr/pkg/.. for
	  extra binaries and conf files
	. service split into parsing config and doing RS request
	  so that a new utility (printconfig) can just print the
	  config in machine-parseable format for netconf integration
	. converted all base system eth drivers/netconf
2011-11-16 16:18:21 +01:00
Ben Gras 5c00743626 Switch to NetBSD passwd format
Based on work by Vivek Prakash and Gianluca Guida.

See UPDATING about caveats on currently existing accounts.

	. restores netbsd libc pwcache functions
2011-11-14 14:47:42 +00:00
David van Moolenbroek 2602861f23 Move optset.c into libsys; remove redundant copies 2011-11-07 16:16:08 +01:00
David van Moolenbroek ff542f0b27 atl2: prevent compiler memory access misordering
While no problems have been observed in practice yet, modern compilers
may reorder memory access operations, and that could lead to problems
with memory-mapped I/O typically done by drivers. This patch prevents
any potentially problematic reordering by the compiler in the ATL2
driver.

In addition, this patch removes a number of gcc/clang warnings.
2011-11-07 14:25:09 +01:00
David van Moolenbroek 47aad344c3 Drivers: fix issues introduced by commit b198207 2011-11-04 23:54:04 +01:00
David van Moolenbroek 5320333614 ahci: prevent compiler memory access misordering
While no problems have been observed in practice yet, modern compilers
may reorder memory access operations, and that could lead to problems
with memory-mapped I/O typically done by drivers. This patch prevents
any potentially problematic reordering by the compiler in the AHCI
driver.
2011-11-04 14:13:24 +01:00
David van Moolenbroek e1d867b686 ahci/libdriver: multithreading support
This patch adds support for executing multiple concurrent requests on
different devices on the same AHCI controller. The libdriver library
has been extended to include a generic multithreading interface, and
the AHCI driver has been extended to make use of this interface.

The original version of this code has been written by Arne Welzel.
2011-11-04 09:37:53 +00:00
Antoine LECA 230dd159df dec21140A driver warnings fix 2011-09-29 17:37:47 +00:00
Arun Thomas cb54d96eec Remove legacy boot monitor vars 2011-09-16 20:10:47 +02:00
Ben Gras 3a44cd477b tty: handle REVIVE case on console device
. can happen on e.g. ^S
	. reported by Stephen Hatton
2011-08-09 16:59:01 +00:00
Ben Gras 989934b37c rename -lutil to -lminixutil
. in preparation for netbsd -lutil
2011-08-01 14:32:14 +02:00
Arun Thomas f985ecba0d MKEMBED is now MKSMALL 2011-08-01 11:05:17 +02:00
Arun Thomas ae561b8f12 Add MKAPIC and MKACPI options 2011-07-31 16:22:43 +02:00
Arun Thomas fcc2c77af2 ramdisk: For MKEMBED, skip ext2, achi, and acpi 2011-07-30 13:16:16 +02:00
Arun Thomas 159b8f71b7 Use 'strip -s' for ELF image 2011-07-22 07:52:34 +02:00
Arun Thomas 70712c015e release.sh: add missing bootstrap util 2011-07-20 16:03:06 +02:00
Arun Thomas 0d9095d116 Fix ISO building
-Update release.sh to use new stat syntax
-Add missing utils to release bootstrap dirs
-Remove needless dependency in ramdisk Makefile
2011-07-20 10:36:37 +02:00
Arun Thomas 3eb22ca4d1 MK option to build only system image programs 2011-07-20 09:57:46 +02:00
Arun Thomas 5df8be8e7a buildsystem: use dependall target
Improves cache locality by grouping together dependency generation
with building for each program instead of doing a whole-tree dep
generation phase followed by a whole-tree build phase
2011-07-19 15:28:20 +02:00
Ben Gras 02081e4b62 rename mmap() and munmap()
. it's a good extra interface to have but doesn't
	  meet standardised functionality
	. applications (in pkgsrc) find it and expect
	  full functionality the minix mmap doesn't offter
	. on the whole probably better to hide these functions
	  (mmap and friends) until they are grown up; the base system
	  can use the new minix_* names
2011-07-16 13:01:19 +02:00
Erik van der Kouwe 66bc7580c7 Fix e1000 bug introduced in 123cf7 2011-07-13 11:36:10 +02:00
Arun Thomas 8a5484202c Support for 82801CAM PRO/100 VE
Contributed by Jan Wieck
2011-07-11 21:10:28 +02:00
Arun Thomas b956c8735e Fix GCC image building 2011-07-09 15:04:42 +02:00
Tomas Hruby a97a80178e E1000 - Intel 82571EB Gigabit Ethernet Controller 2011-07-08 20:31:21 +02:00
Tomas Hruby 6dea092dec E1000 - pci probing
- once we know it is not an Intel device, it is not a match
2011-07-08 20:31:21 +02:00
Tomas Hruby 123cf7fe37 E1000 - reading EEPROM
- once the DONE bit is set, we already have the data
2011-07-08 20:31:21 +02:00
Tomas Hruby 48a4ff2307 E1000 - fixed reading MAC from EEPROM
- makes case which is correct according to Intel docs the default
2011-07-08 20:31:21 +02:00
Tomas Hruby d75138be00 E1000 - fixed reading/writing device registers
- the pointers must be flagged as volatile because otherwise they
  might be "optimized" by a compiler. It is a common good
  practice to access the registers this way, the keyword is in C
  for a reason.

- for instance, in eeprom_eerd() when polling a register the
  compiler, under certain conditions, may decide upon the first
  read and if it does not break the loop it assumes that the
  value is not going to change and thus stays in an infinite
  loop.
2011-07-08 20:31:21 +02:00
Arun Thomas cf04da3ebe Restore stripping of elf binaries in ramdisk 2011-06-28 17:49:45 +02:00
Arun Thomas 93ae43f577 boot: Add multiboot support
Not yet fully spec-compliant; work in progress
2011-06-24 17:21:51 +02:00
Gianluca Guida cc17b27a2b Build NetBSD libc library in world in ELF mode.
3 sets of libraries are built now:
  . ack: all libraries that ack can compile (/usr/lib/i386/)
  . clang+elf: all libraries with minix headers (/usr/lib/)
  . clang+elf: all libraries with netbsd headers (/usr/netbsd/)

Once everything can be compiled with netbsd libraries and headers, the
/usr/netbsd hierarchy will be obsolete and its libraries compiled with
netbsd headers will be installed in /usr/lib, and its headers
in /usr/include. (i.e. minix libc and current minix headers set
will be gone.)

To use the NetBSD libc system (libraries + headers) before
it is the default libc, see:
   http://wiki.minix3.org/en/DevelopersGuide/UsingNetBSDCode
This wiki page also documents the maintenance of the patch
files of minix-specific changes to imported NetBSD code.

Changes in this commit:
  . libsys: Add NBSD compilation and create a safe NBSD-based libc.
  . Port rest of libraries (except libddekit) to new header system.
  . Enable compilation of libddekit with new headers.
  . Enable kernel compilation with new headers.
  . Enable drivers compilation with new headers.
  . Port legacy commands to new headers and libc.
  . Port servers to new headers.
  . Add <sys/sigcontext.h> in compat library.
  . Remove dependency file in tree.
  . Enable compilation of common/lib/libc/atomic in libsys
  . Do not generate RCSID strings in libc.
  . Temporarily disable zoneinfo as they are incompatible with NetBSD format
  . obj-nbsd for .gitignore
  . Procfs: use only integer arithmetic. (Antoine Leca)
  . Increase ramdisk size to create NBSD-based images.
  . Remove INCSYMLINKS handling hack.
  . Add nbsd_include/sys/exec_elf.h
  . Enable ELF compilation with NBSD libc.
  . Add 'make nbsdsrc' in tools to download reference NetBSD sources.
  . Automate minix-port.patch creation.
  . Avoid using fstavfs() as it is *extremely* slow and unneeded.
  . Set err() as PRIVATE to avoid name clash with libc.
  . [NBSD] servers/vm: remove compilation warnings.
  . u32 is not a long in NBSD headers.
  . UPDATING info on netbsd hierarchy
  . commands fixes for netbsd libc
2011-06-24 11:46:30 +02:00
Erik van der Kouwe 6e0f3b3bda Split off sys_umap_remote from sys_umap
sys_umap now supports only:
- looking up the physical address of a virtual address in the address space
  of the caller;
- looking up the physical address of a grant for which the caller is the
  grantee.

This is enough for nearly all umap users. The new sys_umap_remote supports
lookups in arbitrary address spaces and grants for arbitrary grantees.
2011-06-10 14:28:20 +00:00
Ben Gras b19820774e fixed clang warnings in drivers/
. changed debug statements system for audio/ to do so
2011-06-09 16:57:51 +02:00
Erik van der Kouwe 419dadf528 Remove redundant atwini code, use PIO for bad DMA 2011-06-08 19:24:41 +00:00
Erik van der Kouwe c2da8cb535 Globally enable -Wall warnings for GCC 2011-06-08 19:21:03 +00:00
Tomas Hruby f5a1e58f59 PCI - do not panic when ACPI cannot map bridges
- when ACPI does not find mappings for pci brdiges, do no panic,
  only report a warning and continue to a fallback which uses
  only the root bus IRQ routing table. Fail only if that is not
  present.
2011-05-06 17:41:14 +02:00
David van Moolenbroek c51cd5fe91 Server/driver protocols: no longer allow third-party copies.
Before safecopies, the IO_ENDPT and DL_ENDPT message fields were needed
to know which actual process to copy data from/to, as that process may
not always be the caller. Now that we have full safecopy support, these
fields have become useless for that purpose: the owner of the grant is
*always* the caller. Allowing the caller to supply another endpoint is
in fact dangerous, because the callee may then end up using a grant
from a third party. One could call this a variant of the confused
deputy problem.

From now on, safecopy calls should always use the caller's endpoint as
grant owner. This fully obsoletes the DL_ENDPT field in the
inet/ethernet protocol. IO_ENDPT has other uses besides identifying the
grant owner though. This patch renames IO_ENDPT to USER_ENDPT, not only
because that is a more fitting name (it should never be used for I/O
after all), but also in order to intentionally break any old system
source code outside the base system. If this patch breaks your code,
fixing it is fairly simple:

- DL_ENDPT should be replaced with m_source;
- IO_ENDPT should be replaced with m_source when used for safecopies;
- IO_ENDPT should be replaced with USER_ENDPT for any other use, e.g.
  when setting REP_ENDPT, matching requests in CANCEL calls, getting
  DEV_SELECT flags, and retrieving of the real user process's endpoint
  in DEV_OPEN.

The changes in this patch are binary backward compatible.
2011-04-11 17:35:05 +00:00
David van Moolenbroek 7a9e3651fd drivers/sb16: delete altogether; the latest copy is in drivers/audio/sb16 2011-03-25 10:48:16 +00:00
David van Moolenbroek 294112db54 misc drivers: remove more non-safecopy support 2011-03-25 10:45:57 +00:00
David van Moolenbroek f56c4001d5 TTY/LOG driver cleanup:
- remove non-safecopy support from TTY
- make TTY warning-free with gcc -Wall
- remove obsolete diagnostics support
2011-03-25 10:43:24 +00:00
Thomas Veerman 898cce256f Add support for the 82567LM flavor of e1000 2011-03-15 10:04:35 +00:00
Arun Thomas bac0222eec ramdisk: Add procfs to ramdisk
-Prevents kernel/procfs mismatches
-Also, strip ELF binaries in ramdisk
2011-02-23 13:05:28 +00:00
Ben Gras 3beb81a5d0 memory driver: munmap() imgrd after first close.
(that munmap() range not supported yet by vm.)
2011-02-10 15:39:56 +00:00
Dirk Vogt c22564335f Added possibility to inject input events to tty
M    include/Makefile
A    include/minix/input.h
M    include/minix/com.h
M    drivers/tty/keyboard.c
M    drivers/tty/tty.c
M    drivers/tty/tty.h
M    include/minix/syslib.h
M    lib/libsys/Makefile
A    lib/libsys/input.c
2010-11-17 14:53:07 +00:00
Ben Gras f3e1b1c226 Updated some CLEANFILES macros in Makefiles. 2010-11-17 14:27:23 +00:00
Arun Thomas 8173242e01 Remove redundant sha2 code from inet 2010-11-15 11:10:02 +00:00