Commit graph

5686 commits

Author SHA1 Message Date
Thomas Cort
9f23acf410 kernel: spelling fixes
Change-Id: I73c759bdef98be35be77130895ae0ec497e1b954
2013-10-09 20:24:17 -04:00
Lionel Sambuc
40fbf55cf3 Revert "MAKEDEV: Add mtree output, and ramdisk set."
This reverts commit 4c87adc85c.

Change-Id: I469fbbe6f49802cb86d81b059cb454d967f47079
Reason: Introduces new device nodes and removes old devices nodes which where unintended at this point.
2013-10-09 16:28:17 +02:00
Lionel Sambuc
4c87adc85c MAKEDEV: Add mtree output, and ramdisk set.
Change-Id: I36cb7e9451960189a33a04a5c2e3ddb19c7be75e
2013-10-09 14:07:42 +02:00
Lionel Sambuc
45783c536a usr.bin/toproto: Adding support for device nodes
Change-Id: I5958673274ecc06429c489a1ac5a88d2b3c31864
2013-10-09 14:07:27 +02:00
Thomas Cort
916b872033 Importing usr.bin/tee
Replaces commands/tee. No Minix-specific changes needed.

Change-Id: I31481facfa9cd44860bf2b59ec779605dd8d2f2d
2013-10-09 10:58:14 +02:00
Lionel Sambuc
fb69480b9a Fix some unintialized variables with -O3
Change-Id: I7c41b355a503f97501e9ecb768c77a80d1d7ef0c
2013-10-08 11:45:49 +02:00
Lionel Sambuc
ffba9c2def Fix out of array bounds errors with -O3
When compiling with -O3 gcc seems to be a lot stricter on its checks for
index out of bounds error.

Change-Id: I5a63e1db6aa2375223ff13c6352643a9804fa93d
2013-10-08 11:43:31 +02:00
Ben Gras
374af94b2b testsh2: allow compiler fallback to gcc
. lets test work in 'pure DESTDIR' environment

Change-Id: If7d45f01f20bc6369455d706b5ad47d36946fce3
2013-10-02 19:15:23 +02:00
Ben Gras
b2dcc910d4 test75: force child to use a minimum of cpu time
test75 sometimes false-fails if something else is going on
at the same time, presumably because the child doesn't spin
enough to register a nonzero getrusage() cpu time value, as
spin() uses the real time to limit the spinning.

this change forces spin() to do a minimum amount of spinning
before exiting, regardless of scheduling.

Change-Id: I57c63d22969bba418f36bcc8c5ace2b6fb445968
2013-10-02 16:26:27 +02:00
Thomas Cort
b50dbb4d24 Importing usr.bin/machine
Change-Id: I7dd97073e94cbb75fdac7f15c73437c8ce44a606
2013-10-02 14:58:25 +02:00
Thomas Cort
79cc8b683f Importing usr.bin/rev
Change-Id: I73c661eb9d4cca5c17b969bb3831541c1f7f9319
2013-09-30 15:19:38 +02:00
Kees Jongenburger
f88b0924f3 arm:fix for test54 and test55
Define the file name templates as char arrays to prevent the
toolchain from mapping them read-only.

Change-Id: Ib2395587b62d4a6ff19c88adc4246dcb41344a53
2013-09-27 15:15:37 +02:00
Ben Gras
b6d951df17 arm_sdimage.sh: use native minix partition util
. make filesystems on primary partitions to make it
	  easier on the minix partition util
	. so sfdisk isn't required as an external tool
	. also make partition and hitherto x86-only utilities
	  arch-independent

Change-Id: Ib4e07e45d038d084dde1858917d3deb7f0616532
2013-09-27 14:13:43 +02:00
Kees Jongenburger
ed45d98dac arm:ensure read_tsc_64 always returns a valid value.
Before this change overflowing the free running clock counter
between the time the timer was read and the time the overflow
check was done resulted in read_tsc_64 returning a to high value.

Change-Id: I1022f271213647f720477c4121d45f0c965456c6
2013-09-27 11:29:04 +02:00
Kees Jongenburger
02f6308a2b arm:mmc driver speedup.
Speedup the mmc driver one more time before doing a proper fix.

Change-Id: I9dbe9b1e16e71fed00c8ac3ca7fdc6c4374284c0
2013-09-26 12:11:29 +02:00
Kees Jongenburger
d60d07f045 arm:caching enable barriers
Change-Id: I2c54a3c3c8f0502bf365901d771a989f7c556958
2013-09-26 12:11:29 +02:00
Kees Jongenburger
400e577fd5 arm:caching clean caches before setting up mappings.
Change-Id: I9ff1bb04ea9c0adeb76e5176526448d93bfe29f5
2013-09-26 12:11:29 +02:00
Kees Jongenburger
73ed75a454 arm:vm allow per memory type flags.
Change-Id: Id5a5bd479bdfbbc3fb52a85c29e1d7712a1171a7
2013-09-26 12:11:28 +02:00
Kees Jongenburger
34b517ab12 arm:caching mark normal memory cacheable during identity mapping.
Change-Id: I7cd8da168744a3f32276803e99e8af0fea772574
2013-09-26 12:11:28 +02:00
Kees Jongenburger
d77debb5b7 arm:caching access the l1 pages over cacheable memory.
When we start using a new pagetable (for a new process)
the last part is to ensure the pagetable itself can be
accessed by VM. This is done in pt_bind by updating
the "pagetable of pagetables" and we want this mapping
to match other mappings to the l1 pagetable.

Change-Id: I7b506fd75553917fdc1abd25b55e4b2f25ccbf8d
2013-09-26 11:57:44 +02:00
Kees Jongenburger
2830a5af5c arm:perform copy operation using same cacheability.
When copying data from cacheable memory also use cacheable
attributes when creating temporary mappings.

Change-Id: I0e8380293fb4edaafba49f6262983ad86a5350c5
2013-09-26 11:54:36 +02:00
Kees Jongenburger
0d02dc9d54 arm:make the MMU fetch pagetable data through the caches.
Change-Id: Ibd7b66558c369d0c0792c02801562580d255fa1f
2013-09-26 11:54:36 +02:00
Kees Jongenburger
827378c57f arm:caching add methods to flush the data and unified cache
Change-Id: Idb066dd01afbdbccd684bcdcf4af88b4b1ef870a
2013-09-26 11:54:36 +02:00
Kees Jongenburger
c4ffaa0afb arm:caching define a new caching combination and use that.
This combo was taken from the startware examples.

Change-Id: I9ef8d4f4706124a6aaec72f5da65b5301c5c2301
2013-09-26 11:54:36 +02:00
Kees Jongenburger
91004287be arm:caching mark memory as cacheable.
kernel mappings that are not marked as  VMMF_UNCACHED are now mapped
as cacheable.
2013-09-26 11:54:36 +02:00
Kees Jongenburger
0f23130180 arm:caching introduce _CACHED defines
Introduce ARM_VM_SECTION_CACHED and ARM_VM_PTE_CACHED to ensure we
are using the correct caching flags everywhere.
2013-09-26 11:54:36 +02:00
Kees Jongenburger
b82f01ea69 arm:clarify pagetable code.
Make it clear that non RW mapped memory is mapped RO.
2013-09-26 11:45:44 +02:00
Kees Jongenburger
b08490a35b arm:document arm vm.h 2013-09-26 11:45:43 +02:00
Kees Jongenburger
a17691a98f arm:define the physical memory range for the omap.
Change-Id: I256dbeb58fec5b95b48d521054810fe478fce67f
2013-09-26 11:45:43 +02:00
Kees Jongenburger
b98441772c arm:vm map free running clock uncached. 2013-09-26 09:08:13 +02:00
Kees Jongenburger
a88bc73e4c arm:allow to lookup physical addresses of sections.
Change-Id: If4716b81cceee5d8b30d5f103b772b0ac99fc807
2013-09-26 09:07:36 +02:00
Kees Jongenburger
6595e79da8 block-dev:add additional sanity check.
Change-Id: Ib5b7cd93a50726b95c2e1b4c7eeedfefc824dd9c
2013-09-26 09:06:57 +02:00
Kees Jongenburger
b1a7d4d7ea arm:misc fix remove const modifier for value that changes.
Change-Id: I4ac96acdc66ea203a339108225c07c68959556c0
2013-09-26 09:06:24 +02:00
Kees Jongenburger
184fe46a79 arm:use correct address mask for sections. 2013-09-26 09:06:05 +02:00
Kees Jongenburger
e4be0ceecf arm:timer changes.
* Allow to change the timer frequency using the hz paramter.
* Unmask the interrupt only after registering the handler.
* Pass the hz parameter in the command line.
2013-09-26 09:05:44 +02:00
Kees Jongenburger
88c79fc9e9 posix-test:fix times test
Applications should use sysconf(_SC_CLK_TCK) to determine the number
of clock ticks per second as it may  vary  from system to system.
2013-09-26 09:05:28 +02:00
Ben Gras
a9db0ea184 x86 hd image creator
A script that creates a HD image ready to be booted by an x86
emulator, ready to work in a crossbuild environment.

It's really just for qemu/kvm as there's no boot code in
the MBR and no bootloader installed so we rely on the in-kvm
multiboot implementation for now. This is very convenient for
passing args too.

To minimize reliance on external tools, we use the Minix
'partition' utility to write the partition table of the HD
image, which therefore has to be compiled natively.

	. new script releasetools/x86_hdimage.sh
	. natively compile minix 'partition' utility
	. make <machine/partition.h> 64-bit safe for it

Change-Id: If645b4691536752271e0b8a8ed59a34f248dace4
2013-09-25 19:30:22 +02:00
Ben Gras
9dfbfc9af7 release.sh: simplify by removing usb option
. relies on bios_wini which is long gone

Change-Id: I95257b6204cc6d928abcbd8492808b4b6450a99e
2013-09-25 12:26:31 +00:00
Ben Gras
a16d9e9f51 remove unused hdemu release mode
Change-Id: I3ca497eda3c0042cafb8ba88fe16202221823a9c
2013-09-24 15:27:07 +00:00
Ben Gras
a64a836a3f kernel: fixes for DEBUG_DUMPIPC mode
. add dependency of headers on debug.d
	. put the generated headers in the right dir
	. also resilience against future ELAST duplicate errno

Change-Id: I9d10702c8e09699a40138193f14defe902399da6
2013-09-24 08:26:53 +00:00
Thomas Cort
cb5e2921b3 i2c: increase read/write timeout
The sht21 temperature and humidity sensor holds the i2c bus while
an ADC conversion is in progress. For example, a temperature
measurement is requested, a read operation is started, and the
sht21 doesn't respond to the read request until the result of
the measurement is ready. The conversion time isn't constant.
On rare occations (one in hundreds of samples) the timeout in the
i2c driver expires returning an error.

The example code from Sensirion, the sht21's manufacturer, suggests
a bus timeout of 1 second to accommodate the sht21. This commit
increases the bus timeout to 1 second. The timeout is only reached
when chips do not respond normally, so the change doesn't affect the
performance of any other drivers.

Change-Id: I57b0f958a5d0b69b221af380b771fe67401ff604
2013-09-18 08:10:26 -04:00
Thomas Cort
75bd3009d3 libi2cdriver: add functions for IC register access
Many i2c device drivers used similar code to access registers on
the ICs they drive. This commit implements that functionality in
libi2cdriver and updates the drivers to use the library instead of
their own register access functions. The net result is 375+ fewer
lines of code and less work for people developing new drivers.

The two exceptions were cat24c256 and parts of tda19988. They access
the bus in uncommon ways. It doesn't make sense at this time to
move their read/write functions into libi2cdriver.

Change-Id: Id8280b71af33b710a49944d7f20a7262be9f5988
2013-09-18 08:10:26 -04:00
Thomas Cort
43471c3110 bmp085: remove duplicate code
A copy and paste error caused a few lines of code to be duplicated.
This patch removes the excess code.

Change-Id: I7313efb537e2a4102fb25ce05782e82ae0c84285
2013-09-18 08:10:26 -04:00
Thomas Cort
493e4fffc5 tda19988: add missing blockdriver_announce() call
To provide EDID to fb, the TDA19988 implements the block device
protocol with libblockdriver. To properly use the library,
blockdriver_announce() should be called by the driver.

Issue reported by David van Moolenbroek

Change-Id: Id55d159d91502a9afac5c1d4de0fee1e8945b5c1
2013-09-18 08:10:26 -04:00
Lionel Sambuc
3342fb471b Prevent make -C gnu from installing files in /
This is done by adding a dependency on ${GNUHOSTDIST:H}/.gitignore
for both realall and realinstall targets.

Change-Id: If086a6c02ab20a8cd4bbb3597d7203cf22dce796
2013-09-17 15:19:50 +02:00
Ben Gras
c84edbc9c6 test70: reduce ITERATIONS
. full number was needed to reliably trigger the race
	  condition
	. takes a bit too long (7 mins on fast x86 hardware) for a
	  condition that "can't" happen again, so let's cut the iteration
	  count and trust that the test will trigger soon enough for
	  a similar condition in the future.

Change-Id: I2d38b87c25327adbbff91b7db6191648aa1dd8fd
2013-09-16 15:33:44 +00:00
Ben Gras
b5951f9663 vm: enable filemap=1 by default
. turns on mmap() functionality for files by default
	. also causes exec() to use it to map in executables
	  without copying and with sharing those pages with the
	  disk cache and other instances of the executable

Change-Id: Idb94dfe110eed916cf83b12c45e1a77241a2cee5
2013-09-13 12:56:41 +00:00
Lubomir Rintel
4f52c9ea2e inet: Reply to TASK messages even if we're waiting for STAT reply
As they can come anytime upon receipt of interrupt by the ethernet driver. This
is the same thing as is done for CONF replies.

A simple test case would be the following via ssh connection:
while getaddr; do :; done

Change-Id: I68f4403360b3eefe67fc602c4855ca1abd649475
2013-09-12 14:06:27 +02:00
Aurelien Jarno
f0c391e09b virtio-net: acknowledge used features
According to the virtio specifications, the host present the supported
features to the guest, and the guest should answer woth the features it
supports. This allows the host to disable support for features that the
guest is not going to use.

Minix tells to the host it doesn't support any extended features, while
it uses at least VIRTIO_NET_F_MAC and VIRTIO_NET_F_CTRL_VQ. For the
latter it seems it only allocate the queue while not using it later.
However starting with QEMU 1.4.0, with multiqueue support added, the
control queue is not allocated on the host side if the guest doesn't
tell it supports this feature. This cause virtio-net to crash on the
Minix side.

This patch fixes that by correctly telling the features that are
used by the Minix guest for more than printing a debug message. This
fixes virtio-net on QEMU 1.4.x.

Change-Id: I8bbf757c09d24e0f5fe5835531a1c9203b714bd7
2013-09-11 18:34:11 +02:00
Ben Gras
b538531449 vm: make WARNS=5 proof
Change-Id: I737ded223daf04f1c0c85a2e8e6b36c8fdcd07db
2013-09-06 11:51:20 +02:00