The kernel API for requesting interrupts and the associated callback
have a somewhat strange behaviour. Requesting an interrupts is done
by calling sys_irqsetpolicy using an interrupt and a given id. This
id can be modified by the sys_irqsetpolicy and must be used for
subsequent calls to sys_irqenable/sys_irqdisable. However upon an
incoming call from the kernel NOTIFY_ARG contains the original value
encoded in a set e.g. if 1 << id == true the interrupt was raised.
In order to make it more clear that ticks should be used for timers
and realtime should be used for timestamps / displaying the date/time,
getuptime() was renamed to getticks() and getuptime2() was renamed to
getuptime().
Servers, drivers, libraries, tests, etc that use getuptime()/getuptime2()
have been updated. In instances where a realtime was calculated, the
calculation was changed to use realtime.
System calls clock_getres() and clock_gettime() were added to PM/libc.
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
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
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
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.
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.
- 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.
- 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).
- 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.
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.
* Generalize GPIO handling.
* Add libs to configure gpio's clocks and pads
* Add Interrupt handling.
* Introduce mmio.h and log.h
Change-Id: I928e4c807d15031de2eede4b3ecff62df795f8ac
* let busy loops timeout.
* Start using interrupt handlers.
* Allocate the ramdisk only when used.
Change-Id: Ie08d66eefef3c8cd3ee16c04f74a9a50cc12b021
Small GPIO driver that exports a few pins using a virtual file
system. Currently the two user leds and the user button are exported.
Change-Id: I001d017ae27cd17b635587873f7da981054da459
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.
There is also a few related Makefile updates as well as minor
source code corrections.
* Updating common/lib
* Updating lib/csu
* Updating lib/libc
* Updating libexec/ld.elf_so
* Corrected test on __minix in featuretest to actually follow the
meaning of the comment.
* Cleaned up _REENTRANT-related defintions.
* Disabled -D_REENTRANT for libfetch
* Removing some unneeded __NBSD_LIBC defines and tests
Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
Replace proto.sh by the c processor to generate proto.gen in order
for us to have a more flexible way of selecting the files we want
in the ramdisk.
Change-Id: Id82b9f1b73b498c4d885bb3156fcefaeb9d157e0
Also fix a potential issue where host tools would be compiled
dynamically under MINIX.
This also updates proto.common.dynamic to use the new placement
of the dynamic libraries (/usr/lib)
upgrade to NetBSD CVS release from 2012/10/17 12:00:00 UTC
Makefiles updates to imporve portability
Made sure to be consistent in the usage of braces/parenthesis at
least on a per file basis. For variables, it is recommended to
continue to use braces.