]> Zhao Yanbai Git Server - minix.git/log
minix.git
13 years agonamespace.h: add entry for shutdown(2)
Thomas Cort [Thu, 7 Jul 2011 15:47:34 +0000 (15:47 +0000)]
namespace.h: add entry for shutdown(2)

13 years agonbsd libc: no alias for getpw* minix compat symbols
Ben Gras [Wed, 6 Jul 2011 17:02:17 +0000 (19:02 +0200)]
nbsd libc: no alias for getpw* minix compat symbols

13 years agonbsd libc: disable i386 exec*() optimisation
Ben Gras [Wed, 6 Jul 2011 09:34:03 +0000 (11:34 +0200)]
nbsd libc: disable i386 exec*() optimisation

13 years agocompat.S: succincter and without mktemp
Ben Gras [Tue, 5 Jul 2011 14:17:29 +0000 (16:17 +0200)]
compat.S: succincter and without mktemp

13 years agostopgap measure to define originals of __RENAMEd symbols
Ben Gras [Tue, 5 Jul 2011 12:31:06 +0000 (14:31 +0200)]
stopgap measure to define originals of __RENAMEd symbols

13 years agopm, vfs: don't print something for bogus calls
Ben Gras [Mon, 4 Jul 2011 14:18:14 +0000 (16:18 +0200)]
pm, vfs: don't print something for bogus calls

13 years agoReplace indent with NetBSD version
Vivek Prakash [Sat, 2 Jul 2011 23:26:53 +0000 (23:26 +0000)]
Replace indent with NetBSD version

- minix-port.patch is empty as it compiles unchanged

13 years agodescr: add -I to mask forget /usr/include for ack
Ben Gras [Mon, 4 Jul 2011 14:16:10 +0000 (16:16 +0200)]
descr: add -I to mask forget /usr/include for ack

13 years agoReduce compiler/libraries/headers cases to only two
Ben Gras [Fri, 1 Jul 2011 13:57:43 +0000 (15:57 +0200)]
Reduce compiler/libraries/headers cases to only two

1. ack, a.out, minix headers (moved to /usr/include.ack),
   minix libc
2. gcc/clang, elf, netbsd headers (moved to /usr/include),
   netbsd libc (moved to /usr/lib)

So this obsoletes the /usr/netbsd hierarchy.

No special invocation for netbsd libc necessary - it's always used
for gcc/clang.

13 years agonew mtree script
Ben Gras [Sun, 3 Jul 2011 13:30:54 +0000 (15:30 +0200)]
new mtree script

  . skip /proc (allow make etcfiles without unmounting /proc)
  . bit more readable

13 years agointroduce sqrt_approx() in -lsys
Ben Gras [Mon, 4 Jul 2011 00:51:12 +0000 (02:51 +0200)]
introduce sqrt_approx() in -lsys

  . use this to avoid -lm dependency in mfs

13 years agotools/Makefile: don't install servers (workaround)
Ben Gras [Sun, 3 Jul 2011 13:01:18 +0000 (15:01 +0200)]
tools/Makefile: don't install servers (workaround)

   . if the build target is invoked again for the install target, the
     stack sizes aren't set properly. A workaround is to only build
     and not install the servers. (Installing them doesn't really make
     sense anyway.)

13 years agovfs: don't SUSPEND for unknown calls
Ben Gras [Sat, 2 Jul 2011 15:15:20 +0000 (17:15 +0200)]
vfs: don't SUSPEND for unknown calls

. returning ENOSYS helps for implementing
  new calls with forwards compatability

13 years agoAdd bin/ hierarchy
Arun Thomas [Fri, 1 Jul 2011 16:43:15 +0000 (18:43 +0200)]
Add bin/ hierarchy

13 years agoUpdate minix-port.patch
Arun Thomas [Fri, 1 Jul 2011 15:53:12 +0000 (17:53 +0200)]
Update minix-port.patch

13 years agorelease.sh: Add /bin/rm to bootstrap
Arun Thomas [Thu, 30 Jun 2011 12:00:24 +0000 (14:00 +0200)]
release.sh: Add /bin/rm to bootstrap

13 years agorelease.sh: install(1) should go in /bin
Arun Thomas [Thu, 30 Jun 2011 11:42:43 +0000 (13:42 +0200)]
release.sh: install(1) should go in /bin

13 years agoopendir(3): on success, don't clobber errno
Thomas Cort [Wed, 29 Jun 2011 14:45:47 +0000 (14:45 +0000)]
opendir(3): on success, don't clobber errno

The opendir(3) function was setting errno to ENOTDIR even
when the directory existed and was opened successfully. This
caused git to falsely detect an error.

This change moves the errno assignment into the failure code
block. It also adds a test to test24 to check for errno
changing when opendir(3) returns success.

13 years agonew gcc mkheaders location
Ben Gras [Wed, 29 Jun 2011 16:24:16 +0000 (18:24 +0200)]
new gcc mkheaders location

  . Try to be flexible about it this time

13 years agorelease.sh: add /usr/pkg/bin to $PATH for clang
Ben Gras [Wed, 29 Jun 2011 17:23:49 +0000 (19:23 +0200)]
release.sh: add /usr/pkg/bin to $PATH for clang

13 years agoRemove obsolete m4 Makefile
Arun Thomas [Wed, 29 Jun 2011 15:44:07 +0000 (17:44 +0200)]
Remove obsolete m4 Makefile

13 years agoGCC build option for elf libs and usr.bin
Arun Thomas [Wed, 29 Jun 2011 08:32:37 +0000 (10:32 +0200)]
GCC build option for elf libs and usr.bin

13 years agoBuild libelf and mkimage in world
Arun Thomas [Tue, 28 Jun 2011 22:17:35 +0000 (00:17 +0200)]
Build libelf and mkimage in world

13 years agoReplace m4 with NetBSD version
Arun Thomas [Tue, 28 Jun 2011 22:15:19 +0000 (00:15 +0200)]
Replace m4 with NetBSD version

-Create usr.bin hierarchy
-Update minix-port.patch to include m4

13 years agoUpdated hier(7) man page to conform 3.1.8
Vivek Prakash [Mon, 27 Jun 2011 15:32:54 +0000 (15:32 +0000)]
Updated hier(7) man page to conform 3.1.8

13 years agoRestore stripping of elf binaries in ramdisk
Arun Thomas [Tue, 28 Jun 2011 15:49:45 +0000 (17:49 +0200)]
Restore stripping of elf binaries in ramdisk

13 years agoSimplify ELF library build logic
Arun Thomas [Tue, 28 Jun 2011 15:19:10 +0000 (17:19 +0200)]
Simplify ELF library build logic

-Remove obsolete clang-libraries and gnu-libraries targets
-Buildworld now builds elf-libraries as well

13 years agominix.libc.mk: simpler netbsd libc invocation
Ben Gras [Tue, 28 Jun 2011 15:17:44 +0000 (17:17 +0200)]
minix.libc.mk: simpler netbsd libc invocation

  . startup files being mentioned explicitly confuses libtool

13 years agokernel: make clang-buildable
Arun Thomas [Tue, 28 Jun 2011 13:34:19 +0000 (15:34 +0200)]
kernel: make clang-buildable

13 years agodocs/UPDATING: use date of push for newest entry
Arun Thomas [Tue, 28 Jun 2011 10:03:11 +0000 (12:03 +0200)]
docs/UPDATING: use date of push for newest entry

13 years agodocs/UPDATING: revise date in newest entry
Arun Thomas [Tue, 28 Jun 2011 09:58:52 +0000 (11:58 +0200)]
docs/UPDATING: revise date in newest entry

13 years agouse ${PKGPATH} instead of ${CATEGORIES}/${PKGBASE}
Thomas Cort [Mon, 27 Jun 2011 16:01:38 +0000 (16:01 +0000)]
use ${PKGPATH} instead of ${CATEGORIES}/${PKGBASE}

Some packages are in multiple categories (one example is
devel/libgetopt). This broke the IF statement because
${CATEGORIES} got expanded to "cat1 cat2". The proper
variable to use is PKGPATH.

13 years agoadd pkgsrc hooks for building pkgs w/nbsd_libc
Thomas Cort [Mon, 27 Jun 2011 03:16:29 +0000 (03:16 +0000)]
add pkgsrc hooks for building pkgs w/nbsd_libc

Add two makefiles to manage compiling packages with NetBSD libc.

  *  minix.libc.mk contains the proper CFLAGS/LDFLAGS
  *  pkgsrchooks.mk contains the logic for setting the flags.
  *  update bmake

Several pkg-config files were added to help pkgsrc learn about
the c, minlib, and compat_minix libraries.

13 years ago.gitignore: add obj-elfbase-nbsd
Ben Gras [Sat, 25 Jun 2011 16:04:40 +0000 (18:04 +0200)]
.gitignore: add obj-elfbase-nbsd

13 years agoboot: Add multiboot support
Arun Thomas [Fri, 24 Jun 2011 15:20:25 +0000 (17:20 +0200)]
boot: Add multiboot support

Not yet fully spec-compliant; work in progress

13 years agointroduce option to time assert()s
Ben Gras [Thu, 23 Jun 2011 20:43:39 +0000 (22:43 +0200)]
introduce option to time assert()s

  . remove a few asserts in the kernel and 64bi library
    that are not compatible with the timing code
  . change the TIME_BLOCKS code a little to work in-kernel

13 years agorelease.sh: update location of install cmd
Ben Gras [Fri, 24 Jun 2011 10:17:24 +0000 (12:17 +0200)]
release.sh: update location of install cmd

13 years agoundo spurious UPDATING entry
Ben Gras [Fri, 24 Jun 2011 10:15:58 +0000 (12:15 +0200)]
undo spurious UPDATING entry

13 years agoBuild NetBSD libc library in world in ELF mode.
Gianluca Guida [Wed, 27 Apr 2011 13:00:52 +0000 (13:00 +0000)]
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

13 years agofix many clang warnings in lib/
Ben Gras [Thu, 23 Jun 2011 17:25:36 +0000 (19:25 +0200)]
fix many clang warnings in lib/

13 years agolibc!setmode.c: Avoid #if inside macro call
Antoine Leca [Mon, 25 Oct 2010 17:03:36 +0000 (18:03 +0100)]
libc!setmode.c: Avoid #if inside macro call

#if inside macro call is undefined behaviour under the C standard
(3.8.3 paragraph 10 for C90, 6.8.10 paragraph 11 for C99).
The same effect can be achieved with a slightly more verbose construct,
putting the whole macro call inside the #ifdef/#else/#endif.

13 years agofix clang warnings in boot (edparams)
Antoine Leca [Thu, 23 Jun 2011 11:41:50 +0000 (13:41 +0200)]
fix clang warnings in boot (edparams)

. add missing prototypes for recently added functions.

13 years agosys.mk: Improved defaults (sys.mk) for make(1)
Antoine LECA [Wed, 22 Jun 2011 21:35:26 +0000 (23:35 +0200)]
sys.mk: Improved defaults (sys.mk) for make(1)

  . Handle more compiler names, including most cross-compilers.
  . Allows to use acd(1) and [whatever-]acc to designate ACK compiler.
  . Do not abort (on COMPILER_TYPE not defined) if the compiler name
    is not recognized.

13 years agoInitialize NMI watchdog only once, after enabling paging
Erik van der Kouwe [Wed, 22 Jun 2011 15:56:57 +0000 (17:56 +0200)]
Initialize NMI watchdog only once, after enabling paging

13 years agotop: one sanity check endpoint->slot number
Ben Gras [Wed, 22 Jun 2011 13:46:33 +0000 (15:46 +0200)]
top: one sanity check endpoint->slot number

13 years agoRemove obsolete mkdist script
Arun Thomas [Wed, 22 Jun 2011 09:15:00 +0000 (11:15 +0200)]
Remove obsolete mkdist script

13 years agomake /usr/include/i386
Ben Gras [Tue, 21 Jun 2011 15:28:43 +0000 (17:28 +0200)]
make /usr/include/i386

13 years agoSplit off sys_umap_remote from sys_umap
Erik van der Kouwe [Fri, 10 Jun 2011 14:28:20 +0000 (14:28 +0000)]
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.

13 years agoA few aesthetic changes to make the minix port more acceptable
Thomas Cort [Thu, 9 Jun 2011 17:12:53 +0000 (17:12 +0000)]
A few aesthetic changes to make the minix port more acceptable
to upstream.

  - revert to upstream version of function prototypes for
    setting the uid and gid fields of the archive_entry.
  - move uid/gid overflow checks into header_common().
  - use archive_set_error() instead of fprintf() for getting
    error message text back to the main program.

13 years agofixed clang warnings in drivers/
Ben Gras [Thu, 9 Jun 2011 14:57:51 +0000 (16:57 +0200)]
fixed clang warnings in drivers/

  . changed debug statements system for audio/ to do so

13 years agofix clang warnings -R in kernel/ and servers/
Ben Gras [Thu, 9 Jun 2011 14:09:13 +0000 (16:09 +0200)]
fix clang warnings -R in kernel/ and servers/

13 years agocommands: fix clang errors
Ben Gras [Wed, 8 Jun 2011 17:59:14 +0000 (19:59 +0200)]
commands: fix clang errors

13 years agoRemove unused duplicate grant code in umap
Erik van der Kouwe [Thu, 9 Jun 2011 05:06:34 +0000 (05:06 +0000)]
Remove unused duplicate grant code in umap

13 years agoMake sys_umap on grants check grantee
Erik van der Kouwe [Thu, 9 Jun 2011 05:05:20 +0000 (05:05 +0000)]
Make sys_umap on grants check grantee

13 years agoRemove redundant atwini code, use PIO for bad DMA
Erik van der Kouwe [Wed, 8 Jun 2011 19:24:41 +0000 (19:24 +0000)]
Remove redundant atwini code, use PIO for bad DMA

13 years agoGlobally enable -Wall warnings for GCC
Erik van der Kouwe [Wed, 8 Jun 2011 19:19:45 +0000 (19:19 +0000)]
Globally enable -Wall warnings for GCC

13 years agochrootmake: obj-* cleanup instead of just obj-ack
Ben Gras [Wed, 8 Jun 2011 14:19:09 +0000 (16:19 +0200)]
chrootmake: obj-* cleanup instead of just obj-ack

13 years agoProperly overwrite LIBDIR in mk scripts.
Gianluca Guida [Tue, 3 May 2011 21:22:25 +0000 (21:22 +0000)]
Properly overwrite LIBDIR in mk scripts.

13 years agoprepare for netbsd libc/headers
Ben Gras [Tue, 7 Jun 2011 15:23:23 +0000 (15:23 +0000)]
prepare for netbsd libc/headers

  . mtree entries for /usr/netbsd
  . install(1) fix for relative symlinks by Antoine Leca

13 years agochanges for detecting and building for clang/binutils elf
Ben Gras [Tue, 7 Jun 2011 12:48:31 +0000 (14:48 +0200)]
changes for detecting and building for clang/binutils elf

and minor fixes:
 . add ack/clean target to lib, 'unify' clean target
 . add includes as library dependency
 . mk: exclude warning options clang doesn't have in non-gcc
 . set -e in lib/*.sh build files
 . clang compile error circumvention (disable NOASSERTS for release builds)

13 years ago/etc/group: add 'games' group
Thomas Cort [Tue, 7 Jun 2011 12:46:18 +0000 (12:46 +0000)]
/etc/group: add 'games' group

Several pkgsrc packages under the games category won't install
without a games group. This change adds the group with gid 13,
the default games gid on NetBSD.

13 years agorelease.sh, tell_config: variables from /usr/src
Ben Gras [Tue, 7 Jun 2011 12:34:14 +0000 (14:34 +0200)]
release.sh, tell_config: variables from /usr/src

13 years agolibarchive: fix bad timestamp bug caused by bit shift.
Thomas Cort [Mon, 6 Jun 2011 14:31:20 +0000 (14:31 +0000)]
libarchive: fix bad timestamp bug caused by bit shift.

The file timestamps in archives created by libarchive all had
dates in the year 2038. It was caused by a bit shift in
archive_write_set_format_ustar which shifted 1 instead of 1ull.

13 years ago<timers.h> - add feature to time a code block
Ben Gras [Sun, 15 May 2011 03:38:27 +0000 (05:38 +0200)]
<timers.h> - add feature to time a code block

  . also minor compile fixes for it

13 years agorelease.sh fixes, updates, improvements for git, usb, readability
Ben Gras [Sat, 30 Apr 2011 19:25:05 +0000 (21:25 +0200)]
release.sh fixes, updates, improvements for git, usb, readability

13 years agoboot/cdbootblock: use AFLAGS instead of CPPFLAGS
Ben Gras [Wed, 1 Jun 2011 20:53:00 +0000 (22:53 +0200)]
boot/cdbootblock: use AFLAGS instead of CPPFLAGS

  . this unbreaks building the .iso

13 years agoFix VM -Wall warnings and enable -Werror
Erik van der Kouwe [Wed, 1 Jun 2011 09:30:58 +0000 (11:30 +0200)]
Fix VM -Wall warnings and enable -Werror

13 years agoAdd chmod o-w /usr
Thomas Cort [Wed, 25 May 2011 20:39:14 +0000 (20:39 +0000)]
Add chmod o-w /usr

After the default install, /usr was world writable. perl refused to
install itself into /usr with that permission. This fixes the permissions.

13 years agoFix for SPROFILE == 0
Tomas Hruby [Wed, 25 May 2011 07:42:11 +0000 (09:42 +0200)]
Fix for SPROFILE == 0

- contributed by Antoine Leca

13 years agoLWIP - removed __unused where inappropriate
Tomas Hruby [Wed, 25 May 2011 07:41:19 +0000 (09:41 +0200)]
LWIP - removed __unused where inappropriate

13 years agolibcompat: Add net/gen stub headers.
Gianluca Guida [Wed, 27 Apr 2011 13:23:10 +0000 (13:23 +0000)]
libcompat: Add net/gen stub headers.

This helps reducing patching when compiling legacy minix net utils.

13 years agoImport libelf from elftoolchain r1525
Arun Thomas [Sat, 21 May 2011 17:11:59 +0000 (19:11 +0200)]
Import libelf from elftoolchain r1525

13 years agofix clang warnings in servers/
Ben Gras [Thu, 12 May 2011 20:23:02 +0000 (22:23 +0200)]
fix clang warnings in servers/

13 years agolarger i/o buffer for exec()
Ben Gras [Thu, 12 May 2011 17:04:55 +0000 (19:04 +0200)]
larger i/o buffer for exec()

  . makes exec() for large executables (e.g. clang, gcc)
    significantly faster

Thanks to Antoine Leca.

13 years agoAPIC timer needs rearming before halting the cpu
Tomas Hruby [Wed, 11 May 2011 09:54:23 +0000 (11:54 +0200)]
APIC timer needs rearming before halting the cpu

- time stops if there is no activity and the timer expired before
  we halted the cpu

- restart_local_timer() checks if the timer has expired and if so it
  restarts it

- we do the same when switching back to userspace

13 years agoPCI - do not panic when ACPI cannot map bridges
Tomas Hruby [Fri, 6 May 2011 15:41:14 +0000 (17:41 +0200)]
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.

13 years agoELF multiboot support
Arun Thomas [Wed, 4 May 2011 16:51:43 +0000 (18:51 +0200)]
ELF multiboot support

13 years agomade boot/ into hierarchy of programs
Ben Gras [Mon, 25 Apr 2011 13:10:57 +0000 (15:10 +0200)]
made boot/ into hierarchy of programs

work of Antoine Leca

13 years agoRemote unused segctl kernel call
Erik van der Kouwe [Tue, 26 Apr 2011 21:28:23 +0000 (23:28 +0200)]
Remote unused segctl kernel call

13 years agoOBJDIR-clean generating of .gitignore
Ben Gras [Mon, 25 Apr 2011 12:18:36 +0000 (14:18 +0200)]
OBJDIR-clean generating of .gitignore

By Antoine Leca

13 years agofix missing return statement in nonamed causing network failure after 300s when compi...
Erik van der Kouwe [Thu, 21 Apr 2011 19:14:25 +0000 (19:14 +0000)]
fix missing return statement in nonamed causing network failure after 300s when compiling with GCC

13 years agoGenerate .gitignore file for tools directory
Thomas Veerman [Thu, 21 Apr 2011 13:20:55 +0000 (13:20 +0000)]
Generate .gitignore file for tools directory

13 years agoEnable generation of .gitignore file for the test dir
Thomas Veerman [Thu, 21 Apr 2011 13:20:13 +0000 (13:20 +0000)]
Enable generation of .gitignore file for the test dir

13 years agoMake test40 behave
Thomas Veerman [Thu, 21 Apr 2011 13:18:00 +0000 (13:18 +0000)]
Make test40 behave

Make test40 behave better. It should create its own subdirectory to
conduct its tests and should not write to /tmp. Also, the master-slave
terminal pair it tries to open might be in use; it should try to obtain
another pair. These changes allow the test to be run multiple times
simultaneously from different paths (to test select() more intensively).

13 years agosprofalyze.pl: fix for forked-nonexeced processes
David van Moolenbroek [Wed, 20 Apr 2011 21:39:13 +0000 (21:39 +0000)]
sprofalyze.pl: fix for forked-nonexeced processes

13 years agokernel: fix logic error in the case vm_lookup fails
Ben Gras [Wed, 20 Apr 2011 10:17:08 +0000 (10:17 +0000)]
kernel: fix logic error in the case vm_lookup fails

13 years agoKernel: try_async/try_one fixes
David van Moolenbroek [Mon, 18 Apr 2011 22:56:34 +0000 (22:56 +0000)]
Kernel: try_async/try_one fixes
- skip processes that are not asynsending to the target
- do not clear whole asynsend table upon IPC permission error
- be more accepting when one table entry is bogus later on

13 years agodhcpd: fix newly introduced ACK warnings
David van Moolenbroek [Sat, 16 Apr 2011 11:13:31 +0000 (11:13 +0000)]
dhcpd: fix newly introduced ACK warnings

13 years agolibmthread: support for thread-local storage (keys/specifics)
David van Moolenbroek [Thu, 14 Apr 2011 11:54:43 +0000 (11:54 +0000)]
libmthread: support for thread-local storage (keys/specifics)

13 years agoSMP - INIT IPI deasserting fix
Tomas Hruby [Wed, 13 Apr 2011 16:57:43 +0000 (16:57 +0000)]
SMP - INIT IPI deasserting fix

When deasserting the INIT IPI the DM field must be zero

13 years agoReturn errors directly instead of using errno
Thomas Veerman [Wed, 13 Apr 2011 14:01:13 +0000 (14:01 +0000)]
Return errors directly instead of using errno

13 years agoClean up and fix multiple bugs in select:
Thomas Veerman [Wed, 13 Apr 2011 13:25:34 +0000 (13:25 +0000)]
Clean up and fix multiple bugs in select:
 - Remove redundant code.
 - Always wait for the initial reply from an asynchronous select request,
   even if the select has been satisfied on another file descriptor or
   was canceled due to a serious error.
 - Restart asynchronous selects if upon reply from the driver turns out
   that there are deferred operations (and do not forget we're still
   interested in the results of the deferred operations).
 - Do not hang a non-blocking select when another blocking select on
   the same filp is still blocking.
 - Split blocking operations in read, write, and exceptions (i.e.,
   blocking on read does not imply the write will block as well).
 - Some loops would iterate over OPEN_MAX file descriptors instead of
   the "highest" file descriptor.
 - Use proper internal error return values.
 - A secondary reply from a synchronous driver is essentially the same
   as from an asynchronous driver (the only difference being how the
   answer is received). Merge.
 - Return proper error code after a driver failure.
 - Auto-detect whether a driver is synchronous or asynchronous.
 - Remove some code duplication.
 - Clean up code (coding style, add missing comments, put all select
   related code together).

13 years agoDo not print an error message when a binary is corrupt
Thomas Veerman [Tue, 12 Apr 2011 13:09:19 +0000 (13:09 +0000)]
Do not print an error message when a binary is corrupt

13 years agoServer/driver protocols: no longer allow third-party copies.
David van Moolenbroek [Mon, 11 Apr 2011 17:35:05 +0000 (17:35 +0000)]
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.

13 years agoMove back resolv.h, nameser.h and netdb.h as they conflict with NetBSD headers and...
Gianluca Guida [Fri, 8 Apr 2011 18:50:58 +0000 (18:50 +0000)]
Move back resolv.h, nameser.h and netdb.h as they conflict with NetBSD headers and libc.

13 years agolibsys: fix micro_delay()
David van Moolenbroek [Fri, 8 Apr 2011 16:57:44 +0000 (16:57 +0000)]
libsys: fix micro_delay()

13 years agoEnable a process to find out what the error code was when delivery of an
Thomas Veerman [Fri, 8 Apr 2011 15:23:12 +0000 (15:23 +0000)]
Enable a process to find out what the error code was when delivery of an
asynchronous message resulted in an error.

The model here is that:
 - Iff a sender wishes to be notified, the sender MUST check for errors
   BEFORE sending another asynchronous message.

The reason is that in order to remember the error code, we can't clean up
the message table and hence we risk running out of table space. This is
less of a problem when the sender enables notifications only for errors.

13 years agoEnable sending a notification when sending of an asynchronous message was
Thomas Veerman [Fri, 8 Apr 2011 15:14:48 +0000 (15:14 +0000)]
Enable sending a notification when sending of an asynchronous message was
completed (successfully or not). AMF_NOTIFY_ERR can be used if the sender
only wishes to be notified in case of an error (e.g., EDEADSRCDST). A new
endpoint ASYNCM will be the sender of the notification.

13 years agoUse a bitmap for pending asynchronous messages instead of a global flag.
Thomas Veerman [Fri, 8 Apr 2011 15:03:33 +0000 (15:03 +0000)]
Use a bitmap for pending asynchronous messages instead of a global flag.
That way it works similar to pending notifications.

13 years agoReduce the number of copies done by the kernel when handling retrieval and
Thomas Veerman [Fri, 8 Apr 2011 14:53:55 +0000 (14:53 +0000)]
Reduce the number of copies done by the kernel when handling retrieval and
delivery of asynchronous messages.