]> Zhao Yanbai Git Server - minix.git/log
minix.git
11 years agobuild:small fixes to arm_sdimage. 91/391/2
Kees Jongenburger [Fri, 8 Mar 2013 08:42:32 +0000 (09:42 +0100)]
build:small fixes to arm_sdimage.

* Use the same output directory as was previously the standard.
* Add copying of uEnv and cmdline to the obj directory to allow booting from tftp.
* No longer start qemu at the end of the process.
* Use sudo if the script was called as non root user.

Change-Id: I53143b1ce6633e764d173c3eb883c2efa3e6a5b7

11 years agoLet the build system manage compilation flags 74/374/3
Lionel Sambuc [Wed, 27 Feb 2013 16:53:12 +0000 (17:53 +0100)]
Let the build system manage compilation flags

Do not hardcode warning and optimisation flags, otherwise the
main options (i.e. DBG, CPPFLAGS) will not work as expected.

You can still provide specific default by using DBG?=<value>.

Doing so leaves the opportunity to override the setting from the
commandline, while the default value from the build system is
then ignored for that particular package.

When crosscompiling, and using build.sh, adding -V DBG=<value> has
this same effect as make DBG=<value>.

Change-Id: Ic610e4d33b945acad64571e1431f1814291e2d84

11 years agoReduce differences in libgcc Makefiles for ARM 90/390/2
Lionel Sambuc [Thu, 7 Mar 2013 13:31:13 +0000 (14:31 +0100)]
Reduce differences in libgcc Makefiles for ARM

Change-Id: I1b6b18bce063550907aa6e9ea2061e12b0855de4

11 years agoASH: Fix clean target. 88/388/2
Lionel Sambuc [Wed, 6 Mar 2013 12:38:10 +0000 (13:38 +0100)]
ASH: Fix clean target.

Also include code generators in the cleaning targets.

Change-Id: Ic1eeece5152f2b13a0357363d5e902b182022fdf

11 years agokernel, ramdisk: some boot unification 81/381/3
Ben Gras [Wed, 6 Mar 2013 18:27:47 +0000 (19:27 +0100)]
kernel, ramdisk: some boot unification

To use the new SD building script, Linux has to be configured with
loop.max_part=15 on the command line (or set at module load time)
to make the loopback device see the partitions.

This commit removes a lot of differences between the ARM and x86
boot ramdisk and rc scripts. It changes the ARM build from running
from ramdisk to requiring a full filesystem on the SD image and
booting into it.

. ramdisk: remove some arm-only utilities only used for running
  from the shell
. remove ARM-only rc.arm, proto.arm.small, ttys and mylogin.sh
  boot-time ramdisk files
. change kernel to add "arch" variable so userland knows what
  we're running on from sysenv
. make ARM use the regular ramdisk rc file, changed to distinguish
  i386-only and ARM-only drivers; requires rootdevname to be set
. change /etc/rc and /usr/etc/rc to start i386-only drivers only on
  i386 systems
. change the kernel/arm to have a special case for the memory
  driver to load it higher so it can be bigger
. add uEnv.txt, cmdline.txt and a for now highly linux-dependent
  SD preparation script arm_sdimage.sh to the git repository in
  releasetools/

Change-Id: I68910ba4e96ee80f7a12b65e48b5d39b43ca6397

11 years agoFix signal handling for services on abort/exit 76/376/2
Lionel Sambuc [Thu, 28 Feb 2013 14:41:39 +0000 (15:41 +0100)]
Fix signal handling for services on abort/exit

Change-Id: I970a25ae0dd52f0d928fda376296e7b39e3e17eb

11 years agoVFS, FSes: add REQ_PEEK request type 82/382/2
Ben Gras [Sun, 13 Jan 2013 21:44:38 +0000 (21:44 +0000)]
VFS, FSes: add REQ_PEEK request type

REQ_PEEK behaves just like REQ_READ except that it does not copy
data anywhere, just obtains the blocks from the FS into the cache.

To be used by the future mmap implementation.

Change-Id: I1b56de304f0a7152b69a72c8962d04258adb44f9

11 years agoUDS: check connection state better 79/379/4
Thomas Veerman [Tue, 5 Mar 2013 10:10:41 +0000 (10:10 +0000)]
UDS: check connection state better

Select(2)ing on UNIX domain sockets was not working properly because
connection state wasn't properly checked/propagated. So selecting for
a read descriptor and closing the write descriptor on the other end
didn't cause select to return. Similarly, read(2) kept blocking while
it should return an error when the other end closed the socket.

Change-Id: I3f5bb52af1a6b03313d508bf915fc838357ba450

11 years agoVM: shared memory pagefault fix 86/386/2
Ben Gras [Tue, 5 Mar 2013 16:17:21 +0000 (17:17 +0100)]
VM: shared memory pagefault fix

. if there is no memory there, it's not writable; this
  check bug by the shared memory's writable() method causes
  pagefaults not to be handled  at all in certain situations,
  triggering an assert() in pt_writemap()
. added some assert()s to catch this and similar situations
  in the future

Change-Id: Ife89bfab4f9a3aa7bf4e33dfb0b13b89dcd5bb94

11 years agoSpanish keymap with tilde
Antoine Leca [Mon, 23 Jan 2012 20:41:11 +0000 (21:41 +0100)]
Spanish keymap with tilde

and several small changes in keymaps, like cleaner
support for extended keypresses (those preceded with E0)

11 years agomake etcfiles: small fix in Makefile
Antoine Leca [Wed, 23 Jan 2013 16:54:41 +0000 (16:54 +0000)]
make etcfiles: small fix in Makefile

Keep the MKUNPRIVED=yes stuff with the installation
of master.passwd, i.e. away from make etcfiles

11 years agoCleanup: Remove minix.bootprog.mk 75/375/2
Lionel Sambuc [Thu, 28 Feb 2013 10:06:24 +0000 (11:06 +0100)]
Cleanup: Remove minix.bootprog.mk

The build system distinction between "bootprog" and "service" is
meaningless as boot programs are standard services.

As minix.service.mk simply imports minix.bootprog.mk, reduce confusion
by removing minix.bootprog.mk and placing the rules in minix.service.mk.

Change-Id: I4056b1e574bed59a8c890239b41b1a7c7cad63e8

11 years agoKernel: remove compile warnings
Thomas Veerman [Wed, 6 Mar 2013 09:20:00 +0000 (09:20 +0000)]
Kernel: remove compile warnings

11 years agoSpring cleanup 78/378/2
Thomas Veerman [Thu, 28 Feb 2013 14:44:23 +0000 (14:44 +0000)]
Spring cleanup

Remove old versions of system calls and system calls that don't have
a libc api interface anymore (dup, dup2, creat).

VFS still contains support for old system call numbers for the new stat
system calls (i.e., 65, 66, 67) to keep supporting old binaries built for
MINIX 3.2.1 (prior to the release).

Change-Id: I721779b58a50c7eeae20669de24658d55d69b25b

11 years agoImporting usr.bin/col
Thomas Cort [Fri, 1 Mar 2013 03:47:59 +0000 (03:47 +0000)]
Importing usr.bin/col

11 years agoKernel: make shutdown more verbose 77/377/2
Thomas Veerman [Thu, 28 Feb 2013 17:04:15 +0000 (17:04 +0000)]
Kernel: make shutdown more verbose

Change-Id: Iab5fed4cb617a9dbce164ff81c7dedf408e9fd98

11 years agotest68: test pipe2 functionality 73/373/2
Thomas Veerman [Wed, 27 Feb 2013 15:40:54 +0000 (15:40 +0000)]
test68: test pipe2 functionality

Change-Id: Idb15ec83983d0b052232c9533f89d637229d19df

11 years agotest67: test opening files and sockets with O_CLOEXEC 65/365/4
Thomas Veerman [Tue, 26 Feb 2013 11:30:44 +0000 (11:30 +0000)]
test67: test opening files and sockets with O_CLOEXEC

Change-Id: If71e61f830c6d3b5154368e189baa4f70bd73850

11 years agolibc: drop Minix popen and use NetBSD's 72/372/2
Thomas Veerman [Wed, 27 Feb 2013 16:50:04 +0000 (16:50 +0000)]
libc: drop Minix popen and use NetBSD's

Change-Id: I56f253d855671a6e1c8d53c7383107565164ab8d

11 years agoVFS: implement pipe2 58/358/7
Thomas Veerman [Mon, 25 Feb 2013 14:45:22 +0000 (14:45 +0000)]
VFS: implement pipe2

Change-Id: Iedc8042dd73a903456b25ba665d12577f5589ca2

11 years agosocket: implement SOCK_CLOEXEC and SOCK_NONBLOCK 57/357/4
Thomas Veerman [Mon, 25 Feb 2013 11:36:29 +0000 (11:36 +0000)]
socket: implement SOCK_CLOEXEC and SOCK_NONBLOCK

Change-Id: I3fa36fa999c82a192d402cb4d913bd397e106e53

11 years agoVFS: add ability to open files O_CLOEXEC 56/356/3
Thomas Veerman [Thu, 10 Jan 2013 15:31:30 +0000 (15:31 +0000)]
VFS: add ability to open files O_CLOEXEC

.adjust libc to make use of it (undo __minix diff)

Change-Id: I90a1aa219fcd1b12b6bc60e72176f326eac8184a

11 years agosprofalyze: fix profile data parsing
David van Moolenbroek [Wed, 27 Feb 2013 17:53:27 +0000 (17:53 +0000)]
sprofalyze: fix profile data parsing

11 years agoFix permissions for term(1) 69/369/2
Antoine Leca [Fri, 18 Jan 2013 19:52:00 +0000 (19:52 +0000)]
Fix permissions for term(1)

LSC: Small correction, using the group name is not secure in cross-build
     setups, replaced by the numerical gid to ensure proper operation.

Change-Id: I7657b77f29eaa513fe24d8c4e2eb6de9afd53950

11 years agoSimplification in drivers/ramdisk 67/367/2
Lionel Sambuc [Tue, 26 Feb 2013 15:49:27 +0000 (16:49 +0100)]
Simplification in drivers/ramdisk

Periods are allowed in Make variable names, which let us simplify
a bit the Makefile.

Based on a proposition by Antoine LECA

Change-Id: I759d7dc7721905a4775e8ab28e0371e48a443f25

11 years agoRemoving forgotten, useless, renegade defines 66/366/2
Lionel Sambuc [Tue, 26 Feb 2013 12:34:13 +0000 (13:34 +0100)]
Removing forgotten, useless, renegade defines

Change-Id: I3ff12b42e2815c8f3d72bb577a58552f3a0dc662

11 years agoCompatibility check for autotools 63/363/3
Lionel Sambuc [Mon, 25 Feb 2013 10:48:38 +0000 (11:48 +0100)]
Compatibility check for autotools

This add an explicit test on the obsolete _MINIX define, unset it and
replace it with _NETBSD_SOURCE.

This should help compile a lot of packages relying on autotools in pkgsrc.

Change-Id: Ie7da4ed5172f1b9f1f89e7a5d788ec2aed4d2563

11 years agoRemoving obsolete _NBSD_LIBC define 62/362/3
Lionel Sambuc [Mon, 25 Feb 2013 20:06:20 +0000 (21:06 +0100)]
Removing obsolete _NBSD_LIBC define

Change-Id: Ia6ce84ccdf36cf6f64540b990baaa7d85c53533d

11 years agoRemoving obsolete _MINIX_COMPAT define 61/361/3
Lionel Sambuc [Mon, 25 Feb 2013 16:36:35 +0000 (17:36 +0100)]
Removing obsolete _MINIX_COMPAT define

Change-Id: If1f5901a53bbc454c04ee33ebb469a58f0566df7

11 years agoRemoving obsolete _MINIX_SOURCE define 60/360/3
Lionel Sambuc [Mon, 25 Feb 2013 11:48:26 +0000 (12:48 +0100)]
Removing obsolete _MINIX_SOURCE define

Change-Id: I924d5af294cd5daf17c73f71803f060cea3c3d8b

11 years agoRemoving obsolete _MINIX define 59/359/3
Lionel Sambuc [Mon, 25 Feb 2013 11:43:15 +0000 (12:43 +0100)]
Removing obsolete _MINIX define

Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076

11 years agogetdirs.awk: restore regexp to original
Ben Gras [Sun, 24 Feb 2013 12:50:53 +0000 (13:50 +0100)]
getdirs.awk: restore regexp to original

Change-Id: I7f9714e1b0e079299c87b036dea8e91ffc701342

11 years agoRS: refresh service upon init failure 55/355/2
Thomas Veerman [Fri, 22 Feb 2013 13:57:00 +0000 (13:57 +0000)]
RS: refresh service upon init failure

When a service fails to initialize, RS exits the service. When injecting
faults this is undesired behavior. With this patch, we're going to assume
that when starting services with the -b flag (no binary exponential
offset), we don't want to exit the service but simply restart the
initialization.

Change-Id: Ie8b9c89e16fe4df8a89ec30ec678a216b4ec5fd0

11 years agoRemove unintentionally commited file
Thomas Veerman [Fri, 22 Feb 2013 13:56:25 +0000 (13:56 +0000)]
Remove unintentionally commited file

Change-Id: I2e0f66f5d8033e98c4e9e20d60773548af9e8c35

11 years agofb: use timeout instead of microdelay for restart logo 53/353/2
Thomas Veerman [Thu, 21 Feb 2013 16:03:30 +0000 (17:03 +0100)]
fb: use timeout instead of microdelay for restart logo

Change-Id: I1cb192aae502ed917e757cf17f67a9a355d0059a

11 years agolibsys: refactor frclock api 52/352/2
Thomas Veerman [Thu, 21 Feb 2013 16:02:42 +0000 (17:02 +0100)]
libsys: refactor frclock api

Make the frclock functions similar to the tsc utility functions. This
way, we can call frclock functions from the framebuffer driver which
will use frclock on ARM and tsc on X86.

Also, frclock_64_to_micros computed seconds, not microseconds

Change-Id: I6718ae0fb7db050794f6f032205923e1a32dc1ac

11 years agocompile & install the unixbenchmark netbsd style 54/354/3
Ben Gras [Sat, 16 Feb 2013 23:22:48 +0000 (00:22 +0100)]
compile & install the unixbenchmark netbsd style

for convenient crosscompiling & running.

Change-Id: I7dfcea109c00e1457f9de9b2e6437fe6cf925ba7

11 years agotest set: use clear
Thomas Veerman [Fri, 15 Feb 2013 12:18:47 +0000 (13:18 +0100)]
test set: use clear

11 years agoVFS: don't garbage collect if file is already closed
Thomas Veerman [Fri, 15 Feb 2013 15:09:24 +0000 (16:09 +0100)]
VFS: don't garbage collect if file is already closed

11 years agoVFS: prevent unmapping drivers that don't support reopening
Thomas Veerman [Fri, 15 Feb 2013 15:00:21 +0000 (16:00 +0100)]
VFS: prevent unmapping drivers that don't support reopening

libchardriver does not support DEV_REOPEN and will return ERESTART
when you do try it. This made VFS unhappy and concluded erroneously
that the driver was EDEADEPT.

11 years agofb: introduce framebuffer support to Minix
Thomas Veerman [Fri, 1 Feb 2013 12:13:19 +0000 (13:13 +0100)]
fb: introduce framebuffer support to Minix

This patch introduces a framebuffer to Minix. It's written for the ARM
port of Minix, but has an architectural split that separates the
hardware dependent part from the non-hardware dependent part. Futhermore,
this driver was developed using a screen that has a native resolution of
1024x600 pixels and having lack of support for obtaining EDID from the
screen. Consequently, it uses a hardcoded resolution of 1024x600.

The driver uses an interface based on the Linux ioctl API, but supports
only a very limited subset.

11 years agoARM: kernel: fix sanity check for copying 51/351/1
Ben Gras [Wed, 20 Feb 2013 19:29:09 +0000 (20:29 +0100)]
ARM: kernel: fix sanity check for copying

. phys_copy() (taken from memcpy) can legitimately
  cause pagefaults below the source/dest address due
  to word-alignment

Change-Id: Ibee8f069781d16caea671246c021fb17a2a892b1

11 years agotest66: float smoke test, floating point fixes (arm) 42/342/2
Ben Gras [Tue, 19 Feb 2013 18:54:29 +0000 (18:54 +0000)]
test66: float smoke test, floating point fixes (arm)

Change-Id: Idd209ab6f341fbfb6b2dca77290ff440695bc2c1

11 years agokernel:handle improper svc calls gracefully. 40/340/2
Kees Jongenburger [Tue, 19 Feb 2013 12:17:54 +0000 (13:17 +0100)]
kernel:handle improper svc calls gracefully.

Change-Id: Id0f694dd2a8c5981900601fcdb2112ee266d0d76

11 years agokernel: more stack for vm 41/341/1
Ben Gras [Tue, 19 Feb 2013 12:52:52 +0000 (13:52 +0100)]
kernel: more stack for vm

11 years agoARM: Enable caches 38/338/2
Lionel Sambuc [Sun, 10 Feb 2013 19:20:14 +0000 (20:20 +0100)]
ARM: Enable caches

First round, some more optimizations are possible and should be
activated.

Change-Id: I3b7dee7c82fbffd823a08bec1c5d5ebcf769f92f

11 years agoARM: Fix interrupt management 37/337/3
Lionel Sambuc [Fri, 15 Feb 2013 00:07:04 +0000 (01:07 +0100)]
ARM: Fix interrupt management

Interrupts where not correctly masked while in kernel, which
breaks one of the current main assumptions.

Also remove some duplication on ARM asm files, and add a function
to check the status of ARM irqs (not compiled by default)

Change-Id: I3c25d2b388f93fd8fe423998b94b3c4f140ba831

11 years agokernel:enable trace on arm. 36/336/2
Kees Jongenburger [Sat, 16 Feb 2013 21:32:19 +0000 (22:32 +0100)]
kernel:enable trace on arm.

Change-Id: Iabe6dfd758e8f1cdb4a18e2f2ab8f8ca988f3c86

11 years agoinstallboot: allow installation into disk
David van Moolenbroek [Sat, 9 Feb 2013 23:44:44 +0000 (00:44 +0100)]
installboot: allow installation into disk

Previously, installboot would require that the given target device is
a partition. This is not strictly necessary: MINIX3 can also be
installed (manually) into one or more primary partitions, requiring
that the installboot target be the entire disk. With this patch,
specifying a disk as target is now allowed, as long as the -f (force)
option is given.

11 years agoSwitch to disable bin. exp. wait time in RS
Lionel Sambuc [Sat, 16 Feb 2013 15:50:18 +0000 (16:50 +0100)]
Switch to disable bin. exp. wait time in RS

11 years agovm:Display boot process name upon failure to load or execute. 34/334/1
Kees Jongenburger [Sat, 16 Feb 2013 10:17:14 +0000 (11:17 +0100)]
vm:Display boot process name upon failure to load or execute.

Change-Id: I80fdaca09ae255622083b16dee72715f009dc0ee

11 years agopackages.install: remove a few, too big to fit. 33/333/2
Ben Gras [Fri, 15 Feb 2013 11:16:32 +0000 (11:16 +0000)]
packages.install: remove a few, too big to fit.

. the world will look better with base & packages dynamically
  linked.

Change-Id: Ifce80ad7002b530e583422d23c2ab6f4dd7841e0

11 years agokernel: correct typo in clock.c 32/332/1
Thomas Cort [Fri, 15 Feb 2013 11:10:56 +0000 (12:10 +0100)]
kernel: correct typo in clock.c

Change-Id: Iae7f482268809c5675d023d10104f49e5bd65484

11 years agoTTY: "nobeep" setting to disable beeps R3.2.1 v3.2.1
David van Moolenbroek [Sun, 10 Feb 2013 00:17:47 +0000 (01:17 +0100)]
TTY: "nobeep" setting to disable beeps

Disable the speaker by passing in "nobeep=1" as a boot option.
The option is preserved when updating the boot configuration.
Currently i386 only.

11 years agortl8169: reduce verbosity
David van Moolenbroek [Sat, 9 Feb 2013 19:54:04 +0000 (20:54 +0100)]
rtl8169: reduce verbosity

11 years agortl8169: add support for RTL8101E family
David van Moolenbroek [Wed, 13 Feb 2013 22:57:28 +0000 (23:57 +0100)]
rtl8169: add support for RTL8101E family

All cards in this family (RTL8101E, RTL8102E, RTL8103E, RTL8105E,
possibly others) should be recognized based on the added PCI ID.
The hardware version number of the RTL8105E has been added only to
serve as an example of a card that does not require modification of
certain undocumented registers.

11 years agopkgin_all: script to auto-install all packages 31/331/1
Ben Gras [Thu, 14 Feb 2013 22:56:17 +0000 (22:56 +0000)]
pkgin_all: script to auto-install all packages

Change-Id: I858c6d2b1c117c1fb5f702ab9c4921e86fb0cec5

11 years agommc:Ignore SIGTERM if open count > 0 28/328/2
Kees Jongenburger [Wed, 13 Feb 2013 16:54:40 +0000 (17:54 +0100)]
mmc:Ignore SIGTERM if open count > 0

Change-Id: I996497335b4209ff7ef95dfa977d97e5557456e9

11 years agorelease.sh: allow REPO and GITBRANCH env override 29/329/2
Ben Gras [Wed, 13 Feb 2013 19:15:02 +0000 (19:15 +0000)]
release.sh: allow REPO and GITBRANCH env override

patch by Antoine Leca

Change-Id: Iabcf1189d8b5250536bb17e650f48f0e73fcde2c

11 years agoash: default to an editing mode 27/327/1
Ben Gras [Wed, 13 Feb 2013 16:19:15 +0000 (16:19 +0000)]
ash: default to an editing mode

. otherwise line editing is not initialized at all

Change-Id: I4b1aa5659720b1fd955ab0450b111085dcdc9dee

11 years agoahci: more robustness against flaky devices
David van Moolenbroek [Wed, 13 Feb 2013 14:29:44 +0000 (14:29 +0000)]
ahci: more robustness against flaky devices

- if supported, override BSY/DRQ flags and start the port anyway if it
  times out with DET=3h status during device detection;
- no longer rely on the device signature to be set; unless a valid
  signature is obtained, try both ATA and ATAPI device identification.

11 years agoahci: device detection rewrite
David van Moolenbroek [Wed, 13 Feb 2013 14:22:45 +0000 (14:22 +0000)]
ahci: device detection rewrite

- do not start a port before the BSY and DRQ flags have been cleared;
  as such, poll on device status rather than signature availability.
- change "ahci_sig_timeout" to "ahci_device_timeout" variable setting
  accordingly; this variable determines the polling duration before a
  newly attached device is given up on, and uses 30 seconds as default;
- use port connect changes (PCS/X/DET->1h) to kick off polling for an
  attached device; detachment is still detected by means of PhyRdy
  status changes (PRCS/N/DET<->3h).

11 years agoahci: rewrite timeout initialization code
David van Moolenbroek [Tue, 12 Feb 2013 13:53:09 +0000 (13:53 +0000)]
ahci: rewrite timeout initialization code

- the "ahci_sig_timeout" variable now denotes the entire checking
  period, and the delay between checks has been hardcoded; what was
  previously "ahci_sig_checks" is now computed from those two;
- timeout values are no longer used for both millisecond and clock
  tick values, and better typed;
- the computation of timeouts is no longer off by half a second.

11 years agoahci: centralize, fix port reset
David van Moolenbroek [Tue, 12 Feb 2013 13:52:52 +0000 (13:52 +0000)]
ahci: centralize, fix port reset

11 years agoahci: link FIS receive mode to memory allocation
David van Moolenbroek [Tue, 12 Feb 2013 13:52:33 +0000 (13:52 +0000)]
ahci: link FIS receive mode to memory allocation

There is no need to set/clear PxCMD.FRE on every port start/stop.

Also remove some already useless and now also incomplete port
reinitialization at startup.

11 years agoahci: use macros to access HBA and port registers
David van Moolenbroek [Tue, 12 Feb 2013 13:52:01 +0000 (13:52 +0000)]
ahci: use macros to access HBA and port registers

11 years ago__aeabi_ldivmod: fix sign logic 26/326/2
Ben Gras [Mon, 11 Feb 2013 01:02:08 +0000 (02:02 +0100)]
__aeabi_ldivmod: fix sign logic

. signed 64-bit divide incorrectly tested for sign compensation
  bits in the NEG (R5) register, causing the signedness of the
  quotient and modulus to be wrong for negative numerators.

Fixes test45 on ARM.

Change-Id: Id0df8fd97ea67cd0722db8cdd70a07e01b3d7870

11 years agoimpove memory accounting 19/319/3
Ben Gras [Fri, 8 Feb 2013 18:11:42 +0000 (19:11 +0100)]
impove memory accounting

. the total amount of memory in the system didn't include the memory
  used by the boot-time modules and some dynamic allocation by the
  kernel at boot time (to map in VM). especially apparent on our
  ARM board with 'only' 512MB of memory and a huge ramdisk.
. also: *add* the VM loaded module to the freelist after it has
  been allocated for & mapped in instead of cutting it *out* of the
  freelist! so we get a few more MB free..

Change-Id: If37ac32b21c9d38610830e21421264da4f20bc4f

11 years agoVM: slight pagedir mapping generalization 25/325/2
Ben Gras [Sun, 10 Feb 2013 18:37:12 +0000 (19:37 +0100)]
VM: slight pagedir mapping generalization

. allow any number of pde's used for pagedir mapping
. allows >1024 NR_PROCS on x86, >64 on ARM
. allows NR_PROCS to be the same in both cases
. also cleanup: allocating spare PDE's is not necessary
  throw that function out

Change-Id: Ibb8f8cf6e7db6a4d6384b6911d1a3f3f5e5d8256

11 years agolibexec: quiet 24/324/1
Ben Gras [Sun, 10 Feb 2013 18:52:25 +0000 (19:52 +0100)]
libexec: quiet

. harmless errors in the case of shell scripts

Change-Id: I461776024a21233e291102ca6d05dc7fa767f71a

11 years agoARM divsi3.S: raise(SIGFPE) when called for 23/323/1
Ben Gras [Sat, 9 Feb 2013 19:38:45 +0000 (20:38 +0100)]
ARM divsi3.S: raise(SIGFPE) when called for

. raise(SIGFPE) for modulo-0/divide-0 operations in
  internal int division functions
. gcc: do not link with -lgcc anywhere so these internal
  functions are always used from libc instead of (sometimes)
  masked by -lgcc
. together fixes test53 on ARM

Change-Id: I31ec19dfdd68b8a92695595da901874e63106f9d

11 years agot40c term[] count fix 22/322/2
Ben Gras [Sat, 9 Feb 2013 17:42:33 +0000 (18:42 +0100)]
t40c term[] count fix

. term[] did not have the promised number of entries

Change-Id: I06a45ca0d948a6876bf1bffd0ec4706c88b7a3b0

11 years agodrivers: build random for arm too 21/321/2
Ben Gras [Sat, 9 Feb 2013 14:52:03 +0000 (15:52 +0100)]
drivers: build random for arm too

Change-Id: I801643281fdacc6cb7950cc79a29bec28dcf40ec

11 years agoopendir change: refinement
Ben Gras [Fri, 8 Feb 2013 23:09:21 +0000 (23:09 +0000)]
opendir change: refinement

Change-Id: I90cc6929c9e7678da8e200688dcd40441efe030f

11 years agoadd opendir alias 20/320/2
Ben Gras [Fri, 8 Feb 2013 21:40:57 +0000 (21:40 +0000)]
add opendir alias

Change-Id: Ib121e763bac7bea44a2f2533c454ff7d9361dc8d

11 years agoldivmod, uldivmod: fix qdivrem calls 18/318/1
Ben Gras [Fri, 8 Feb 2013 12:12:45 +0000 (13:12 +0100)]
ldivmod, uldivmod: fix qdivrem calls

. ldivmod, uldivmod were passing the modulo argument pointer
  in R4, which is bogus, as qdivrem expects it on the stack as
  per the EABI, causing essentially 'random' memory to be trampled
  by qdivrem. fix by pushing R4 before the call.
. also add these functions to -minc so -lminc clients can be
  linked without -lgcc

Change-Id: I90b0b28b51a188c93da5de6afb108224749ea794

11 years agoramdisk Makefile: CLEANFILES fix 17/317/1
Ben Gras [Thu, 7 Feb 2013 22:08:37 +0000 (23:08 +0100)]
ramdisk Makefile: CLEANFILES fix

11 years agotest41: relax maximum timer tick rate 00/300/1
Ben Gras [Wed, 6 Feb 2013 16:38:13 +0000 (17:38 +0100)]
test41: relax maximum timer tick rate

. on ARM (hz=1000) does not give code a chance to stop the timer

Change-Id: Id626bfed088400c3c3962ddfc5e8fbe23dd2a797

11 years agoGPIO:further development 96/296/5
Kees Jongenburger [Wed, 6 Feb 2013 14:46:21 +0000 (15:46 +0100)]
GPIO:further development

* Generalize GPIO handling.
* Add libs to configure gpio's clocks and pads
* Add Interrupt handling.
* Introduce mmio.h and log.h

Change-Id: I928e4c807d15031de2eede4b3ecff62df795f8ac

11 years agobuild:remove minix-sys.plist from version management. 99/299/1
Kees Jongenburger [Wed, 6 Feb 2013 14:44:31 +0000 (15:44 +0100)]
build:remove minix-sys.plist from version management.

Remove minix-sys.plist from version management it is generated by
the build system.

Change-Id: I6fc831992ea619e598130450f0f46b6fc01145ed

11 years agoarm: protect state after signal handler 95/295/1
Ben Gras [Tue, 5 Feb 2013 16:17:19 +0000 (17:17 +0100)]
arm: protect state after signal handler

. set MF_CONTEXT_SET after signal handler state
  is set so it doesn't get clobbered by the kernel
  afterwards (i.e. by delivermsg()).

fixes at least test41.

Change-Id: I7e5e0e9311c8bbc1c0a9c7ca466ceddd9edfa03f

11 years agolibexec: detect short files 92/292/2
Ben Gras [Mon, 4 Feb 2013 00:49:48 +0000 (01:49 +0100)]
libexec: detect short files

if an exec() fails partway through reading in the sections, the target
process is already gone and a defunct process remains. sanity checking
the binary beforehand helps that.

test10 mutilates binaries and exec()s them on purpose; making an exec()
fail cleanly in such cases seems like acceptable behaviour.

fixes test10 on ARM.

Change-Id: I1ed9bb200ce469d4d349073cadccad5503b2fcb0

11 years agokernel, libc: signals fixes 93/293/2
Ben Gras [Mon, 4 Feb 2013 03:08:12 +0000 (04:08 +0100)]
kernel, libc: signals fixes

. kernel: signal handler args for ARM
. kernel: sanity check return address (LSB indicates thumb mode)
. libc: properly retrieve signal mask for ARM

together fix test37 on ARM.

Change-Id: I4e00f754c50104ed85c7fdf8ec5ad54568f20a81

11 years agoumount: getopt return value is int, not char 94/294/2
Ben Gras [Mon, 4 Feb 2013 04:09:28 +0000 (05:09 +0100)]
umount: getopt return value is int, not char

. causes infinite loop on ARM (default unsigned char?)

Change-Id: If00184f37317c8597a8203f68ec96f1ce5030853

11 years agokernel: scheduling fix for ARM 89/289/2
Ben Gras [Sun, 3 Feb 2013 18:28:24 +0000 (19:28 +0100)]
kernel: scheduling fix for ARM

. make read_tsc_64 use the free-running clock, significantly
  improving scheduling behaviour

Change-Id: Idf6a12f6e26be7fe3b3664c278cae846d8b2a442

11 years agoFix warning about double rule for rc in ramdisk 83/283/3
Lionel Sambuc [Wed, 30 Jan 2013 19:09:02 +0000 (20:09 +0100)]
Fix warning about double rule for rc in ramdisk

Change-Id: I870364455e5cbfe178b3dba44a1c944ca7ed9d19

11 years agoUpgrading sync 82/282/3
Lionel Sambuc [Wed, 30 Jan 2013 18:11:42 +0000 (19:11 +0100)]
Upgrading sync

Change-Id: Ied34ebd1d2dc963f5a2af8fc3bbf8e6c94df61cf

11 years agoUpgrading ls 81/281/3
Lionel Sambuc [Wed, 30 Jan 2013 18:06:57 +0000 (19:06 +0100)]
Upgrading ls

Change-Id: Ie0bacf04e727fac5c6df7b2bcf5039e9ce800616

11 years agovm: fix sanity checks on arm 86/286/1
Ben Gras [Fri, 1 Feb 2013 16:48:40 +0000 (17:48 +0100)]
vm: fix sanity checks on arm

The 'polarity' of the RW bit is inversed on ARM, causing one
of the sanity check compensations to fail. ARM now runs basic
stuff with sanity checks passing.

Change-Id: Iee28ab63e430e759f204eeb204b24c301d5ea3c9

11 years agommc:development 71/271/2
Kees Jongenburger [Fri, 19 Oct 2012 13:44:10 +0000 (15:44 +0200)]
mmc:development

* let busy loops timeout.
* Start using interrupt handlers.
* Allocate the ramdisk only when used.

Change-Id: Ie08d66eefef3c8cd3ee16c04f74a9a50cc12b021

11 years agoImporting bin/ln 80/280/2
Lionel Sambuc [Wed, 30 Jan 2013 18:04:17 +0000 (19:04 +0100)]
Importing bin/ln

Change-Id: I318e79f2d02dcff10bda8af335d286a78be5c5a2

11 years agoUpgrading kill 79/279/2
Lionel Sambuc [Wed, 30 Jan 2013 18:01:43 +0000 (19:01 +0100)]
Upgrading kill

Change-Id: I9ad71f08998ac17651d243afecbcc362e0f91b56

11 years agoUpgrading pwd 78/278/2
Lionel Sambuc [Wed, 30 Jan 2013 17:57:00 +0000 (18:57 +0100)]
Upgrading pwd

Change-Id: I3bab8335ac58f2d0af20c5cee4b772b1175c2ede

11 years agoImporting NetBSD expr 77/277/2
Lionel Sambuc [Wed, 30 Jan 2013 17:52:21 +0000 (18:52 +0100)]
Importing NetBSD expr

Change-Id: Ifdb1160cbfeb1324f6fcd612e66112fa0940227c

11 years agoUpgrading echo 76/276/2
Lionel Sambuc [Wed, 30 Jan 2013 17:49:19 +0000 (18:49 +0100)]
Upgrading echo

Change-Id: Idaa5da742b3cc9a1ee2f5c03f10e0627690556fa

11 years agoUpgrading test 75/275/2
Lionel Sambuc [Wed, 30 Jan 2013 14:53:50 +0000 (15:53 +0100)]
Upgrading test

Change-Id: I1cd8e24475030989c95ba60b4e7462dacf945b9f

11 years agoUpgrading printf 74/274/2
Lionel Sambuc [Wed, 30 Jan 2013 14:45:47 +0000 (15:45 +0100)]
Upgrading printf

Change-Id: I78dbbf0d14e4d61f5dfbec53d3938453b3e03ee6

11 years agoFix command line history in ash 73/273/2
Lionel Sambuc [Wed, 30 Jan 2013 14:36:51 +0000 (15:36 +0100)]
Fix command line history in ash

Also did some cleanup in ash sources, to make minix modifications
more obvious, as well as some simplifications (by removing code which
is never compiled)

Removed EDITLINE support, use libedit, which does the termcap/terminfo
handling.

Change-Id: I19f7f425ed6a61298844631f9d7f3173cf7f30c0

11 years agoFix file permissions in usr.bin/tput
Lionel Sambuc [Tue, 29 Jan 2013 18:17:51 +0000 (18:17 +0000)]
Fix file permissions in usr.bin/tput

Change-Id: Ieb29d7a91bbd90273e37406f5454e23c3131634a

11 years agoARM: provide free running clock to replace ccnt 84/284/2
Thomas Veerman [Tue, 29 Jan 2013 19:58:00 +0000 (20:58 +0100)]
ARM: provide free running clock to replace ccnt

The Cycle CouNTer on ARM cannot be used reliably as it wraps around
rather quickly and can be altered by user space (on Minix). Furthermore,
it's buggy when wrapping and is not implemented at all on the Linaro
Beagleboard emulator.

This patch programs GPTIMER10 as a free running clock at 1.625 MHz (it
doesn't generate interrupts). It's memory mapped into every process,
which enables libsys to provide micro_delay().

Change-Id: Iba004c6c62976762fe154ea390d69e518eec1531