Fix dead code block, make surrounding code more readable, and remove
unused mode variable.
closes#20
Change-Id: I802e3d8680d7a7adc7acd580bfcec9dc28af0bc4
Removing the panic leads to exactly one message on ALIX. Both commits
make minix out of the box booting on ALIX devices.
Change-Id: I9210fef79a8736e36b9c42c7925c9f3354c60e7c
Seems like its a kind of convention introduced by Intel but not
mandatory from a PCI specification point of view, that the PCI host
controller resides on bus 0, device 0 function 0. At least tinybios
(the bios used by ALIX and WRAP) based appliances are not able to boot
with this change.
Change-Id: I0e45c68c482972be7276028525985de920cf64f7
Bad logic introduced as part of the fsdriver changes could cause
getdents to terminate early in these libraries.
Issue reported by r0ller.
Change-Id: If450d5ea85e830584878d8a4ec0f00519355a353
We already had a hack to ignore the precision, but the ACPI driver
requires an actual implementation--it prints garbage at the end of
some strings otherwise. This patch adds support for precision for
strings only, limiting printing to the given number of characters.
For all other specifiers, precision is still unsupported.
Change-Id: I1d41fc70a0d0494db695c22ba609262a50b86e08
Previously, the bootloader would only provide a single memory range.
At least on VirtualBox, this memory range includes the ACPI tables,
which the kernel then happily overwrites when executing VM. Much of
the infrastructure to use a fullblown memory map is already in place;
this patch adds the last (and strangely missing) bit of generating
the memory map in a multiboot-compatible way.
It should be noted that both the bootloader and the kernel actually
violate the multiboot specification by not packing the structure for
the memory ranges. This is a NetBSD bug, but it is also a nonissue
for (our) practical purposes. It can be fixed without changing the
code added in this patch.
Change-Id: I7c0a307a8a8133239531e1d2b80f376849f90247
The original one-shot page patch (git-e321f65) did not account for the
possibility of pagefaults happening while copying memory in the
kernel. This allowed a simple cp(1) from vbfs to hang the system,
since VM was repeatedly requesting the same page from the file system.
With this fix, VM no longer tries to fetch the same memory-mapped page
from VFS more than once per memory handling request from the kernel.
In addition to fixing the original issue, this change should make
handling memory somewhat more robust and ever-so-slightly faster.
Test74 has been extended with a simple test for this case.
Change-Id: I6e565f3750141e51b52ec98c938f8e1aa40070d0
This allows the URL used to clone our specific version of u-boot to be
specified in the environment, instead of being hard-coded.
This new flexibility will be required by the new Continuous Integration
infrastructure, whose test nodes are in a network without direct
internet access.
Change-Id: I7440b5bba6786f979623b4509111e4e99c6558f6
. bitcode fixes
. switch to compiler-rt instead of netbsd libc functions
or libgcc for support functions for both x86 and arm
. minor build fixes
. allow build with llvm without crossbuilding llvm itself
. can now build minix/arm using llvm and eabi - without C++
support for now (hence crossbuilding llvm itself is turned off
for minix/arm)
Change-Id: If5c44ef766f5b4fc4394d4586ecc289927a0d6eb
- Expose in procfs the service status and supported recovery policies.
- This adds a test (testrelpol.sh) to exercise the restart policies of
the system services and drivers.
NOTE:
The policy support information is temporarily hardcoded in ProcFS, but
this has to be replaced by properly retrieving this information from
RS, which should in turn be setup on a per service basis, at
initialization time.
Change-Id: I0cb1516a450355b38d0c46b1a8b3d9e841a2c029
The new implementation of this library provides abstractions for
network drivers, and should be used for all network drivers from now
on. It provides the following functionality:
- a function call table abstraction, hiding the details of the
datalink protocol with simple parameters;
- a state machine for sending and receiving packets, freeing the
actual driver from keeping track of pending requests;
- an abstraction for copying data from and to the network driver,
freeing the actual driver from dealing with I/O vectors while at
the same time providing a copy implementation which is more
efficient than most current driver implementations;
- a generalized implementation of zero-copy port-based I/O;
- a clearer set of policies and defaults.
While the concept is very similar to lib{block,char,fs,input}driver,
one main difference is that libnetdriver now also takes care of SEF
initialization, mainly so that aspects such as recovery policies and
live-update aspects can be changed for all network drivers in a
single place. As always, for the case that the provided message loop
is too restrictive, a set of more low-level message processing
functions is provided.
The netdriver API has been designed so as to allow alleviation of one
current protocol bottleneck: the fact that at most one send request
and one receive request may be pending at any time. Changing this
aspect will however require a significant rewrite of libnetdriver,
and possibly debugging of drivers that are not able to cope with (in
particular) queuing multiple packets for transmission at once.
Beyond that, the design of the new API is based on the current
protocol, and may be changed/extended later to allow for non-ethernet
network drivers, exposure of link status, multicast address
configuration, suspend and resume, and any other features that are in
fact long overdue.
Change-Id: I47ec47e05852c42f92af04549d41524f928efec2
This is required for at least QEMU. However, as of writing, QEMU also
requires fixes in its epro100 emulator before this driver can use it.
Change-Id: Ie5c5ffe4311b1a0e581bc687f1c15de3a85f4a30
Bochs has switched from port base 0x240 to 0x300 for its default
NE2000 ISA configuration, and QEMU is using the same settings.
Change-Id: Ide6cdb14321eb4324d0bf6d6314c5970b3493e95
The expected argument name would include the instance number, which
is not only redundant in many cases (FOOETHn_n=arg.., "n" being the
instance number) and conflicted with what netconf(8) does, but some
drivers need to be able to see the arguments for all instances of its
driver type--for example, dp8390 needs to know how many earlier
instances have been configured to use PCI.
Change-Id: I4830b823352722f554a032979464aba8b08fc166
Previously, a TCP option length of zero would cause inet to end up
in an infinite loop.
This resolves#7, reported by Alejandro Hernandez.
Change-Id: I45ad4c789d10d8e202cf6e140a7b9db7a6543c75
After importing the default environment from NetBSD, we discovered that
it doesn't contain /usr/games, which is required for the commands
strfile. This utility is used while generating fortune database.
This patch simply sets TOOL_STRFILE to contain an absolute path.
Change-Id: I2e366a0b67d5258f387c3f5a2a2a581fedead359
The jump-to-start hack is not resetting global variables, resulting in
a crash after several such restarts cause an overflow in the network
table. This patch fixes that particular issue, but more similar
issues (in particular memory leaks) are bound to come up. As such this
is a stopgap measure until we can get rid of the old dhcpd altogether.
This resolves the additional issue reported in #2.
Change-Id: Ic4cd80eae520cf2b97e893bac63b3ab1ecfea6d8
This patch adds (very limited) support for memory-mapping pages on
file systems that are mounted on the special "none" device and that
do not implement PEEK support by themselves. This includes hgfs,
vbfs, and procfs.
The solution is implemented in libvtreefs, and consists of allocating
pages, filling them with content by calling the file system's READ
functionality, passing the pages to VM, and freeing them again. A new
VM flag is used to indicate that these pages should be mapped in only
once, and thus not cached beyond their single use. This prevents
stale data from getting mapped in without the involvement of the file
system, which would be problematic on file systems where file contents
may become outdated at any time. No VM caching means no sharing and
poor performance, but mmap no longer fails on these file systems.
Compared to a libc-based approach, this patch retains the on-demand
nature of mmap. Especially tail(1) is known to map in a large file
area only to use a small portion of it.
All file systems now need to be given permission for the SETCACHEPAGE
and CLEARCACHE calls to VM.
A very basic regression test is added to test74.
Change-Id: I17afc4cb97315b515cad1542521b98f293b6b559