Commit graph

52 commits

Author SHA1 Message Date
David van Moolenbroek
9ba65d2ea8 This patch switches the MINIX3 ethernet driver stack from a port-based
model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.
2010-05-17 22:22:53 +00:00
Cristiano Giuffrida
5a98cd3e92 Fix Inet initialization race. 2010-05-06 22:18:21 +00:00
Cristiano Giuffrida
65ef539739 Driver mapping refactory.
VFS CHANGES:
- dmap table no longer statically initialized in VFS
- Dropped FSSIGNON svrctl call no longer used by INET

INET CHANGES:
- INET announces its presence to VFS just like any other driver

RS CHANGES:
- The boot image dev table contains all the data to initialize VFS' dmap table
- RS interface supports asynchronous up and update operations now
- RS interface extended to support driver style and flags
2010-04-09 21:56:44 +00:00
Cristiano Giuffrida
48c6bb79f4 Driver refactory for live update and crash recovery.
SYSLIB CHANGES:
- DS calls to publish / retrieve labels consider endpoints instead of u32_t.

VFS CHANGES:
- mapdriver() only adds an entry in the dmap table in VFS.
- dev_up() is only executed upon reception of a driver up event.

INET CHANGES:
- INET no longer searches for existing drivers instances at startup.
- A newtwork driver is (re)initialized upon reception of a driver up event.
- Networking startup is now race-free by design. No need to waste 5 seconds
at startup any more.

DRIVER CHANGES:
- Every driver publishes driver up events when starting for the first time or
in case of restart when recovery actions must be taken in the upper layers.
- Driver up events are published by drivers through DS. 
- For regular drivers, VFS is normally the only subscriber, but not necessarily.
For instance, when the filter driver is in use, it must subscribe to driver
up events to initiate recovery.
- For network drivers, inet is the only subscriber for now.
- Every VFS driver is statically linked with libdriver, every network driver
is statically linked with libnetdriver.

DRIVER LIBRARIES CHANGES:
- Libdriver is extended to provide generic receive() and ds_publish() interfaces
for VFS drivers.
- driver_receive() is a wrapper for sef_receive() also used in driver_task()
to discard spurious messages that were meant to be delivered to a previous
version of the driver.
- driver_receive_mq() is the same as driver_receive() but integrates support
for queued messages.
- driver_announce() publishes a driver up event for VFS drivers and marks
the driver as initialized and expecting a DEV_OPEN message.
- Libnetdriver is introduced to provide similar receive() and ds_publish()
interfaces for network drivers (netdriver_announce() and netdriver_receive()).
- Network drivers all support live update with no state transfer now.

KERNEL CHANGES:
- Added kernel call statectl for state management. Used by driver_announce() to
unblock eventual callers sendrecing to the driver.
2010-04-08 13:41:35 +00:00
Ben Gras
76f8132545 dec21140A ethernet driver for virtualpc, contributed by nicolas tittley. 2010-01-26 10:20:18 +00:00
David van Moolenbroek
1489f14b37 Driver for Attansic L2 FastEthernet (atl2) 2009-12-30 22:42:44 +00:00
Ben Gras
26ba254a4a Intel Pro/1000 driver written by Niek Linnenbank. 2009-12-07 18:33:41 +00:00
Ben Gras
207621b6fb rtl8169 driver contributed by Jaswinder Singh Rajput. 2009-12-02 15:59:42 +00:00
Ben Gras
ad4fc01b7b - new entry for bios_wini and ipc
- start ipc server on botting
2009-09-21 14:26:20 +00:00
Philip Homburg
341270673b mfs no longer needs access to VIRCOPY, Added rs.inet. Start inet with
rs.inet as the restart script.
2007-08-15 12:56:35 +00:00
Ben Gras
816f5dd550 a driver for wireless pci cards with the Prism chipset from Intersil
Original version, by Stevens Le Blond and Michael Valkering.
2007-07-24 14:49:09 +00:00
Ben Gras
b857dec78d Don't complain about missing ip address. 2007-02-09 16:28:34 +00:00
Ben Gras
7a0f8e28ba Start nonamed in local mode by default 2006-04-11 13:42:58 +00:00
Ben Gras
103f18cb1f (1) remove ftpd in favour of ftpd200
(2) add /etc/rc.daemons.dist, can be copied to /etc/rc.daemons
    if user wants the standard daemons to run, which are no longer run
    by default
2006-04-11 11:55:45 +00:00
Ben Gras
6137c5898c -f 2006-04-05 09:29:18 +00:00
Ben Gras
7a1853a524 Remove old syslogd.pid at boot time 2006-04-04 16:12:08 +00:00
Ben Gras
ea398f994a Only fiddle with /var/log on cd 2006-04-04 13:44:23 +00:00
Ben Gras
3775ce2eba Fixes for /var/log 2006-04-04 13:31:56 +00:00
Ben Gras
a3dfe3c9a4 Make /var/log writable (in /tmp); start syslogd after that 2006-04-04 11:52:57 +00:00
Ben Gras
14a82e2d05 start syslogd instead of usyslogd ; include syslog.conf 2006-04-03 13:09:47 +00:00
Ben Gras
3e6ec29095 psip fix 2006-03-28 13:38:52 +00:00
Ben Gras
ef676bd39b Set ip address manually without dhcp when psip is set in /etc/inet.conf. 2006-03-28 12:35:33 +00:00
Ben Gras
682efc75e5 Wait longer for ip address (fxp) 2006-03-10 17:33:15 +00:00
Ben Gras
fec2fa95e2 It's not always initialization 2006-02-20 15:11:41 +00:00
Ben Gras
ba667a0774 Don't copy memory to rescue
local package initialization
2006-02-17 16:46:08 +00:00
Ben Gras
093cfe1143 . less verbose cd /usr debugging
. save random data only if /usr is mounted rw, don't display error otherwise
2006-01-18 09:33:09 +00:00
Ben Gras
428f9d63c4 Don't print randomness error when booting from install cd. 2006-01-17 17:57:40 +00:00
Jorrit Herder
2aac756e76 New up() functions in rc scripts. 2005-11-28 15:39:01 +00:00
Jorrit Herder
7a7e680da7 Added periodic checks from RS to drivers. 2005-10-21 14:34:13 +00:00
Ben Gras
75cb21f407 start lance driver too if/when selected 2005-09-08 21:15:11 +00:00
Ben Gras
87732bd6e0 Added rc.cd that gets executed when starting from CD. 2005-08-24 07:33:13 +00:00
Ben Gras
48cb1bcb64 rotate log message 2005-08-12 13:25:27 +00:00
Jorrit Herder
3cb000654a Minor changes. 2005-08-11 13:22:31 +00:00
Ben Gras
94095d8727 Formatting fix for if networking isn't enabled. 2005-08-10 15:19:50 +00:00
Ben Gras
ddb8e7300d Took hostaddr out of the loop; if it fails after 10 secs, continue
startup script. (ast@)
2005-08-08 16:56:40 +00:00
Jorrit Herder
7de7ca978d Security check on physical address to be < 16 MB (ISA DMA uses 24-bit
addressing, which can address 16 MB max).
Floppy driver now dynamically loaded.
2005-08-05 16:23:42 +00:00
Philip Homburg
473317e571 Added dp8390 to /usr/etc/rc. Renamed get_mon_prm.c to env_get_prm.c.
Add env_setargs call for access to argc/argv.
2005-08-05 14:20:05 +00:00
Ben Gras
e21c135fe5 added /sbin in mtree
/usr/etc/rc now reads variables from /usr/etc/rc.local it can feed to
drivers as args
2005-08-05 10:37:02 +00:00
Jorrit Herder
74711a3b14 Check if kernel calls is allowed (from process' call mask) added. Not yet
enforced. If a call is denied, this will be kprinted. Please report any such
errors, so that I can adjust the mask before returning errors instead of
warnings.

Wrote CMOS driver. All CMOS code from FS has been removed. Currently the
driver only supports get time calls. Set time is left out as an exercise
for the book readers ... startup scripts were updated because the CMOS driver
is needed early on. (IS got same treatment.) Don't forget to run MAKEDEV cmos
in /dev/, otherwise the driver cannot be loaded.
2005-08-04 19:23:03 +00:00
Jorrit Herder
8cb902dce3 Fix. Names were not showing. 2005-08-04 17:00:18 +00:00
Jorrit Herder
40e9875fd6 Startup script now checks if network driver is mentioned in inet.conf.
Also allowed disabling daemons (like services) with disable= parameter.
2005-08-04 16:45:29 +00:00
Jorrit Herder
e561081545 Miscellaneous clean ups and fixes to the kernel.
Support for FLOPPY in boot image. (Set controller=fd at boot monitor.)
Moved major device numbers to <minix/dmap.h> (maybe rename to dev.h?)
2005-08-04 09:26:36 +00:00
Philip Homburg
c12b74dad5 Random is now a separate driver. 2005-08-03 15:22:41 +00:00
Jorrit Herder
4a8c5316ec Temporarily disabled FLOPPY to prevent mayhem due to ISA DMA below 16 MB. 2005-08-02 16:05:01 +00:00
Jorrit Herder
0bd61375ad Miscellaneous small fixes to prettify startup output. 2005-08-02 15:56:24 +00:00
Jorrit Herder
61a4e15bb0 Dynamic starting of services. 2005-08-02 15:46:24 +00:00
Philip Homburg
f8c380c195 Small update to random number generator 2005-07-19 12:16:55 +00:00
Jorrit Herder
488b2afc12 System processes started via servers=... boot monitor parameter
are now daemonized (instead of SIGNON procedure at PM).
2005-07-19 12:14:10 +00:00
Ben Gras
42050e39f8 kernel and servers send diagnostic messages to IS; IS sends them to TTY
and the new log driver if enabled.

new usyslogd is started from /usr/etc/rc. New device created by
MAKEDEV.sh. /var/log created by etc/mtree/minix.tree (on root for
now). Made select() slightly more generic, with less code duplication.
2005-07-08 17:30:01 +00:00
Ben Gras
9748a6536e Fixed an mtree bugs that caused permissions and ownerships for / to
be wrong.

Made the install process quieter when install already done.

rc and daily now is more readonly-/usr aware (for cd).
2005-05-03 15:41:02 +00:00