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
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
* port libgpio to am335x.
* increase NR_IRQ to 16 to avoid too many IRQs requested error.
* move gpio binary to /sbin (that's where mount looks for drivers).
* fix bug that re-enabled banks that were disabled due to bad revision.
* fix padconf masks for dm37xx in gpio driver (should be 16-bit).
* fix a few typos in README.txt and comments.
Change-Id: I32374415a97135174c5224f76374a870909fa90c
On the AM335X, writes to the padconf registers must be done in privileged
mode. To allow userspace drivers to dynamically change the padconf at
runtime, a kernel call has been added.
Change-Id: I4b25d2879399b1785a360912faa0e90b5c258533
for clang, fix warnings in drivers/, lib/, servers/, sys/, common/.
by turning off fatal warnings (takes effect if the default is on),
fixing warnings or reducing the warning level.
Change-Id: Ia1b4bc877c879ba783158081b59aa6ebb021a50f
Previously, all incoming messages would be blocked before a DL_CONF
message arrives from the TCP/IP stack. This however makes it impossible
for a driver to process interrupts before the DL_CONF initialization.
This patch blocks only datalink messages before the initial DL_CONF,
and lets through all other messages to the driver.
Change-Id: I89988958c0bff9bb38e0379b66f6142491a67b61
readclock:
- the setup function for readclock on i386 was missing a return.
- the message field for RTCDEV_GRANT wasn't the right type.
tda19988:
- position variable was used without being initialized.
Change-Id: I3f78dd0a9d44f35eb38cb7da0974909f066b7007
The VM server now manages its call masks such that all user processes
share the same call mask. As a result, an update for the call mask of
any user process will apply to all user processes. This is similar to
the privilege infrastructure employed by the kernel, and may serve as
a template for similar fine-grained restrictions in other servers.
Concretely, this patch fixes the problem of "service edit init" not
applying the given VM call mask to user processes started from RC
scripts during system startup.
In addition, this patch makes RS set a proper VM call mask for each
recovery script it spawns.
Change-Id: I520a30d85a0d3f3502d2b158293a2258825358cf
. Replace 64bit funcions with operators in arch_clock.c
. Replace 64bit funcions with operators in proc.c
. Replace 64bit funcions with operators in vbox.c
. Replace 64bit funcions with operators in driver.c
. Eradicates is_zero64, make_zero64, neg64
Change-Id: Ie4e1242a73534f114725271b2e2365b2004cb7b9
Add support for getting/setting the am335x SoC's internal real
time clock. Also, allow the power off alarm to be set.
Make readclock an "always on" driver. This is needed for setting
power-off alarms whenever the power button is pressed on the BBB.
Replace the readclock.sh script & single run driver with a
readclock program that takes the same arguments and forwards
the requests on to the always up readclock driver.
Change-Id: Ifd6c2acd80ae4b5e79d83df510df445c24e24a71
128 byte reads are much more common than 32 byte reads. The message
passing + setup/teardown for a read is much more expensive, in terms
of time, than the reading itself. A slightly bigger struct is well
worth the time savings. This reduces read times for /dev/eeprom
from 57 seconds per 4KB to 14 seconds.
Additionally, make sending the page address in the eeprom driver
and utility optional. This can save a little time when reading
within the same page and allows support for smaller devices that
don't support pages (example: chips containing EDID).
Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43
Implement getrusage.
These fields of struct rusage are not supported and always set to zero at this time
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary context switches */
test75.c is the unit test for this new function
Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539
Clock configuration will be needed by other/future subsystems such as i2c.
Extract the functionality from libgpio and put it into it's own library.
Change-Id: I6f6de0b3fb4d305ddfeac74123b78c983d1318dd
. by making the address and frequency of the
free running clock kinfo members, set at runtime
in the kernel, instead of compile time constants
in libsys
Change-Id: I4a8387302d4d3ffd47d2448525725683a74c9a4f
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
This is a good special case to have as vfs is a slightly
different client from regular user processes. It doesn't do it
for itself, and has the dev & inode info already so the callback
to VFS for the lookup isn't necessary. So it has different info
to have to give to VM.
. libc: also add minix_mmap64() that accepts a 64-bit offset, even
though our off_t is still 32 bit now.
. On exec() time, try to mmap() in the executable if available.
(It is not yet available in this commit.)
. To support mmap(), add do_vm_call that allows VM to lookup
(to ino+dev), do i/o from and close FD's on behalf of other
processes.
Change-Id: I831551e45a6781c74313c450eb9c967a68505932
. add receive hooks in the kernel to print asynchronously
delivered messages
. do not rely on MF_REPLY_PEND to decide between calls and errors,
as that isn't reliable for asynchronous messages; try both instead
. add _sendcall() that extract-mfield.sh can then reliably recognize
the fields for messages that are sent with just send()
. add DEBUG_DUMPIPC_NAMES to restrict printed messages to
from/to given process names
Change-Id: Ia65eb02a69a2b58e73bf9f009987be06dda774a3
The natural term to use when talking about MINIX big pages on ARM
is SECTION. A section is a level 1 page table entry pointing to
a 1MB area.
Change-Id: I9bd27ca99bc772126c31c27a537b1415db20c4a6
libminixfs may now be informed of changes to the block usage on the
filesystem. if the net change becomes big enough, libminixfs may
resize the cache based on the new usage.
. update the 2 FSes to provide this information to libminixfs
Change-Id: I158815a11da801fd5572a8de89c9e6c039b82650
This commit introduces a new request type called REQ_BPEEK. It
requests minor device blocks from the FS. Analogously to REQ_PEEK,
it requests the filesystem to get the requested blocks into its
cache, without actually copying the result anywhere.
Change-Id: If1d06645b0e17553a64b3167091e9d12efeb3d6f
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e.
inode numbers and inode offsets where applicable; and (b) know about
*all* cache blocks, i.e. also of the FS primary caches and not just
the blocks that spill into the secondary one. This changes the
interface and VM data structures.
This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the
secondary cache will be used as normal, blocks will not be annotated
with inode information until the FS is modified to provide this
information. Until it is modified, mmap of files will fail gracefully
on such filesystems.
This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.
Change-Id: I1d2df6c485e6c5e89eb28d9055076cc02629594e
Some (backwards-compatible) changes in mmap() call message fields
that allow for a 64-bit offset. minix_mmap() takes an off_t and
minix_mmap64() takes a u64_t. Some mmap() work in VM goes into a
separate function, using the new fields, so that that can be re-used
when files are to be mapped (future commit).
Change-Id: Ifb77a90b593dd3c33cf81b396068e4da1ec5fb1c
This commit removes the secondary cache code implementation from
VM and its usage from libminixfs. It is to be replaced by a new
implementation.
Change-Id: I8fa3af06330e7604c7e0dd4cbe39d3ce353a05b1
. test70: regression test for m_out vfs race condition
The following tests use testcache.c to generate test i/o
patterns, generate random write data and verify the reads.
. test71: blackbox full-stack test of FS operation, testing
using the regular VFS interface crazy i/o patterns
with various working set sizes, triggering only
primary cache, also secondary cache, and finally
disk i/o and verifying contents all the time
. test72: unit test of libminixfs, implementing
functions it needs from -lsys and -lblockdriver
and the client in order to simulate a working
cache client and backend environment.
. test73: blackbox test of secondary vm cache in isolation
Change-Id: I1287e9753182b8719e634917ad158e3c1e079ceb
Variant of utime(2) with struct timespec (with ns precision)
instead of time_t values; also allows for tv_nsec members
the values UTIME_NOW (force update to current time) or
UTIME_OMIT (allow to set either atim or mtim independently.)
Provides a superset of utimes(2), futimes(2), lutimes(2),
and futimens(2).
Provides the same subset of utimensat(2) as does NetBSD 6.
Also import utimens() and lutimeNS() from NetBSD-current.