Commit graph

18 commits

Author SHA1 Message Date
Ben Gras 3c7f4e462e 64-bit bdev position
Change-Id: I149693624610e04af0c5e4437b5efa484a33467d
2014-07-28 17:05:10 +02:00
Gerard 78da142dab Replaced common u64.h functions with operators.
Change-Id: I71b7b4879209eeff89ce5748d67102afebf871dc
2014-03-02 12:28:32 +01:00
Lionel Sambuc c3fc9df84a Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
2014-03-01 09:05:01 +01:00
David van Moolenbroek 6700874deb Block drivers: make IOCTL request unsigned long
The block driver protocol and libblockdriver's bdr_ioctl hook are
changed, as well as the users of this hook. Other parts of the system
are expected to change accordingly eventually, since the ioctl(2)
prototype has been aligned with NetBSD's.

Change-Id: Ide46245b22cfa89ed267a38088fb0ab7696eba92
2014-02-19 11:22:15 +01:00
David van Moolenbroek 95624ae072 Block protocol: add user endpoint to IOCTL request
I/O control requests now come with the endpoint of the user process
that initiated the ioctl(2) call. It is stored in a new BDEV_USER
field, which is an alias for BDEV_FLAGS. The contents of this field
are to be used only in highly specific situations. It should be
preserved (not replaced!) by services that forward IOCTL requests,
and may be set to NONE for service-initiated IOCTL requests.

Change-Id: I68a01b9ce43eca00e61b985a9cf87f55ba683de4
2014-02-19 11:22:15 +01:00
David van Moolenbroek 0f7f3c0d54 libblockdriver: various updates
- internal structure rearrangement;
- respond to char device open requests to avoid hanging VFS threads;
- make drivers use designated initializers;
- use devminor_t for all minor device numbers;
- change bdr_other hook to take ipc_status and return nothing;
- fix default geometry computation;
- add support for sef_cancel.

Change-Id: Ia063a136a3ddb2b78de36180feda870605753d70
2014-02-19 11:22:15 +01:00
Gerard f1b0deacf3 Replaced add64, add64u and add64ul with operators.
Change-Id: Ia537f83e15cb686f1b81b34d73596f4298b0a924
2013-11-13 13:11:33 +00:00
Gregg Hernandez 1939870c2e removed some 64-bit functions
Change-Id: Idbafdbf13714f984f03770bd3b39521cb1014cdb
2013-08-05 10:40:26 +02:00
Lionel Sambuc 003ff52ebb Revert "drivers/fbd/action.c: removed some 64-bit functions"
This reverts commit 85e7d849c8.

This introduce a bug in position computing for disk bigger than 4GB.

Change-Id: I281e60e9644d995cc4643006b50c05693f939b44
2013-07-23 19:19:53 +02:00
Gregg Hernandez 85e7d849c8 drivers/fbd/action.c: removed some 64-bit functions
Change-Id: I6a041f7dabad3e849d868c94c4fbd0edb7fc88b7
2013-07-23 11:35:41 +02:00
Ben Gras 456359aa72 retire 64-bit conversion functions
Change-Id: Ib6b81403f877c363a286c654e0524fa1cb781b80
2013-06-24 16:50:57 +02:00
Thomas Cort e67fc5771d libc: add clock_getres()/clock_gettime() system calls.
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.
2013-04-04 15:04:53 +02:00
David van Moolenbroek 8caec1b57b libsys: 64-bit numbers support for printf()
Change some drivers accordingly.
2012-07-26 09:45:05 +00:00
Ben Gras 2bfeeed885 drop segment from safecopy invocations
. all invocations were S or D, so can safely be dropped
	  to prepare for the segmentless world
	. still assign D to the SCP_SEG field in the message
	  to make previous kernels usable
2012-06-16 16:22:51 +00:00
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02: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
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00
David van Moolenbroek e7db2d3588 Add fbd -- Faulty Block Device driver
This driver can be loaded as an overlay on top of a real block
device, and can then be used to generate block-level failures for
certain transfer requests. Specifically, a rule-based system allows
the user to introduce (overt and silent) data corruption and errors.

It exposes itself through /dev/fbd, and a file system can be mounted
on top of it. The new fbdctl(8) tool can be used to control the
driver; see ``man fbdctl'' for details. It also comes with a test
set, located in test/fbdtest.
2011-12-11 22:45:46 +01:00