summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/dev_net.c
Commit message (Collapse)AuthorAgeFilesLines
* - Add code allowing a network device to only be open and closed oncemarius2010-01-091-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | by keeping it opened after the first open and closing it via the cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to avoid the open-close-dance on every file access which with firmware that for example performs an auto-negotiation on every open causes netbooting to take horribly long. Basically the behavior with this knob enabled resembles the one employed between r60506 and r177108 (and for sparc64 also again since r182919) with the addition that the network device now is closed eventually before entering the kernel and before rebooting. Actually I think this should be the desired MI behavior, however the U-Boot loader actually requires net_close() to be called after every transaction in order for some local shutdown operations to be performed (and which I think thus will break on concurrent opens, i.e. when netdev_opens is > 1, like the loader does at least for disks when LOADER_GZIP_SUPPORT is enabled). - Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially increased netdev_opens for sparc64 in order to keep the network device opened forever, as at least some firmware versions require the network device to be closed eventually before entering the kernel or otherwise will DMA received packets to stale memory. The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be set as well for the same reasons.
* Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNFmarius2010-01-091-10/+1
| | | | | | license FreeBSD had in sys/boot). Obtained from: NetBSD
* - Consistently wrap debugging in NETIF_DEBUG. This basically mergesmarius2009-12-241-6/+22
| | | | | NetBSD rev 1.19. - Make the functions match their prototypes regarding static.
* Revert r177108 and restore r60506 for sparc64 as long as libstandmarius2008-09-101-0/+3
| | | | | | | | isn't fixed to only open the network device once and not do a open and close dance on every file access; the firmwares of newer sparc64 machines perform an auto-negotiation with every open which in turn causes netbooting to take horribly long if we open and close the device over and over again.
* Show info about net devices in loader's 'lsdev' command. While there fix style.raj2008-09-031-155/+167
|
* Eliminate artificial increasing of 'netdev_opens' counter in loader's ↵raj2008-03-121-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | net_open(). This was introduced as a workaround long time ago for some Alpha firmware (which is now gone), and actually prevented net_close() to ever be called. Certain firmwares (U-Boot) need local shutdown operations to be performed on a network controller upon transaction end: such platform-specific hooks are supposed to be called via netif_close() (from within net_close()). This change effectively reverts the following CVS commit: sys/boot/common/dev_net.c revision 1.7 date: 2000/05/13 15:40:46; author: dfr; state: Exp; lines: +2 -1 Only probe network settings on the first open of the network device. The alpha firmware takes a seriously long time to open the network device the first time. Also suppress excessive output while netbooting via loader, unless debugging. While there, make sys/boot/uboot more style(9) compliant. Reviewed by: imp Approved by: cognet (mentor)
* Change the following environment variables to kernel options:brian2004-07-081-1/+1
| | | | | | | | | | | | | bootp -> BOOTP bootp.nfsroot -> BOOTP_NFSROOT bootp.nfsv3 -> BOOTP_NFSV3 bootp.compat -> BOOTP_COMPAT bootp.wired_to -> BOOTP_WIRED_TO - i.e. back out the previous commit. It's already possible to pxeboot(8) with a GENERIC kernel. Pointed out by: dwmalone
* Change the following kernel options to environment variables:brian2004-07-081-1/+1
| | | | | | | | | | | | | | | | | | BOOTP -> bootp BOOTP_NFSROOT -> bootp.nfsroot BOOTP_NFSV3 -> bootp.nfsv3 BOOTP_COMPAT -> bootp.compat BOOTP_WIRED_TO -> bootp.wired_to This lets you PXE boot with a GENERIC kernel by putting this sort of thing in loader.conf: bootp="YES" bootp.nfsroot="YES" bootp.nfsv3="YES" bootp.wired_to="bge1" or even setting the variables manually from the OK prompt.
* Override the root server address if an IP address is specified iniedowse2003-11-031-7/+9
| | | | | | | | | the root path. This is reported to make non-PXE netbooting, such as is used on sparc64 systems, work correctly when the TFTP server is not the same as the root server. PR: kern/57328 Submitted by: Per Kristian Hove <Per.Hove@math.ntnu.no>
* Use __FBSDID().obrien2003-08-251-3/+5
| | | | Also some minor style cleanups.
* Stash various networking paramters in the environment for the kerneljake2002-07-311-0/+9
| | | | to pick up, ala pxe.
* Give the network device a print method.benno2000-11-101-1/+9
| | | | Reviewed by: obrien
* Add support to send the string 'PXEClient' as the Vendor classps2000-08-111-1/+2
| | | | | | identifier to the DHCP server. Now you can check for this string in your dhcp configuration to decide whether you will hand out a lease to the client or not.
* Fix the more obvious warnings to deal with my earlier warning cleanups.jhb2000-08-031-1/+0
|
* Only probe network settings on the first open of the network device.dfr2000-05-131-0/+1
| | | | | The alpha firmware takes a seriously long time to open the network device the first time.
* * Fix a stack of warnings.dfr1999-09-011-10/+8
| | | | | | * Make it possible to type a filename to boot1 so that it is possible to recover from fatally broken versions of /boot/loader. * Make a start at a CD boot program (not yet functional).
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Changes to support diskless booting on the alpha:dfr1999-05-031-4/+21
| | | | | | | | | | | | * Make the network code in the bootstrap more chatty (helps debugging) * Add nfs root stuff to cpu_rootconf(). I also added a check to make sure it really was netbooting which allows the use of the same kernel for local and network boots. * Tweak the de driver so that it takes the speed setting from the console for the alpha (some PWSs have broken de chipsets). This is the same behaviour as NetBSD/alpha. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* Make the alpha bootstrap build again, fix some warning and change sdboot to ↵dfr1998-09-201-2/+1
| | | | daboot.
* Minor tweaks to track a couple of i386 changes and to make it compile.dfr1998-08-221-6/+2
|
* This is the new unified bootstrap, sometimes known previously as themsmith1998-08-211-0/+275
'three-stage' bootstrap. There are a number of caveats with the code in its current state: - The i386 bootstrap only supports booting from a floppy. - The kernel and kld do not yet know how to deal with the extended information and module summary passed in. - PnP-based autodetection and demand loading of modules is not implemented. - i386 ELF kernel loading is not ready yet. - The i386 bootstrap is loaded via an ugly blockmap. On the alpha, both net- and disk-booting (SRM console machines only) is supported. No blockmaps are used by this code. Obtained from: Parts from the NetBSD/i386 standalone bootstrap.
OpenPOWER on IntegriCloud