Commit graph

4796 commits

Author SHA1 Message Date
Ben Gras db242ed39d retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00
David van Moolenbroek cf720a028a Test set for sys_vumap()
Located in test/kernel. Invoke "run" to run tests.
2012-03-24 19:51:14 +01:00
David van Moolenbroek b91295a8d2 vm: if mmap address is given, try that first
Previously, the mmap address (if given) was merely used as a lower
bound, and then possibly overriden with a hint. Now, the mapping is
first tried at the exact given address. If that fails, the start of
the mmap range is used as lower bound (which is then still overridden
by the hint for efficiency).

This allows two pages to be mapped in at predefined addresses, where
the second address is lower than the first. That was not possible.
2012-03-24 19:51:14 +01:00
David van Moolenbroek c729ff0050 blocktest: updates for sys_vumap() 2012-03-24 19:51:13 +01:00
David van Moolenbroek 186a4db672 ahci: use sys_vumap() instead of sys_umap()
This is only an optimization for CPU performance. Callers are
currently still required to supply contiguous memory.
2012-03-24 19:51:13 +01:00
David van Moolenbroek 70abb127cc Add sys_vumap() kernel call
This new call is a vectored version of sys_umap(). It supports batch
lookups, non-contiguous memory, faulting in memory, and basic access
checks.
2012-03-24 19:51:13 +01:00
David van Moolenbroek 2a395dd8b4 Kernel: introduce vm_check_range 2012-03-24 19:51:13 +01:00
David van Moolenbroek 08af3f672b Kernel: replace vm_contiguous with vm_lookup_range 2012-03-24 19:51:12 +01:00
Ben Gras 5737b690dc import NetBSD /usr/share/misc/
. for /usr/share/misc/style, NetBSD coding style
	. and for indent.pro (style-compatible indent(1) indenting profile)
2012-03-23 16:27:59 +01:00
David van Moolenbroek f140910d3c Clean up a stale a.out-related declaration 2012-03-19 00:10:18 +01:00
David van Moolenbroek 91a1d11c11 Remove unsupported legacy TIOC[GS]ET[PC] ioctls 2012-03-19 00:09:29 +01:00
Ben Gras 6af9856d4a libcompat_minix-centric cleanup
remove some old minix-userland-specific stuff

	. /etc/ttytab as a file, and minix-compat function (fftyslot()),
	  replaced by /etc/ttys and new libc functions
	. also remove minix-specific nlist(), cuserid(), fttyslot(), v8 regex
	  functions and <compat/regex.h>
	. and remaining minix-only utilities that use them
	. also unused <compat/pwd.h> and <compat/syslog.h> and
	  redundant <sys/sigcontext.h>
2012-03-16 17:06:24 +01:00
Evgeniy Ivanov 9290237811 Bootloader reinstall mode for setup. 2012-03-15 19:06:23 +01:00
Evgeniy Ivanov 72eca0eb1e update_bootcfg improvements.
- Fix a glitch (don't glob '*' in for).
- update_bootcfg should be a /bin command.
- update_bootcfg should not add menu entries for missing kernels.
2012-03-14 18:19:28 +01:00
Andy Kosela 24f1e18846 Import NetBSD cat(1) 2012-03-14 16:54:30 +01:00
Andy Kosela 7e81b07cc5 Import NetBSD ed(1) 2012-03-14 16:52:31 +01:00
Ben Gras d65f6f7009 imported code harmonisation
. common/include/arch/i386 is not actually an imported
	  sys/arch/i386/include but leftover Minix files;
	  remove and move to include/
	. move include/ufs to sys/ufs, where it came from, now that
	  we have a sys/ hierarchy
	. move mdocml/ to external/bsd/, now we have that
	. single sys/arch/i386/stand/ import for boot stuff
2012-03-14 16:02:59 +01:00
Ben Gras 6cdfedc12c tools: some nbsd_ports fixes
. figure out which dates were used for various nbsd imports
	  and specify them for each one in the nbsd_ports file
	. other minor fixes and improvements
2012-03-14 16:02:58 +01:00
Erik van der Kouwe 9e56468d6c sprofalyze forgets a.out and learns that ELF binaries have larger addresses 2012-03-13 11:23:35 +01:00
David van Moolenbroek e8d2d2f6b6 libminc-related updates
- add files needed for acpi, ahci, fbd, vfs to libminc
- remove "-lc" from their respective makefiles
- remove setenv from libminc (requires initialization)
2012-03-12 23:16:45 +01:00
Thomas Veerman 0438b62014 Test48: resolve existing hostname with static IP address 2012-03-09 11:44:03 +00:00
David van Moolenbroek ffaae26145 test48: disable failing resolver test
Temporary, until a better solution comes along.
Also, .xxx is now a valid TLD!
2012-03-09 02:01:03 +01:00
David van Moolenbroek d395035160 libddekit: resolve compiler warnings
Introduced by commit ca95f69.
2012-03-08 23:52:28 +01:00
David van Moolenbroek 457d3884a2 pci: apply ACLs to device reservations 2012-03-08 23:52:17 +01:00
David van Moolenbroek e21c21a31a pci: USER_SPACE cleanup 2012-03-08 23:52:13 +01:00
David van Moolenbroek 291ece0caa drivers: slightly better use of PCI constants
- introduce PCI_BAR_{IO|MEM}_MASK
- remove redundant PCI definitions from lance
- fix vbox BAR retrieval
2012-03-08 23:51:18 +01:00
David van Moolenbroek 5152cfd8bd drivers: remove redundant PCI ID tables
- remove PCI tables where system.conf suffices
- remove drivers' ability to mess up NIC order
- fix dp8390 PCI enumeration
- convert ti1225 to instance model
- add system.conf entry for ti1225
2012-03-07 23:58:00 +01:00
David van Moolenbroek de45264c74 dp8390,ti1225: reenable register memory mapping 2012-03-07 23:57:34 +01:00
David van Moolenbroek 21ed531c8f pci: remove pci_init1 API call 2012-03-07 23:56:08 +01:00
David van Moolenbroek c8b892d835 swifi: modernize a bit
- ELF support
- update of one example script
- warning fixes
2012-03-05 22:41:49 +01:00
David van Moolenbroek 1512dc5c23 Kernel: do not retry message delivery upon failure 2012-03-05 22:38:04 +01:00
David van Moolenbroek ca95f69f25 drivers: resolve compiler warnings 2012-03-05 22:32:55 +01:00
David van Moolenbroek 4aaa5377b3 Import NetBSD du(1) 2012-03-05 22:32:33 +01:00
David van Moolenbroek fecfd07997 mfs: more accurate stat.st_blocks estimation
On MFS file systems, the stat(2) call now counts indirect blocks as
part of the st_blocks calculation, in addition to proper initial
rounding of the file size. The returned value is now a true upper
bound on the actual number of 512-byte blocks allocated to the file.
As before, it is not accurate for sparse files.
2012-03-05 22:32:33 +01:00
David van Moolenbroek 075f839810 mfs: remove legacy stat code 2012-03-05 22:32:32 +01:00
David van Moolenbroek c8c9565a03 Kernel: only reset/reload FPU state when necessary 2012-03-05 22:32:14 +01:00
David van Moolenbroek a615a7d4d2 Kernel: retain FPU state upon save
On the x86, saving FPU state has the side effect of resetting this
state. In some cases (fork, getcontext), this would cause the state
to be lost. This patch restores the FPU state right after saving it,
except when different state is loaded immediately after.
2012-03-05 22:32:14 +01:00
David van Moolenbroek 0a8a2ecfb5 Kernel: pass FPU restore exception to user process
Previously, user processes could cause a kernel panic upon FPU state
restore, by passing bogus FPU state to the kernel (through e.g.
sigreturn). With this patch, the process is now sent a SIGFPE signal
instead.
2012-03-05 22:32:14 +01:00
David van Moolenbroek 4b6a98de5f Kernel: adjust FPU state upon process slot swap
This fixes seemingly random FPU exceptions and kernel panics occurring
after a system server restart.
2012-03-05 22:32:14 +01:00
David van Moolenbroek 831450aacc e1000: add support for 82545EM
Tested on VirtualBox and VMware.
2012-03-05 13:00:06 +01:00
Tomas Hruby fb31513b00 LWIP,NETSOCK - lwip uses asynchronous protocol
- libnetsock - internal implementation of a socket on the lwip
  server side. it encapsulates the asynchronous protocol

- lwip server - uses libnetsock to work with the asynchronous
  protocol
2012-03-02 15:44:48 +00:00
Tomas Hruby 199e9c1907 LWIP fixed Makefile 2012-03-02 15:44:48 +00:00
Tomas Hruby 72b7abd1a1 VFS - no CANCEL for async non-blocking operations
- if an operation (R, W, IOCTL) is non blocking, a flag is set
  and sent to the device.

- nothing changes for sync devices

- asyn devices should reply asap if an operation is non-blocking.
  We must trust the devices, but we had to trust them anyway to
  reply to CANCEL correctly

- we safe sending CANCEL commands to asyn devices. This greatly
  simplifies the protocol. Asynchronous devices can always reply
  when a reply is ready and do not need to deal with other
  situations

- currently, none of our drivers use the flags since they drive
  virtual devices which do not block
2012-03-02 15:44:48 +00:00
Tomas Hruby f19d8df184 VFS : simplification of handling asyn selects
- select_request_async() returns no ops by default

- wantops in do_select() always set correctly, do_select() does
  not need a special case for SUSPEND (and ugly code)
2012-03-02 15:44:48 +00:00
Tomas Hruby 369a12704f VFS - dev_style_asyn()
- dev_style_asyn() tests whether a device is asynchronous

 - simplifies code and helps readability
2012-03-02 15:44:47 +00:00
Tomas Hruby 35eb88461d VFS - cancel_nblock()
- duplicate code in dev_io() which sends CANCEL in case of a
  non-blocking operation moved to cancel_nblock()
2012-03-02 15:44:47 +00:00
Ben Gras 98afd590c4 include netdrv_tg3 on cd 2012-02-26 23:34:59 +01:00
Antoine Leca adb5107e26 Cosmetic boot fix.
The NetBSD boot loader loads automatically the kernel module appropriate
for the detected root file system; it is preset at "ffs".  The MINIX3fs
support does not reset the underlying global variable, since there are
no use for this on MINIX.  As a result, the boot loader searches for
/ffs.kmod, and issues two warnings about "module failure to open/load."
2012-02-24 13:30:09 +01:00