Commit graph

76 commits

Author SHA1 Message Date
Jean-Baptiste Boric 69eead77ff New image framework generation
The CD now boots directly from the ISO 9660 filesystem instead of using
MBR partitioning with Minix file systems. This saves some space on the
CD and reduces memory requirements by some unknown amount as the root
ramdisk is completely eliminated.

The x86 hard drive image creation is also rewritten in the same
fashion.

The setup is modified to be more NetBSD-like (unpacking sets
tarballs instead of blindly copying the CD contents). Splitting MINIX
into sets is done in another commit due to it being a nightmare to
rebase.

Since MINIX lacks union mounts for now, a bunch of ramdisks are
generated at run-time to make parts of the filesystem writeable for the
CD. This solution isn't ideal, but it's enough for an installation CD.

Change-Id: Icbd9cca4dafebf7b42c345b107a17679a622d5cd
2015-10-10 19:09:35 +02:00
David van Moolenbroek 7c48de6cc4 Resolve more warnings
Change-Id: Ibc1b7f7cd45ad7295285e59c6ce55888266fece8
2015-09-23 12:04:58 +00:00
David van Moolenbroek d91f738bd8 Kernel: export clock information on kernel page
Please note that this information is for use by system services only!
The clock facility is not ready to be used directly by userland, and
thus, this kernel page extension is NOT part of the userland ABI.

For service programmers' convenience, change the prototype of the
getticks(3) to return the uptime clock value directly, since the call
can no longer fail.

Correct the sys_times(2) reply message to use the right field type
for the boot time.

Restructure the kernel internals a bit so as to have all the clock
stuff closer together.

Change-Id: Ifc050b7bd253aecbe46e3bd7d7cc75bd86e45555
2015-09-23 12:00:46 +00:00
David van Moolenbroek 594df55e53 Abstract away minix_kerninfo access
Instead of importing an external _minix_kerninfo variable, any code
using the shared kernel page should now call get_minix_kerninfo(3).
Since this is the only logical name for such a function, rename the
previous get_minix_kerninfo call to ipc_minix_kerninfo.

Change-Id: I2e424b6fb55aa55d3da850187f1f7a0b7cbbf910
2015-09-21 15:09:04 +00:00
David van Moolenbroek 0d6c408f48 libblockdriver: suspend threads for live update
Same as for VFS.

Change-Id: I0f09d43f24c32361af5e5658923140c79244d3d1
2015-09-17 17:13:52 +00:00
David van Moolenbroek 1aad172900 Make more services use stateful live update
Change-Id: If2e5b8e56fef633e471ec1cbb6e08ce3496ea755
2015-09-17 17:12:02 +00:00
David van Moolenbroek 2867e60add SEF: query VM about holes during state transfer
The 'memory' service has holes in its data section, which causes
problems during state transfer.  Since VM cannot handle page faults
during a multicomponent-with-VM live update, the state transfer must
ensure that no page faults occur during copying.  Therefore, we now
query VM about the regions to copy, thus skipping holes.  While the
solution is not ideal, it is sufficiently generic that it can be used
for the data section state transfer of all processes, and possibly
for state transfer of other regions in the future as well.

Change-Id: I2a71383a18643ebd36956c396fbd22c8fd137202
2015-09-17 13:43:06 +00:00
Cristiano Giuffrida 3f82ac6a4e services: Selectively enable stateful restart.
Change-Id: Ibf6afa3041013ca714e28b673abb1329cd72d2d5
2015-09-17 13:36:01 +00:00
Cristiano Giuffrida 0e78c0166c Switch to stateful restart.
The following services have been updated to support stateful restarts:
 - Drivers: tty
 - Filesystems: isofs, mfs, pfs, libvtreefs-based file servers
 - System servers: tty, ds, pm, vfs, vm

Change-Id: Ie84baa3ba1774047b3ae519808fe4116928edabb
2015-09-17 13:26:22 +00:00
Cristiano Giuffrida 50b7f13f9f Add live update-friendly annotations.
Change-Id: I7d7d79893836a20799ca548a350f3288e92581f0
2015-09-17 13:25:38 +00:00
Cristiano Giuffrida e1f889d228 libsys: Change SEF Live Update state callback API.
The following callbacks are concerned:
 - state_save
 - state_isvalid

Change-Id: I75f71fe162ccd8b23b18cae15f844b79b290a8c1
2015-09-16 11:03:17 +00:00
David van Moolenbroek 8731fd1c47 audio: use standard Makefile structure
The previous approach of including libraries through the parent
directory's Makefile.inc created linking issues, with libchardriver
not finding snprintf in certain cases.  The new approach of including
libraries through the driver's only Makefile is the one used by all
other drivers.

Change-Id: I96e6308e12e54f0fce8ecf58bd061269860d4355
2015-08-08 16:55:03 +00:00
Leonardo Fogel 4796287659 eMMC: add support to 8-bit mode.
Change-Id: I0470130eb5f8de319cd55c448a9aa1b9131e8e07
2015-07-26 15:53:37 +00:00
David van Moolenbroek 818c405ae1 LOG: fix bugs in userland write handler
- report correct number of bytes written;
- correctly return partial writes on failure;
- do not overwrite result if there is a pending read.

Change-Id: I92aeeaee1eccb47c2aa2b6666a2f560c3cb17f42
2015-07-26 11:56:36 +00:00
David van Moolenbroek da32b6c32e orinoco: retire
This code is MPL-licensed and thus does not belong in the MINIX3
source tree.

Change-Id: I10388b05e90e83b95414cf9b469e50f49bc1db31
2015-07-20 16:55:15 +00:00
Lionel Sambuc f837aff6e8 memory: announce presence during startup
Change-Id: Id4724c444bdca9f72fca05edb55d7614eb5c8286
2015-06-29 10:58:01 +00:00
Lionel Sambuc 67b4718325 log: announce presence during startup
Set its restart policy to "reset".

Change-Id: I54f350d9d0d9bc571abd9630f27f4c961c7c0778
2015-06-29 10:57:38 +00:00
David van Moolenbroek da21d85025 Add PTYFS, Unix98 pseudo terminal support
This patch adds support for Unix98 pseudo terminals, that is,
posix_openpt(3), grantpt(3), unlockpt(3), /dev/ptmx, and /dev/pts/.
The latter is implemented with a new pseudo file system, PTYFS.

In effect, this patch adds secure support for unprivileged pseudo
terminal allocation, allowing programs such as tmux(1) to be used by
non-root users as well.  Test77 has been extended with new tests, and
no longer needs to run as root.

The new functionality is optional.  To revert to the old behavior,
remove the "ptyfs" entry from /etc/fstab.

Technical nodes:

o The reason for not implementing the NetBSD /dev/ptm approach is that
  implementing the corresponding ioctl (TIOCPTMGET) would require
  adding a number of extremely hairy exceptions to VFS, including the
  PTY driver having to create new file descriptors for its own device
  nodes.

o PTYFS is required for Unix98 PTYs in order to avoid that the PTY
  driver has to be aware of old-style PTY naming schemes and even has
  to call chmod(2) on a disk-backed file system.  PTY cannot be its
  own PTYFS since a character driver may currently not also be a file
  system.  However, PTYFS may be subsumed into a DEVFS in the future.

o The Unix98 PTY behavior differs somewhat from NetBSD's, in that
  slave nodes are created on ptyfs only upon the first call to
  grantpt(3).  This approach obviates the need to revoke access as
  part of the grantpt(3) call.

o Shutting down PTY may leave slave nodes on PTYFS, but once PTY is
  restarted, these leftover slave nodes will be removed before they
  create a security risk.  Unmounting PTYFS will make existing PTY
  slaves permanently unavailable, and absence of PTYFS will block
  allocation of new Unix98 PTYs until PTYFS is (re)mounted.

Change-Id: I822b43ba32707c8815fd0f7d5bb7a438f51421c1
2015-06-23 17:43:46 +00:00
Leonardo Fogel 07cbc27cb0 Add a driver for the eMMC on the BeagleBone Black
Change-Id: I30ab36ac048c65538718e372db9502fb8f51d41f
2015-06-21 11:04:16 +00:00
rlfnb e1e2bc96d2 handle lack of pckbd more gracefully
kb_init() panics, if no keyboard controller is found during self-test.
Instead of panic, the driver should quit the init process and tell it the SEF .

Change-Id: Icdfb7125f5d4062f46cfbbdbbb9e54ac4b273642
2015-06-15 17:11:29 +02:00
rlfnb 31ba042920 Fix boot if no pckd device is there
Trying to boot Minix3 master on an appliance/sbc like ALIX fails, as
the service command throws an error. Making the rc script more robust
solves it.

Change-Id: I659043cbbaa2d67b70d6d6e5ab14fff8e1bba769
2015-03-23 14:57:06 +01:00
rlfnb 7171c2321f Maybe a broken bios/device setting
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
2015-03-11 13:46:45 +01:00
rlfnb b56a9d4725 ALIX: No pci device at bus 0, dev 0, func 0
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
2015-03-11 13:46:41 +01:00
David van Moolenbroek 75e18fe498 Add 3c90x: 3Com 3C90xB/C network driver
Change-Id: Iba0bbcb3b1b69a7c204abdc81cf3afe59b6bfaae
2015-02-10 13:47:28 +00:00
David van Moolenbroek 2a3bc70264 ACPI: OS-dependent code tweaks
Change-Id: I533685f6716cb48ccf3d5ca5ef0fb681a5293549
2015-02-10 13:47:28 +00:00
David van Moolenbroek 29492bb71c ACPI: upgrade to acpica-unix2-20141107
Change-Id: I96151a2756fd9814bfba180548e8a96dca63ce51
2015-02-10 13:47:27 +00:00
Thomas Goering e1131d9c96 recognize Intel 82540EP LP by e1000
Change-Id: I8868963ba09ce1dffa9416c9ece29c7315dee4cd
2014-12-12 21:28:06 +01:00
Ben Gras 5ae1a533c7 ARM: can build with llvm, switch to EABI
. 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
2014-12-12 13:04:56 +01:00
David van Moolenbroek 5260f07c2c virtio_net: use new libnetdriver
Change-Id: Id06bdb67da12477984b42bbd46623bd8f25c0ab9
2014-12-04 12:10:52 +00:00
David van Moolenbroek d76bd1f07c rtl8169: use new libnetdriver
Change-Id: Ia26b6c440a1525f1d2bb9e7592e357dac0ba602c
2014-12-04 12:10:52 +00:00
David van Moolenbroek 4081bff625 rtl8139: use new libnetdriver
Change-Id: Iba941653b7c052375694bcec2561957c1979feb0
2014-12-04 12:10:51 +00:00
David van Moolenbroek bcc1b08c61 orinoco: use new libnetdriver
Change-Id: I003590539dd76f4be8e067f986bb1f17b151490d
2014-12-04 12:10:51 +00:00
David van Moolenbroek 6315775f16 lance: use new libnetdriver
Change-Id: If3414088e66407c688c4960f99a165b0ee1ebc83
2014-12-04 12:10:51 +00:00
David van Moolenbroek 5af3c2565f lan8710a: use new libnetdriver
Change-Id: Iaee4d75a5dfafc72d94f0b02681f9aea1c9da535
2014-12-04 12:10:50 +00:00
David van Moolenbroek 96e62d65b6 fxp: use new libnetdriver
Change-Id: I03268655a5daff3d109ae52e64673911ef096a3f
2014-12-04 12:10:49 +00:00
David van Moolenbroek 1ad10e3ae0 e1000: use new libnetdriver
Change-Id: I111750d2ca27f01039d0b427b1314aea861e2074
2014-12-04 12:10:49 +00:00
David van Moolenbroek 91c4db251e dpeth: use new libnetdriver
Change-Id: Ic389e54817c5b241dad851c89ef1cf16c015a79b
2014-12-04 12:10:49 +00:00
David van Moolenbroek 3913e49004 dp8390: use new libnetdriver
Change-Id: Ieaf6d605832d475f95fd9b06026b349dce7ee025
2014-12-04 12:10:49 +00:00
David van Moolenbroek 29018b4ecd dec21140A: use new libnetdriver
Change-Id: I54be3b770e4d1fd320200c30e9e9073a7c1b405b
2014-12-04 12:10:48 +00:00
David van Moolenbroek b80fc5be89 atl2: use new libnetdriver
Change-Id: I65de5d29a75d5f3101b2c5ab16a4b0d79bd77cc3
2014-12-04 12:10:48 +00:00
David van Moolenbroek 107df7c8fa e1000: convert to KNF
Change-Id: Ibd156c2e0a58fed70895080d4b230b26c500fa11
2014-12-04 12:10:48 +00:00
David van Moolenbroek 1539606d98 atl2: convert to KNF
Change-Id: Ie4b979aab3127a91a12b8086326da0eb1f9a860b
2014-12-04 12:10:47 +00:00
David van Moolenbroek d1db724f47 libvirtio: expose result size on packet dequeue
Change-Id: I49304678895779849abc2528a9f78730f968e712
2014-12-04 12:10:47 +00:00
David van Moolenbroek a810336026 orinoco: restore register memory mapping
Untested.

Change-Id: I439f0e711e16ba478dadf57ffc8ad74ec19ea1b9
2014-12-04 12:10:47 +00:00
David van Moolenbroek 2e5374621d fxp: enable bus mastering if needed
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
2014-12-04 12:10:47 +00:00
David van Moolenbroek 92293fafd3 e1000: fix unaligned register access
This resolves a guru meditation in recent VirtualBox versions.

Change-Id: I5034d8af1fe885adda3c027cb23563bffaccf97e
2014-12-04 12:10:46 +00:00
David van Moolenbroek cc5b198875 UDS: move from drivers/net/ to net/
Change-Id: I53992b205e767a77c7b3c868a38c7f3d772a4ed3
2014-12-04 12:10:46 +00:00
Ben Gras 3c8950cce9 minix/ changes for arm llvm build
. fixes needed to build Minix/ARM with LLVM without errors,
	  mostly size_t cleanness

Change-Id: If4dd0a23bc5cb399296073920a8940c34b4caef4
2014-12-03 23:40:56 +01:00
David van Moolenbroek b49f4cacde rtl8139: enable bus mastering if needed
This resolves #2.

Change-Id: Ie6736f0d5a713025f09c18de7042ba44fbb1b2f8
2014-11-17 19:23:00 +00:00
David van Moolenbroek 52be5c0afb libvtreefs: API changes/extensions, part 2
- rename start_vtreefs to run_vtreefs, since the function returns upon
  termination these days;
- add get_inode_slots function to retrieve the number of indexed slots;
- add support for extra per-inode data for arbitrary storage.

Change-Id: If2d365d7b478a1cecc9e20fb2b3e70c1a1cf7243
2014-11-12 12:13:43 +00:00