267655 |
20-Jun-2014 |
gjb |
Remove svn:mergeinfo carried over from stable/9.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
267654 |
20-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
264817 |
23-Apr-2014 |
brueffer |
MFC: r264482
Re-indent break statement.
|
263705 |
25-Mar-2014 |
dteske |
MFC r258270:
Add a try-include word (which acts the same as "include") and use it to conditionally include (but ignore failures) /boot/loader.rc.local and /boot/menu.rc.local -- to make customizing the menu easier.
Reviewed by: alfred Discussed on: -hackers
|
263701 |
25-Mar-2014 |
dteske |
MFC r257650:
Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device.
Discussed on: -current
|
262192 |
18-Feb-2014 |
jhb |
MFC 261517,261520: Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses.
|
261721 |
10-Feb-2014 |
wblock |
MFC r261522:
Describe the use of a freebsd-boot GPT partition, brought up by Scot Hetzel <swhetzel@gmail.com> on the -doc mailing list.
Also modify the Author section to be clear that I wrote the man page, not gptboot.
|
261574 |
07-Feb-2014 |
mav |
MFC r260949: Make comconsole options set before its activation to be remembered.
|
260868 |
18-Jan-2014 |
mav |
MFC r245848 (by jhb): Always update the hw.uart.console hint anytime a change is made to the comconsole setup. Previously the hint would be set when if you set a custom port, but it would not be updated if you later set a custom speed.
Also, leave the hw.uart.console hint mutable so it can be overridden or unset by the user if needed.
|
260497 |
09-Jan-2014 |
dim |
MFC r260334:
Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree.
MFC r260369:
Apply band-aid for 32-bit compat libs failures after r260334: put back -Qunused-arguments for clang for now, until I can figure out a way to make it unneeded in all scenarios. Sorry about the breakage.
|
260291 |
04-Jan-2014 |
dim |
MFC r260095:
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed directly to the linker (LD_FLAGS) from flags passed indirectly, via the compiler driver (LDFLAGS).
This is because several Makefiles under sys/boot/i386 and sys/boot/pc98 use ${LD} directly to link, and the normal LDFLAGS value should not be used in these cases.
|
260096 |
30-Dec-2013 |
dim |
MFC r257532 (by adrian):
Fix this build for clang.
MFC r259730:
To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles:
CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc
In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler.
MFC r259913:
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC r259927:
Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile.
Pointy hat to: dim
|
259485 |
16-Dec-2013 |
andreast |
Fix the outstanding mergeinfo part of r249374.
|
258171 |
15-Nov-2013 |
jhb |
MFC 256293: Sanitize the %eflags returned by BIOS routines. Some BIOS routines enter protected mode and may leave protected-mode-specific flags like PSL_NT set when they return to real mode. This can cause a fault when BTX re-enters protected mode after the BIOS mode returns.
PR: amd64/182740
|
256266 |
10-Oct-2013 |
bdrewery |
MFC r255944:
Use MK_SSP=no after including bsd.own.mk to disable SSP instead of user-knob WITH[OUT]_SSP to avoid hitting an error if user has WITH_SSP in their make.conf. Ports now use this knob.
make[7]: "/usr/src/share/mk/bsd.own.mk" line 466: WITH_SSP and WITHOUT_SSP can't both be set.
Approved by: bapt
|
254146 |
09-Aug-2013 |
dteske |
MFC r242688: Hook in new files menusets.4th and manual.
|
253211 |
11-Jul-2013 |
wblock |
MFC r245910,r247370,r249371,r252492,r252586:
r252586:
Add descriptions to the FILES list, fix some mdoc complaints, move the "neither" entry out of the table in BOOTING.
r252492:
Add a new gptboot(8) man page. Factor out the redundant information in gpart(8) and boot(8), adding references to gptboot(8) in both.
r249371:
Remove kernel options from the SYNOPSIS. They are already documented in the geom(4) manual page SYNOPSIS.
r247370:
Fix typo in EFI GPT GUID.
r245910:
Expand description of how gptboot and gptzfsboot choose a partition for booting.
|
252778 |
05-Jul-2013 |
achim |
MFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID controller families Series 6, 7, 8 and upcoming products.
Approved by: emaste (co-mentor)
|
250248 |
04-May-2013 |
mdf |
MFC r248933:
Use a shared lock for VOP_GETEXTATTR, as it is a read-like operation.
|
250151 |
01-May-2013 |
dim |
MFC r249846:
When rebooting (exiting) from the BTX loader, make sure to restore the GDT from the correct segment, otherwise a triple fault would be caused. In some virtual environments (VMware, VirtualBox, etc) this could lead to a unhandled error or hang in the guest emulation software.
Thanks to avg and jhb for a few hints in the right direction.
Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others)
|
250111 |
30-Apr-2013 |
gnn |
Improve error handling when unwrapping received data.
Submitted by: Rick Macklem
|
248665 |
23-Mar-2013 |
mckusick |
MFC of 246876 and 246877
MFC: 246876:
Add barrier write capability to the VFS buffer interface. A barrier write is a disk write request that tells the disk that the buffer being written must be committed to the media along with any writes that preceeded it before any future blocks may be written to the drive.
Barrier writes are provided by adding the functions bbarrierwrite (bwrite with barrier) and babarrierwrite (bawrite with barrier).
Following a bbarrierwrite the client knows that the requested buffer is on the media. It does not ensure that buffers written before that buffer are on the media. It only ensure that buffers written before that buffer will get to the media before any buffers written after that buffer. A flush command must be sent to the disk to ensure that all earlier written buffers are on the media.
Reviewed by: kib Tested by: Peter Holm
MFC 246877:
The UFS2 filesystem allocates new blocks of inodes as they are needed. When a cylinder group runs short of inodes, a new block for inodes is allocated, zero'ed, and written to the disk. The zero'ed inodes must be on the disk before the cylinder group can be updated to claim them. If the cylinder group claiming the new inodes were written before the zero'ed block of inodes, the system could crash with the filesystem in an unrecoverable state.
Rather than adding a soft updates dependency to ensure that the new inode block is written before it is claimed by the cylinder group map, we just do a barrier write of the zero'ed inode block to ensure that it will get written before the updated cylinder group map can be written. This change should only slow down bulk loading of newly created filesystems since that is the primary time that new inode blocks need to be created.
Reported by: Robert Watson Reviewed by: kib Tested by: Peter Holm
|
248626 |
22-Mar-2013 |
mckusick |
MFS of 246289:
For UFS2 i_blocks is unsigned. The current "sanity" check that it has gone below zero after the blocks in its inode are freed is a no-op which the compiler fails to warn about because of the use of the DIP macro. Change the sanity check to compare the number of blocks being freed against the value i_blocks. If the number of blocks being freed exceeds i_blocks, just set i_blocks to zero.
Reported by: Pedro Giffuni (pfg@)
|
247111 |
21-Feb-2013 |
mav |
MFC r230590 (by ken) except parts changing ABI: Add CAM infrastructure to allow reporting when a drive's long read capacity data changes.
|
245258 |
10-Jan-2013 |
ae |
MFC r244750: Add net.link.stf.permit_rfc1918 sysctl variable. It can be used to allow the use of private IPv4 addresses with stf(4).
MFC r244752: Add an ability to set net.link.stf.permit_rfc1918 from the loader.
|
244999 |
03-Jan-2013 |
gnn |
MFC: 234930
Fix so that ,usr and ,os work correctly with fixed function (IAF) counters.
|
243989 |
07-Dec-2012 |
gnn |
MFC: 238366, 240924
Initial commit of an I/O provider for DTrace on FreeBSD.
These probes are most useful when looking into the structures they provide, which are listed in io.d. For example:
dtrace -n 'io:kernel::start { printf("%d\n", args[0]->bio_bcount); }'
Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently different that there is not a 1:1 mapping from scripts that work with one to the other.
This commit includes the fix so that our probes use "kernel" instead of the Solaris specific "genunix"
|
243243 |
18-Nov-2012 |
ae |
MFC 239054,239057,239058,239060,239066,239067,239068,239070,239073, 239087,239088,239127,239210,239211,239230,239231,239232,239243, 239292,239293,239294,239325,240272,240273,240274,240275,240276, 240277,240335,240481,241023,241047,241053,241065,241068,241069, 241070,241164,241809,241876
239054: Create the interface to work with various partition tables from the loader(8). The following partition tables are supported: BSD label, GPT, MBR, EBR and VTOC8. 239057: Remove unused variables. 239058: Introduce new API to work with disks from the loader's drivers. It uses new API from the part.c to work with partition tables. 239060: When GPT signature is invalid in the primary GPT header, then try to read backup GPT header. 239066: Add offset field to the i386_devdesc structure to be compatible with disk_devdesc structure. Update biosdisk driver to the new disk API. 239067: Remove unneeded flag. 239068: Teach the ZFS use new partitions API when probing. Note: now ZFS does probe only for partitions with type "freebsd-zfs" and "freebsd". 239070: Add simple test program that uses the partition tables handling code. It is useful to test and debug how boot loader handles partition tables metadata. 239073: Bump USERBOOT_VERSION. 239087: Add to the debug output the offset from the parent partitioning scheme. 239088: Fix start offset calculation for the EBR partitions. 239127: As it turned out, there are some installations, where BSD label contains partitions with type zero. And it has worked. So, allow detect these partitions. 239210: Add more debug messages. 239211: Add another debug message. 239230: Unbreak booting from the true dedicated disks. When we open the disk, check the type of partition table, that has been detected. If this is BSD label, then we assume this is DD mode. 239231: Remove colons from the debug message, device name returned by the disk_fmtdev() already has the colons. 239232: Restore the old behaviour. If requested partition is a BSD slice, but d_partition isn't explicitly set, then try to open BSD label and its first partition. 239243: After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing in sys/boot/i386/libi386/biosdisk.c. Otherwise, when DISK_DEBUG is enabled, the DEBUG() macros will clobber those fields, and cause the probing to always fail mysteriously when debugging is enabled. 239292: Explicitly terminate the string after strncpy(3). 239293: Rework r239232 to unbreak ZFS detection on MBR slices. 239294: Some BIOSes return incorrect number of sectors, make checks less strictly, to do not lost some partitions. 239325: Add comment why the code has been disabled. 240272: Make struct uboot_devdesc compatible with struct disk_devdesc. 240273: Use disk_fmtdev() and disk_parsedev() functions from the new DISK API. 240274: Update uboot's disk driver to use new DISK API. 240275: Build disk.c only when DISK_SUPPORT is enabled. 240276: Update according to the change of struct uboot_devdesc. 240277: Handle LOADER_NO_DISK_SUPPORT knob in the arm and powerpc ubldr. 240335: Slightly reduce an overhead for the open() call in the zfsloader. libstand(3) tries to detect file system in the predefined order, but zfsloader usually is used for the booting from ZFS, and there is no need to try detect several file system types for each open() call. 240481: The MBR data is not necessarily aligned. This is a problem on ARM. 241023: Make the loader a bit smarter, when it tries to open disk and the slice number is not exactly specified. When the disk has MBR, also try to read BSD label after ptable_getpart() call. When the disk has GPT, also set d_partition to 255. Mostly, this is how it worked before. 241047: Disable splitfs support, since we aren't support floppies for a long time. This slightly reduces an overhead, when loader tries to open file that doesn't exist. 241053: Almost each time when loader opens a file, this leads to calling disk_open(). Very often this is called several times for one file. This leads to reading partition table metadata for each call. To reduce the number of disk I/O we have a simple block cache, but it is very dumb and more than half of I/O operations related to reading metadata, misses this cache.
Introduce new cache layer to resolve this problem. It is independent and doesn't need initialization like bcache, and will work by default for all loaders which use the new DISK API. A successful disk_open() call to each new disk or partition produces new entry in the cache. Even more, when disk was already open, now opening of any nested partitions does not require reading top level partition table. So, if without this cache, partition table metadata was read around 20-50 times during boot, now it reads only once. This affects the booting from GPT and MBR from the UFS. 241065: Fix disk_cleanup() to work without DISK_DEBUG too. 241068: Reduce the number of attempts to detect proper kld format for the amd64 loader. 241069: Remember the file format of the last loaded module and try to use it for next files. 241070: Fix the style. 241164: Replace all references to loader_callbacks_v1 with loader_callbacks. 241809: Add the flags parameter to the disk_open() function and DISK_F_NOCACHE flag, that disables the caching of partition tables metadata. Use this flag for floppies in the libi386/biosdisk driver. 241876: When loader tries to open GPT partition, but partition table is not GPT, then try automatically detect an appropriate partition type.
|
243219 |
18-Nov-2012 |
avg |
MFC r241785: boot: use -march=i386 for both i386 and amd64 builds
|
243217 |
18-Nov-2012 |
avg |
MFC r243025: boot: use packed attribute for edd_params* structures
|
242907 |
12-Nov-2012 |
dim |
MFC r242804:
Shrink boot2 by 8 bytes, by eliminating some unneeded instructions in sio.S. This is not particularly needed for head right now, but it is intended to merge to stable/9, to fix boot2 build with clang there.
Reviewed by: avg
|
242562 |
04-Nov-2012 |
avg |
MFC r241301: add detection of serial console presence to btx and boot2-like blocks
|
242561 |
04-Nov-2012 |
avg |
MFC r241300: i386 comconsole: don't loop forever if hardware doesn't respond
|
242243 |
28-Oct-2012 |
avg |
MFC r241294: zfsboot: simplify probe_drive() a little bit
|
242241 |
28-Oct-2012 |
avg |
MFC r241293: zfs boot: export boot/primary pool and vdev guid all the way to kenv
|
242232 |
28-Oct-2012 |
avg |
MFC r241284: zfs boot: add lszfs command to i386 loader
|
242224 |
28-Oct-2012 |
avg |
MFC r241288: zfsboot: use the same zfs dataset naming format as loader
|
241681 |
18-Oct-2012 |
marius |
MFC: r239864
- Unlike cache invalidation and TLB demapping IPIs, reading registers from other CPUs doesn't require locking so get rid of it. As the latter is used for the timecounter on certain machine models, using a spin lock in this case can lead to a deadlock with the upcoming callout(9) rework. - Merge r134227/r167250 from x86: Avoid cross-IPI SMP deadlock by using the smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation and TLB demapping IPIs. - Mark some unused function arguments as such.
|
241256 |
06-Oct-2012 |
avg |
MFC r240341,240637: loader/i386: replace ugly inb/outb re-implementations with cpufunc.h
|
241222 |
05-Oct-2012 |
jh |
MFC r239257:
Reserve room for the terminating NUL when setting or getting kernel environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include space for the terminating NUL.
|
241194 |
04-Oct-2012 |
rmacklem |
MFC: r240720 Modify the NFSv4 client so that it can handle owner and owner_group strings that consist entirely of digits, interpreting them as the uid/gid number. This change was needed since new (>= 3.3) Linux servers reply with these strings by default. This change is mandated by the rfc3530bis draft. Reported on freebsd-stable@ under the Subject heading "Problem with Linux >= 3.3 as NFSv4 server" by Norbert Aschendorff on Aug. 20, 2012.
|
241112 |
01-Oct-2012 |
jhb |
MFC 239779: Shorten the name of the fast SWI taskqueue to "fast taskq" so that it fits.
|
241110 |
01-Oct-2012 |
jhb |
MFC 239008,239020: Improve the handling of static DMA buffers that use non-default memory attributes (currently just BUS_DMA_NOCACHE): - Don't call pmap_change_attr() on the returned address, instead use kmem_alloc_contig() to ask the VM system for memory with the requested attribute. - As a result, always use kmem_alloc_contig() for non-default memory attributes, even for sub-page allocations. This requires adjusting bus_dmamem_free()'s logic for determining which free routine to use. - For x86, add a new dummy bus_dmamap that is used for static DMA buffers allocated via kmem_alloc_contig(). bus_dmamem_free() can then use the map pointer to determine which free routine to use. - For powerpc, add a new flag to the allocated map (bus_dmamem_alloc() always creates a real map on powerpc) to indicate which free routine should be used.
Note that the BUS_DMA_NOCACHE handling in powerpc is currently #ifdef'd out. I have left it disabled but updated it to match x86.
|
241109 |
01-Oct-2012 |
jhb |
MFC 239771: Fix misspelled "Infiniband".
|
240977 |
26-Sep-2012 |
rmacklem |
MFC: r240289 Add a simple printf() based debug facility to the new nfs client. Use it for a printf() that can be harmlessly generated for mmap()'d files. It will be used extensively for the NFSv4.1 client. Debugging printf()s are enabled by setting vfs.nfs.debuglevel to a non-zero value. The higher the value, the more debugging printf()s.
|
240217 |
07-Sep-2012 |
thomas |
Merge rev. 239673 from head to stable/9: (g_multipath_rotate): Fix algorithm so that it does rotate over all good providers, not just the last two.
|
240159 |
06-Sep-2012 |
thomas |
MFC: merge rev. 239012 from head to stable/9 New command "gmultipath prefer" to force selection of a specified provider in an Active/Passive configuration.
|
239920 |
30-Aug-2012 |
jhb |
MFC 239128: Don't try to stop the IPMI watchdog timer if it is not running. Starting or stopping the IPMI watchdog is rather expensive with the current implementation as all IPMI requests are bounced via thread. This is not viable during shutdown or dumps, and this avoids headache in the common case that the watchdog is not enabled. The IPMI watchdog should probably be reworked to not use a separate thread to fix this in the case when the watchdog timer is enabled.
|
239917 |
30-Aug-2012 |
jhb |
MFC 239103: Explicitly enable busmastering on PCI-PCI bridges. Transactions initiated on the secondary side of a bridge will not be propagated to the primary bus unless this is enabled. Busmastering is not enabled by default (we have relied on firmware to set this bit to date). The OS needs to set it for any bridges not configured by system firmware.
|
239915 |
30-Aug-2012 |
jhb |
MFC 238424: Make the interval timings for EVFILT_TIMER more accurate. tvtohz() always adds an extra tick to account for the current partial clock tick. However, that is not appropriate for a repeating timer when the exact tvtohz() value should be used for subsequent intervals. Fix repeating callouts for EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the fix used in realitexpire() for interval timers.
While here, update a few comments to note that if the EVFILT_TIMER code were to move out of kern_event.c, it should move to kern_time.c (where the interval timer code it mimics lives) rather than kern_timeout.c.
|
239914 |
30-Aug-2012 |
jhb |
MFC 238311: Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h> on x86 and use that to implement stop_emulating() in the fpu/npx code. Reimplement start_emulating() in the non-XEN case by using load_cr0() and rcr0() instead of the 'lmsw' and 'smsw' instructions. Intel explicitly discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in the description of these instructions in Volume 2 of the ADM.
|
239882 |
29-Aug-2012 |
jhb |
MFC 238142,238179: Now that our assembler supports the xsave family of instructions, use them natively rather than hand-assembled versions. For xgetbv/xsetbv, add a wrapper API to deal with xcr* registers: rxcr() and load_xcr().
|
239880 |
29-Aug-2012 |
jhb |
MFC 238310: Partially revert r217515 so that the mem_range_softc variable is always present on x86 kernels. This fixes the build of kernels that include 'device acpi' but do not include 'device mem'.
|
239879 |
29-Aug-2012 |
jhb |
MFC 238109,238166: Several fixes to the amd64 disassembler: - Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and 'rdtscp' instructions. - Add generic support for opcodes that are escape bytes used for multi-byte opcodes (such as the 0x0f prefix). Use this to replace the hard-coded 0x0f special case and add support for three-byte opcodes that use the 0x0f38 prefix. - Decode all Intel VMX instructions. invept and invvpid in particular are three-byte opcodes that use the 0x0f38 escape prefix. - Rework how the special 'SDEP' size flag works such that the default instruction name (i_name) is the instruction when the data size prefix (0x66) is not specified, and the alternate name in i_extra is used when the prefix is included. - Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses between i_name and i_extra based on the address size prefix (0x67). Use this to fix the decoding for jrcxz vs jecxz which is determined by the address size prefix, not the operand size prefix. Also, jcxz is not possible in 64-bit mode, but jrcxz is the default instruction for that opcode. - Add support for handling instructions that have a mandatory 'rep' prefix (this means not outputting the 'repe ' prefix until determining if it is used as part of an opcode). Make 'pause' less of a special case this way. - Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions but with a REX.W prefix.
|
239874 |
29-Aug-2012 |
jhb |
MFC 238000,239584: Honor db_pager_quit in 'show malloc', 'show uma', and 'show witness'.
|
239866 |
29-Aug-2012 |
jhb |
MFC 238077: Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver. The new driver changed the size of the mfi_dcmd_frame structure in such a way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer is treated as the buffer length. mfi_user_command() doesn't have a bounds check on the buffer length, so it passes a really big value to malloc() which panics when it tries to exhaust the kmem_map. Fix this two ways: - Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set, otherwise treat it as an unknown ioctl. - Add a bounds check on the buffer length passed by the user. For now it fails any user attempts to use a buffer larger than 1MB.
While here, fix a few other nits: - Remove an unnecessary check for a NULL return from malloc(M_WAITOK). - Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.
|
239821 |
29-Aug-2012 |
jhb |
MFC 237338: Don't return an error if a kld does not contain any modules (e.g. a kld that only contained a sysctl). The kernel linker allows such modules, so the boot loader should not reject them.
|
239787 |
28-Aug-2012 |
jhb |
MFC 230782,237274: Refine the implementation of POSIX_FADV_NOREUSE to perform POSIX_FADV_DONTNEED requests on the currently accessed portion of the file on each read(2) or write(2) rather than using direct I/O. This gives much better performance including read-ahead and write clustering similar to normal read(2) and write(2) calls.
If subsequent read(2) and write(2) calls are sequential, then the POSIX_FADV_DONTNEED requests will cover the entire sequentially-accessed range.
|
239748 |
27-Aug-2012 |
jhb |
MFC 233040,233198,233870,234183: Add OFED and the associated options and drivers to x86 LINT builds: - Fix build with INET6 disabled. - Fix build of OFED bits with debugging options enabled. - Fix build on i386. - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled).
|
239662 |
24-Aug-2012 |
jhb |
MFC 233872: Add descriptions after the 'device' line for several NICs to match the existing style.
|
239565 |
22-Aug-2012 |
mdf |
MFC r238502:
Fix a bug with memguard(9) on 32-bit architectures without a VM_KMEM_MAX_SIZE.
The code was not taking into account the size of the kernel_map, which the kmem_map is allocated from, so it could produce a sub-map size too large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely and base the memguard map's size off the kernel_map's size, since this is always relevant and always smaller.
Found by: Justin Hibbits
|
239483 |
21-Aug-2012 |
marius |
MFC: r239079
Merge r236494 from x86:
Isolate the global TTE list lock from data and other locks to prevent false sharing within the cache.
|
238916 |
30-Jul-2012 |
jhb |
MFC 238164: Add another PS/2 keyboard PNP ID. This ID is listed as "Reserved by Microsoft" in the standard PNP ID table, but has been seen in the wild on at least one laptop.
Approved by: re (kib)
|
238904 |
30-Jul-2012 |
marius |
Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe all diskN aliases for providers (which more or less corresponds to how the x86 version behaves) but instead probe only those listed in the boot-device OFW environment variable. This has the following advantages: - avoids otherwise unavoidable OFW warnings about failures to open disks for which aliases exist but no actual hardware is connected - avoids issues due to different diskN naming schemes - aligns us with Solaris
Approved by: re (kib)
|
238689 |
22-Jul-2012 |
marius |
MFC: r238621
Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user data introduced in r236061 (MFC'ed to stable/9 in r237186). Using that flag doesn't make that much sense on this case as the DMA maps using it are also created during sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing so may exhaust the bounce pages pool on architectures requiring bounce pages. [1] While at it, use a slightly more appropriate maxsegsz parameter.
PR: 169526 Submitted by: Mike Watters [1] Approved by: re (kib)
|
238047 |
03-Jul-2012 |
thompsa |
MFC r237852
Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed.
PR: kern/169557
|
238017 |
02-Jul-2012 |
marius |
MFC: r237547
Fix size of the bcopy when extracting ethernet address
Obtained from: DragonFly
|
238013 |
02-Jul-2012 |
marius |
MFC: r237546
Correct sizeof usage
Obtained from: DragonFly
|
238012 |
02-Jul-2012 |
marius |
MFC: r237842
Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4).
|
237995 |
02-Jul-2012 |
bms |
Merge r237736 from HEAD: Kick the current-state report timer when a V1 group report would be triggered.
Submitted by: rpaulo@
|
237992 |
02-Jul-2012 |
bms |
Merge r237735 from HEAD: Fix a typo in MLD query exponent processing.
Submitted by: rpaulo@
|
237990 |
02-Jul-2012 |
bms |
Merge r237734 from HEAD: In MLDv2 general query processing, do not enforce the strict check on query origins.
Submitted by: Gu Yong
|
237839 |
30-Jun-2012 |
avg |
MFC r236503: free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG
|
237822 |
29-Jun-2012 |
jhb |
MFC 235024,235029,235556,235834,235845: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior.
|
237815 |
29-Jun-2012 |
marius |
MFC: r236581
The loaddev environment variable is not modifiable once set, so it is not update for ZFS. It seems that this does not really affect anything except the help command. Nevertheless, rearrange things so loaddev is set only once in all cases in order to get it right. Pointed out by: avg
|
237812 |
29-Jun-2012 |
dim |
MFC r235281:
Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219. This file uses .code16 directives, which are not yet supported by clang's integrated assembler.
|
237805 |
29-Jun-2012 |
jhb |
MFC 233191: Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int' count of pages overflowed on 64-bit platforms. While here, change vm_object_madvise() to accept two vm_pindex_t parameters (start and end) rather than a (start, count) tuple to match other VM APIs as suggested by alc@.
|
237803 |
29-Jun-2012 |
jhb |
MFC 237334: Move the per-thread deferred user map entries list into a private list in vm_map_process_deferred() which is then iterated to release map entries. This avoids having a nested vm map unlock operation called from the loop body attempt to recuse into vm_map_process_deferred(). This can happen if the vm_map_remove() triggers the OOM killer.
|
237797 |
29-Jun-2012 |
jhb |
MFC 237008,237271,237272,237673: - Fix a couple of bugs that prevented windows in PCI-PCI bridges from growing "downward" (moving the start address down). First, an off by one error caused the end address to be moved down an extra alignment chunk unnecessarily. Second, when aligning the new candidate starting address, the wrong bits were masked off. - Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in pcib_grow_window(). - For subtractively decoding bridges, don't try to grow windows but pass the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box.
|
237771 |
29-Jun-2012 |
avg |
MFC r235390: zfs boot code: mark spa_t arguments as const where they are used as such
|
237770 |
29-Jun-2012 |
avg |
MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC
|
237767 |
29-Jun-2012 |
avg |
MFC r235330: zfs boot: try to set vfs.root.mountfrom from currdev as a fallback
|
237766 |
29-Jun-2012 |
avg |
MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing filesystems within a pool
|
237763 |
29-Jun-2012 |
avg |
MFC r235264: MFi386: improve argument passing via btxldr
|
237761 |
29-Jun-2012 |
avg |
MFC r235219: cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants
|
237760 |
29-Jun-2012 |
avg |
MFC r235156: i386 zfsloader: rename LIBZFS to LIBZFSBOOT
|
237758 |
29-Jun-2012 |
avg |
MFC r235155: i386 boot: consolidate MAXBDDEV definition
|
237756 |
29-Jun-2012 |
avg |
MFC r235154,r235158: btxldr: future-proof argument passing from boot1/2-ish to loader
|
237752 |
29-Jun-2012 |
avg |
MFC r235153: sys/boot: add common CTASSERT definition
|
237731 |
28-Jun-2012 |
jhb |
MFC 228161,230774,230822,236415: Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER).
|
237727 |
28-Jun-2012 |
jhb |
MFC 236405: Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S.
|
237725 |
28-Jun-2012 |
jhb |
MFC 236404: Extend VERBOSE_SYSINIT to also print out the name of variables passed to SYSINIT routines if they can be resolved via symbol look up in DDB. To avoid false positives, only honor a name if the symbol resolves exactly to the pointer value (no offset).
|
237719 |
28-Jun-2012 |
jhb |
MFC 234494: Include the associated wait channel message for context switch ktrace records. kdump supports both the old and new messages.
|
237670 |
27-Jun-2012 |
thompsa |
MFC r236178
if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row
|
237669 |
27-Jun-2012 |
thompsa |
MFC r236062
Turn LACP debugging from a compile time option to a sysctl, it is very handy to be able to turn it on when negotiation to a switch misbehaves.
|
237663 |
27-Jun-2012 |
jhb |
MFC 233925,236357: Add new ktrace records for the start and end of VM faults. This gives a pair of records similar to syscall entry and return that a user can use to determine how long page faults take. The new ktrace records are enabled via the 'p' trace type, but are not enabled in the default set of trace points.
|
237543 |
25-Jun-2012 |
rmacklem |
MFC: r237244 Fix the NFSv4 client for the case where mmap'd files are written, but not msync'd by a process. A VOP_PUTPAGES() called when VOP_RECLAIM() happens will usually fail, since the NFSv4 Open has already been closed by VOP_INACTIVE(). Add a vm_object_page_clean() call to the NFSv4 client's VOP_INACTIVE(), so that the write happens before the NFSv4 Open is closed. kib@ suggested using vgone() instead and I will explore this, but this patch fixes things in the meantime. For some reason, the VOP_PUTPAGES() is still attaempted in VOP_RECLAIM(), but having this fail doesn't cause any problems except a "stateid0 in write" being logged.
|
237534 |
24-Jun-2012 |
rmacklem |
MFC: r237200 Move the nfsrpc_close() call in ncl_reclaim() for the NFSv4 client to below the vnode_destroy_vobject() call, since that is where writes are flushed.
|
237491 |
23-Jun-2012 |
marius |
MFC: r231616, r232497, r234337
Add __aeabi_read_tp function required for thread-local storage.
|
237444 |
22-Jun-2012 |
gnn |
MFC 230063 Clean up a switch statement for uncore events on Westmere processors.
Submitted by: Davide Italiano Reviewed by: gnn
|
237388 |
21-Jun-2012 |
marius |
MFC: r231617
Add ARM relocations types used for thread-local storage
Reviewed by: cognet
|
237386 |
21-Jun-2012 |
marius |
MFC: r235348, r236191, r236497
Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently, all integrated and on-board peripherals except NAND Flash (missing NAND framework/integration) are working.
|
237384 |
21-Jun-2012 |
marius |
MFC: r236496
- Loop up to 3 seconds when waiting for a device to get ready. [1] - Make the device description match the driver name. - Identify the chip variant based on the JEDEC and use that information to use the proper values for page count, offset and size instead of hardcoding a AT45DB642x with 2^N byte page support disabled. - Take advantage of bioq_takefirst(). - Given that CONTINUOUS_ARRAY_READ_HF (0x0b) command isn't even mentioned in Atmel's DataFlash Application Note, as suggested by the previous comment may not work on all all devices and actually doesn't properly on at least AT45DB321D (JEDEC 0x1f2701), rewrite at45d_task() to use CONTINUOUS_ARRAY_READ (0xe8) for reading instead. This rewrite is laid out in a way allowing to easily add support for BIO_DELETE later on. - Add support for reads and writes not starting on a page boundary. - Verify the flash content after writing. - Let at45d_task() gracefully handle errors on SPI transfers and the device not becoming ready afterwards again. [1] - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1]
Additional testing by: Ian Lepore
Submitted by: Ian Lepore [1]
|
237382 |
21-Jun-2012 |
marius |
MFC: r237239
Revert the part of r236495 (MFC'ed to stable/9 in r237095) that introduced checking of SPI_SR_TXEMPTY for TX transfer completion as for reasons unknown this occasionally causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise. In any case, once the RX part of the transfer is done it's obvious that the preceding TX part had finished and checking of SPI_SR_TXEMPTY was introduced to rule out a possible cause for the data corruption mentioned in r236495 but which didn't turn out to be the problem anyway.
|
237380 |
21-Jun-2012 |
marius |
MFC: r230242, r237102, r237236
- Add support for the FT2232 based egnite Turtelizer 2 JTAG/RS232 Adapter. This includes adding support for skipping FTDI interfaces used for JTAG leaving them for userland and just attaching to the RS232 half, similarly to how the corresponding Linux drivers handles these kind of adapters. While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because uftdi_probe() alters the instance variables for better or worse as do other probe routines of USB drivers) instead of 0. - Remove duplicated entries for BeagleBone. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Remove some stray lines.
|
237352 |
21-Jun-2012 |
mckusick |
MFC of 236937
In softdep_setup_inomapdep() we may have to allocate both inodedep and bmsafemap dependency structures in inodedep_lookup() and bmsafemap_lookup() respectively. The setup of these structures must be done while holding the soft-dependency mutex. If the inodedep is allocated first, it may be freed in the I/O completion callback when the mutex is released to allocate the bmsafemap. If the bmsafemap is allocated first, it may be freed in the I/O completion callback when the mutex is released to allocate the inodedep.
To resolve this problem, bmsafemap_lookup has had a parameter added that allows a pre-malloc'ed bmsafemap to be passed in so that it does not need to release the mutex to create a new bmsafemap. The softdep_setup_inomapdep() routine pre-malloc's a bmsafemap dependency before acquiring the mutex and starting to build the inodedep with a call to inodedep_lookup(). The subsequent call to bmsafemap_lookup() is passed this pre-allocated bmsafemap entry so that it need not release the mutex if it needs to create a new one.
Reported by: Peter Holm Tested by: Peter Holm
|
237351 |
21-Jun-2012 |
mckusick |
MFC of 236825
When synchronously syncing a device (MNT_WAIT), wait for buffers to become available. Otherwise we may excessively spin and fail with ``fsync: giving up on dirty''.
Reviewed by: kib Tested by: Peter Holm
|
237343 |
20-Jun-2012 |
rnoland |
MFC r236246
Add device ids for the Winbond 83627DHG-P chip and set the registers to trigger the keyboard reset line on timeout.
|
237342 |
20-Jun-2012 |
rnoland |
MFC r236245
Fix a typo in wbwd so that CRF5 is actually written to the data register rather than the index register.
|
237191 |
17-Jun-2012 |
marius |
MFC: r237107
- As a baind-aid, disable ATAPI DMA when using ATA_CAM for these controllers as well as it causes the kernel to hang during boot. Reported and tested by: Kevin Oberman - Use NULL instead of 0 for a pointer.
|
237188 |
17-Jun-2012 |
marius |
MFC: r230179
BeagleBone uses an FTDI chip with an altered Product ID.
|
237186 |
17-Jun-2012 |
marius |
MFC: r237101
Fix a braino in r236469 (MFC'ed to stable/9 in r236468); the number of DMA tags required for handling MAXPHYS should be based on PAGE_SIZE rather than SYM_CONF_DMA_BOUNDARY. While at it, reuse the SYM_CONF_MAX_SG macro for specifying the maximum number of DMA tags so sym(4) itself doesn't size memory beyond what's required for handling MAXPHYS.
PR: 168928
|
237103 |
14-Jun-2012 |
thompsa |
MFC r236916
Fix a panic I introduced in r234487, the bridge softc pointer is set to null early in the detach so rearrange things not to explode.
Reported by: David Roffiaen, Gustau Perez Querol
|
237095 |
14-Jun-2012 |
marius |
MFC: r236495
- Prepend the device description with "AT91" to reflect its nature. [1] - Move DMA tag and map creature to at91_spi_activate() where the other resource allocation also lives. [1] - Flesh out at91_spi_deactivate(). [1] - Work around the "Software Reset must be Written Twice" erratum. - For now, run the bus at the slowest speed possible in order to work around data corruption on transit even seen with 9 MHz on ETHERNUT5 (15 MHz maximum) and AT45DB321D (20 MHz maximum). This also serves as a poor man's work-around for the "NPCSx rises if no data data is to be transmitted" erratum of RM9200. Being able to use the appropriate bus speed would require: 1) Adding a proper work-around for the RM9200 bug consisting of taking the chip select control away from the SPI peripheral and managing it directly as a GPIO line. 2) Taking the maximum frequencies supported by the actual board and the slave devices into account and basing the whole thing on the master clock instead of hardcoding a divisor as previously done. 3) Fixing the above mentioned data corruption. - KASSERT that TX/RX command and data sizes match on transfers. - Introduce a mutex ensuring that only one child device is running a SPI transfer at a time. [1] - Add preliminary, #ifdef'ed out support for setting the chip select. [1] - Use the RX instead of the TX commando size when setting up the RX side of a transfer. - For controllers having SPI_SR_TXEMPTY, i.e. !RM9200, also wait for the completion of the TX part of transfers before stopping the whole thing again. - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1, partially]
Additional testing by: Ian Lepore
Submitted by: Ian Lepore [1]
|
237093 |
14-Jun-2012 |
marius |
MFC: r225882
Remove pointless semicolons after label
|
237091 |
14-Jun-2012 |
marius |
MFC: r236579
The workaround added in r151650 for handling firmwares that don't allow a single device to be opened multiple times concurrently unfortunately isn't sufficient with ZFS. This is due to the fact, that ZFS may open different partitions of a single device simultaneously. So the best we can do in this case is to cache the lastly used device path and close and open devices in ofwd_strategy() as needed.
PR: 165025 Submitted by: Gavin Mu
|
236887 |
11-Jun-2012 |
rmacklem |
MFC: r235381 Fix two cases in the new NFS server where a tsleep() is used, when the code should actually protect the tested variable with a mutex. Since the tsleep()s had a 10sec timeout, the race would have only delayed the allocation of a new clientid for a client. The sleeps will also rarely occur, since having a callback in progress when a client acquires a new clientid, is unlikely. in practice, since having a callback in progress when a fresh clientid is being acquired by a client is unlikely.
|
236702 |
07-Jun-2012 |
yongari |
MFC r236371: Remove unnecessary device_printfs.
|
236698 |
06-Jun-2012 |
jhb |
MFC 233760: Export some more useful info about shared memory objects to userland via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size.
|
236683 |
06-Jun-2012 |
jhb |
MFC 228509,228620,228533: Add a helper API to allow in-kernel code to map portions of shared memory objects created by shm_open(2) into the kernel's address space. This provides a convenient way for creating shared memory buffers between userland and the kernel without requiring custom character devices.
|
236642 |
05-Jun-2012 |
marius |
MFC: r236491
Add missing prototypes. While at it, sort them alphabetically.
|
236641 |
05-Jun-2012 |
marius |
MFC: r236488
Take advantage of nitems().
|
236631 |
05-Jun-2012 |
marius |
MFC: r236486
Add nitems(), a macro for determining the number of elements in a statically-allocated array.
Obtained from: OpenBSD (in principle)
MFC: r236489
|
236518 |
03-Jun-2012 |
marius |
MFC: r233666
Fix build after changes to trap headers.
|
236511 |
03-Jun-2012 |
marius |
MFC: r233635
Allow multiple inclusion of trap.h. This has always been broken, but until recently never caused problems.
|
236484 |
02-Jun-2012 |
marius |
MFC: r236328
Try to finally get the point in time at which bge_add_sysctls() is called right; it needs to be called before bge_can_use_msi() but in turn requires bge_flags to be properly set.
Submitted by: yongari
|
236481 |
02-Jun-2012 |
avg |
MFC r235829: vm_pager_object_lookup: small performance optimization
|
236479 |
02-Jun-2012 |
marius |
MFC: r236156
- Fix some typos in mmc_acquire_bus() and mmc_send_csd(). - Fix some math errors in mmc_decode_csd_sd(). - Fix incorrect arguments to mmc_send_app_op_cond() in mmc_go_discovery(). - Add reporting of CSD for debug purposes. - Add detection (and skipping) of password-locked cards. - Add setting of block length on card if necessary.
Submitted by: Patrick Kelsey
|
236477 |
02-Jun-2012 |
marius |
MFC: r236070
Consistently use USB_PAGE_SIZE. Currently, this is cosmetic.
|
236475 |
02-Jun-2012 |
marius |
MFC: r236069, r236073
Make the VIA workaround actually do its intended job.
|
236473 |
02-Jun-2012 |
marius |
MFC: r236063
Remove extraneous empty lines.
|
236472 |
02-Jun-2012 |
marius |
Revert changes accidentally committed as part of r236468.
|
236468 |
02-Jun-2012 |
marius |
MFC: r236061
- When creating the DMA tag for user data, don't ask for more segments than required for handling MAXPHYS and report the resulting maximum I/O size to CAM instead of implicitly limiting it to DFLTPHYS. - Move the variables of sym_action2() out of nested scope as required by style(9) and remove extraneous curly braces. - Replace a magic value for PCIR_COMMAND with the appropriate macro. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
Tested with a HBA donated by wilko.
|
236464 |
02-Jun-2012 |
avg |
MFC r235391: i386 bootinfo: re-arrange EFI fields for natural alignment and packing
|
236413 |
01-Jun-2012 |
gallatin |
MFC 236212:
Update mxge(4) firmware to the latest version available from Myricom (1.4.55).
Sponored by: Myricom, Inc.
|
236320 |
30-May-2012 |
jhb |
MFC 235833: Only check to see if a memory resource is a PCI ROM BAR when activating and deactivating PCI resources. Previously, if a device had more than 48 MSI interrupts, then activating message 48 (which has a rid == PCIR_BIOS) would incorrectly try to enable the PCI ROM BAR.
|
236318 |
30-May-2012 |
jhb |
MFC 234501: The amr(4) firmware contains a rather dubious "feature" where it assumes for small buffers (< 64k) that the OS driver is actually using a buffer rounded up to the next power of 2. It also assumes that the buffer is at least 4k in size. Furthermore, there is at least one known instance of megarc sending a request with a 12k buffer where the firmware writes out a 24k-ish reply.
To workaround the data corruption triggered by this "feature", ensure that buffers for user commands use a minimum size of 32k, and that buffers between 32k and 64k use a 64k buffer.
|
236316 |
30-May-2012 |
jhb |
MFC 234099: Properly parse 40G media types from newer Mellanox adapters that are 40G capable. For now, map all 40G links to 40GBase-CR4.
|
236218 |
29-May-2012 |
yongari |
MFC r235821: Don't force max payload size to 128. Root complex and Endpoint will negotiate with each other on the TLP payload size so blindly forcing the size to 128 can cause a completion error which in turn will stop device.
Reported by: Geans Pin < geanspin <> broadcom dot com >
|
236216 |
29-May-2012 |
yongari |
MFC r235816: Make IPMI work in the bce driver even when the interface is configured down. Formerly, IPMI communication was lost whenever the interface was not up. The reason was that the BCE_EMAC_MODE register was not configured with the correct media settings. There are two parts to the fix.
First, resetting the chip in bce_reset() causes the BCE_EMAC_MODE register to be initialized to a default value that does not necessarily correspond to the actual media settings. The fix implemented here is a bit of a hack. Ideally, at the end of bce_reset() we would poll the PHY to determine the negotiated media, and then we would set the BCE_EMAC_MODE register accordingly. That is difficult, since the PHY is abstracted behind the MII layer and is not supposed to be queried directly from the MAC driver. Instead, we read the BCE_EMAC_MODE register at the beginning of bce_reset() and then restore its media bits to their original values before returning. If IPMI is up and running, then the link is already established and the BCE_EMAC_MODE register is already set appropriately when bce_reset() is called. If IPMI is not running, no harm is done by preserving the BCE_EMAC_MODE settings. The driver will set the register properly once the interface is configured up and link is established.
Second, bce_miibus_statchg() is sometimes called when the link is down. In that case, the reported media settings are invalid. Formerly, the driver used them anyway to setup the BCE_EMAC_MODE register. We now avoid changing any MAC registers unless link is active and the reported media settings are valid.
Submitted by: jdp Tested by: jdp
|
236164 |
27-May-2012 |
mckusick |
MFC of 235610
Add missing `continue' statement at end of case.
Found by: Kevin Lo (kevlo@)
|
236134 |
27-May-2012 |
rmacklem |
MFC: r234740 Fix a leak of namei lookup path buffers that occurs when a ZFS volume is exported via the new NFS server. The leak occurred because the new NFS server code didn't handle the case where a file system sets the SAVENAME flag in its VOP_LOOKUP() and ZFS does this for the DELETE case.
|
236096 |
26-May-2012 |
rmacklem |
MFC: r235332 PR# 165923 reported intermittent write failures for dirty memory mapped pages being written back on an NFS mount. Since any thread can call VOP_PUTPAGES() to write back a dirty page, the credentials of that thread may not have write access to the file on an NFS server. (Often the uid is 0, which may be mapped to "nobody" in the NFS server.) Although there is no completely correct fix for this (NFS servers check access on every write RPC instead of at open/mmap time), this patch avoids the common cases by holding onto a credential that recently opened the file for writing and uses that credential for the write RPCs being done by VOP_PUTPAGES() for both NFS clients.
|
236089 |
26-May-2012 |
marius |
MFC: r234524
o Fixes: - When switching to 4-bit operation, send a SET_CLR_CARD_DETECT command to disconnect the card-detect pull-up resistor from the DAT3 line before sending the SET_BUS_WIDTH command. - Add the missing "reserved" zero entry to the mantissa table used to decode various CSD fields. This was causing SD cards to report that they could run at 30 MHz instead of the maximum 25 MHz mandated in the spec. o Enhancements: - At the MMC layer, format various info from the CID into a string that uniquely identifies the card instance (manufacturer number, serial number, product name and revision, etc). Export it as an instance variable. - At the MMCSD layer, display the formatted card ID string, and also report the clock speed of the hardware (not the card's max speed), and the number of bits and number of blocks per transfer. It comes out like this now: mmcsd0: 968MB <SD SD01G 8.0 SN 276886905 MFG 08/2008 by 3 SD> at mmc0 22.5MHz/4bit/128-block o Use DEVMETHOD_END. o Use NULL instead of 0 for pointers.
PR: 156496 Submitted by: Ian Lepore
|
236088 |
26-May-2012 |
marius |
MFC: r234901
- Add missing locking in at91_usart_getc(). - Align the RX buffers on the cache line size, otherwise the requirement of partial cache line flushes on every are pretty much guaranteed. [1] - Make the code setting the RX timeout match its comment (apparently, start and stop bits were missed in the previous calculation). [1] - Cover the busdma operations in at91_usart_bus_{ipend,transmit}() with the hardware mutex, too, so these don't race against each other. - In at91_usart_bus_ipend(), reduce duplication in the code dealing with TX interrupts. - In at91_usart_bus_ipend(), turn the code dealing with RX interrupts into an else-if cascade in order reduce its complexity and to improve its run-time behavior. - In at91_usart_bus_ipend(), add missing BUS_DMASYNC_PREREAD calls on the RX buffer map before handing things over to the hardware again. [1] - In at91_usart_bus_getsig(), used a variable of sufficient width for storing the contents of USART_CSR. - Use KOBJMETHOD_END. - Remove an unused header.
Submitted by: Ian Lepore [1] Reviewed by: Ian Lepore
|
236085 |
26-May-2012 |
marius |
MFC: r234561
Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value.
PR: 160431 Submitted by: Ian Lepore
|
236084 |
26-May-2012 |
marius |
MFC: r234560
- Add support for MCI1 revision 2xx controllers and a work-around for their "Data Write Operation and number of bytes" erratum. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
|
236082 |
26-May-2012 |
marius |
MFC: r234293
Generate an obviously missing STOP when having finished transmitting data. This fixes communication with PCF8563.
|
236081 |
26-May-2012 |
marius |
MFC: r234291, r234292
Add support for the Atmel SAM9XE family of microcontrollers, which consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip flash. Tested with SAM9XE512.
|
236080 |
26-May-2012 |
marius |
MFC: r234281
- Try to bring these files closer to style(9). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
|
236078 |
26-May-2012 |
marius |
MFC: r234248
Add a driver for the NXP (Philips) PCF8563 RTC.
Obtained from: NetBSD (pcf8563reg.h)
|
236076 |
26-May-2012 |
marius |
MFC: r234898, r235207
Add initial support for booting from ZFS on sparc64. At least on Sun Fire V100, the firmware is known to be broken and not allowing to simultaneously open disk devices, causing attempts to boot from a mirror or RAIDZ to cause a crash. This will be worked around later. The firmwares of newer sun4u models don't seem to exhibit this problem though.
PR: 165025 Submitted by: Gavin Mu
|
236074 |
26-May-2012 |
thompsa |
MFC r234936 (emaste)
Relax restriction on direct tx to child ports
Lagg(4) restricts the type of packet that may be sent directly to a child port, to avoid undesired output from accidental misconfiguration. Previously only ETHERTYPE_PAE was permitted.
BPF writes to a lagg(4) child port are presumably intentional, so just allow them, while still blocking other packets that should take the aggregation path.
PR: kern/138620
|
236071 |
26-May-2012 |
thompsa |
MFC r231130 (pjd)
Allow to set if_bridge(4) sysctls from /boot/loader.conf.
|
236054 |
26-May-2012 |
thompsa |
MFC r235147
Do not reinitialise the interface if it is already running, this prevents the bootp+nfs code from working as it calls init on each dhcp send and rx fails to start in time.
|
236053 |
26-May-2012 |
thompsa |
MFC r235144
The DEVICE_POLLING dereference of sc->tsec_ifp needs to be checked for null first or this will panic. Condense three blocks that check sc->tsec_ifp into one while I am here.
|
236052 |
26-May-2012 |
thompsa |
MFC r234488
Move the interface media check to a taskqueue, some interfaces (usb) sleep during SIOCGIFMEDIA and we were holding locks.
|
236051 |
26-May-2012 |
thompsa |
MFC r234487
Add linkstate to bridge(4), set the link to up when at least one underlying interface is up, otherwise the link is down.
This, among other things, allows carp to work on a bridge.
|
236050 |
26-May-2012 |
thompsa |
MFC r234163
Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets are discarded, this is an issue because lacp drops the lock which may allow network threads to access freed memory. Expand the lock coverage so the detach/attach happen atomically.
Submitted by: Andrew Boyer (earlier version)
|
236049 |
26-May-2012 |
thompsa |
MFC r232629,r232640
Add the ability to set which packet layers are used for the load balance hash calculation.
|
236048 |
26-May-2012 |
thompsa |
MFC r232118
Only look for a usable MAC address for the bridge ID from ports within our bridge, this allows us to have more than one independent bridge in the same STP domain.
PR: kern/164369 Submitted by: Nikos Vassiliadis (earlier version)
|
236047 |
26-May-2012 |
thompsa |
MFC r232014,r232030,r232070
- bstp_input() always consumes the packet so remove the mbuf handling dance around it. - Now that network interfaces advertise if they support linkstate notifications we do not need to perform a media ioctl every 15 seconds. - Indicate this function decrements the timer as well as testing for expiry.
|
236021 |
25-May-2012 |
marius |
MFC: r235681
Rewrite nd6_sysctl_{d,p}rlist() to avoid misaligned accesses to char arrays casted to structs by getting rid of these buffers entirely. In r169832, it was tried to paper over this issue by 32-bit aligning the buffers. Depending on compiler optimizations that still was insufficient for 64-bit architectures with strong alignment requirements though. While at it, add comments regarding the total lack of locking in this area.
Tested by: bz Reviewed by: bz (slightly earlier version), yongari (earlier version)
|
235997 |
25-May-2012 |
marius |
MFC: r234897
Add a command for showing the heap usage.
PR: 165025 Submitted by: Gavin Mu
|
235995 |
25-May-2012 |
marius |
MFC: r234789
Add multiple inclusion protection.
PR: 165025 Submitted by: Gavin Mu
|
235992 |
25-May-2012 |
marius |
MFC: r234348
Turn on PREEMPTION by default. After fixing several bugs over time, the last show-stopper keeping PREEMPTION from being usable on sparc64 should have been dealt with in r230662 (MFC'ed to stable/9 in r230662). At least on 2-way systems, PREEMPTION causes a little bit of a degradation in worldstone performance. However, FreeBSD seems to have started building up regressions in !PREEMPTION cases so sparc64 better should not be an oddball in this regard.
|
235906 |
24-May-2012 |
rmacklem |
MFC: r235568 A problem with the NFSv4 server was reported by Andrew Leonard to freebsd-fs@, where the setfacl of an NFSv4 acl would fail. This was caused by the VOP_ACLCHECK() call for ZFS replying EOPNOTSUPP. After discussion with rwatson@, it was determined that a call to VOP_ACLCHECK() before doing VOP_SETACL() is not required. This patch fixes the problem by deleting the VOP_ACLCHECK() call.
|
235818 |
23-May-2012 |
yongari |
MFC r235151: Implement basic remote PHY support. Remote PHY allows the controller to perform MDIO type accesses to a remote transceiver using message pages defined through MRBE(multirate backplane ethernet). It's used in blade systems(e.g Dell Blade m610) which are connected to pass-through blades rather than traditional switches. This change directly manipulates firmware's mailboxes to control remote PHY such that it does not use mii(4). Alternatively, as David said, it could be implemented in brgphy(4) by creating a fake PHY and let brgphy(4) do necessary mii accesses and bce(4) can implement mailbox accesses based on the type of brgphy(4)'s mii accesses. Personally, I think it would make brgphy(4) hard to maintain since it would have to access many bce(4) registers in brgphy(4). Given that there are users who are suffering from lack of remote PHY support, it would be better to get working system rather than waiting for complete/perfect implementation.
|
235764 |
22-May-2012 |
jhb |
MFC 234098: Add media types for 40G media that might be used with FreeBSD.
|
235763 |
22-May-2012 |
jhb |
Repair mergeinfo from merges done into a sparse checkout.
|
235741 |
21-May-2012 |
jhb |
MFC 234190,234196,234280: - Extend the KDB interface to add a per-debugger callback to print a backtrace for an arbitrary thread (rather than the calling thread). A kdb_backtrace_thread() wrapper function uses the configured debugger if possible, otherwise it falls back to using stack(9) if that is available. - Replace a direct call to db_trace_thread() in propagate_priority() with a call to kdb_backtrace_thread() instead.
|
235627 |
18-May-2012 |
jhb |
Move mergeinfo from sys/kern/subr_witness.c up to sys/.
|
235626 |
18-May-2012 |
mckusick |
MFC of 234386, 234400, 234441, 234443, 234482, 234483, 235052, 235241, 235246, and 235619
MFC: 234386
Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. The primary changes are that the user of the interface no longer needs to manage the mount-mutex locking and that the vnode that is returned has its mutex locked (thus avoiding the need to check to see if its is DOOMED or other possible end of life senarios).
To minimize compatibility issues for third-party developers, the old MNT_VNODE_FOREACH interface will remain available so that this change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH will be removed in head.
The reason for this update is to prepare for the addition of the MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point).
Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
MFC: 234400
Drop export of vdestroy() function from kern/vfs_subr.c as it is used only as a helper function in that file. Replace sole call to vbusy() with inline code in vholdl(). Replace sole calls to vfree() and vdestroy() with inline code in vdropl().
The Clang compiler already inlines these functions, so they do not show up in a kernel backtrace which is confusing. Also you cannot set their frame in kgdb which means that it is impossible to view their local variables. So, while the produced code is unchanged, the debugging should be easier.
Discussed with: kib MFC after: 2 weeks
MFC: 234441
Fix a memory leak of M_VNODE_MARKER introduced in 234386.
Found by: Peter Holm
MFC: 234443
Delete a no longer useful VNASSERT missed during changes in 234400.
Suggested by: kib
MFC: 234482
This change creates a new list of active vnodes associated with a mount point. Active vnodes are those with a non-zero use or hold count, e.g., those vnodes that are not on the free list. Note that this list is in addition to the list of all the vnodes associated with a mount point.
To avoid adding another set of linkage pointers to the vnode structure, the active list uses the existing linkage pointers used by the free list (previously named v_freelist, now renamed v_actfreelist).
This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point).
Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
MFC: 234483
This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point to replace MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync routines.
The vfs_msync routine is run every 30 seconds for every writably mounted filesystem. It ensures that any files mmap'ed from the filesystem with modified pages have those pages queued to be written back to the file from which they are mapped.
The ffs_lazy_sync and qsync routines are run every 30 seconds for every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine ensures that any files that have been accessed in the previous 30 seconds have had their access times queued for updating in the filesystem. The qsync routine ensures that any files with modified quotas have those quotas queued to be written back to their associated quota file.
In a system configured with 250,000 vnodes, less than 1000 are typically active at any point in time. Prior to this change all 250,000 vnodes would be locked and inspected twice every minute by the syncer. For UFS/FFS filesystems they would be locked and inspected six times every minute (twice by each of these three routines since each of these routines does its own pass over the vnodes associated with a mount point). With this change the syncer now locks and inspects only the tiny set of vnodes that are active.
Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
MFC: 235052 (by pluknet)
Fix mount mutex handling missed in r234386.
MFC: 235241 (by pluknet)
Fix mount interlock oversights from the previous change in r234386.
Reported by: dougb Submitted by: Mateusz Guzik <mjguzik at gmail com> Reviewed by: Kirk McKusick Tested by: pho
MFC: 235246
Fix mount mutex handling missed in r234386.
MFC: 235619
Update comment to document that the vnode free-list mutex needs to be held when updating mnt_activevnodelist and mnt_activevnodelistsize.
|
235620 |
18-May-2012 |
jhb |
MFC 234186 If a linker file contains at least one module, but all of the modules fail to load (the MOD_LOAD event fails) during a kldload(2), unload the linker file and fail the kldload(2) with ENOEXEC.
|
235612 |
18-May-2012 |
jhb |
MFC 234182: Don't update if_obytes when transmitting packets. That is already done in IFQ_HANDOFF() when the packet is passed to the start routine, so doing it here resulted in double counting.
|
235564 |
17-May-2012 |
jhb |
MFC 235563: Don't expose i386-only ptrace constants on amd64. This broke gdb with libthread_db on amd64.
|
235522 |
16-May-2012 |
jhb |
MFC 234152: Allow device_busy() and device_unbusy() to be invoked while a device is being attached. This is implemented by adding a new DS_ATTACHING state while a device's DEVICE_ATTACH() method is being invoked. A driver is required to not fail an attach of a busy device. The device's state will be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked busy during DEVICE_ATTACH()
|
235515 |
16-May-2012 |
jhb |
MFC 233709,233781,233793: - Don't malloc() new MCA records for machine checks logged due to a CMCI or MC# exception. Instead, use a pre-allocated pool of records. When a CMCI or MC# exception fires, schedule a task to refill the pool. The pool is sized to hold at least one record per available machine bank, and one record per CPU. This should handle the case of all CPUs triggering a single bank at once as well as the case a single CPU triggering all of its banks. The periodic scans still use malloc() since they are run from a safe context. - Make machine check exception logging more readable. On newer Intel systems, an uncorrected ECC error tends to fire on all CPUs in a package simultaneously and the current printf hacks are not sufficient to make the messages legible. Instead, use the existing mca_lock spinlock to serialize calls to mca_log() and change the machine check code to panic directly when an unrecoverable error is encoutered rather than falling back to a trap_fatal() call in trap() (which adds nearly a screen-full of logging messages that aren't useful for machine checks).
|
235480 |
15-May-2012 |
avg |
MFC r230643: stop_scheduler -> td_stopsched
|
235449 |
14-May-2012 |
jh |
MFC r234489:
The value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP from setfflags() in this case. This fixes the return value of chflags(path, -1).
|
235423 |
14-May-2012 |
yongari |
MFC r235119: Restore jumbo frame configuration which was broken in r218423.
Submitted by: Andrey Zonov <andrey <> zonov dot org > (initial version) Tested by: Andrey Zonov <andrey <> zonov dot org >
|
235422 |
14-May-2012 |
marius |
MFC: r235255
- Change the module order of these MAC drivers to be last so they are deterministically handled after the corresponding PHY drivers when loaded as modules. Otherwise, when these MAC/PHY driver pairs are compiled into a single module probing the PHY driver may fail. This makes r151438 and r226154 actually work. [1] Reported and tested by: yongari (fxp(4)) - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
Submitted by: jhb [1]
|
235413 |
13-May-2012 |
avg |
MFC r229854: enable stop_scheduler_on_panic by default
|
235411 |
13-May-2012 |
avg |
MFC r228765: ukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code
|
235410 |
13-May-2012 |
avg |
MFC r228760: adapt usb transfer code for SCHEDULER_STOPPED
|
235409 |
13-May-2012 |
avg |
MFC r228767: sc_cngrab: switch to console vty when possible
|
235408 |
13-May-2012 |
avg |
MFC r228644: syscons: provide a first iteration of cngrab/cnungrab implementation
|
235407 |
13-May-2012 |
avg |
MFC r228633,228634,228638,228642,228643: introduce cngets, a method for kernel to read a string from console
|
235406 |
13-May-2012 |
avg |
MFC r228632: introduce cngrab/cnungrab stub calls in some places where they make sense
|
235405 |
13-May-2012 |
avg |
MFC r228631: kern cons: introduce infrastructure for console grabbing by kernel
|
235404 |
13-May-2012 |
avg |
MFC r228424,228448: panic: add a switch and infrastructure for stopping other CPUs in SMP case
|
235397 |
13-May-2012 |
rmacklem |
MFC: r234742 It was reported via email that some non-FreeBSD NFS servers do not include file attributes in the reply to an NFS create RPC under certain circumstances. This resulted in a vnode of type VNON that was not usable. This patch adds an NFS getattr RPC to nfs_create() for this case, to fix the problem. It was tested by the person that reported the problem and confirmed to fix this case for their server.
|
235260 |
11-May-2012 |
attilio |
MFC r233961,234074,234105,234564,234723,234989,235231-235232: - Fix a bug in x86 and sparc64 where the intr cpu mask does only enables the BSP. - Remove the SMP constraints for intr_add_cpu
|
235131 |
07-May-2012 |
jh |
MFC r234104:
Apply changes from r233787 to ext2fs:
- Use more natural ip->i_flags instead of vap->va_flags in the final flags check. - Style improvements.
No functional change intended.
MFC r234139:
Restore the blank line incorrectly removed in r234104.
|
235010 |
04-May-2012 |
jh |
MFC r233875: Add a check for unsupported file flags to ufs_setattr().
|
234929 |
02-May-2012 |
jh |
MFC r233787:
- Use more natural ip->i_flags instead of vap->va_flags in the final flags check. - Add a comment for the immutable/append check done after handling of the flags. - Style improvements.
No functional change intended.
MFC r234421:
The part about exec atime no longer applies in the comment.
|
234771 |
28-Apr-2012 |
alc |
MFC r234038 If a page belonging a reservation is cached, then mark the reservation so that it will be freed to the cache pool rather than the default pool. Otherwise, the cached pages within the reservation may be recycled sooner than necessary.
|
234766 |
28-Apr-2012 |
alc |
MFC r234039 Fix mincore(2) so that it reports PG_CACHED pages as resident.
|
234765 |
28-Apr-2012 |
alc |
MFC r233097 With the changes over the past year to how accesses to the page's dirty field are synchronized, there is no need for pmap_protect() to acquire the page queues lock unless it is going to access the pv lists.
|
234764 |
28-Apr-2012 |
alc |
MFC r234554 Updates to the vm_page's flags no longer require the page queues lock.
|
234763 |
28-Apr-2012 |
alc |
MFC r232166 Simplify vm_mmap()'s control flow.
Add a comment describing what vm_mmap_to_errno() does.
|
234679 |
25-Apr-2012 |
avg |
MFC r234339: zfsboot: honor -q if it's present in boot.config
|
234677 |
25-Apr-2012 |
avg |
MFC r234338: intpm: add ATI IXP400 pci id
PR: kern/136762
|
234673 |
25-Apr-2012 |
avg |
MFC r234208: add actual interrupt counters to back ipi_invlcache_counts
|
234671 |
25-Apr-2012 |
avg |
MFC r234207: bump INTRCNT_COUNT values to reflect actual numbers of IPI counters
|
234593 |
23-Apr-2012 |
yongari |
MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited.
Reported by: Paul Guyot <paulguyot <> ieee dot org >
|
234559 |
21-Apr-2012 |
raj |
MFC r227730:
Initial version of cesa(4) driver for Marvell crypto engine and security accelerator.
The following algorithms and schemes are supported: - 3DES, AES, DES - MD5, SHA1
Obtained from: Semihalf Written by: Piotr Ziecik
|
234558 |
21-Apr-2012 |
raj |
MFC r233230, r233323:
Improve device tree blob (DTB) handling in loader(8).
Enable using the statically embedded blob from the kernel, if present. The KLD loaded DTB takes precedence, but they are both recognized and handled in the same way.
Improve FDT handling in loader(8) and make it more robust.
o Fix buffer overflows when using a long property body in node paths. o Fix loop end condition when iterating through the symbol table. o Better error handling during node modification, better problem reporting. o Eliminate build time warnings.
Submitted by: Lukasz Wojcik Obtained from: Semihalf
|
234511 |
20-Apr-2012 |
rmh |
MFC of r227310:
Don astbestos garment and remove the warning about TMPFS being experimental -- highly experimental even. So far the closest to a bug in TMPFS that people have gotten to relates to how ZFS can take away from the memory that TMPFS needs. One can argue that such is not a bug in TMPFS. Irrespective, even if there is a bug here and there in TMPFS, it's not in our own advantage to scare people away from using TMPFS. I for one have been using it, even with ZFS, very successfully.
Reviewed by: marcel
|
234490 |
20-Apr-2012 |
marius |
MFC: r234247
Merge from x86:
r233961:
Fix interrupt load balancing regression, introduced in revision 222813, that left all un-pinned interrupts assigned to CPU 0. In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized the "intr_cpus" cpuset to only contain CPU0.
This initialization is too late and nullifies the results of calls to the intr_add_cpu() that occur much earlier in the boot process.
r234074 (partial):
The BSP is not added to the mask of valid target CPUs for interrupts. Fix this by adding the BSP as an interrupt target directly in
r234105:
Fix !SMP build after r234074.
|
234473 |
19-Apr-2012 |
mckusick |
MFC of 234158:
Export vinactive() from kern/vfs_subr.c (e.g., make it no longer static and declare its prototype in sys/vnode.h) so that it can be called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c) instead of the body of vinactive() being cut and pasted into process_deferred_inactive().
Reviewed by: kib MFC after: 2 weeks
|
234471 |
19-Apr-2012 |
mckusick |
MFC of 234157:
Whitespace cleanup.
|
234470 |
19-Apr-2012 |
mckusick |
MFC of 233817:
A file cannot be deallocated until its last name has been removed and it is no longer referenced by a user process. The inode for a file whose name has been removed, but is still referenced at the time of a crash will still be allocated in the filesystem, but will have no references (e.g., they will have no names referencing them from any directory).
With traditional soft updates these unreferenced inodes will be found and reclaimed when the background fsck is run. When using journaled soft updates, the kernel must keep track of these inodes so that it can find and reclaim them during the cleanup process. Their existence cannot be stored in the journal as the journal only handles short-term events, and they may persist for days. So, they are tracked by keeping them in a linked list whose head pointer is stored in the superblock. The journal tracks them only until their linked list pointers have been commited to disk. Part of the cleanup process involves traversing the list of unreferenced inodes and reclaiming them.
This bug was triggered when confusion arose in the commit steps of keeping the unreferenced-inode linked list coherent on disk. Notably, a race between the link() system call adding a link-count to a file and the unlink() system call removing a link-count to the file. Here if the unlink() ran after link() had looked up the file but before link() had incremented the link-count of the file, the file's link-count would drop to zero before the link() incremented it back up to one. If the file was referenced by a user process, the first transition through zero made it appear that it should be added to the unreferenced-inode list when in fact it should not have been added. If the new name created by link() was deleted within a few seconds (with the file still referenced by a user process) it would legitimately be a candidate for addition to the unreferenced-inode list. The result was that there were two attempts to add the same inode to the unreferenced-inode list which scrambled the unreferenced-inode list's pointers leading to a panic. The fix is to detect and avoid the false attempt at adding it to the unreferenced-inode list by having the link() system call check to see if the link count is zero before it increments it. If it is, the link() fails with ENOENT (showing that it has failed the link()/unlink() race).
While tracking down this bug, we have added additional assertions to detect the problem sooner and also simplified some of the code.
Reported by: Kirk Russell Fix submitted by: Jeff Roberson Tested by: Peter Holm PR: kern/159971
|
234466 |
19-Apr-2012 |
mckusick |
MFC of 233627, 234024, 234025, and 234026
Restore per mount-point counts of synchronous and asynchronous reads and writes associated with UFS and MSDOS filesystems.
MFS 233627: Keep track of the mount point associated with a special device to enable the collection of counts of synchronous and asynchronous reads and writes for its associated filesystem. The counts are displayed using `mount -v'.
Ensure that buffers used for paging indicate the vnode from which they are operating so that counts of paging I/O operations from the filesystem are collected.
This checkin only adds the setting of the mount point for the UFS/FFS filesystem, but it would be trivial to add the setting and clearing of the mount point at filesystem mount/unmount time for other filesystems too.
Reviewed by: kib
MFC 234024: Drop an unnecessary setting of si_mountpt when updating a UFS mount point. Clearly it must have been set when the mount was done.
Reviewed by: kib
MFC 234025: Add I/O accounting to msdos filesystem.
Suggested and reviewed by: kib
MFC 234026: Expand locking around identification of filesystem mount point when accounting for I/O counts at completion of I/O operation. Also switch from using global devmtx to vnode mutex to reduce contention.
Suggested and reviewed by: kib
|
234391 |
17-Apr-2012 |
jhb |
MFC 234059: Recognize the RDRAND instruction feature.
|
234316 |
15-Apr-2012 |
netchild |
MFC r232799: - add comments to syscalls.master and linux(32)_dummy about which linux kernel version introduced the sysctl (based upon a linux man-page) - add comments to syscalls.master regarding some names of sysctls which are different than the linux-names (based upon the linux unistd.h) - add some dummy sysctls - name an unimplemented sysctl
|
234240 |
13-Apr-2012 |
marius |
MFC: r233888
- Const'ify the device lookup-table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Enable support for flow control. Tested by: yongari
|
234215 |
13-Apr-2012 |
avg |
MFC r234043: intpm: return only SMB bus error codes from SMB methods
|
234213 |
13-Apr-2012 |
avg |
MFC r234040: intpm: reflect the fact that SB800 and later AMD chipsets are not supported
|
234211 |
13-Apr-2012 |
avg |
MFC r233918: zfs_ioctl: no need for ddi_copyin/out here because sys_ioctl handles that
|
234209 |
13-Apr-2012 |
avg |
MFC r231558: newvers.sh: unbreak git/git-svn support
|
234181 |
12-Apr-2012 |
jhb |
MFC 233547: Use VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings. VM_MEMATTR_UNCACHED is actually the x86-specific UC- mode (where a WC MTRR can override the PAT setting).
|
234179 |
12-Apr-2012 |
jhb |
MFC 233670,233671: - Use VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than VM_MEMATTR_UNCACHED on mips. - Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to be less ambiguous and more clearly identify what it means. An alias from VM_MEMATTR_WEAK_UNCACHEABLE to VM_MEMATTR_WEAK_UNCACHED remains on x86 to preserve the KPI. - Remove the VM_MEMATTR_UNCACHED alias from powerpc.
|
234150 |
11-Apr-2012 |
jhb |
MFC 233676: Use a more proper fix for enabling HT MSI mapping windows on Host-PCI bridges. Rather than blindly enabling the windows on all of them, only enable the window when an MSI interrupt is enabled for a device behind the bridge, similar to what already happens for HT PCI-PCI bridges.
|
234148 |
11-Apr-2012 |
jhb |
MFC 233893: Disable INET6 support in modules when building the LINT-NOINET6 kernel.
|
234147 |
11-Apr-2012 |
jhb |
MFC 233305,233623: - Mark the 'lapics' and 'ioapics' arrays here static since they are private to this file. The 'lapics' array was actually shadowing a completely different 'lapics' array that is private to local_apic.c. - Allocate the ioapics[] array dynamically since it is only needed for the duration of madt_setup_io(). This avoids having the array take up permanent space in the BSS.
|
234145 |
11-Apr-2012 |
jhb |
MFC 232228,233613: Move the DTrace return IDT vector back up from 0x20 to 0x92. The 0x20 vector is currently dedicated to servicing IRQ 0 from the 8259A's, so it shouldn't be overloaded for DTrace.
|
234144 |
11-Apr-2012 |
jhb |
MFC 232744,232747,233031: - Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on amd64, if 'device isa' is present quiesce the 8259A's during boot and resume from suspend. - Move i386's intr_machdep.c to the x86 tree and share it with amd64. - Merge r232744 changes to pc98. (Allow a kernel to be built with 'nodevice atpic'.) - Move ICU related defines from x86/isa/atpic.c to x86/isa/icu.h and use them in x86/x86/intr_machdep.c.
Note, I normally would have merged 232747 separately, but 233031 assumed 232747 was already merged and 232744 needs to be merged with 233031.
|
234141 |
11-Apr-2012 |
jhb |
MFC 232742: MFamd64: - Return failure for a suspend attempt if we have no wake address. - Use intr_disable()/intr_restore() instead of ACPI_DISABLE_IRQS(). - Invoke intr_suspend() earlier and call intr_resume() if suspend fails. - Use pause in the loop waiting for CPU to suspend. - Restore PAT MSR, switchtime, switchticks, and MTRRs on resume.
|
234126 |
11-Apr-2012 |
yongari |
MFC r233688-233689: r233688: Remove task queue based link state change handler. Driver no longer needs to defer link state handling. While I'm here, mark IFF_DRV_RUNNING before changing media. If link is established without any delay, that link state change handling could be lost.
r233689: Do not report current link status if driver is not running. This change also workarounds dhclient's link state handling bug by not giving current link status.
Unlike other controllers, ale(4)'s PHY hibernation perfectly works such that driver does not see a valid link if the controller is not brought up. If dhclient(8) runs on ale(4) it will blindly waits until link UP and then gives up after 10 seconds. Because dhclient(8) still thinks interface got a valid link when IFM_AVALID is not set for selected media, this change makes dhclient initiate DHCP without waiting for link UP.
|
234123 |
11-Apr-2012 |
yongari |
MFC r233585-233587: r233585: Partially revert r223608 and selectively allow microcode loading for 82550C. For 82550 controllers this change restores CPUSaver microcode loading. Due to silicon bug on 82550 and 82550C with server extension, these controllers seem to require CPUSaver microcode to receive fragmented UDP datagrams. However the microcode shouldn't be used on client featured 82550C as it locks up the controller. In addition, client featured 82550C does not have the silicon bug. Also clear temporary memory used for microcode loading since the same memory area is used for other commands. While I'm here use 82550C in probe message instead of generic 82550.
Reported by: Andreas Longwitz <longwitz <> incore de> Tested by: Andreas Longwitz <longwitz <> incore de>
r233586: Load entire EEPROM contents in device attach time and verify whether the checksum of EEPROM is valid or not. Because driver heavily relies on EEPROM information when it selectively enables features/workarounds, it would be helpful to know whether driver sees valid EEPROM. While I'm here remove all other EEPROM accesses since the entire EEPROM is loaded at device attach time.
r233587: Remove unnecessary #if as the software workaround for PCI protocol violation should be activated unless the system is cold-booted after updating EEPROM. The PCI protocol violation happens only when established link is 10Mbps so the workaround should be updated whenever link state change is detected. Previously the workaround was activated only when user checks current media status with ifconfig(8).
|
233995 |
07-Apr-2012 |
marius |
MFC: r233827
Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed to stable/9 in r232562). Reported by: infofarmer
MFC: r233886
Refine r233827; as it turns out, controllers with a device ID of 0x0059 can be upgraded to MegaRAID mode, in which case mfi(4) should attach to these based on the sub-vendor and -device ID instead (not currently done). Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY. While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in the default case.
|
233924 |
05-Apr-2012 |
jhb |
MFC 233675: Restore proper use of bounce buffers for ISA DMA. When locking was added, the call to pmap_kextract() was moved up, and as a result the code never updated the physical address to use for DMA if a bounce buffer was used. Restore the earlier location of pmap_kextract() so it takes bounce buffers into account.
|
233889 |
04-Apr-2012 |
marius |
MFC: r233747, r233748
- Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086. Reported by: David E. Cross - Remove checks that are redundant due to tf_type being unsigned.
|
233816 |
02-Apr-2012 |
jhb |
MFC 233236: Add sys/ofed to the 'make cscope' target.
|
233814 |
02-Apr-2012 |
jhb |
MFC 232700: Add a new sched_clear_name() method to the scheduler interface to clear the cached name used for KTR_SCHED traces when a thread's name changes. This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's name changes, most commonly via execve().
|
233811 |
02-Apr-2012 |
marius |
MFC: r233701
- Remove erroneous trailing semicolon. [1] - Correctly determine the maximum payload size for setting the TX link frequent NACK latency and replay timer thresholds.
Submitted by: stefanf [1]
|
233810 |
02-Apr-2012 |
gnn |
MFC: 232612
Properly mask off bits that are not supported in the IAP counters. This fixes a bug where users would see massively large counts, near to 2**64 -1, due to the bits not being cleared.
|
233750 |
31-Mar-2012 |
alc |
MFC r233256 Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no longer serve any purpose.
|
233743 |
31-Mar-2012 |
marius |
MFC: r233427
Add cas(4), gem(4) and hme(4) to x86 GENERICs as suggested by netchild@ in <20120222095239.Horde.0hpYHJjmRSRPRKzXsoFRbYk@webmail.leidinger.net>. According to some private emails received, it apparently is not unpopular to use at least Quad GigaSwift cards driven by cas(4) in x86 machines.
|
233740 |
31-Mar-2012 |
marius |
MFC: r233425
Consistently update to the MPI header set version 01.05.20 after r224761. Requested by: mjacob
|
233725 |
31-Mar-2012 |
marius |
MFC: r233423
Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in order to avoid otherwise harmless witness warnings when these are acquired at the same time and due to both using MTX_NETWORK_LOCK as their type. The right fix actually would be to use different, descriptive types for these. However, the latter would require undesirable changes to the shared code base. Another approach would be to just supply NULL as the type, which was deemed as less desirable though as it would cause the unique but cryptic name also to be used for the type and to diverge from the type used by other network device drivers.
|
233723 |
31-Mar-2012 |
marius |
MFC: r233421
Given that this is a host-PCI-Express bridge driver, create the parent DMA tag with a 4 GB boundary as required by PCI-Express. With r232403 (MFC'ed to stable/9 in r233393) in place this actually is redundant. However, the host-PCI-Express bridge driver is the more appropriate place for implementing this restriction.
|
233721 |
31-Mar-2012 |
marius |
MFC: r233403, r233404
- Use the PCI ID macros from mpi_cnfg.h rather than duplicating them here. Note that this driver additionally probes some device IDs for the most part not know to other MPT drivers, if at all. So rename the macros not present in mpi_cnfg.h to match the naming scheme in the latter and but suffix them with a _FB in order to not cause conflicts. - Like mpt_set_config_regs(), comment out mpt_read_config_regs() as the content of the registers read isn't actually used and both functions aren't exactly up to date regarding the possible layouts of the BARs (these function might be helpful for debugging though, so don't remove them completely). - Use DEVMETHOD_END. - Use NULL rather than 0 for pointers. - Remove an unusual check for the softc being NULL. - Remove redundant zeroing of the softc. - Remove an overly banal and actually partly incorrect as well as partly outdated comment regarding the allocation of the memory resource.
|
233719 |
31-Mar-2012 |
marius |
MFC: r233287
Use the common/shared CRC-32 implementation instead of duplicating it.
|
233717 |
31-Mar-2012 |
marius |
MFC: r233282
- First pass at const'ifying ata(4) as appropriate. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
|
233715 |
30-Mar-2012 |
marius |
MFC: r233274
Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it along with functions, SYSCTLs and tunables that are not used with ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM code for the other way around. This makes it easier to understand which parts of ata(4) actually are used in the new world order and to later on remove the !ATA_CAM bits. It also makes it obvious that there is something fishy with the C-bus front-end as well as in the ATP850 support, as these used ATA_LOCKING which is defunct in the ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to be brought back in some form or other.
Reviewed by: mav
|
233712 |
30-Mar-2012 |
marius |
MFC: r233273
Exclude devices which are mutually exclusive with ATA_CAM. For better or worse, the former are still built as modules as part of the LINT builds.
Reviewed by: mav
|
233705 |
30-Mar-2012 |
jhb |
MFC 232669: Use bus_get_dma_tag() to inherit the 4G boundary restriction from the parent PCI bus and remove the home-grown version in this driver.
|
233659 |
29-Mar-2012 |
rmh |
MFC r233096:
Hide a few declarations from userland (including `struct inpcbgroup'). This removes the dependency on <machine/param.h> which was introduced with SVN rev 222748 (due to CACHE_LINE_SIZE).
Reviewed by: bde MFC after: 10 days
|
233647 |
29-Mar-2012 |
alc |
MFC r233291 Handle spurious page faults that may occur in no-fault sections of the kernel.
|
233630 |
28-Mar-2012 |
mckusick |
MFC of 232351, 233438, and 233629
MFC reviewed by: kib
MFC 232351:
This change avoids a kernel deadlock on "snaplk" when using snapshots on UFS filesystems running with journaled soft updates. This is the first of several bugs that need to be fixed before removing the restriction added in -r230250 to prevent the use of snapshots on filesystems running with journaled soft updates.
The deadlock occurs when holding the snapshot lock (snaplk) and then trying to flush an inode via ffs_update(). We become blocked by another process trying to flush a different inode contained in the same inode block that we need. It holds the inode block for which we are waiting locked. When it tries to write the inode block, it gets blocked waiting for the our snaplk when it calls ffs_copyonwrite() to see if the inode block needs to be copied in our snapshot.
The most obvious place that this deadlock arises is in the ffs_copyonwrite() routine when it updates critical metadata in a snapshot and tries to write it out before proceeding. The fix here is to write the data and indirect block pointer for the snapshot, but to skip the call to ffs_update() to write the snapshot inode. To ensure that we will never have to update a pointer in the inode itself, the ffs_snapshot() routine that creates the snapshot has to ensure that all the direct blocks are allocated as part of the creation of the snapshot.
A less obvious place that this deadlock occurs is when we hold the snaplk because we are deleting a snapshot. In the course of doing the deletion, we need to allocate various soft update dependency structures and allocate some journal space. If we hit a resource limit while doing this we decrease the resources in use by flushing out an existing dirty file to get it to give up the soft dependency resources that it holds. The flush can cause an ffs_update() to be done on the inode for the file that we have selected to flush resulting in the same deadlock as described above when the inode that we have chosen to flush resides in the same inode block as the snapshot inode that we hold. The fix is to defer cleaning up any time that the inode on which we are operating is a snapshot.
Help and review by: Jeff Roberson Tested by: Peter Holm
MFC 233438:
Add a third flags argument to ffs_syncvnode to avoid a possible conflict with MNT_WAIT flags that passed in its second argument.
Discussed with: kib
MFC 233629:
A refinement of change 232351 to avoid a race with a forcible unmount. While we have a snapshot vnode unlocked to avoid a deadlock with another inode in the same inode block being updated, the filesystem containing it may be forcibly unmounted. When that happens the snapshot vnode is revoked. We need to check for that condition and fail appropriately.
Spotted by: kib Reviewed by: kib
|
233604 |
28-Mar-2012 |
zec |
MFC r232517: Change SYSINIT priorities so that ip_mroute_modevent() is executed before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize tunable to be set, and that is done in in ip_mroute_modevent(). Apparently I broke that ordering with r208744 almost 2 years ago...
PR: kern/162201 Submitted by: Stevan Markovic (mcafee.com) MFC after: 3 days
|
233602 |
28-Mar-2012 |
zec |
MFC: 232487 Properly restore curvnet context when returning early from ether_input_internal().
This change only affects options VIMAGE kernel builds.
PR: kern/165643 Submitted by: Vijay Singh MFC after: 3 days
|
233543 |
27-Mar-2012 |
jh |
MFC r233126:
Cast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.
PR: kern/161552
|
233501 |
26-Mar-2012 |
yongari |
MFC r232951,232953,233158: r232951: fxp(4) does not handle deferred dma map loading. Tell bus_dmamap_load(9) that it should return immediately with error when there are insufficient mapping resources.
r232953: Fix white space nits.
r233158: Do not change current media when driver is already running. If driver is running driver would have already completed flow control configuration. This change removes unnecessary media changes in controller reconfiguration cases such that it does not trigger link reestablishment for configuration change requests like promiscuous mode change.
Reported by: Many Tested by: Mike Tancsa <mike <> sentex dot net>
|
233498 |
26-Mar-2012 |
yongari |
MFC r232849-232850: r232849: Show PCI bus speed and width as well as running mode of PCI-X device in device attach. This would help to narrow down issue to a specific controller and operating mode of the controller. While I'm here rename BGE_MISCCFG_BOARD_ID with BGE_MISCCFG_BOARD_ID_MASK.
r232850: Make if_ierrors updated whenever any of the following counters are updated. o Number of times NIC ran out of RX buffer descriptors o Number of inbound packet errors o Number of inbound packets that were chosen to be discarded Previously only the discarded packet counter was used to update if_ierrors. This change fixes wrong if_ierrors counter on BCM570[0-4] controllers. For BCM5705 and later controllers bge(4) already correctly counted it.
Reported by: Eugene Grosbein <egrosbein <> rdtc dot ru>
|
233495 |
26-Mar-2012 |
yongari |
MFC r232848: Add workaround for PCI-X BCM5704 controller that live behind AMD-8131 PCI-X bridge. The bridge seems to reorder write access to mailbox registers such that it caused watchdog timeouts by out-of-order TX completions.
Tested by: Michael L. Squires <mikes <> siralan dot org >
|
233492 |
26-Mar-2012 |
yongari |
MFC r232246: Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to extract a link status of PHY when parent driver is re(4). RGEPHY_MII_SSR register does not seem to report correct PHY status on some integrated PHYs used with re(4). Unfortunately, RealTek PHYs have no additional information to differentiate integrated PHYs from external ones so relying on PHY model number is not enough to know that. However, it seems RGEPHY_MII_SSR register exists for external RealTek PHYs so checking parent driver would be good indication to know which PHY was used. In other words, for non-re(4) controllers, the PHY is external one and its revision number is greater than or equal to 2. This change fixes intermittent link UP/DOWN messages reported on RTL8169 controller.
Also, mii_attach(9) is tried after setting interface name since rgephy(4) have to know parent driver name.
PR: kern/165509
|
233489 |
26-Mar-2012 |
yongari |
MFC r232145: Use correct Config registers for RTL8139 family. Unlike RTL8168 and RTL810x family , RTL8139 has different register map for Config registers.
While here, follow the lead of re(4) in WOL configuration. - Disable WOL_UCAST and WOL_MCAST capabilities by default. - Config5 register write does not need to unlock EEPROM access on RTL8139 family but unlocking EEPROM access does not affect its operation and make it consistent with re(4).
Reported by: Matt Renzelmann mjr <> cs dot wisc dot edu
|
233486 |
26-Mar-2012 |
yongari |
MFC r232019,232021,232025,232027,232029,232031,232040: r232019: Give hardware chance to drain active DMA cycles.
r232021: If there are not enough RX buffers, release partially allocated RX buffers.
r232025: Introduce sf_ifmedia_upd_locked() and have driver reset PHY before switching to selected media. While here, set if_drv_flags before switching to selected media.
r232027: No need to reprogram hardware RX filter when driver is not running.
r232029: Remove taskqueue based MII stat change handler. Driver does not need deferred link state change processing. While I'm here, do not report current link status if interface is not UP.
r232031: With r232015, sf(4) gets correct speed/duplex of established link. Add more strict speed check in sf_miibus_statchg() and do not touch MAC config registers when driver lost a link.
r232040: Add check for IFF_DRV_RUNNING flag after serving an interrupt and don't give RX path more priority than TX path. Also remove infinite loop in interrupt handler and limit number of iteration to 32. This change addresses system load fluctuations under high network load.
|
233485 |
26-Mar-2012 |
yongari |
MFC r232015-232016: r232015: Add Seeq Technology 80220 PHY support to smcphy(4). This PHY is found on Adaptec AIC-6915 Starfire ethernet controller. While here, use status register to know resolved speed/duplex. With this change, sf(4) correctly reports speed/duplex of established link.
r232016: Connect smcphy(4) to mii module build.
|
233468 |
25-Mar-2012 |
marius |
MFC: r233105
Declare some variables static in order to reduce the object size and redo r232822 (MFC'ed to stable/9 in r232962) in a less hackish way. The latter now no longer breaks compiling the x86 boot2 with clang.
|
233398 |
23-Mar-2012 |
jhb |
MFC 232470: Use pci_find_cap() instead of pci_find_extcap() to locate PCI find capabilities as the latter API is deprecated for this purpose.
|
233393 |
23-Mar-2012 |
jhb |
MFC 232403,232667: - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge. The tag enforces a single restriction that all DMA transactions must not cross a 4GB boundary. Note that while this restriction technically only applies to PCI-express, this change applies it to all PCI devices as it is simpler to implement that way and errs on the side of caution. - Add a softc structure for PCI bus devices to hold the bus_dma tag and a new pci_attach_common() routine that performs actions common to the attach phase of all PCI bus drivers. Right now this only consists of a bootverbose printf and the allocate of a bus_dma tag if necessary. - Adjust all PCI bus drivers to allocate a PCI bus softc and to call pci_attach_common() from their attach routines.
|
233385 |
23-Mar-2012 |
jhb |
MFC 232401: Similar to the fixes in 226967 and 226987, purge any name cache entries associated with the previous vnode (if any) associated with the target of a rename(). Otherwise, a lookup of the target pathname concurrent with a rename() could re-add a name cache entry after the namei(RENAME) lookup in kern_renameat() had purged the target pathname.
|
233383 |
23-Mar-2012 |
jhb |
MFC 232367: Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X allocation fails.
|
233379 |
23-Mar-2012 |
jhb |
MFC 232360: Add pci_save_state() and pci_restore_state() wrappers around pci_cfg_save() and pci_cfg_restore() for device drivers to use when saving and restoring state (e.g. to handle device-specific resets).
|
233376 |
23-Mar-2012 |
jhb |
Record mergeinfo for 233374.
|
233374 |
23-Mar-2012 |
jhb |
MFC 232570,232754: Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Specifically, kname cannot be pointed at cmd[] since it's value is change to be an empty string after the initial call to parse, and cmd[]'s value can be changed (thus losing a prior setting for kname) due to user input at the boot prompt. While here, ensure that that initial boot config file text is nul-terminated, that ops is initialized to zero, and that kname is always initialized to a valid string.
In addition, include other changes to ensure boot2 still builds with Clang.
|
233358 |
23-Mar-2012 |
jhb |
MFC 232218: Clear the a device's description string anytime it's driver changes. Descriptions are specific to drivers and we don't change drivers on attached devices. This fixes a few places where we were not clearing the description when detaching a driver (e.g. if device_attach() failed). While here, fix a few other nits: - Remove spurious call to remove a device's driver from devclass_driver_deleted(). device_detach() removes it already. - Fix a typo.
|
233355 |
23-Mar-2012 |
jhb |
MFC 232265: Properly clear a device's devclass if DEVICE_ATTACH() fails if the device does not have a fixed devclass.
|
233353 |
23-Mar-2012 |
kib |
MFC r231949: Fix found places where uio_resid is truncated to int.
Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode.
MFC r232493: Remove unneeded cast to u_int. The values as small enough to fit into int, beside the use of MIN macro which performs type promotions.
MFC r232494: Instead of incomplete handling of read(2)/write(2) return values that does not fit into registers, declare that we do not support this case using CTASSERT(), and remove endianess-unsafe code to split return value into td_retval.
While there, change the style of the sysctl debug.iosize_max_clamp definition.
MFC r232495: pipe_read(): change the type of size to int, and remove signed clamp. pipe_write(): change the type of desiredsize back to int, its value fits.
|
233326 |
22-Mar-2012 |
jhb |
MFC 230547: Add a timeout on positive name cache entries in the NFS client. That is, we will only trust a positive name cache entry for a specified amount of time before falling back to a LOOKUP RPC, even if the ctime for the file handle matches the cached copy in the name cache entry. The timeout is configured via a new 'nametimeo' mount option and defaults to 60 seconds. It may be set to zero to disable positive name caching entirely.
|
233324 |
22-Mar-2012 |
jhb |
MFC 232116: Adjust the nfs_skip_wcc_data_onerr setting so that it does not block post-op attributes for ENOENT errors now that the name caching logic depends on working post-op attributes.
|
233285 |
21-Mar-2012 |
jhb |
MFC 230394,230441,230489,230552,232420: Close a race in NFS lookup processing that could result in stale name cache entries on one client when a directory was renamed on another client. The root cause for the stale entry being trusted is that each per-vnode nfsnode structure has a single 'n_ctime' timestamp used to validate positive name cache entries. However, if there are multiple entries for a single vnode, they all share a single timestamp. To fix this, extend the name cache to allow filesystems to optionally store a timestamp value in each name cache entry. The NFS clients now fetch the timestamp associated with each name cache entry and use that to validate cache hits instead of the timestamps previously stored in the nfsnode. Another part of the fix is that the NFS clients now use timestamps from the post-op attributes of RPCs when adding name cache entries rather than pulling the timestamps out of the file's attribute cache. The latter is subject to races with other lookups updating the attribute cache concurrently.
|
233281 |
21-Mar-2012 |
jh |
MFC r232975: Add an assert for proctree_lock to proc_to_reap().
|
233275 |
21-Mar-2012 |
glebius |
Merge 232685 from head: Merge from OpenBSD:
revision 1.146 date: 2010/05/12 08:11:11; author: claudio; state: Exp; lines: +2 -3 bzero() the full compressed update struct before setting the values. This is needed because pf_state_peer_hton() skips some fields in certain situations which could result in garbage beeing sent to the other peer. This seems to fix the pfsync storms seen by stephan@ and so dlg owes me a whiskey.
I didn't see any storms, but this definitely fixes a useless memory allocation on the receiving side, due to non zero scrub_flags field in a pfsync_state_peer structure.
|
233266 |
21-Mar-2012 |
glebius |
Merge 228321 from head: Fix double free.
PR: kern/163089 Submitted by: Herbie Robinson <Herbie.Robinson stratus.com>
|
233265 |
21-Mar-2012 |
glebius |
Merge from head: r227785: - Reduce severity for all ARP events, that can be triggered from remote machine to LOG_NOTICE. Exception left to "using my IP address". - Fix multicast ARP warning: add newline and also log the bad MAC address.
Tested by: Alexander Wittig <wittigal msu.edu>
r227790: Be more informative for "unknown hardware address format" message.
Submitted by: Andrzej Tobola <ato iem.pw.edu.pl>
|
233261 |
21-Mar-2012 |
glebius |
Merge 227308 from head/: In icmp6_redirect_input:
- Assert that we got a valid mbuf with rcvif pointer. [1] - Use __func__ in logging.
Submitted by: prabhakar lakhera <prabhakar.lakhera gmail.com> [1] Submitted by: Kristof Provost <kristof sigsegv.be> [1]
|
233200 |
19-Mar-2012 |
jhb |
MFC 229621: Convert all users of IF_ADDR_LOCK to use new locking macros that specify either a read lock or write lock.
|
233084 |
17-Mar-2012 |
brueffer |
MFC: r232315
Use a more appropriate default for the maximum number of addresses in the bridge forwarding table.
|
233076 |
17-Mar-2012 |
marcel |
MFC r227430: On i386, fbt probes are implemented by writing an invalid opcode over certain instructions in a function prologue or epilogue. DTrace has a hook into the invalid opcode fault handler that checks whether the fault was due to an probe and if so, runs the DTrace magic.
Upon returning from an invalid opcode fault caused by a probe, DTrace must emulate the instruction that was replaced with the invalid opcode and then return control to the instruction following the invalid opcode.
There were a pair of related bugs in the emulation for the leave instruction. The leave instruction is used to pop off a stack frame prior to returning from a function. The emulation for this instruction must move the trap frame for the invalid opcode fault down the stack to the bottom of the stack frame that is being removed, and then execute an iret.
At two points in this process, the emulation code was storing values above the current value of the stack pointer. This opened up a window in which if we were two take an interrupt, the trap frame for the interrupt would overwrite the values stored on the stack, causing the system to panic later.
The first bug was that at one point the emulation code saves the new value for $esp above the current stack pointer value. The fix is to save this value instead inside of the original trap frame. At this point we do not need the original trap frame so this is safe.
The second bug is that when the emulate code loads $esp from the stack, it points part-way through the new trap frame instead of at its beginning. The emulation code adjusts the stack pointer to the correct value immediately afterwards, but this still leaves a one instruction window in which an interrupt would corrupt this trap frame. Fix this by adjusting the stack frame value before loading it into $esp.
This fixes panics in invop_leave on i386 when using fbt return probes.
Ok'd by: rstone
|
233046 |
16-Mar-2012 |
jhb |
MFC 226340,226340: Use queue(3) macros instead of home-rolled versions in several places in the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next' macros.
|
233015 |
15-Mar-2012 |
raj |
MFC r232518:
Respect phy-handle property in Ethernet nodes of the device tree.
This lets specify whereabouts of the parent PHY for a given MAC node (and get rid of ugly kludges in mge(4) and tsec(4)).
Obtained from: Semihalf
|
233014 |
15-Mar-2012 |
raj |
MFC r232512:
Remove unused #defines. All this is now retrieved from the device tree.
|
232962 |
14-Mar-2012 |
marius |
MFC: r232822
Fix a bug introduced in r223938; on big-endian machines coping a 32-bit quantum bytewise to the address of a 64-bit variable results in writing to the "wrong" 32-bit half so adjust the address accordingly. This fix is implemented in a hackish way for two reasons: o in order to be able to get it into 8.3 with zero impact on the little- endian architectures where this bug has no effect and o to avoid blowing the x86 boot2 out of the water again when compiling it with clang, which all sane versions of this fix tested do. This change fixes booting from UFS1 file systems on big-endian machines.
|
232945 |
13-Mar-2012 |
glebius |
Merge 231025 from head: Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT, that allow to control initial timeout, idle time, idle re-send interval and idle send count on a per-socket basis.
Reviewed by: andre, bz, lstewart
|
232930 |
13-Mar-2012 |
dim |
MFC r232263:
Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles.
Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations)
As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following:
CC=clang CXX=clang++ CPP=clang-cpp
|
232683 |
08-Mar-2012 |
rmacklem |
MFC: r2323467 The name caching changes of r230394 exposed an intermittent bug in the new NFS server for NFSv4, where it would report ENOENT when the file actually existed on the server. This turned out to be caused by not initializing ni_topdir before calling lookup() and there was a rare case where the value on the stack location assigned to ni_topdir happened to be a pointer to a ".." entry, such that "dp == ndp->ni_topdir" succeeded in lookup(). This patch initializes ni_topdir to fix the problem.
|
232682 |
08-Mar-2012 |
rmacklem |
MFC: r232327 Fix the NFS clients so that they use copyin() instead of bcopy(), when doing direct I/O. This direct I/O code is not enabled by default.
|
232511 |
04-Mar-2012 |
raj |
MFC r230865:
Adjust mvs(4) to handle interrupt cause reg depending on the actual number of channels available
- current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC interrupt cause' as flags for SATA channels 2 and 3
- for embedded SATA controllers (SoC) these bits have been marked as reserved in datasheets so far, but for some new and upcoming chips they are used for purposes other than SATA
Submitted by: Lukasz Plachno Reviewed by: mav Obtained from: Semihalf
|
232508 |
04-Mar-2012 |
raj |
MFC r228504, r228530.
r228504: Make *intr{cnt,names} on ARM reside in data section, similar to other arches.
sintrnames and sintrcnt are initialized with non-zero values, which were discarded by the .bss directive, so consumers like "vmstat -i" were not getting correct data.
Submitted by: Lukasz Plachno Obtained from: Semihalf
r228530: ARM pmap fixes:
- Write Buffers have to be drained after write to Page Table even if caches are in write-through mode.
- Make sure to sync PTE in pmap_zero_page_generic().
Submitted by: Michal Mazur Reviewed by: cognet Obtained from: Semihalf
|
232417 |
03-Mar-2012 |
jkim |
MFC: r232309
Fix a long standing bug. The caller expects a non-zero value for success. Luckily keyboard probing was turned off by default from the first revision.
|
232292 |
29-Feb-2012 |
bz |
MFC r231852,232127:
Merge multi-FIB IPv6 support.
Extend the so far IPv4-only support for multiple routing tables (FIBs) introduced in r178888 to IPv6 providing feature parity.
This includes an extended rtalloc(9) KPI for IPv6, the necessary adjustments to the network stack, and user land support as in netstat.
Sponsored by: Cisco Systems, Inc.
|
232290 |
29-Feb-2012 |
davidxu |
MFC 230857:
If multiple threads call kevent() to get AIO events on same kqueue fd, it is possible that a single AIO event will be reported to multiple threads, it is not threading friendly, and the existing API can not control this behavior. Allocate a kevent flags field sigev_notify_kevent_flags for AIO event notification in sigevent, and allow user to pass EV_CLEAR, EV_DISPATCH or EV_ONESHOT to AIO kernel code, user can control whether the event should be cleared once it is retrieved by a thread. This change should be comptaible with existing application, because the field should have already been zero-filled, and no additional action will be taken by kernel.
PR: kern/156567
MFC 231006:
Add 32-bit compat code for AIO kevent flags introduced in revision 230857.
MFC 231724:
Add notes about sigev_notify_kevent_flags introduced in revision 230857 which enables thread-friendly polling on same fd for AIO events.
Reviewed by: delphij
MFC 231777:
Bump .Dd date for previous revision.
|
232279 |
29-Feb-2012 |
thompsa |
MFC r232008,232010,232080,232089
Using the flowid in the mbuf assumes the network card is giving a good hash for the traffic flow, this may not be the case giving poor traffic distribution. Add a sysctl which allows us to fall back to our own flow hash code.
PR: kern/164901
|
232259 |
28-Feb-2012 |
rmacklem |
MFC: r232050 hrs@ reported a panic to freebsd-stable@ under the subject line "panic in 8.3-PRERELEASE" on Feb. 22, 2012. This panic was caused by use of a mix of tsleep() and msleep() calls on the same event in the new NFS server DRC code. It did "mtx_unlock(); tsleep();" in two places, which kib@ noted introduced a slight risk that the wakeup() would occur before the tsleep(), resulting in a 10sec delay before waking up. This patch fixes the problem by replacing "mtx_unlock(); tsleep();" with mtx_sleep(..PDROP..). It also changes a nfsmsleep() call to mtx_sleep() so that the code uses mtx_sleep() consistently within the file.
|
232140 |
25-Feb-2012 |
marius |
MFC: r231985
Fix memset sizeof
|
232137 |
25-Feb-2012 |
marius |
MFC: r231914
Probe the National DP83849, which is a dual-port version of the PHYTER.
Obtained from: NetBSD
|
232134 |
25-Feb-2012 |
marius |
MFC: r231913
- Probe BCM57780. - In case the parent is bge(4), don't set the Jumbo frame settings unless the MAC actually is Jumbo capable as otherwise the PHY might not have the corresponding registers implemented. This is also in line with what the Linux tg3 driver does.
PR: 165032 Submitted by: Alexander Milanov Obtained from: OpenBSD
|
232117 |
24-Feb-2012 |
alc |
MFC r231904 Close a race due to dropping of the map lock between creating a map entry for a shared mapping and marking the entry for inheritance.
|
232092 |
24-Feb-2012 |
marius |
MFC: r231621
- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END.
PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb
[1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf
|
232068 |
23-Feb-2012 |
cperciva |
MFC 230183: Make XENHVM work on i386 by fixing the definition of __ffs.
|
232067 |
23-Feb-2012 |
cperciva |
MFC 230184, 230185: Add XENHVM config file to i386.
|
232045 |
23-Feb-2012 |
yongari |
MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions.
|
232018 |
23-Feb-2012 |
rmacklem |
MFC: r231805 Delete a couple of out of date comments that are no longer true in the new NFS client.
|
231905 |
19-Feb-2012 |
rmh |
MFC r230972,r230980,r231559,r231565: Add MK_SOURCELESS build option, and associated fixes.
Approved by: kib (mentor)
|
231775 |
15-Feb-2012 |
alc |
MFC r229363 Don't pass VM_ALLOC_ZERO to vm_page_grab() in tmpfs_mappedwrite() and tmpfs_nocacheread(). It is both unnecessary and a pessimization. It results in either the page being zeroed twice or zeroed first and then overwritten by an I/O operation.
|
231734 |
15-Feb-2012 |
yongari |
MFC r230286,230337-230338,231159: r230286: Introduce a tunable that disables use of MSI. Non-zero value will use INTx.
r230337-230338: Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches enable/disable and default it to on.
r231159: Call bge_add_sysctls() early and especially before bge_can_use_msi() so r230337 actually has a chance of working and doesn't always unconditionally disable the use of MSIs.
|
231731 |
15-Feb-2012 |
yongari |
MFC r230336: Fix a logic error which resulted in putting PHY into sleep when WOL is active. If WOL is active driver should not put PHY into sleep. This change makes WOL work on RTL8168E.
|
231728 |
15-Feb-2012 |
yongari |
MFC r230575-230576: r230275: Use a RX DMA tag to free loaded RX DMA maps. Previously it used a TX DMA tag.
r230276: Free allocated jumbo buffers when controller is stopped.
|
231725 |
15-Feb-2012 |
yongari |
MFC r229940: style. No functional changes.
|
231636 |
14-Feb-2012 |
rmacklem |
MFC: r230803 When a "mount -u" switches an NFS mount point from TCP to UDP, any thread doing an I/O RPC with a transfer size greater than NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC. After a discussion on freebsd-fs@, I decided to add a warning message for this case, as suggested by Jeremy Chadwick.
|
231633 |
14-Feb-2012 |
rmacklem |
MFC: r230801 jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011 under the subject "F_RDLCK lock to FreeBSD NFS fails to R/O target file". This occurred because the server side NLM always checked for VWRITE access, irrespective of the type of lock request. This patch replaces VOP_ACCESS(..VWRITE..) with one appropriate to the lock operation. It allows unlock and lock cancellation to be done without a check of VOP_ACCESS(), so that files can't be left locked indefinitely after the file permissions have been changed.
|
231629 |
14-Feb-2012 |
marius |
MFC: r231228
Remove extra newlines from panic messages.
|
231623 |
14-Feb-2012 |
marius |
MFC: r231518
Remove extra newlines from panic messages.
|
231610 |
13-Feb-2012 |
jhb |
MFC 230340: Properly return success once a matching VPD entry is found in pci_get_vpd_readonly_method(). Previously the loop was always running to completion and falling through to failing with ENXIO.
|
231545 |
12-Feb-2012 |
rmacklem |
MFC: r231133 r228827 fixed a problem where copying of NFSv4 open credentials into a credential structure would corrupt it. This happened when the p argument was != NULL. However, I now realize that the copying of open credentials should only happen for p == NULL, since that indicates that it is a read-ahead or write-behind. This patch fixes this. After this commit, r228827 could be reverted, but I think the code is clearer and safer with the patch, so I am going to leave it in. Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have changed the credentials of the caller. This would have happened if the process doing the VOP_SETATTR() did not have the file open, but some other process running as a different uid had the file open for writing at the same time.
|
231522 |
11-Feb-2012 |
avg |
MFC r230157: dadump: don't leak the periph lock on i/o error
|
231330 |
10-Feb-2012 |
rmacklem |
MFC: r230605 A problem with respect to data read through the buffer cache for both NFS clients was reported to freebsd-fs@ under the subject "NFS corruption in recent HEAD" on Nov. 26, 2011. This problem occurred when a TCP mounted root fs was changed to using UDP. I believe that this problem was caused by the change in mnt_stat.f_iosize that occurred because rsize was decreased to the maximum supported by UDP. This patch fixes the problem by using v_bufobj.bo_bsize instead of f_iosize, since the latter is set to f_iosize when the vnode is allocated, but does not change for a given vnode when f_iosize changes.
|
231287 |
09-Feb-2012 |
bapt |
MFH r226506: Look for /boot/config in addition to /boot.config
Approved by: des (mentor)
|
231178 |
08-Feb-2012 |
marcel |
MFC r231177: Rev. 228360 moved the call to cpu_set_upcall() to happen before td_proc gets initialized in td (=newtd). Use td0 instead.
|
231165 |
07-Feb-2012 |
jhb |
MFC 229465: Use correct locking when traversing interface address list.
|
231157 |
07-Feb-2012 |
jhb |
MFC 229614: Add new variants of the IF_ADDR_*LOCK*() macros used for protecting interface address lists that distinguish read locks from write locks. To preserve the KPI, the previous operations are mapped to the write lock macros. The lock is still kept as a mutex for now.
|
231156 |
07-Feb-2012 |
jhb |
MFC 229613: Update recently added drivers to use the if_*addr_r*lock() wrapper functions instead of using the IF_ADDR_LOCK directly. The wrapper functions are the supported interface for device drivers.
|
231153 |
07-Feb-2012 |
jhb |
MFC 229598: Remove use of explicit bus space tags and handles and use methods that operate on resource objects instead.
|
231152 |
07-Feb-2012 |
jhb |
Hoist mergeinfo for modules/sound/driver/* up to sys/.
|
231150 |
07-Feb-2012 |
jhb |
MFC 228962: Use curthread rather than PCPU_GET(curthread). 'curthread' uses special-case optimizations on several platforms and is preferred.
|
231145 |
07-Feb-2012 |
jhb |
MFC 228957: Implement linux_fadvise64() and linux_fadvise64_64() using kern_posix_fadvise().
|
231035 |
05-Feb-2012 |
sbruno |
MFC r230325
Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT
|
231023 |
05-Feb-2012 |
nwhitehorn |
MFC r230247:
Revert r212360 now that PowerPC can handle large sparse arguments to pmap_remove() (changed in r228412).
|
231022 |
05-Feb-2012 |
nwhitehorn |
Pick a constant high IRQ value for the PS3 IPI, which lets PS3 devices be usefully loaded and unloaded as modules.
Submitted by: geoffrey dot levand at mail dot ru
|
231021 |
05-Feb-2012 |
nwhitehorn |
MFC r230398:
Prevent an error resulting from signed/unsigned comparison on systems that do not comply with the OF spec.
Submitted by: Anders Gavare
|
230928 |
03-Feb-2012 |
rmacklem |
MFC: r230345 Martin Cracauer reported a problem to freebsd-current@ under the subject "Data corruption over NFS in -current". During investigation of this, I came across an ugly bogusity in the new NFS client where it replaced the cr_uid with the one used for the mount. This was done so that "system operations" like the NFSv4 Renew would be performed as the user that did the mount. However, if any other thread shares the credential with the one doing this operation, it could do an RPC (or just about anything else) as the wrong cr_uid. This patch fixes the above, by using the mount credentials instead of the one provided as an argument for this case. It appears to have fixed Martin's problem. This patch is needed for NFSv4 mounts and NFSv3 mounts against some non-FreeBSD servers that do not put post operation attributes in the NFSv3 Statfs RPC reply.
Tested by: cracauer at cons.org, dim
|
230920 |
02-Feb-2012 |
ken |
MFC 230592:
Bring in the LSI-supported version of the mps(4) driver.
This involves significant changes to the mps(4) driver, but is not a complete rewrite.
Some of the changes in this version of the driver: - Integrated RAID (IR) support. - Support for WarpDrive controllers. - Support for SCSI protection information (EEDP). - Support for TLR (Transport Level Retries), needed for tape drives. - Improved error recovery code. - ioctl interface compatible with LSI utilities.
mps.4: Update the mps(4) driver man page somewhat for the driver changes. The list of supported hardware still needs to be updated to reflect the full list of supported cards.
conf/files: Add the new driver files.
mps/mpi/*: Updated version of the MPI header files, with a BSD style copyright.
mps/*: See above for a description of the new driver features.
modules/mps/Makefile: Add the new mps(4) driver files.
Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com> Sponsored by: LSI, Spectra Logic Reviewed by: ken
|
230896 |
01-Feb-2012 |
marius |
MFC: r227980
Move to SCHED_ULE by default. Since r226057 SCHED_ULE and sparc64 are compatible with each other and since r227539 the last issue seen when using SCHED_ULE is fixed (MFC'ed to stable/9 in r230691 and r227714 respectively). At least on UP and 2-way machines SCHED_4BSD still performs better than SCHED_ULE, however, the optimizations done in r225889 (MFC'ed to stable/9 in r230673) pretty much compensate that so there's at least no net regression. Thanks go to Peter Jeremy for extensive testing.
|
230894 |
01-Feb-2012 |
marius |
MFC: r230664
As it turns out r227960 (MFC'ed to stable/9 in r228126) may still be insufficient with PREEMPTION so try harder to get the CDMA sync interrupt delivered and also in a more efficient way: - wrap the whole process of sending and receiving the CDMA sync interrupt in a critical section so we don't get preempted, - send the CDMA sync interrupt to the CPU that is actually waiting for it to happen so we don't take a detour via another CPU, - instead of waiting for up to 15 seconds for the interrupt to trigger try the whole process for up to 15 times using a one second timeout (the code was also changed to just ignore belated interrupts of a previous tries should they appear).
According to testing done by Peter Jeremy with the debugging also added as part of this commit the first two changes apparently are sufficient to now properly get the CDMA sync interrupts delivered at the first try though.
|
230892 |
01-Feb-2012 |
marius |
MFC: r230662
Fully disable interrupts while we fiddle with the FP context in the VIS-based block copy/zero implementations. While with 4BSD it's sufficient to just disable the tick interrupts, with ULE+PREEMPTION it's otherwise also possible that these are preempted via IPIs.
|
230890 |
01-Feb-2012 |
marius |
MFC: r230633, r230634
Now that we have a working OF_printf() since r230631 and a OF_panic() helper since r230632 (MFC'ed to stable/9 in r230884 and r230886 respectively), use these for output and panicing during the early cycles and move cninit() until after the static per-CPU data has been set up. This solves a couple of issue regarding the non- availability of the static per-CPU data: - panic() not working and only making things worse when called, - having to supply a special DELAY() implementation to the low-level console drivers, - curthread accesses of mutex(9) usage in low-level console drivers that aren't conditional due to compiler optimizations (basically, this is the problem described in r227537 but in this case for keyboards attached via uart(4)). [1]
PR: 164123 [1]
|
230888 |
01-Feb-2012 |
marius |
MFC: r230628
Mark cpu_{halt,reset}() as __dead2 as appropriate.
|
230886 |
01-Feb-2012 |
marius |
MFC: r230632
- Now that we have a working OF_printf() since r230631 (MFC'ed to stable/9 in r230884), use it for implementing a simple OF_panic() that may be used during the early cycles when panic() isn't available, yet. - Mark cpu_{exit,shutdown}() as __dead2 as appropriate.
|
230884 |
01-Feb-2012 |
marius |
MFC: r230631
Implement OF_printf() using kvprintf() directly, avoiding to use a buffer and allowing to handle newlines properly.
|
230882 |
01-Feb-2012 |
marius |
MFC: r230630
For machines where the kernel address space is unrestricted increase VM_KMEM_SIZE_SCALE to 2, awaiting more insight from alc@. As it turns out, the VM apparently has problems with machines that have large holes in the physical address space, causing the kmem_suballoc() call in kmeminit() to fail with a VM_KMEM_SIZE_SCALE of 1. Using a value of 2 allows these, namely Blade 1500 with 2GB of RAM, to boot.
PR: 164227
|
230880 |
01-Feb-2012 |
marius |
MFC: r230627
Using ATA_CAM along with ATAPI DMA causes data corruption with ALI_NEW and CMD controllers for reasons unknown so disable it.
PR: 164226
|
230872 |
01-Feb-2012 |
mav |
MFC r228820, r228851: Merge to da driver quirks hinting 4K physical sector sizes for SATA disks connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA I have translate models in different ways, requiring twice more quirks. Unluckily for Hitachi, their model names are trimmed on SAS, making impossible to identify 4K sector drives that way.
|
230867 |
01-Feb-2012 |
pluknet |
MFC r230545: Clarify and improve the boot menu with some small changes.
PR: misc/160818 Submitted by: Warren Block <wblock wonkity com>
|
230849 |
31-Jan-2012 |
ken |
MFC: 230000, 230544
Fix a race condition in CAM peripheral free handling, locking in the CAM XPT bus traversal code, and a number of other periph level issues.
r230544 | ken | 2012-01-25 10:58:47 -0700 (Wed, 25 Jan 2012) | 9 lines
Fix a bug introduced in r230000. We were eliminating all LUNs on a target in response to CAM_DEV_NOT_THERE, instead of just the LUN in question.
This will now just eliminate the specified LUN in response to CAM_DEV_NOT_THERE.
Reported by: Richard Todd <rmtodd@servalan.servalan.com>
r230000 | ken | 2012-01-11 17:41:48 -0700 (Wed, 11 Jan 2012) | 72 lines
Fix a race condition in CAM peripheral free handling, locking in the CAM XPT bus traversal code, and a number of other periph level issues.
cam_periph.h, cam_periph.c: Modify cam_periph_acquire() to test the CAM_PERIPH_INVALID flag prior to allowing a reference count to be gained on a peripheral. Callers of this function will receive CAM_REQ_CMP_ERR status in the situation of attempting to reference an invalidated periph. This guarantees that a peripheral scheduled for a deferred free will not be accessed during its wait for destruction.
Panic during attempts to drop a reference count on a peripheral that already has a zero reference count.
In cam_periph_list(), use a local sbuf with SBUF_FIXEDLEN set so that mallocs do not occur while the xpt topology lock is held, regardless of the allocation policy of the passed in sbuf.
Add a new routine, cam_periph_release_locked_buses(), that can be called when the caller already holds the CAM topology lock.
Add some extra debugging for duplicate peripheral allocations in cam_periph_alloc().
Treat CAM_DEV_NOT_THERE much the same as a selection timeout (AC_LOST_DEVICE is emitted), but forgo retries.
cam_xpt.c: Revamp the way the EDT traversal code does locking and reference counting. This was broken, since it assumed that the EDT would not change during traversal, but that assumption is no longer valid.
So, to prevent devices from going away while we traverse the EDT, make sure we properly lock everything and hold references on devices that we are using.
The two peripheral driver traversal routines should be examined. xptpdperiphtraverse() holds the topology lock for the entire time it runs. xptperiphtraverse() is now locked properly, but only holds the topology lock while it is traversing the list, and not while the traversal function is running.
The bus locking code in xptbustraverse() should also be revisited at a later time, since it is complex and should probably be simplified.
scsi_da.c: Pay attention to the return value from cam_periph_acquire().
Return 0 always from daclose() even if the disk is now gone.
Add some rudimentary error injection support.
scsi_sg.c: Fix reference counting in the sg(4) driver.
The sg driver was calling cam_periph_release() on close, but never called cam_periph_acquire() (which increments the reference count) on open.
The periph code correctly complained that the sg(4) driver was trying to decrement the refcount when it was already 0.
Sponsored by: Spectra Logic
|
230799 |
31-Jan-2012 |
attilio |
MFC r227758,227759,227788: Introduce macro stubs in the mutex and sxlock implementation that will be always defined and will allow consumers, willing to provide options, file and line to locking requests, to not worry about options redefining the interfaces. This is typically useful when there is the need to build another locking interface on top of the mutex one.
Requested by: kib
|
230788 |
30-Jan-2012 |
jhibbits |
MFC r228270,228277:
Add a devd notification for closing/opening the lid on PowerBooks and iBooks.
Approved by: nwhitehorn (mentor)
|
230769 |
30-Jan-2012 |
pluknet |
MFC r230531: Remove unused variable.
|
230760 |
29-Jan-2012 |
mckusick |
MFC r230101:
Convert FFS mount error messages from kernel printf's to using the vfs_mount_error error message facility provided by the nmount interface.
Clean up formatting of mount warnings which still need to use kernel printf's since they do not return errors.
Requested by: Craig Rodrigues <rodrigc@crodrigues.org>
|
230751 |
29-Jan-2012 |
jhibbits |
MFC r226449:
Add support for special keys (volume/brightness/eject) on Apple laptops with ADB keyboards.
Approved by: nwhitehorn (mentor)
|
230746 |
29-Jan-2012 |
marius |
MFC: r228858
Update a comment to reflect reality and explain why we're using the medany code model.
|
230740 |
29-Jan-2012 |
marius |
MFC: r228211
It doesn't make much sense to check whether child is NULL after already having dereferenced it. We either should generally check the device_t's supplied to bus functions before using them (which we seem to virtually never do) or just assume that they are not NULL. While at it make this code fit 78 columns.
Found with: Coverity Prevent(tm) CID: 4230
|
230738 |
29-Jan-2012 |
marius |
MFC: r228209
- In device_probe_child(9) check the return value of device_set_driver(9) when actually setting a driver as especially ENOMEM is fatal in these cases. - Annotate other calls to device_set_devclass(9) and device_set_driver(9) without the return value being checked and that are okay to fail.
Reviewed by: yongari (slightly earlier version)
|
230736 |
29-Jan-2012 |
marius |
MFC: r228027
Move the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.h where the prototype for pc98_ata_disk_firmware_geom_adjust() also lives in order to avoid an #ifdef'ed include in cam(4).
|
230734 |
29-Jan-2012 |
marius |
MFC: r228024
Update comment.
|
230733 |
29-Jan-2012 |
marius |
MFC: r228005
Change another instance of amd(4) to esp(4) missed in r227006 (MFC'ed to stable/9 in r227305).
Submitted by: Garrett Cooper
|
230725 |
29-Jan-2012 |
mckusick |
MFC r230249:
Make sure all intermediate variables holding mount flags (mnt_flag) and that all internal kernel calls passing mount flags are declared as uint64_t so that flags in the top 32-bits are not lost.
MFC r230250:
There are several bugs/hangs when trying to take a snapshot on a UFS/FFS filesystem running with journaled soft updates. Until these problems have been tracked down, return ENOTSUPP when an attempt is made to take a snapshot on a filesystem running with journaled soft updates.
|
230719 |
29-Jan-2012 |
marius |
MFC: r227912
- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than duplicating it. - In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.
|
230717 |
29-Jan-2012 |
marius |
MFC: r227907, r22791 (for diff reduction)
Add BCM5785 but wrap it in #ifdef notyet for now. According to yongari@ there are issues probably needing workarounds in bge(4) when brgphy(4) handles this PHY. Letting ukphy(4) handle it instead results in a working configuration, although likely with performance penalties.
|
230716 |
29-Jan-2012 |
marius |
MFC: r227906
Sync with NetBSD rev. 1.104
Obtained from: NetBSD
|
230711 |
29-Jan-2012 |
marius |
MFC: r227688
There's no need export the device interface methods of miibus(4).
|
230709 |
29-Jan-2012 |
marius |
MFC: r227687, r228290
- Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY addresses from being probed and attaching something including ukphy(4) to it. This is mainly necessarily for PHY switches that create duplicate or fake PHYs on the bus that can corrupt the PHY state when accessed or simply cause problems when ukphy(4) isolates the additional instances. - Change miibus(4) to be a hinted bus, allowing to add child devices via hints and to set their attach arguments (including for automatically probed PHYs). This is mainly needed for PHY switches that violate IEEE 802.3 and don't even implement the basic register set so we can't probe them automatically. However, the ability to alter the attach arguments for automatically probed PHYs is also useful as for example it allows to test (or tell a user to test) new variant of a PHY with a specific driver by letting an existing driver attach to it via manipulating the IDs without the need to touch the source code or to limit a Gigabit Ethernet PHY to only announce up to Fast Ethernet in order to save energy by limiting the capability mask. Generally, a driver has to be hinted via hint.phydrv.X.at="miibusY" and hint.phydrv.X.phyno="Z" (which already is sufficient to add phydrvX at miibusY at PHY address Z). Then optionally the following attach arguments additionally can be configured: hint.phydrv.X.id1 hint.phydrv.X.id2 hint.phydrv.X.capmask - Some minor cleanup.
Reviewed by: adrian, ray
|
230707 |
29-Jan-2012 |
marius |
MFC: r227686
There's no need to read DC_10BTSTAT twice in dcphy_status().
|
230705 |
29-Jan-2012 |
marius |
MFC: r227685
- There's no need to ignore the return value of mii_attach(9) when attaching dcphy(4) (CID 9283). - In dc_detach(), check whether ifp is NULL as dc_attach() may call the former without ifp being allocated (CID 4288).
Found with: Coverity Prevent(tm)
|
230703 |
29-Jan-2012 |
marius |
MFC: r227043
Sprinkle some const.
|
230701 |
29-Jan-2012 |
marius |
MFC: r226950
Add multiple inclusion protection.
|
230699 |
29-Jan-2012 |
marius |
MFC: r226948
Remove unnecessary DMA constraints.
|
230697 |
29-Jan-2012 |
marius |
MFC: r226270
- Remove unused remnants of MII bitbang'ing. - Sprinkle const.
|
230695 |
29-Jan-2012 |
marius |
MFC: r226175
In device_get_children() avoid malloc(0) in order to increase portability to other operating systems.
PR: 154287
|
230694 |
29-Jan-2012 |
marius |
MFC: r226171
Sprinkle const.
|
230691 |
29-Jan-2012 |
marius |
MFC: r226057
- Currently, sched_balance_pair() may cause a CPU to send an IPI_PREEMPT to itself, which sparc64 hardware doesn't support. One way to solve this would be to directly call sched_preempt() instead of issuing a self-IPI. However, quoting jhb@: "On the other hand, you can probably just skip the IPI entirely if we are going to send it to the current CPU. Presumably, once this routine finishes, the current CPU will exit softlock (or will do so "soon") and will then pick the next thread to run based on the adjustments made in this routine, so there's no need to IPI the CPU running this routine anyway. I think this is the better solution. Right now what is probably happening on other platforms is as soon as this routine finishes the CPU processes its self-IPI and causes mi_switch() which will just switch back to the softclock thread it is already running." - With r226054 (MFC'ed to stable/9 in r230690) and the the above change in place, sparc64 now no longer is incompatible with ULE and vice versa. However, powerpc/E500 still is.
Submitted by: jhb Reviewed by: jeff
|
230690 |
29-Jan-2012 |
marius |
MFC: r226054
- Use atomic operations rather than sched_lock for safely assigning pm_active and pc_pmap for SMP. This is key to allowing adding support for SCHED_ULE. Thanks go to Peter Jeremy for additional testing. - Add support for SCHED_ULE to cpu_switch().
|
230687 |
29-Jan-2012 |
marius |
MFC: r225931, r225932, r227000
Make sparc64 compatible with NEW_PCIB and enable it: - Implement bus_adjust_resource() methods as far as necessary and in non-PCI bridge drivers as far as feasible without rototilling them. - As NEW_PCIB does a layering violation by activating resources at layers above pci(4) without previously bubbling up their allocation there, move the assignment of bus tags and handles from the bus_alloc_resource() to the bus_activate_resource() methods like at least the other NEW_PCIB enabled architectures do. This is somewhat unfortunate as previously sparc64 (ab)used resource activation to indicate whether SYS_RES_MEMORY resources should be mapped into KVA, which is only necessary if their going to be accessed via the pointer returned from rman_get_virtual() but not for bus_space(9) as the later always uses physical access on sparc64. Besides wasting KVA if we always map in SYS_RES_MEMORY resources, a driver also may deliberately not map them in if the firmware already has done so, possibly in a special way. So in order to still allow a driver to decide whether a SYS_RES_MEMORY resource should be mapped into KVA we let it indicate that by calling bus_space_map(9) with BUS_SPACE_MAP_LINEAR as actually documented in the bus_space(9) page. This is implemented by allocating a separate bus tag per SYS_RES_MEMORY resource and passing the resource via the previously unused bus tag cookie so we later on can call rman_set_virtual() in sparc64_bus_mem_map(). As a side effect this now also allows to actually indicate that a SYS_RES_MEMORY resource should be mapped in as cacheable and/or read-only via BUS_SPACE_MAP_CACHEABLE and BUS_SPACE_MAP_READONLY respectively. - Do some minor cleanup like taking advantage of rman_init_from_resource(), factor out the common part of bus tag allocation into a newly added sparc64_alloc_bus_tag(), hook up some missing newbus methods and replace some homegrown versions with the generic counterparts etc. - While at it, let apb_attach() (which can't use the generic NEW_PCIB code as APB bridges just don't have the base and limit registers implemented) regarding the config space registers cached in pcib_softc and the SYSCTL reporting nodes set up.
|
230683 |
28-Jan-2012 |
marius |
MFC: r225901
Remove obsolete macros.
|
230682 |
28-Jan-2012 |
marius |
MFC: r225900
Nuke SUN4U #ifdef's which with the demise of sun4v no longer serve any purpose.
|
230680 |
28-Jan-2012 |
marius |
MFC: r225899
Also allocate space for the PIL counters. Given that no machine actually uses IV_MAX interrupt vectors this wasn't a problem in practice though.
|
230677 |
28-Jan-2012 |
marius |
MFC: r225891
Re-reading the Schizo errata suggests that it's actually tolerable to also use the streaming buffer of pre version 5/revision 2.3 hardware as long as we stay away from context flushes (which iommu(4) so far doesn't take advantage of). OpenSolaris does the same.
|
230675 |
28-Jan-2012 |
marius |
MFC: r225890
- Add protective parentheses to macros as far as possible. - Move {r,w,}mb() to the top of this file where they live on most of the other architectures.
|
230673 |
28-Jan-2012 |
marius |
MFC: r225889, r228222
In total store which we use for running the kernel and all of the userland atomic operations behave as if they were followed by a CPU memory barrier so there's no need to include ones in the acquire variants of atomic(9) and it's sufficient to just use include compiler memory barriers to satisfy the requirements of atomic(9). Removing the CPU memory barriers results in a small performance improvement, specifically this is sufficient to compensate the performance loss seen in the worldstone benchmark seen when using SCHED_ULE instead of SCHED_4BSD. This change is inspired by Linux even more radically doing the equivalent thing some time ago. Thanks go to Peter Jeremy for additional testing.
|
230671 |
28-Jan-2012 |
marius |
MFC: r225888
Add a comment about why contrary to what once would think running all of userland with total store order actually is appropriate.
|
230669 |
28-Jan-2012 |
marius |
MFC: r225887
Use the extended integer condition code when comparing 64-bit values. Given that ATOMIC_INC_LONG currently is unused this happened to not be fatal.
|
230667 |
28-Jan-2012 |
marius |
MFC: r225886
- Right-justify backslashes as suggested by style(9). - Rename ATOMIC_INC_ULONG to ATOMIC_INC_LONG in order to be consistent with the names of the other macros in this file an adjust accordingly.
|
230665 |
28-Jan-2012 |
marius |
MFC: r228022, r228026
For sparc64 also adjust the geometry of da(4) driven disks to not overflow the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The geometry chosen for disks above that limit allows to use disks up to 2TB, which is the limit of the extended VTOC8 format. The geometry used for disks smaller than the 16-bit cylinders limit stays the same as used by cam_calc_geometry(9) for extended translation. Thanks to Hans-Joerg Sirtl for providing hardware for testing this change.
|
230637 |
28-Jan-2012 |
rmacklem |
MFC: r230100 Tai Horgan reported via email that there were two places in the new NFSv4 server where the code follows the wrong list. Fortunately, for these fairly rare cases, the lc_stateid[] lists are normally empty. This patch fixes the code to follow the correct list.
|
230607 |
27-Jan-2012 |
pluknet |
MFC r230496: Remove the stale XXX rt_newaddrmsg comment.
|
230604 |
27-Jan-2012 |
qingli |
MFC 227460
A default route learned from the RAs could be deleted manually after its installation. This removal may be accidental and can prevent the default route from being installed in the future if the associated default router has the best preference. The cause is the lack of status update in the default router on the state of its route installation in the kernel FIB. This patch fixes the described problem.
Reviewed by: hrs, discussed with hrs
|
230518 |
25-Jan-2012 |
rmacklem |
MFC: r229956 jwd@ reported via email that the "CacheSize" field reported by "nfsstat -e -s" would go negative after using the "-z" option to zero out the stats. This patch fixes that by not zeroing out the srvcache_size field for "-z", since it is the size of the cache and not a counter
|
230497 |
24-Jan-2012 |
pluknet |
MFC r230256: Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing the allocated memory before calling mtx_init(9) on mtx pointing to it. Otherwize, random contents of uninitialized memory might occasionally trigger the assertion.
Reported by: Pavel Polyakov <bsd kobyla org> Reviewed by: pjd
|
230485 |
23-Jan-2012 |
jh |
MFC r229694:
r222004 changed sbuf_finish() to not clear the buffer error status. As a consequence sbuf_len() will return -1 for buffers which had the error status set prior to sbuf_finish() call. This causes a problem in pfs_read() which purposely uses a fixed size sbuf to discard bytes which are not needed to fulfill the read request.
Work around the problem by using the full buffer length when sbuf_finish() indicates an overflow. An overflowed sbuf with fixed size is always full.
PR: kern/163076
|
230462 |
22-Jan-2012 |
jh |
MFC r229692:
Check the return value of sbuf_finish() in pfs_readlink() and return ENAMETOOLONG if the buffer overflowed.
|
230446 |
22-Jan-2012 |
rmacklem |
MFC: r229802 opt_inet6.h was missing from some files in the new NFS subsystem. The effect of this was, for clients mounted via inet6 addresses, that the DRC cache would never have a hit in the server. It also broke NFSv4 callbacks when an inet6 address was the only one available in the client. This patch fixes the above, plus deletes opt_inet6.h from a couple of files it is not needed for.
|
230435 |
21-Jan-2012 |
alc |
MFC r228923, r228935, and r229007 Eliminate many of the unnecessary differences between the native and paravirtualized pmap implementations for i386.
Fix a bug in the Xen pmap's implementation of pmap_extract_and_hold(): If the page lock acquisition is retried, then the underlying thread is not unpinned.
Wrap nearby lines that exceed 80 columns.
Merge r216333 and r216555 from the native pmap When r207410 eliminated the acquisition and release of the page queues lock from pmap_extract_and_hold(), it didn't take into account that pmap_pte_quick() sometimes requires the page queues lock to be held. This change reimplements pmap_extract_and_hold() such that it no longer uses pmap_pte_quick(), and thus never requires the page queues lock.
Merge r177525 from the native pmap Prevent the overflow in the calculation of the next page directory. The overflow causes the wraparound with consequent corruption of the (almost) whole address space mapping.
Strictly speaking, r177525 is not required by the Xen pmap because the hypervisor steals the uppermost region of the normal kernel address space. I am nonetheless merging it in order to reduce the number of unnecessary differences between the native and Xen pmap implementations.
|
230431 |
21-Jan-2012 |
alc |
MFC r228746 The Xen pmap doesn't support superpages. So, there is no point in it initializing structures, like the pv table, that are only used to implement superpages. In fact, some of the unnecessary code in pmap_init() was actually doing harm. It was preventing the kernel from booting on virtual machines with more than 768 MB of memory.
|
230425 |
21-Jan-2012 |
rmh |
MFC r227827 Define __FreeBSD_kernel__ macro in sys/param.h.
__FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, which by definition is always true on FreeBSD. This macro is also defined on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.
It is tempting to use this macro in userland code when we want to enable kernel-specific routines, and in fact it's fine to do this in code that is part of FreeBSD itself. However, be aware that as presence of this macro is still not widespread (e.g. older FreeBSD versions, 3rd party compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in external applications without also checking for __FreeBSD__ as an alternative.
Approved by: kib (mentor)
|
230421 |
21-Jan-2012 |
alc |
MFC r228398 Avoid the possibility of integer overflow in the calculation of VM_KMEM_SIZE_MAX. Specifically, if the user/kernel address space split was changed such that the kernel address space was greater than or equal to 2 GB, then overflow would occur.
PR: 161721
|
230418 |
21-Jan-2012 |
alc |
MFC r226163, r228317, and r228324 Fix the handling of an empty kmem map by sysctl_kmem_map_free().
Eliminate the possibility of 32-bit arithmetic overflow in the calculation of vm_kmem_size that may occur if the system administrator has specified a vm.vm_kmem_size tunable value that exceeds the hard cap.
Eliminate stale numbers from a comment.
PR: 162741
|
230320 |
18-Jan-2012 |
gnn |
MFC: 229965
Fix for PR 138526.
Add the ability for /dev/null and /dev/zero to accept being set into non blocking mode via fcntl(). This brings the code into compliance with IEEE Std 1003.1-2001 as referenced in another PR, 94729.
Reviewed by: jhb
|
230305 |
18-Jan-2012 |
jhibbits |
MFC r228869,r228874:
Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x). Sampling is in progress.
Approved by: nwhitehorn (mentor)
|
230302 |
18-Jan-2012 |
hselasky |
MFC r230032, r230050, r230090, r230091 and r228493. - Various XHCI and USB 3.0 related issues. - USB 3.0 HUBs should work after this change.
|
230290 |
17-Jan-2012 |
jhibbits |
MFC r230035:
Add PWM monitoring sysctl to G4 MDD (Windtunnel) fan driver. While there, clean up some style nits.
|
230266 |
17-Jan-2012 |
gavin |
Merge r229085 from head:
Default to not performing the early-boot memory tests when we detect we are booting inside a VM. There are three reasons to disable this:
o It causes the VM host to believe that all the tested pages or RAM are in use. This in turn may force the host to page out pages of RAM belonging to other VMs, or otherwise cause problems with fair resource sharing on the VM cluster. o It adds significant time to the boot process (around 1 second/Gig in testing) o It is unnecessary - the host should have already verified that the memory is functional etc.
Note that this simply changes the default when in a VM - it can still be overridden using the hw.memtest.tests tunable.
Early MFC requested by: bz
|
230257 |
17-Jan-2012 |
kib |
MFC r229435: Add special loader environment variables 'comconsole_port' and 'comconsole_pcidev'.
Change allows to use ISA serial ports other than COM1 for the loader/kernel console without loader recompilation, and to configure console on the PCI-attached UARTs.
|
230219 |
16-Jan-2012 |
pluknet |
MFC r228985,229881:
Unset the environment variables associated with individual menu items before invoking the kernel.
Get rid of a spurious warning on the console when booting the kernel from the interactive loader(8) prompt and beastie_disable="YES" is set in loader.conf(5).
Submitted by: Devin Teske <devin dott teske fisglobal.com>
|
230175 |
15-Jan-2012 |
avg |
MFC r228265: critical_exit: ignore td_owepreempt if kdb_active is set
|
230173 |
15-Jan-2012 |
avg |
MFC r228718: ule: ensure that batch timeshare threads are scheduled fairly
|
230171 |
15-Jan-2012 |
avg |
MFC r228710: opensolaris compat: fix vcmn_err so that panic(9) produces a proper message
|
230169 |
15-Jan-2012 |
avg |
MFC r228426: syscons: make sc_puts static as it is used only privately
|
230167 |
15-Jan-2012 |
avg |
MFC r228430,228433: put sys/systm.h at its proper place or add it if missing
|
230165 |
15-Jan-2012 |
avg |
MFC r228267: zfsboot: print boot.config contents before parsing it
|
230163 |
15-Jan-2012 |
avg |
MFC r228266: zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)
|
230086 |
13-Jan-2012 |
jhb |
MFC 229665,229672,229700: Remove the assertion from tcp_input() that rcv_nxt is always greater than or equal to rcv_adv and fix tcp_twstart() to handle this case by assuming the last window was zero rather than a negative value.
The code in tcp_input() already safely handled this case. It can happen due to delayed ACKs along with a remote sender that sends data beyond the window we previously advertised. If we have room in our socket buffer for the extra data beyond the advertised window, we will accept it. However, if the ACK for that segment is delayed, then we will not effectively fixup rcv_adv to account for that extra data until the next segment arrives and forces out an ACK. When that next segment arrives, rcv_nxt will be beyond rcv_adv.
|
230085 |
13-Jan-2012 |
jhb |
MFC 228961: Further relax the strictness of enforcing allocations to only come from decoded ranges. Pass any request for a specific range that fails because it is not in a decoded range for an ACPI Host-PCI bridge up to the parent to see if it can still be allocated. This is based on the assumption that many BIOSes are inconsistent/broken and that settings programmed into BARs or resources assigned to other built-in components are more trustworthy than the list of decoded resource ranges in _CRS. This effectively limits the decoded ranges to only being used for "wildcard" ranges when allocating fresh resources for a BAR, etc. At some point I would like to only be this permissive during an early scan of firmware-assigned resources during boot and to be strict about all later allocations, but that isn't viable currently.
|
230083 |
13-Jan-2012 |
jhb |
MFC 228960: Cap the priority calculated from the current thread's running tick count at SCHED_PRI_RANGE to prevent overflows in the priority value. This can happen due to irregularities with clock interrupts under certain virtualization environments.
|
230081 |
13-Jan-2012 |
jhb |
MFC 229519: Fix 'make clean' for this module so it cleans up the generated gssd.h.
|
230079 |
13-Jan-2012 |
jhb |
MFC 229429: Some small fixes to CPU accounting for threads: - Only initialize the per-cpu switchticks and switchtime in sched_throw() for the very first context switch on APs during boot. This avoids a small gap between the middle of thread_exit() and sched_throw() where time is not accounted to any thread. - In thread_exit(), update the timestamp bookkeeping to track the changes to mi_switch() introduced by td_rux so that the code once again matches the comment claiming it is mimicing mi_switch(). Specifically, only update the per-thread stats directly and depend on ruxagg() to update p_rux rather than adjusting p_rux directly. While here, move the timestamp bookkeeping as late in the function as possible.
|
230078 |
13-Jan-2012 |
jhb |
MFC 229427: Fix a few bugs in the SRAT parsing code: - Actually increment ndomain when building our list of known domains so that we can properly renumber them to be 0-based and dense. - If the number of domains exceeds the configured maximum (VM_NDOMAIN), bail out of processing the SRAT and disable NUMA rather than hitting an obscure panic later. - Don't bother parsing the SRAT at all if VM_NDOMAIN is set to 1 to disable NUMA (the default).
|
230076 |
13-Jan-2012 |
jhb |
MFC 229390,229420,229479: Fix some races in the multicast code by removing places where we would drop the IF_ADDR_LOCK while walking an interface's multicast address list: - Use TAILQ_FOREACH() instead of TAILQ_FOREACH_SAFE() for some loops that do not modify the queues they iterate over. - When cancelling multicast timers on an interface, don't release the reference on a group in the leaving state while iterating over the loop. Instead, use the same approach used in igmp_ifdetach() and mld_ifdetach() of placing the groups to free on a pending release list and then releasing the references after dropping the IF_ADDR_LOCK. - Use the mli_relinmhead list normally used to defer calls to in6m_release_locked() to defer calls to mld_v1_transmit_report() until after the IF_ADDR_LOCK is dropped.
|
230074 |
13-Jan-2012 |
jhb |
MFC 229414,229476,229477: Various fixes to the SIOC[DG]LIFADDR ioctl handlers: - Grab a reference on any matching interface address (ifa) before dropping the IF_ADDR_LOCK() and release the reference after using it to prevent a potential use-after-free. - Fix the IPv4 ioctl handlers in in_lifaddr_ioctl() to work with IPv4 interface addresses rather than IPv6. - Add missing interface address list locking in the IPv4 handlers.
|
230072 |
13-Jan-2012 |
jhb |
MFC 229400: Improve the cscope target's handling of MD directories. Automatically include the MACHINE_CPUARCH directory if it differents from MACHINE when building an index for a single machine. Also, include the 'x86' directory when building an index for i386, pc98, or amd64.
|
230071 |
13-Jan-2012 |
jhb |
MFC 229728: Add 5 spare VOPs as placeholders to avoid breaking the KBI in the future when new VOPs are MFC'd to a branch.
|
230069 |
13-Jan-2012 |
jhb |
MFC 229622: Fix a logic bug in change 228207 in the check for a thread's new user priority being a realtime priority.
|
230067 |
13-Jan-2012 |
jhb |
MFC 228849, 229727: Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended attributes of a vnode are changed.
|
230065 |
13-Jan-2012 |
jhb |
MFC 228738: Allow boot0cfg to force a PXE boot via boot0 on the next boot. - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well.
|
230019 |
12-Jan-2012 |
mav |
MFC r228461: Fix few bugs in isp(4) target mode support: - in destroy_lun_state() assert hold == 1 instead of 0, as it should receive hold taken by the create_lun_state() or get_lun_statep() before; - fix hold count leak inside rls_lun_statep() that also fired above assert; - in destroy_lun_state() use SIM bus number instead of SIM path id for ISP_GET_PC_ADDR(), as it was before r196008; - make isp_disable_lun() to set status in CCB; - make isp_target_mark_aborted() set status into the proper CCB.
Reviewed by: mjacob Sponsored by: iXsystems, inc.
|
230014 |
12-Jan-2012 |
mav |
MFC r228808, r228847, 229395:
r228808, r228847: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC.
229395: Add support for CDRIOCGETBLOCKSIZE and CDRIOCSETBLOCKSIZE IOCTLs to control sector size same as acd driver does. Together with r228808 and r228847 this allows existing multimedia/vlc to play Audio CDs via CAM cd driver.
PR: ports/162190 Sponsored by: iXsystems, Inc.
|
230012 |
12-Jan-2012 |
jhb |
MFC 228715: Add a TASK_INITIALIZER() macro that can be used to statically initialize a task structure.
|
229973 |
11-Jan-2012 |
mav |
MFC r228726, r228727: Cast some vendor-specific spell on VIA VT1708S codecs to: - make analog input loopback work; - get access to the mics boost controls.
Sponsored by: iXsystems, Inc.
|
229953 |
11-Jan-2012 |
rmacklem |
MFC: r228827 During investigation of an NFSv4 client crash reported by glebius@, jhb@ spotted that nfscl_getstateid() might modify credentials when called from nfsrpc_read() for the case where p != NULL, whereas nfsrpc_read() only did a crdup() to get new credentials for p == NULL. This bug was introduced by r195510, since pre-r195510 nfscl_getstateid() only modified credentials for the p == NULL case. This patch modifies nfsrpc_read()/nfsrpc_write() so that they do crdup() for the p != NULL case. It is conceivable that this bug caused the crash reported by glebius@, but that will not be determined for some time, since the crash occurred after about 1month of operation.
|
229935 |
10-Jan-2012 |
jh |
MFC r228021:
Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target. This was missed in r221353.
|
229929 |
10-Jan-2012 |
pho |
MFC: r227550, r227576
Handle invalid large values for getdirentries(2) data buffer size. Fix build, use %d for int value formatting.
|
229902 |
10-Jan-2012 |
rmacklem |
MFC: r228757 jwd@ reported a problem via email where the old NFS client would get a reply of EEXIST from an NFS server when a Mkdir RPC was retried, for an NFS over UDP mount. Upon investigation, it was found that the client was retransmitting the Mkdir RPC request over UDP, but with a different xid. As such, the retransmitted message would miss the Duplicate Request Cache in the server, causing it to reply EEXIST. The kernel client side UDP rpc code has two timers. The first one causes a retransmit using the same xid and socket and was set to a fixed value of 3seconds. (The default can be overridden via CLSET_RETRY_TIMEOUT.) The second one creates a new socket and xid and should be larger than the first. However, both NFS clients were setting the second timer to nm_timeo ("timeout=<value>" mount argument), which defaulted to 1second, so the first timer would never time out. This patch fixes both NFS clients so that they set the first timer using nm_timeo and makes the second timer larger than the first one.
|
229885 |
09-Jan-2012 |
thompsa |
MFC r226324
Dont just set the pin high when turning on output, use the current value. Also let this value be set when in input mode.
|
229883 |
09-Jan-2012 |
thompsa |
MFC r226034
Add missing newbus glue, this has never attached properly to gpiobus.
|
229882 |
09-Jan-2012 |
thompsa |
MFC r225955
Allow ixp425 boot2 to compile after r219452
|
229874 |
09-Jan-2012 |
yongari |
MFC r228717: Increase wait time for OP_TCPSTART command processing. It seems 100us is not enough to ensure prefetch unit work.
|
229870 |
09-Jan-2012 |
yongari |
MFC r228716: TCP header size is represented by number of 32bits words. Fix the TCP header size calculation such that makes TSO engine cache all header(ethernet/IP/TCP) bytes to its internal buffer. While here, remove extra pull up for TCP payload. Unlike some em(4) controllers, fxp(4) does not require such work around for TSO. The two limitations are ethernet/IP/TCP header size should be less than or equal to the size of controller's internal buffer(80 bytes) and these header information should be found in the first fragment of a TSO frame.
|
229867 |
09-Jan-2012 |
yongari |
MFC r228479-228480: r228479: BCM5720 performance tweak from Broadcom. o Allow multiple outstanding read requests from non-LSO read DMA engine. o Allow 4KB burst length reads for non-LSO frames. o Enable 512B burst length reads for buffer descriptors.
r228480: Destroy DMA tag for jumbo RX buffer in device detach.
|
229864 |
09-Jan-2012 |
yongari |
MFC r228476: Rework link state tracking and remove superfluous link UP/DOWN messages. o Add check for actually resolved speed in miibus_statchg callback instead of blindly reprogramming BCE_EMAC_MODE register. The callback may be called multiple times(e.g. link UP, link transition, auto-negotiate complete etc) while auto-negotiation is in progress. All unresolved link state changes are ignored now and setting BCE_EMAC_MODE after link establishment is done once. o bce(4) is careful enough not to drive MII_TICK if driver got a valid link. To detect lost link, bce(4) relied on link state change interrupt and if driver see the interrupt, it forced to drive MII_TICK by calling bce_tick() in interrupt handler. Because bce(4) generates multiple link state change interrupts while auto-negotiation is in progress, bce_tick() would be called multiple times and this resulted in generating multiple link UP/DOWN messages. With this change, bce_tick() is not called in interrupt handler anymore such that miibus_statchg callback handles link state changes with consistent manner.
|
229858 |
09-Jan-2012 |
jh |
MFC r227823, r228163:
Append unit number to the WMI status device name to allow attaching multiple acpi_wmi(4) instances.
PR: kern/162491
|
229855 |
09-Jan-2012 |
ivoras |
MFC r227822: Avoid panics from recursive rename operations.
PR: kern/159418
|
229827 |
08-Jan-2012 |
rmacklem |
MFC: r228560 Patch the new NFS server in a manner analagous to r228520 for the old NFS server, so that it correctly handles a count == 0 argument for Commit.
|
229799 |
08-Jan-2012 |
rmacklem |
MFC: r228260 This patch adds a sysctl to the NFSv4 server which optionally disables the check for a UTF-8 compliant file name. Enabling this sysctl results in an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled by default. However, enabling this sysctl results in NFSv3 compatible behaviour and fixes the problem reported by "dan at sunsaturn.com" to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat".
|
229752 |
07-Jan-2012 |
rmacklem |
MFC: r228217 Post r223774, the NFSv4 client no longer has multiple instances of the same lock_owner4 string. As such, the handling of cleanup of lock_owners could be simplified. This simplification permitted the client to do a ReleaseLockOwner operation when the process that the lock_owner4 string represents, has exited. This permits the server to release any storage related to the lock_owner4 string before the associated open is closed. Without this change, it is possible to exhaust a server's storage when a long running process opens a file and then many child processes do locking on the file, because the open doesn't get closed. A similar patch was applied to the Linux NFSv4 client recently so that it wouldn't exhaust a server's storage.
|
229736 |
06-Jan-2012 |
yongari |
MFC r228333,228335-228336,228362,228368-228369,228381: r228333: Protect SIOCSIFMTU ioctl handler with driver lock. Don't blindly re-initialize controller whenever MTU is changed. Now, reinitializing is done only when driver is running.
While here, remove unnecessary assignment of error value since it was already initialized to 0.
r228335: Consistently use a tab character instead of using either a space or tab after #define. While I'm here consistently use capital letters when it uses hexadecimal notation.
No functional changes.
r228336: Disable all clocks and put PHY into COMA before entering into suspend state. This will save more power. On resume, make sure to enable all clocks. While I'm here, if controller is not fast ethernet, enable gigabit PHY.
r228362: Do not disable interrupt without knowing whether the raised interrupt is ours. Note, interrupts are automatically ACKed when the status register is read. Add RX/TX DMA error to interrupt handler and do full controller reset if driver happen to encounter these errors. There is no way to recover from these DMA errors without controller reset. Rename local variable name intrs with status to enhance readability.
While I'm here, rename ET_INTR_TXEOF and ET_INTR_RXEOF to ET_INTR_TXDMA and ET_INTR_RXDMA respectively. These interrupts indicate that a frame is successfully DMAed to controller's internal FIFO and they have nothing to do with EOF(end of frame). Driver does not need to wait actual end of TX/RX of a frame(e.g. no need to wait the end signal of TX which is generated when a frame in TX FIFO is emptied by MAC). Previous names were somewhat confusing.
r228368: Remove unnecessary definition of ET_PCIR_BAR. Controller support I/O memory only. While here, use pci_set_max_read_req(9) rather than directly manipulating PCIe device control register.
r228369: Announce flow control ability to PHY driver and enable RX flow control. Controller does not automatically generate pause frames based on number of available RX buffers so it's very hard to know when driver should generate XON frame in time. The only mechanism driver can detect low number of RX buffer condition is ET_INTR_RXRING0_LOW or ET_INTR_RXRING1_LOW interrupt. This interrupt is generated whenever controller notices the number of available RX buffers are lower than pre-programmed value( ET_RX_RING0_MINCNT and ET_RX_RING1_MINCNT register). This scheme does not provide a way to detect when controller sees enough number of RX buffers again such that efficient generation of XON/XOFF frame is not easy.
While here, add more flow control related register definition.
r228381: FreeBSD driver does not require arpcom structure in softc.
|
229723 |
06-Jan-2012 |
jhb |
MFC 227070,227341,227502: Add the posix_fadvise(2) system call. It is somewhat similar to madvise(2) except that it operates on a file descriptor instead of a memory region. It is currently only supported on regular files.
Note that this adds a new VOP, so all filesystem modules must be recompiled.
Approved by: re (kib)
|
229720 |
06-Jan-2012 |
yongari |
MFC r228326-228327,228331-228332: r228326: Controller does not require TX start command for every frame. So send a single TX command after setting up all TX frames. This removes unnecessary register accesses and bus_dmamap_sync(9) calls. et(4) uses TX interrupt moderation so it's possible to have TX buffers that were already transmitted but waiting for TX completion interrupt. If the number of available TX descriptor is less then 1/3 of total TX descriptor, try reclaiming first to get enough free TX descriptors before setting up TX descriptors. After r228325, et_txeof() no longer tries to send frames after reclaiming TX buffers. That change was made to give more chance to transmit frames in main interrupt handler since we can still send frames in interrupt handler with RX interrupt. So right before exiting interrupt hander, after enabling interrupt, try to send more frames. This gives slightly better performance numbers.
While I'm here reduce number of spare TX descriptors from 8 to 4. Controller does not require reserved TX descriptors, it was just to reduce TX overhead. After r228325, driver has much lower TX overhead so it does not make sense to reserve 8 TX descriptors.
r228327: Remove et_enable_intrs(), et_disable_intrs() functions and manipulation of interrupt register access is done through CSR_WRITE_4 macro. Also add disabling interrupt into et_reset() because we want interrupt disabled state after controller reset. While I'm here slightly change interrupt handler to be more readable one.
r228331: Rework link state tracking and TX/RX MAC configuration. o Do not report link status if driver is not running. o TX/RX MAC configuration should be done with resolved speed, duplex and flow control after establishing a link so it can't be done in driver initialization routine. Move the configuration to miibus_statchg callback which will be called whenever any link state change is detected. At this moment, flow-control is not enabled yet mainly because I was not able to set correct flow control parameters to generate TX pause frames. o Now TX/RX MAC is enabled only when a valid link is detected. Rearragnge hardware initialization routine a bit to leave enabling MAC to miibus_statchg callback. In order to that, TX/RX DMA engine is enabled in et_init_locked(). o Introduce ET_FLAG_LINK flag to track current link state. o Introduce ET_FLAG_FASTETHER flag to mark whether controller is fast ethernet. This flag is checked in miibus_statchg callback to know whether PHY established a valid link. o In et_stop(), TX/RX MAC is explicitly disabled instead of relying on et_reset(). And move et_reset() from et_stop() to controller initialization. Controler reset is not required here and it would also clear critial registers(i.e station address, RX filter configuration, WOL etc) that are required to make WOL work. o Switching to current media is done in et_init_locked() after setting IFF_DRV_RUNNING flag. This should ensure reliable auto-negotiation/manual link establishment. o In et_start_locked(), check whether driver got a valid link before trying to send frames. o Remove checking a link in et_tick() as this is done by miibus_statchg callback.
r228332: Implement hardware MAC statistics counter. Counters could be queried with dev.et.%d.stats sysctl node where %d is an instance of device.
|
229717 |
06-Jan-2012 |
yongari |
MFC r228325: Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path. This change should make et(4) work on any architectures. o Remove m_getl inline function and replace it with stanard mbuf interfaces. Previous code tried to minimize code duplication but this came from incorrect use of common DMA tag. Driver may be still use a common RX allocation handler with additional structure changes but I don't see much point to do that it would make it hard to understand the code. o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use ETHER_VLAN_ENCAP_LEN instead. o Add bunch of new RX status definition. It seems controller supports RX checksum offloading but I was not able to make the feature work yet. Currently driver checks whether recevied frame is good one or not. o Avoid a typedef ending in '_t' as style(9) says. o Controller has no restriction on DMA address space, so there is no reason to limit the DMA address to 32bit. Descriptor rings, status blocks and TX/RX buffers now use full 64bit DMA addressing. o Allocate DMA memory shared between host and controller as coherent. o Create 3 separate DMA tags to be used as TX, mini RX ring and stanard RX ring. Previously it created a single DMA tag and it was used to all three rings. o et(4) does not support jumbo frame at this moment and I still don't quite understand how jumbo frame works on this controller so use two RX rings to handle small sized frame and normal sized frame respectively. The mini RX ring will be used to receive frames that are less than or equal to 127 bytes. The second RX ring is used to receive frames that are not handled by the first RX ring. If jumbo frame support is implemented, driver may have to choose better RX scheme by letting the second RX ring handle jumbo frames. This scheme will mimic Broadcom's efficient jumbo frame handling feature. However RAM buffer size(16KB) of the controller is too small to hold 2 jumbo frames, if 9KB jumbo frame is used, I'm not sure how good performance would it have. o In et_rxeof(), make sure to check whether controller received good frame or not. Passing corrupted frame to upper layer is bad idea. o If driver receives a bad frame or driver fails to allocate RX buffer due to resource shortage condition, reuse previously loaded DMA map for RX buffer instead of unloading/loading RX buffer again. o et_init_tx_ring() never fails so change return type to void. o In watchdog handler, show TX DMA write back status of errored frame which could be used as a clue to debug watchdog timeout. o Add missing bus_dmamap_sync() in various places such that et(4) should work with bounce buffers(e.g. PAE). o TX side bus_dmamap_load_mbuf_sg(9) support. o RX side bus_dmamap_load_mbuf_sg(9) support. o Controller has no DMA alignment limit in RX buffer so use m_adj(9) in RX buffer allocation to make IP header align on 2 bytes boundary. Otherwise it would trigger unaligned access error in upper layer on strict alignment architectures. One of down side of controller is it provides limited set of RX buffer length like most Intel controllers. This is not problem at this moment because driver does not support jumbo frame yet but it may require alignment fixup code to support jumbo frame on strict alignment architectures. o In et_txeof(), don't zero TX descriptors for transmitted frames. TX descriptors don't need write access after transmission. Driver sets IFF_DRV_OACTIVE when the number of available TX descriptors are less than or equal to ET_NSEG_SPARE. Make sure to clear IFF_DRV_OACTIVE only when the number of available TX descriptor is greater than ET_NSEG_SPARE.
|
229711 |
06-Jan-2012 |
yongari |
MFC r228291-228293,228297-228298: r228291: Remove NetBSD license. r199548 removed all bit macros that were derived from NetBSD.
r228292: Implement suspend/resume methods. Driver has no issue with suspend/resume.
r228293: Fix alt(4) support. Also add check for number of available TX descriptors before trying to send frames. If we're not able to send a frame, make sure to prepend it to if_snd queue such that alt(4) should work.
While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP. ETHER_BPF_MTAP should be used for controllers that support VLAN hardware tag insertion. The controller supports VLAN tag insertion but lacks VLAN tag stripping in RX path though.
r228297: et(4) supports VLAN oversized frame so correctly set header length. While I'm here remove initializing if_mtu, it is set by ether_ifattach(9). Also move callout_init_mtx(9) to the right below driver lock initialization.
r228298: Make et_probe() return BUS_PROBE_DEFAULT such that allow other driver that has high precedence for the controller override et(4). Add missing callout_drain(9) in device detach and rework detach routine. While I'm here use rman_get_rid(9) instead of using cached resource id because bus methods are free to change the id.
|
229708 |
06-Jan-2012 |
jhb |
MFC 228967: Update if_obytes and if_omcast after successful transmit. While I'm here update if_oerrors if parent interface of vlan is not up and running. Previously it updated collision counter and it was confusing to interprete it.
|
229678 |
06-Jan-2012 |
rmacklem |
MFC: r227796 Clean up some cruft in the NFSv4 client left over from the OpenBSD port, so that it is more readable. No logic change is made by this commit.
|
229674 |
06-Jan-2012 |
rmacklem |
MFC: r227760 Add two arguments to the nfsrpc_rellockown() function in the NFSv4 client. This does not change the client's behaviour, but prepares the code so that nfsrpc_rellockown() can be called elsewhere in a future commit.
|
229661 |
05-Jan-2012 |
jhb |
MFC 227577: The sys/sysctl.h header is needed when MFI_DEBUG is defined.
|
229648 |
05-Jan-2012 |
yongari |
MFC r228286: Fix off by one error in mbuf access. Previously it caused panic. While I'm here use NULL to compare mbuf pointer and add additional check for zero length mbuf before accessing the mbuf.
PR: kern/162932
|
229641 |
05-Jan-2012 |
yongari |
MFC r228086: Announce flow control capability to PHY drivers and enable flow control for all vr(4) controllers that support it. It's known that old vr(4) controllers(Rhine II) does not support TX pause but Rhine III supports both TX and RX pause. Make TX pause really work on Rhine III by letting controller know available RX buffers. While here, adjust XON/XOFF parameters to get better performance with flow control.
|
229637 |
05-Jan-2012 |
jhb |
MFC 228866: Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the proper lock.
|
229635 |
05-Jan-2012 |
jhb |
MFC 228593: Fire a kevent if necessary after seeking on a regular file. This fixes a case where a kevent would not fire on a regular file if an application read to EOF and then seeked backwards into the file.
|
229633 |
05-Jan-2012 |
jhb |
MFC 228089: Change the if_vlan driver to use if_transmit for forwarding packets to the parent interface. This avoids the overhead of queueing a packet to an IFQ only to immediately dequeue it again.
|
229627 |
05-Jan-2012 |
jhb |
MFC 228361: Explicitly use curthread while manipulating td_fpop during last close of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collection of open file descriptors in pending control messages in the socket buffer of a UNIX domain socket after it was closed.
|
229625 |
05-Jan-2012 |
jhb |
MFC 228496: Implement BUS_ADD_CHILD() for the isab(4) driver. It already calls bus_generic_probe() and bus_generic_attach() to handle drivers that add new children via identify methods.
|
229619 |
05-Jan-2012 |
jhb |
MFC 228207: When changing the user priority of a thread, change the real priority in addition to the user priority for threads whose current real priority is equal to the previous user priority or if the new priority is a real-time priority. This allows priority changes of other threads to have an immediate effect.
|
229617 |
05-Jan-2012 |
jhb |
MFC 228185: Enhance the sequential access heuristic used to perform readahead in the NFS server and reuse it for writes as well to allow writes to the backing store to be clustered.
|
229611 |
05-Jan-2012 |
jhb |
MFC 227562: Add single-message MSI support to mfi(4). It is disabled by default but can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also support MSI-X, but in testing it seems that many adapters do not work with MSI-X but do work with MSI.
|
229607 |
05-Jan-2012 |
yongari |
MFC r228084: Reuse flag variable to represent driver internal states rather than using member variables in softc. While I'm here change media after setting IFF_DRV_RUNNING. This will remove unnecessary link state handling in vr_tick() if controller established a link immediately.
|
229604 |
05-Jan-2012 |
jhb |
MFC 227507: Finish making 'wcommitsize' an NFS client mount option.
|
229599 |
05-Jan-2012 |
rmacklem |
MFC: r227744 Since the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client, delete the code and fix up the related comments. This should not have any functional effect on the client.
|
229548 |
05-Jan-2012 |
rmacklem |
MFC: r227743 Post r223774 the NFSv4 client never uses the linked list with the head nfsc_defunctlockowner. This patch simply removes the code that loops through this always empty list, since the code no longer does anything useful. It should not have any effect on the client's behaviour.
|
229543 |
05-Jan-2012 |
yongari |
MFC r227842: For IP1001 PHY, do not set multi-port device(MASTER). Ideally this bit should not affect link establishment process of auto-negotiation if manual configuration is not used, which is true in auto-negotiation. However it seems setting this bit interfere with IP1001 PHY's down-shifting feature such that establishing a 10/100Mbps link failed when 1000baseT link is not available during auto-negotiation process.
|
229540 |
05-Jan-2012 |
yongari |
MFC r227828,227835,227837: r227828: Always start MII auto polling before accessing any MII registers.
r227835: Rework link establishment and link state detection logic. - Remove MIIBUS statchg callback and program VGE_DIAGCTL before initiating link establishment. Previously driver used to program VGE_DIAGCTL after getting a link in statchg callback. It seems the VGE_DIAGCTL register works like a kind of MII register such that it requires setting a 'to be' mode in advance rather than relying on resolved speed/duplex of established link. This means the statchg callback is not needed in driver. In addition, if there was no link at the time of media change, this was not called at all. - Introduce vge_ifmedia_upd_locked() to change current media to configured one. Actual media change is performed only after PHY reset and VGE_DIAGCTL setup. - In WOL configuration, make sure to clear forced mode such that controller can rely on auto-negotiation. - Unlike most other drivers that use miibus(4), vge(4) used controller's auto-polling feature for link state tracking via interrupt. This came from controller's inefficient mechanism to access MII registers. On link state change interrupt, vge(4) used to get current link state with series of MII register accesses. Because vge(4) already enabled auto polling, read PHY status register to resolved speed/duplex/flow control parameters.
vge(4) still does not drive MII_TICK to reduce number of MII register accesses which in turn means the driver does not know the status of auto-negotiation. This was a one of long standing issue of vge(4). Probably driver may be able to implement a timer that keeps track of auto-negotiation state and restart auto-negotiation when driver couldn't establish a link within a specified period. However the controller does not provide a reliable way to detect auto-negotiation failure so I'm not sure whether it's worth to implement it in driver.
Alternatively driver can completely disable MII auto-polling and let miibus(4) poll link state by driving MII_TICK. This may reduce unnecessary overhead of stopping/restarting MII auto-polling of controller. Unfortunately it was known that some variants of controller does not work correctly if MII auto-polling is disabled.
r227837: Announce flow control capability to underlying PHY driver. Pause timer value is initialized to 0xFFFF. Controller allows just 4 different TX pause thresholds. The lowest possible threshold value looks too aggressive so use next available threshold value.
|
229534 |
04-Jan-2012 |
yongari |
MFC r227850-227851,227854,227914,227916: r227850: Writing access to RL_CFG5 register also requires EEPROM write access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8).
r227851: Perform media change after setting IFF_DRV_RUNNING flag. Without it, driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick().
r227854: Disable accepting frames in re_stop() to put RX MAC into idle state. Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F).
While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown.
This should address occasional 'memory modified free' errors seen on recent RealTek controllers.
r227914: Make sure to stop TX MAC before freeing queued TX frames. For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART register. For RTL8402/8168E-VL/8168F/8411, wait until TX queue is empty.
r227916: To save more power, switch to 10/100Mbps link when controller is put into suspend/shutdown. Old PCI controllers performed that operation in firmware but for RTL8111C or newer controllers, it's responsibility of driver. It's not clear whether the firmware of RTL8111B still downgrades its speed to 10/100Mbps so leave it as it was.
|
229529 |
04-Jan-2012 |
yongari |
MFC r227587,227590-227591,227593,227638-227639: r227587: Add preliminary support for RTL8402 PCIe FastEthernet with integrated card reader.
r227590: Add preliminary support for RTL8411 PCIe Gigabit ethernet with integrated card reader.
r227591: Add missing driver lock in SIOCSIFCAP handler.
r227593: Disable PCIe ASPM (Active State Power Management) for all controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems.
r227638: Add preliminary support for second generation RTL8105E PCIe FastEthernet.
r227639: Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.
|
229524 |
04-Jan-2012 |
yongari |
MFC r227582: Enable 64bit DMA addressing support for all msk(4) controllers. Unnecessarily complex LE format used on Marvell controller was main reason not to enable 64bit DMA addressing in driver. If high 32bit address of DMA address of TX/RX buffer is changed, driver has to generate a new LE. In TX path, driver will keep track of lastly used high 32bit address of DMA address and generate a new LE whenever it sees high address change in the DMA address. In RX path, driver will always use two LEs to specify 64bit DMA address of RX buffer. If the high 32bit address of DMA address of RX buffer is the same as previous DMA address of RX buffer, driver does not have to use two LEs but driver will use two LEs for simplicity in RX ring management.
One of draw back for switching to 64bit DMA addressing is that the large amount of LEs are used to specify 64bit DMA address such that number of available LEs for TX/RX buffers are considerably reduced. To mitigate the issue, increase number of available LEs from 256 to 384 for TX and from 256 to 512 for RX. For 32bit architectures, msk(4) does not use 64bit DMA addressing to save resources.
|
229520 |
04-Jan-2012 |
yongari |
MFC r227452: To send a frame, controller requires a prepended TX header and the length of frame should be treated as multiple of 4. Actual frame length is set in the TX header. The TX header position should be aligned on 4 byte boundary and actual frame start position should be aligned on 4 byte boundary as well. This means we need 4(TX header length) + 3(frame length fixup) additional free space in TX buffer in addition to actual frame length. Make sure TX handler check these additional bytes. ae_tx_avail_size() returns actual free space in TX buffer to ease the calculation of available TX buffer space in caller. While I'm here, replace magic number to appropriate sizeof operator to enhance readability.
This change should fix controller lockup issue happened under certain conditions but it still does not fix watchdog timeout. It seems the watchdog timeout is side-effect of TxS and TxD mismatches. The root cause of TxD/TxD mismatch is not known yet but it looks like silicon bug. I guess driver may have to reinitialize controller whenever it sees TxS and TxD mismatches but leave it as it was at this moment.
PR: kern/145918
|
229505 |
04-Jan-2012 |
jhb |
MFC 227069: Move the cleanup of f_cdevpriv when the reference count of a devfs file descriptor drops to zero out of _fdrop() and into devfs_close_f() as it is only relevant for devfs file descriptors.
|
229501 |
04-Jan-2012 |
jhb |
MFC 226746: Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for the carry and zero flags being set, respectively, in <btxv86.h> and use them throughout the x86 boot code.
|
229500 |
04-Jan-2012 |
jhb |
MFC 226364: Use PAIR32TO64() for the offset and length parameters to freebsd32_posix_fallocate() to properly handle big-endian platforms.
|
229499 |
04-Jan-2012 |
jhb |
MFC 226039: Ignore SRAT memory entries if the memory range does not overlap with an existing phys_avail[] entry. If a hw.physmem setting causes a memory domain to not be present in phys_avail[], the SRAT table will now be ignored rather than triggering a panic when a CPU in the missing domain tries to allocate a page.
|
229492 |
04-Jan-2012 |
pluknet |
MFC r228916: Clean up from the 4.x era.
In an example of boot command: - rename wd(4) IDE disk drives name to ad(4) for the time being. - update the used kernel path "/kernel" to the current default.
Bump .Dd for this and previous changes.
|
229487 |
04-Jan-2012 |
pluknet |
MFC r227447:
struct timespec32: change types of tv_sec and tv_nsec fields to signed to match native struct timespec ABI on __LP32__.
|
229485 |
04-Jan-2012 |
pluknet |
MFC r226882: Fix arguments list for proc:::signal-discard DTrace probe.
Reported by: Anton Yuzhaninov <citrin citrin ru>
|
229482 |
04-Jan-2012 |
pluknet |
MFC r227055: Remove a couple of write-only variables.
|
229480 |
04-Jan-2012 |
pluknet |
Revert MFC r226833,227056. /stand exists in the MFS root used during a sysinstall-based install.
Reported by: jhb Pointy hat to: pluknet
|
229475 |
04-Jan-2012 |
pho |
MFC: r227527
Removed extra PRELE() call.
|
229473 |
04-Jan-2012 |
pluknet |
MFC r226833,r227056:
Remove the long reprecated ``/stand/sysinstall'' from the init_path.
|
229452 |
04-Jan-2012 |
yongari |
MFC r227675: Partially revert r218788. r218788 removed calling dc_setcfg() for !DC_IS_ADMTEK in dc_miibus_statchg(). This change broke link establishment of Intel 21143 with dcphy(4) where it stuck in "ability detect" state without completing auto-negotiation. Also nuke dc_if_media as it's not actually used.
|
229441 |
03-Jan-2012 |
yongari |
MFC r227512: Overhaul bus_dma(9) usage in driver: - Don't use a single big DMA block for all rings. Create separate DMA area for each ring instead. Currently the following DMA areas are created: Event ring, standard RX ring, jumbo RX ring, RX return ring, hardware MAC statistics and producer/consumer status area. For Tigon II, mini RX ring and TX ring are additionally created. - Added missing bus_dmamap_sync(9) in various TX/RX paths. - TX ring is no longer created for Tigon 1 such that it saves more resources on Tigon 1. - Data sheet is not clear about alignment requirement of each ring so use 32 bytes alignment for normal DMA area but use 64 bytes alignment for jumbo RX ring where the extended RX descriptor size is 64 bytes. - For each TX/RX buffers use separate DMA tag(e.g. the size of a DMA segment, total size of DMA segments etc). - Tigon allows separate DMA area for event producer, RX return producer and TX consumer which is really cool feature. This means TX and RX path could be independently run in parallel. However ti(4) uses a single driver lock so it's meaningless to have separate DMA area for these producer/consumer such that this change creates a single status DMA area. - It seems Tigon has no limits on DMA address space and I also don't see any problem with that but old comments in driver indicates there could be issues on descriptors being located in 64bit region. Introduce a tunable, dev.ti.%d.dac, to disable using 64bit DMA in driver. The default is 0 which means it would use full 64bit DMA. If there are DMA issues, users can disable it by setting the tunable to 0. - Do not increase watchdog timer in ti_txeof(). Previously driver increased the watchdog timer whenever there are queued TX frames. - When stat ticks is set to 0, skip processing ti_stats_update(), avoiding bus_dmamap_sync(9) and updating if_collisions counter. - MTU does not include FCS bytes, replace it with ETHER_VLAN_ENCAP_LEN.
With these changes, ti(4) should work on PAE environments. Many thanks to Jay Borkenhagen for remote hardware access.
|
229438 |
03-Jan-2012 |
yongari |
MFC r227431-227432,227505,227509: r227431: style. No functional changes.
r227432: Remove dead ifdef. Driver should always check raised interrupt is for the device.
r227505: It's bad idea to allocate large memory, 4KB, from stack. Pre-allocate the memory in device attach time. While I'm here remove unnecessary reassignment of error variable as it was already initialized. Also added a missing driver lock in TIIOCSETTRACE handler.
r227509: Export sysctl node for various interrupt moderation parameters and have administrators control them. ti(4) provides a character device to control various other features of driver via ioctls but users had to write their own code to manipulate these parameters. It seems some default values for these parameters are not optimal on today's system but leave it as it was and let administrators change them. The following parameters could be changed:
dev.ti.%d.rx_coal_ticks dev.ti.%d.rx_max_coal_bds dev.ti.%d.tx_coal_ticks dev.ti.%d.tx_max_coal_bds dev.ti.%d.tx_buf_ratio dev.ti.%d.stat_ticks
The interface has to be brought down and up again before a change takes effect.
ti(4) controller supports hardware MAC counters with additional DMA statistics. So it's doable to export these counters via sysctl interface. Unfortunately, these counters are cumulative such that driver have to either send an explicit clear command to controller after extracting them or have to maintain internal counters to get actual changes. Neither look good to me so counters were not exported via sysctl.
|
229432 |
03-Jan-2012 |
yongari |
MFC r227347,227367: r227347: Retire 'options TI_PRIVATE_JUMBOS' and replace local jumbo allocator with UMA backed jumbo allocator by default. Previously ti(4) used sf_buf(9) interface for jumbo buffers but it was broken at this moment such that enabling jumbo frame caused instant panic. Due to the nature of sf_buf(9) it heavily relies on VM changes but it seems ti(4) was not received much blessing from VM gurus. I don't understand VM magic and implications used in driver either. Switching to UMA backed jumbo allocator like other network drivers will make jumbo frame work on ti(4). While I'm here, fully allocate all RX buffers. This means ti(4) now uses 512 RX buffer and 1024 mini RX buffers.
To use sf_buf(9) interface for jumbo buffers, introduce a new 'options TI_SF_BUF_JUMBO'. If it is proven that sf_buf(9) is better for jumbo buffers, interesting developers can fix the issue in future.
ti(4) still needs more bus_dma(9) cleanups and should use separate DMA tag/map for each ring(standard, jumbo, mini, command, event etc) but it should work on all platforms except PAE.
Special thanks to Jay[1] who provided complete remote debugging access.
r227367: Comment out TI_JUMBO_HDRSPLIT. TI_JUMBO_HDRSPLIT requires TI_SF_BUF_JUMBO.
|
229421 |
03-Jan-2012 |
yongari |
MFC r227311-227312,227318-227319,227322-227324: r227311: Remove ti_unit member variable in softc. While I'm here use PCIR_BAR macro.
r227312: o Remove unnecessary controller reinitialization. o Do not blindly UP controller when MTU is changed. Reinitialize controller only if driver is running. o Remove useless ti_stop() in ti_watchdog() since ti_init_locked() always invokes ti_stop().
r227318: Track which ring was updated in RX handler and update only modified ring. This should reduce unnecessary register accesses.
r227319: Mini ring is not available on Tigon 1 so do not create DMA maps for mini ring on Tigon 1 to save resources.
r227322: Show RX buffer allocation failure and do not blindly send alive message to firmware. Probably the correct way for this error is to send a TI_CMD_CODE_STACK_DOWN message to firmware and let firmware handle the rest.
r227323: If ti_chipinit() fails in ti_stop(), ignore the error and release all allocated TX/RX buffer resources. If the interface is brought to up again after the error, we will leak allocated TX/RX buffers.
r227324: Do not allow changing MTU to be less than the minimum.
|
229417 |
03-Jan-2012 |
yongari |
MFC r227091-227095,227098-227099: r227091: Make sure to unload loaded DMA area(descriptor, command, event ring).
r227092: Announce IFCAP_LINKSTATE capability and let network stack know link state changes. Hide superfluous link up/down message under bootverbose since if_link_state_change(9) shows that information. While I'm here, change baudrate with the resolved speed of the established link instead of blindly setting it 1G. Unfortunately, it seems there is no way to differentiate 10/100Mbps from non-gigabit link so just assume we established a 100Mbps link if current link is not a gigabit link.
r227093: Introduce ti_ifmedia_upd_locked() to use in driver initialization and add missing driver lock for both ti_ifmedia_upd() and ti_ifmedia_sts().
r227094: Don't clear upper 4bits from VLAN tag information. It's responsibility of vlan(4) to extract VLAN id from the tag information and vlan(4) correctly handles it.
r227095: Don't abuse if_hwassist and make sure enabling corresponding TX/RX checksum offloading and VLAN hardware tag insertion/stripping from the currently enabled hardware offloading capabilities. Previously if_hwassist, which was initialized to TX/RX checksum offloading, was blindly used to enable both TX and RX checksum offloading such that disabling either TX or RX checksum offloading was not possible.
ti(4) controllers support TX/RX checksum offloading with VLAN tagging so announce TX/RX checksum offloading capability over VLAN to vlan(4).
Make VLAN hardware tag insertion/stripping honors currently enabled interface capability instead of blindly enabling VLAN hardware tagging. This change allows disabling hardware support of VLAN tag.
Because ti(4) supports VLAN oversized frames, make network stack know the capability by setting if_hdrlen.
While I'm here, rewrite SIOCSIFCAP handler and make sure to reinitialize controller whenever TX/RX checksum offloading and VLAN hardware tagging option is changed. The requirement of controller reinitialization comes from the limitation of Tigon I/II firmware. Tigon I/II firmware requires all related RCBs should be reinitialized whenever any of its hardware offloading capabilities change.
vlan(4) is also notified whenever the parent interface's capability changes such that it can correctly handle TX/RX checksum offloading based on parent interface's enabled offloading capabilities.
RX checksum offloading handler was changed to make upper stack use controller computed partial checksum value. Previously, ti(4) just set the computed value for any frames(IPv4, IPv6) and the value was not used in upper stack because driver didn't set CSUM_DATA_VALID such that upper network stack had to recompute checksum of TCP/UDP packets. I have no idea how this was not noticed for a long time. With this change, upper network stack does not have to fully recompute the checksum such that calculating pseudo checksum based on partial checksum is sufficient to know whether received packet's checksum is correct or not. However, I don't know why ti(4) does not have controller compute pseudo checksum as controller has ability to do it. I'm just guessing enabling that feature could trigger a firmware bug or could be slower than computing it on host side so just leave it as it was.
In order not to produce false positives, ti(4) now checks whether controller actually computed IP or TCP/UDP checksum by checking ti_flags field.
r227098: Because ti(4) drops a driver lock in RX handler, check whether driver is still running before re-enabling interrupts.
r227099: Implement altq(4) support. While I'm here fix a logic error in r227098 where it didn't re-enable interrupts when TX queue is empty.
|
229404 |
03-Jan-2012 |
yongari |
MFC r227086-227089: r227086: Use ANSI function definations.
r227087: No functional changes.
r227088: Make ti(4) build with 'options TI_PRIVATE_JUMBOS'. This was broken in r175872.
We have a UMA backed jumbo allocator and that is much better implementation than having a local jumbo buffer allocator in driver. This local allocator would be removed in near future but fixing build before removal wouldn't be a bad idea.
r227089: s/u_intXX_t/uintXX_t/g
|
229391 |
03-Jan-2012 |
rmacklem |
MFC: r227690 The old NFS client will crash due to the reply being m_freem()'d twice if the server bogusly returns an error with the NFSERR_RETERR bit (bit 31) set. No actual NFS error has this bit set, but it seems that amd will sometimes do this. This patch makes sure the NFSERR_RETERR bit is cleared to avoid a crash.
|
229387 |
03-Jan-2012 |
mav |
MFC r225839: Import the rest of HID improvements from the branch: - improve report descriptor parser in libusbhid to handle several kinds of reports same time; - add to the libusbhid API two functions wrapping respective kernel IOCTLs for reading and writing reports; - tune uhid IOCTL interface to allow reading and writing arbitrary report, when multiple supported by the device; - teach usbhidctl to set output and feature reports; - make usbhidaction support all the same item names as bhidctl.
Sponsored by: iXsystems, inc.
|
229369 |
03-Jan-2012 |
hselasky |
MFC r229317: Fix for USB suspend and resume.
|
229360 |
03-Jan-2012 |
yongari |
MFC r226871-226872: r226871: Add initial BCM5720 support. Many thanks to Broadcom for continuing support of FreeBSD.
Submitted by: Geans Pin at Broadcom (initial version) H/W donated by: Broadcom
r226872: Disable updating InputDiscards counter for BCM5717, BCM5718, BCM5719 A0 and BCM5720 A0 and add comment why driver does not try to read it.
|
229357 |
03-Jan-2012 |
yongari |
MFC r226870: Recognize BCM5720C PHY.
|
229354 |
03-Jan-2012 |
yongari |
MFC r226814-226815,226820-226821,226864,226866-226867: r226814: Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones. The origin of GENCOMM seems to come from Alteon Tigon Host/NIC interface definition where it defines general communications region which is active when firmware is loaded and running. This region was used in communication between the host and processor internal to the Tigon chip. Broadcom data sheet also defines the region as 'Software Gencomm' in NetXtreme memory map but lacks detailed description of its interface so it was hard to know which ones are used for which interface. This change shall slightly enhance readability.
No functional changes.
r226815: Define MAC address mail box and use it instead of using hard-coded value.
r226820: Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with BGE_RX_CPU_EVENT for readability. Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).
r226821: SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware about the various driver events like load, unload, reset, suspend, restart, and ioctl operations. Define driver's event rather than using hard-coded values. We don't still send suspend/resume event to firmware.
Previously bge(4) used BGE_SDI_STATUS to send events. Because driver has to access firmware mail box to inform current state, using BGE_SDI_STATUS register was wrong. The end result was the same as BGE_SDI_STATUS is 0x0C04.
No functional changes.
r226864: Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE. Also add more firmware commands(not used yet). No functional changes.
r226866: Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT. This bit(SW event 7 in publicly available data sheet) is used to make RX CPU handle a firmware command and the bit is automatically cleared after RX CPU completed the command. Generally firmware command takes the following steps. 1. Write BGE_SRAM_FW_CMD_MB with a command. 2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes. 3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data. 4. Generate BGE_RX_CPU_EVENT and let firmware handle the command. 5. Wait for the ACK of the firmware command.
No functional changes.
r226867: Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value. bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2 seconds. BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data. This data contains timeout value in seconds until the next BGE_FW_CMD_DRV_ALIVE command. Broadcom recommends driver set the value 3 times longer than the interval that it sends BGE_FW_CMD_DRV_ALIVE. Currently bge(4) uses 3 seconds so probably we have to increase it in future and use different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).
No functional changes.
|
229350 |
03-Jan-2012 |
yongari |
MFC r226749,226770,226804-226807: r226749: Whitespace nits.
r226770: Fix long standing bge_sysctl_debug_info() issues. o Protect bge(4) status block access and register dump with driver lock. o Add missing bus_dmamap_sync() before dumping status block. o Use minimum status block size, 32 bytes, for status block dump on most controllers except BCM5700 AX/BX. While I'm here, make the handler show 5717 Plus in hardware flags.
r226804: Make CPMU handle GPHY power down control on controllers that have CPMU capability.
r226805: It is known that all Broadcom controllers have 4GB boundary DMA bug. Apply workaround to all controllers.
r226806: Broadcom says BCM5755 or higher and BCM5906 have short DMA bug. Apply workaround to these controllers.
r226807: BCM5719 cannot handle DMA requests for DMA segments that have larger than 4KB in size. However the maximum DMA segment size created in DMA tag is 4KB, so we wouldn't encounter the issue here. Just record this issue such that let developers not to create a DMA segment that is larger than 4KB for BCM5719. It's possible to split a DMA segment into multiple smaller ones in run time but I believe it's not worth to implement that.
|
229336 |
02-Jan-2012 |
yongari |
MFC r226701: Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet controller which is found on ULi M1563 South Bridge & M1689 Bridge. These controllers look like a tulip clone. M5263 controller does not support MII bitbang so use DC_ROM register to access MII registers. Like other tulip variants, ULi controller uses a setup frame to configure RX filter and uses new setup frame format. It's not clear to me whether the controller supports a hash based multicast filtering so this patch uses 14 perfect multicast filter to filter multicast frames. If number of multicast addresses is greater than 14, controller is put into a mode that receives all multicast frames. Due to lack of access to M5261, this change was not tested with M5261 but it probably works. Many thanks to Marco who provided remote access to M5263.
Tested by: Marco Steinbach <coco <> executive-computing dot de>, Martin MATO <martin.mato <> orange dot fr>
|
229333 |
02-Jan-2012 |
yongari |
MFC r226699: When driver is run for the first time there would be no established link such that calling dc_setcfg() right after media change would be meaningless unless controller in question is not Davicom DM9102. Ideally dc_setcfg() should be called when speed/duplex is resolved otherwise it would reprogram controller with wrong speed/duplex information. Because MII status change callback already calls dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is wrong. For instance, it would take some time to establish a link after mii_mediachg(), so blindly calling dc_setcfg() right after mii_mediachg() will always yield wrong media configuration.
Extend dc_ifmedia_upd() to handle media change and still allow 21143 and Davidcom controllers program speed/duplex regardless of current resolved speed/duplex of link. In theory 21143 may not need to call dc_setcfg() right after media change, but leave it as it is because there are too many variants to test that change. Probably dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to verify correctness of the change.
This change reliably makes ULi M5263 establish a link.
While I'm here correctly report media change result. Previously it always reported a success.
|
229303 |
02-Jan-2012 |
mav |
MFC r227464, r227471 Major GEOM MULTIPATH class rewrite: - Improved locking and destruction process to fix crashes. - Improved "automatic" configuration method to make it consistent and safe by reading metadata back from all specified paths after writing to one. - Added provider size check to reduce chance of ordering conflict with other GEOM classes. - Added "manual" configuration method without using on-disk metadata. - Added "add" and "remove" commands to allow manage paths manually. - Failed paths are no longer dropped from geom, but only marked as FAIL and excluded from I/O operations. - Automatically restore failed paths when all others paths are marked as failed, for example, because of device-caused (not transport) errors. - Added "fail" and "restore" commands to manually control FAIL flag. - geom is now destroyed on last path disconnection. - Added optional Active/Active mode support. Unlike Active/Passive mode, load evenly distributed between all working paths. If supported by the device, it allows to significantly improve performance, utilizing bandwidth of all paths. It is controlled by -A option during creation. Disabled by default now. - Improved `status` and `list` commands output.
Sponsored by: iXsystems, inc.
|
229301 |
02-Jan-2012 |
mav |
MFC r226816: Clarify disks/volumes above 2TiB support in geom_raid: - add support for volumes above 2TiB with Promise metadata format; - enforse and document other limitations: - Intel and Promise metadata formats do not support disks above 2TiB; - NVIDIA metadata format does not support volumes above 2TiB.
Sponsored by: iXsystems, Inc.
|
229299 |
02-Jan-2012 |
mav |
MFC r228819: Update list of 4K physical sector hard drives.
|
229297 |
02-Jan-2012 |
mav |
MFC r227637: Introduce CAM_SIM_POLLED SIM flag, indicating that it works in polling mode. It blocks CAM SWI usage on requests completion, unneeded because of polling and denied during kernel dumping because of blocked scheduler.
Before r198899 there was periph flag CAM_PERIPH_POLLED, but that was wrong, because there is whole SIM is polled or handled by SWI, not a single periph.
|
229295 |
02-Jan-2012 |
mav |
MFC r228497: Add PCI IDs for the Intel ICH9M SATA controllers.
|
229293 |
02-Jan-2012 |
mav |
MFC r226680: Some dmesg cosmetics: - for the legacy PCI ATA channels move channel number out of the device description, same as it is for ahci(4), siis(4) and mvs(4); - add device description for the ISA ATA channels.
|
229291 |
02-Jan-2012 |
mav |
MFC r228200: Add hw.ahci.force tunable to control whether AHCI drivers should attach to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation.
Enabled by default to get additional performance and functionality of AHCI when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if needed for some reason.
|
229289 |
02-Jan-2012 |
mav |
MFC r227635: Change the way how "not implemented" AHCI channels handled. Instead of completely skipping them, create ahcich devices for them to allocate unit numbers, but mark them as disabled to prevent driver probe and attach.
Last time some BIOSes tend to report unused channels as "not implemented". This change makes ahcichX devices numbering consistent, independently of connected disks. It makes per-channel driver hints usable and CAM devices wiring possible on such systems.
|
229287 |
02-Jan-2012 |
rmacklem |
MFC: r227543 Modify the new NFS client so that nfs_fsync() only calls ncl_flush() for regular files. Since other file types don't write into the buffer cache, calling ncl_flush() is almost a no-op. However, it does clear the NMODIFIED flag and this shouldn't be done by nfs_fsync() for directories.
|
229263 |
02-Jan-2012 |
rmacklem |
MFC: r227517 Move the setting of the default value for nm_wcommitsize to before the nfs_decode_args() call in the new NFS client, so that a specfied command line value won't be overwritten. Also, modify the calculation for small values of desiredvnodes to avoid an unusually large value or a divide by zero crash. It seems that the default value for nm_wcommitsize is very conservative and may need to change at some time.
|
229258 |
02-Jan-2012 |
rmacklem |
MFC: r227494 Since NFSv4 byte range locking only works for regular files, add a sanity check for the vnode type to the NFSv4 client.
|
229172 |
01-Jan-2012 |
rmacklem |
MFC: r227493 Move the assignment of default values for some mount options to before the nfs_decode_args() call in the new NFS client, so they don't overwrite the value specified on the command line.
|
229130 |
31-Dec-2011 |
pho |
MFC: r226987
Added missing cache purge of from argument for rename().
|
229121 |
31-Dec-2011 |
hselasky |
MFC r228195: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list().
|
229120 |
31-Dec-2011 |
hselasky |
MFC r228232 and r228303: Fix clang compile warnings.
|
229119 |
31-Dec-2011 |
hselasky |
MFC r227706, r227748, r227749 and r228234: Simplify the usb_pause_mtx() function by factoring out the generic parts to the kernel's pause() function. The pause() function can now be used when cold != 0. Also assert that the timeout in system ticks must be greater or equal to zero.
|
229118 |
31-Dec-2011 |
hselasky |
MFC r227701, r227847 and r227849: Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Rename device_delete_all_children() into device_delete_children(). Identify a few other places where it makes sense to use device_delete_children().
|
229117 |
31-Dec-2011 |
hselasky |
MFC r227610 and r228243: Add more quirks for USB mass storage devices.
|
229116 |
31-Dec-2011 |
hselasky |
MFC r228637: Add new USB ID.
|
229115 |
31-Dec-2011 |
hselasky |
MFC r227781: Add new USB IDs.
PR: usb/162712, usb/163732
|
229111 |
31-Dec-2011 |
hselasky |
MFC r226465 and r226467: Fix an issue with 11g beacon frames which looks to be a limitation on the largest multi-write size.
|
229108 |
31-Dec-2011 |
hselasky |
MFC r228494, r228508: Fix for random USB transfer time out.
|
229107 |
31-Dec-2011 |
hselasky |
MFC r227462: Enable power save mode for the USB storage device driver.
|
229106 |
31-Dec-2011 |
hselasky |
MFC r226743: Implement TX/RX checksum offloading support for ASIX AX88772B controller.
|
229105 |
31-Dec-2011 |
hselasky |
MFC r226709: Allow USB ethernet drivers to define a driver specific attach handler so that a USB ethernet driver can announce interface capabilities and do its own MII attach.
|
229103 |
31-Dec-2011 |
hselasky |
MFC 228304: Correct some bInterval USB template descriptor values.
|
229100 |
31-Dec-2011 |
hselasky |
MFC r228709, r228711 and r228723: - Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. - Add code to wait for USB shutdown to be executed at system shutdown. - Add sysctl which can be used to skip this waiting.
|
229099 |
31-Dec-2011 |
hselasky |
MFC r227285: Add support for new USB modem protocol.
PR: usb/159919
|
229097 |
31-Dec-2011 |
hselasky |
MFC r228758: Fix for race against user-space applications trying to change the configuration on USB HUBs.
PR: kern/163091
|
229096 |
31-Dec-2011 |
hselasky |
MFC r229086, r228483 and r228640: Implement better support for USB controller suspend and resume. Fix some build issues in avr32dci.c
|
229093 |
31-Dec-2011 |
hselasky |
MFC r226173, r227843, r227848 and r227908: Use DEVMETHOD_END to mark end of device methods. Remove superfluous device methods. Add some missing __FBSBID() macros.
|
229084 |
31-Dec-2011 |
hselasky |
MFC r227396, r227401, r227541, r227654 and r228493: Relax XHCI timeouts which should fix enumeration issues. Fix definition of XHCI port power bit. Correct size of some USB 3.0 descriptor fields.
Reported by: Kohji Okuno, Jan Henrik Sylvester
|
229082 |
31-Dec-2011 |
hselasky |
MFC r227463, r227383 and r227108: Add support for modem control lines. Add support for GPIO pins.
PR: usb/162307 Submitted by: JD Louw
|
229080 |
31-Dec-2011 |
hselasky |
MFC r227461: Style change. Use memxxx() functions instead of bxxx() functions.
|
229061 |
31-Dec-2011 |
yongari |
MFC r226480-226481: r226480: Add missing driver lock in media status handler.
r226481: Make sure to report media change status to caller. Previously it always reported success.
|
229060 |
31-Dec-2011 |
yongari |
MFC r226479: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock.
Reported by: Karim (fodillemlinkarimi <> gmail dot com)
|
229057 |
31-Dec-2011 |
yongari |
MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock.
Reported by: Karim (fodillemlinkarimi <> gmail dot com)
|
229052 |
31-Dec-2011 |
yongari |
MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0.
|
228244 |
03-Dec-2011 |
hrs |
MFC r226446: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address.
Approved by: re (bz)
|
228187 |
01-Dec-2011 |
jhb |
MFC 227389: Remove some debugging printfs.
Approved by: re (bz)
|
228126 |
29-Nov-2011 |
marius |
MFC: r227960
Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy
Approved by: re (bz)
|
228041 |
27-Nov-2011 |
marcel |
MFC rev. 227629: Wire the kernel text RWX, rather than RX. We're not quite ready for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with.
Approved by: re (kib)
|
228036 |
27-Nov-2011 |
tuexen |
MFC r228031:
Fix a warning reported by arundel@. Fix a bug where the parameter length of a supported address types parameter is set to a wrong value if the kernel is built with with either INET or INET6, but not both.
Approved by: re@
|
227976 |
25-Nov-2011 |
marius |
MFC: r227829, r227844
- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END.
Submitted by: jhb Approved by: re (kib)
|
227971 |
25-Nov-2011 |
rstone |
MFC r227342. Note that the original commit message, reproduced below, has error. The final sentence should read "*without* CTF data".
The in-kernel CTF parser caches the result of its first attempt to parse CTF data from a module. On subsequent attempts to retrieve CTF data for a module, return an error if there no CTF data.
This fixes a panic if you try to enable fbt probes on a module with CTF data twice.
Approved by: re (kib)
|
227948 |
24-Nov-2011 |
tuexen |
MFC r227930:
Move up the address to the top of the sctp_paddrthlds structure like in all other structures. This avoids alignment problems.
Approved by: re@
|
227945 |
24-Nov-2011 |
rstone |
MFC r227290 and r227291:
r227290: Fix the DTrace pid return trap interrupt vector. Previously we were using 31, but that vector is reserved.
Without this fix, running dtrace -p <pid> would either cause the target process to crash or the kernel to page fault
r227291: Replace fasttrap_copyout() with uwrite(). FreeBSD copyout() is not able to write to the .text section of a process.
Approved by: re (kib)
|
227942 |
24-Nov-2011 |
tuexen |
MFC r227540:
Set the MTU of an path to an approriate value if the interface MTU can't be determined.
Approved by: re@
|
227940 |
24-Nov-2011 |
tuexen |
MFC r227486:
Don't copy uninitialized memory. Also simplify the comparison of interface names.
Approved by: re@
|
227923 |
24-Nov-2011 |
pjd |
MFC r227110,r227111:
r227110:
In zvol_open() if the spa_namespace_lock is already held, it means that ZFS is trying to open and taste ZVOL as its VDEV. This is not supported, so return an error instead of panicing on spa_namespace_lock recursion.
Reported by: Robert Millan <rmh@debian.org> PR: kern/162008
r227111:
Correct typo in comment.
Reported by: Fabian Keil <fk@fabiankeil.de>
Approved by: re (kib)
|
227898 |
23-Nov-2011 |
bz |
MFC r226938 (by kevlo):
Add missing PF_UNLOCK in pf_test
Approved by: re (kib)
|
227894 |
23-Nov-2011 |
bz |
MFC r227061 (by mlaier):
Fix a use-after-free/redzone issue in the routing code.
Approved by: re (kib)
|
227890 |
23-Nov-2011 |
bz |
MFC r227547:
The maximum TSO frame size should be: maximum IP datagram size (65535 bytes) + Ethernet header size (14 bytes) + 2 * VLAN tag size (4 bytes) [1].
[1] We need to multiply by 2 to account for the double VLAN tag provision added in IEEE 802.1ad.
Submitted by: David Somayajulu (david.somayajulu qlogic.com)
Approved by: re (kib)
|
227888 |
23-Nov-2011 |
attilio |
MFC r227058: Disable interrupt and preemption for smp_rendezvous() also in the UP/!SMP case.
Sponsored by: Sandvine Incorporated Approved by: re (kib)
|
227885 |
23-Nov-2011 |
bz |
MFC r227481:
Return the correct value for the IPV6_MULTICAST_HOPS getsockopt() call.
Submitted by: rpaulo
Approved by: re (kib)
|
227718 |
19-Nov-2011 |
marius |
MFC: r227578
Fix compilation with DEBUG defined.
Approved by: re (kib)
|
227714 |
19-Nov-2011 |
marius |
MFC: r227539
Define curthread as an inline function that loads the thread pointer directly from g7, the pcpu pointer. This guarantees correct behavior when the thread migrates to a different CPU. Commit message stolen from r205431. Additional testing by Peter Jeremy.
Approved by: re (kib)
|
227711 |
19-Nov-2011 |
marius |
MFC: r227537
As it turns out, r186347 actually is insufficient to avoid the use of the curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style curthread implementation on sparc64, crashing the kernel in its early cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the things we need for that, which leads to a chicken-and-egg problem). What happens is that due to the fact that the idea of r210623 actually is to allow the compiler to cache invocations of curthread, it factors out obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to before the branch based on kobj_mutex_inited when compiling the kernel without the debugging options. So change kobj_class_compile_static(9) to just never acquire kobj_mtx, effectively restricting it to its documented use, and add a kobj_init_static(9) for initializing objects using a class compiled with the former and that also avoids using mutex(9) (and malloc(9)). Also assert in both of these functions that they are used in their intended way only. While at it, inline kobj_register_method() and kobj_unregister_method() as there wasn't much point for factoring them out in the first place and so that a reader of the code has to figure out the locking for fewer functions missing a KOBJ_ASSERT. Tested on powerpc{,64} by andreast.
Reviewed by: nwhitehorn (earlier version), jhb Approved by: re (kib)
|
227705 |
19-Nov-2011 |
pjd |
MFC r226549,r226550,r226551,r226552,r226553,r226554,r226568,r226569,r226611, r226612:
r226549:
Remove redundant size calculation.
r226550:
Initialize 'rc' properly before using it. This error could lead to infinite loop when data reconstruction was needed.
r226551:
Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.
r226552:
Never pass NULL block pointer when reading. This is neither expected nor handled by lower layers like vdev_raidz, which uses bp for checksum verification. This bug could lead to NULL pointer reference and resets during boot.
r226553:
Always pass data size for checksum verification function, as using physical block size declared in bp may not always be what we want. For example in case of gang block header physical block size declared in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum calculation failed. This bug could lead to accessing unallocated memory and resets/failures during boot.
r226554:
Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORT is not.
r226568:
- Correctly read gang header from raidz. - Decompress assembled gang block data if compressed. - Verify checksum of a gang header. - Verify checksum of assembled gang block data. - Verify checksum of uber block.
Submitted by: avg
r226569:
With LOADER_MBR_SUPPORT defined and LOADER_GPT_SUPPORT undefined we would never call disk_openmbr().
Submitted by: avg
r226611:
- Allow to specify multiple files to check, eg.
zfsboottest gpt/system0 gpt/system1 - /boot/kernel/kernel /boot/zfsloader
- Instead of printing file's content calculate MD5 hash of the file, so it can be easly compared to the hash calculated via file system. - Some other minor improvements.
r226612:
Because ZFS boot code was very fragile in the past and real PITA to debug, introduce zfsboottest.sh script that will verify if it will be possible to boot from the given pool.
# zfsboottest.sh system
Where "system" is pool name of the pool we want to boot from.
What is being verified by the script: - Does the pool exist? - Does it have bootfs property configured? - Is mountpoint property of the boot dataset set to 'legacy'?
Dataset configured in bootfs property has to be mounted to perform more checks: - Does the /boot directory in boot dataset exist? - Is this dataset configured as root file system in /etc/fstab or set in vfs.root.mountfrom variable in /boot/loader.conf?
By using zfsboottest tool the script will read all the files in /boot directory using ZFS boot code and calculate their checksums. Then, it will walk /boot directory using find(1) though regular file sytem and also read all the files in /boot directory and calculate their checksums. If any of the files cannot be looked up, read or checksum is invalid it will be reported and booting off of this pool is probably not possible.
Some additional checks may be interesting as well. For example if the disks contain proper pmbr and gptzfsboot code or if all expected files in /boot/ are present.
When upgrading FreeBSD, one should snapshot datasets that contain operating system, upgrade (install new world and kernel) and use zfsboottest.sh to verify if it will be possible to boot from new configuration. If all is good one should upgrade boot blocks, by eg.:
# gpart -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
If something is wrong, one should rollback datasets and report the problems.
Approved by: re (kib)
|
227704 |
19-Nov-2011 |
pjd |
MFC r226617:
zfs vdev_file_io_start: validate vdev before using vdev_tsd
vdev_tsd can be NULL for certain vdev states. At least in userland testing with ztest.
Submitted by: avg Approved by: re (kib)
|
227702 |
19-Nov-2011 |
pjd |
MFC r226620:
Update per-thread I/O statistics collection in ZFS. This allows to see processes I/O activity in 'top -m io' output.
PR kern/156218 Reported by: Marcus Reid <marcus@blazingdot.com> Patch by: avg Approved by: re (kib)
|
227677 |
18-Nov-2011 |
dougb |
MFC r226863:
Fix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR} (since it no longer exists). Instead, run svnversion if we can find the binary and test that the output looks like a version string.
Approved by: re (kib)
|
227630 |
17-Nov-2011 |
rmacklem |
MFC: r227059 Both a crash reported on freebsd-current on Oct. 18 under the subject heading "mtx_lock() of destroyed mutex on NFS" and PR# 156168 appear to be caused by clnt_dg_destroy() closing down the socket prematurely. When to close down the socket is controlled by a reference count (cs_refs), but clnt_dg_create() checks for sb_upcall being non-NULL to decide if a new socket is needed. I believe the crashes were caused by the following race: clnt_dg_destroy() finds cs_refs == 0 and decides to delete socket clnt_dg_destroy() then loses race with clnt_dg_create() for acquisition of the SOCKBUF_LOCK() clnt_dg_create() finds sb_upcall != NULL and increments cs_refs to 1 clnt_dg_destroy() then acquires SOCKBUF_LOCK(), sets sb_upcall to NULL and destroys socket
This patch fixes the above race by changing clnt_dg_destroy() so that it acquires SOCKBUF_LOCK() before testing cs_refs.
Tested by: bz Reviewed by: dfr Approved by: re (kib)
|
227624 |
17-Nov-2011 |
eadler |
Record the merge of r227457, which was done as part of r227565 but not mentioned in the commit log
PR: kern/142999 PR: kern/151365 Submitted by: Takefu Kenji <takefu@airport.fm> Submitted by: Joerg Niendorf <f5d10a@internode.on.net> Approved by: re (kib)
|
227450 |
11-Nov-2011 |
trociny |
MFC r227449:
Fix false positive EADDRINUSE that could be returned by bind, due to the typo made in r227207.
Reported by: kib Tested by: kib
Approved by: re (kib)
|
227428 |
10-Nov-2011 |
trociny |
MFC r227204, 227206, 227207:
r227204:
Fix the typo made in r157474.
r227206:
Before dereferencing intotw() check for NULL, the same way as it is done for in_pcb (see r157474).
r227207:
Cache SO_REUSEPORT socket option in inpcb-layer in order to avoid inp_socket->so_options dereference when we may not acquire the lock on the inpcb.
This fixes the crash due to NULL pointer dereference in in_pcbbind_setup() when inp_socket->so_options in a pcb returned by in_pcblookup_local() was checked.
Reported by: dave jones <s.dave.jones@gmail.com>, Arnaud Lacombe <lacombar@gmail.com> Suggested by: rwatson Glanced by: rwatson Tested by: dave jones <s.dave.jones@gmail.com>
Approved by: re (kib)
|
227426 |
10-Nov-2011 |
tuexen |
MFC 227320: When loading addresses from INITs, always use the correct local address.
Approved by: re@
|
227424 |
10-Nov-2011 |
tuexen |
MFC 227266: Initialize all components of the sent COOKIE.
Approved by: re@
|
227423 |
10-Nov-2011 |
andre |
Back out r226299 (MFC of r226105) which caused a number of ports that depend on the incorrect IP length field. The fix stays in HEAD and ports should test for it.
Requested by: glebius Approved by: re (kib)
|
227420 |
10-Nov-2011 |
alc |
MFC r226740 Speed up vm_page_cache() and vm_page_remove() by checking for a few common cases that can be handled in constant time.
Approved by: re (kib)
|
227402 |
09-Nov-2011 |
pho |
MFC r226971 Added missing cache purge of from argument.
Approved by: re (kensmith)
|
227400 |
09-Nov-2011 |
jhb |
MFC 226748: - Add a new header for the x86 boot code that defines various structures and constants related to the BIOS Enhanced Disk Drive Specification. - Use this header instead of magic numbers and various duplicate structure definitions for doing I/O. - Use an actual structure for the request to fetch drive parameters in drvsize() rather than a gross hack of a char array with some magic size. While here, change drvsize() to only pass the 1.1 version of the structure and not request device path information. If we want device path information you have to set the length of the device path information as an input (along with probably checking the actual EDD version to see which size one should use as the device path information is variable-length). This fixes data smashing problems from passing an EDD 3 structure to BIOSes supporting EDD 4.
Approved by: re (kib)
|
227397 |
09-Nov-2011 |
jhb |
MFC 226302: If an allocation for a specific resource range fails because it is not in a decoded range for an ACPI Host-PCI bridge, try to allocate it from the ACPI system resource range. If that works, permit the resource allocation regardless.
Approved by: re (kib)
|
227305 |
07-Nov-2011 |
marius |
MFC: r227006, r227281, r227282
Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel configuration files. Besides duplicating functionality, amd(4), which previously also supported the AMD Am53C974, unlike esp(4) is no longer maintained and has accumulated enough bit rot over time to always cause a panic during boot as long as at least one target is attached to it (see PR 124667).
PR: 124667 Approved by: re (kib) Obtained from: NetBSD (based on)
|
227302 |
07-Nov-2011 |
marius |
MFC: r226947, r226949, r227284
- Use device_t rather than the NetBSDish struct device. - Move esp_devclass to ncr53c9x.c in order to allow different bus front-ends to use it. - Use KOBJMETHOD_END. - Remove the gl_clear_latched_intr hook as it's not needed for any of the chips nor the front-ends supported in FreeBSD and likely never will be. - Correct the DMA constraints and only limit the tag used for the transfer buffers to 32-bit DMA as that address is written into a 32-bit register. - The ESP200 also only supports up to 64k transfers. - Don't let the DMA and SBus front-end supply a maximum transfer size larger than MAXPHYS as that's the maximum the upper layers use and we otherwise just waste resources unnecessarily. - Initialize the ECB callout and don't zero the handle when returning ECBs to the free list so that ncr53c9x_callout() actually is called with the driver lock held. - On detach the driver lock should be held across cam_sim_free() according to isp(4) and a panic received. - Check the return value of NCRDMA_SETUP(), i.e. bus_dmamap_load(9), and try to handle failures gracefully. - In ncr53c9x_action() replace N calls to xpt_done() in a switch with just one at the end. - On XPT_PATH_INQ report "NCR" rather than "Sun" as the vendor as the former is somewhat more correct as well as the maximum supported transfer size via maxio in order to take advantage of controllers that that can handle more than DFLTPHYS. - Freeze the device queue if a request didn't complete without error and isn't already frozen. - Print the number of MESSAGE (EXTENDED) rejected. - Fix the path encoded in the multiple inclusion protection of ncr53c9xvar.h. - Correct the DMA constraints used in the LSI64854 core to not exceed the maximum supported transfer size and include the boundary so we don't need to check on every setup of a DMA transfer. - Let the bus DMA map callbacks do nothing in case of an error. - Correctly handle > 64k transfers for FAS366 in the LSI64854. A new feature flag NCR_F_LARGEXFER was introduced so we just need to check for this one and not for individual controllers supporting large transfers in several places. - Let the LSI64854 core load transfer buffers using BUS_DMA_NOWAIT as the NCR53C9x core can't handle EINPROGRESS. Due to lack of bounce buffers support, sparc64 doesn't actually use EINPROGRESS and likely never will, as an example for writing additional front-ends for the NCR53C9x core it makes sense to set BUS_DMA_NOWAIT anyway though. - Some minor cleanup.
Approved by: re (kib)
|
227277 |
06-Nov-2011 |
marius |
MFC: r226995, r227042
- Import the common MII bitbang'ing code from NetBSD and convert drivers to take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 8k. The only potential in-tree users left unconverted are ed(4) and xe(4). Xe(4) generally should be changed to use miibus(4) instead of implementing PHY handling on its own, as otherwise it makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to it just for the MII bitbang'ing code. Ed(4) has some chip specific things interwinded with the MII bitbang'ing code and it's unclear whether it can be converted to common code, at least not without thorough testing of all the various chips supported by ed(4). The common MII bitbang'ing code also is useful in the embedded space for using GPIO pins to implement MII access. - Based on lessons learnt with dc(4) (see r185750), add bus barriers to the MII bitbang read and write functions of the other drivers converted in order to ensure the intended ordering. Given that register access via an index register as well as register bank/window switching is subject to the same problem, also add bus barriers to the respective functions of smc(4), tl(4) and xl(4). - Sprinkle some const.
Thanks to the following testers: Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4)) Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).
Reviewed by: yongari (subset of drivers) Approved by: re (kib) Obtained from: NetBSD (partially)
|
227268 |
06-Nov-2011 |
bz |
MFC r227064:
Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30 for 3200 and 8200 series cards.
Submitted by: David C Somayajulu (david.somayajulu@qlogic.com), Qlogic Corporation
Approved by: re (kib)
|
227232 |
06-Nov-2011 |
bz |
MFC r227085:
Always use the opt_*.h options for ipfw.ko, not just when compiled into the kernel. Do not try to build the module in case of no INET support but keep #error calls for now in case we would compile it into the kernel.
This should fix an issue where the module would fail to enable IPv6 support from the rc framework, but also other INET and INET6 parts being silently compiled out without giving a warning in the module case.
While here garbage collect unneeded opt_*.h includes. opt_ipdn.h is not used anywhere but we need to leave the DUMMYNET entry in options for conditional inclusion in kernel so keep the file with the same name.
Reported by: pluknet Reviewed by: plunket, jhb
Approved by: re (kib)
|
227230 |
06-Nov-2011 |
marius |
MFC: r227001
Increase the IOC port initialization timeouts by ten times to what the corresponding Linux driver uses. This allows mpt(4) to still recognize all good SATA devices in presence of a defective one, which takes about 45 seconds. In the long term we probably should implement the logic used by mpt2sas(4) allowing IOC port initialization to complete at a later time.
Submitted by: Andrew Boyer Approved by: re (kib)
|
227229 |
06-Nov-2011 |
marius |
MFC: r226154, r226165
- Follow the lead of dcphy(4) and pnphy(4) and move the reminder of the PHY drivers that only ever attach to a particular MAC driver, i.e. inphy(4), ruephy(4) and xlphy(4), to the directory where the respective MAC driver lives and only compile it into the kernel when the latter is also there, also removing it from miibus.ko and moving it into the module of the respective MAC driver. - While at it, rename exphy.c, which comes from NetBSD where the MAC driver it corresponds to also is named ex(4) instead of xl(4) but that in FreeBSD actually identifies itself as xlphy(4), and its function names accordingly for consistency. - Additionally while at it, fix some minor style issues like whitespace in the register headers and add multi-inclusion protection to inphyreg.h.
Approved by: re (kib)
|
227226 |
06-Nov-2011 |
mav |
MFC r226985: Workaround the problem introduced by combination of r162200 and r215687. r162200 delays provider orphanization until all running requests complete, to workaround broken orphan() method implementation in some classes. r215687 removes persistent periodic (10Hz) event thread wake ups. Together these changes can indefinitely delay orphanization until some other event wake up the event thread. One consequence of this is inability of CAM to destroy device disconnected when busy and, as consequence, create new one after reconnection.
While the best solution would be to revert r162200, it is not easy, as some classes still broken in that way. Instead conditionally wake up event thread if there are some providers waiting for orphanization.
Approved by: re (kib)
|
227216 |
06-Nov-2011 |
hselasky |
MFC r227075: Fix for panic at USB controller attach failure during cold boot.
Approved by: re (kib)
|
227073 |
04-Nov-2011 |
ae |
MFC r226880: Our geom withering function could take some time before geom with its providers and consumers will be destroyed. Before take some actions with a geom, check that it is not destroyed at the moment.
Tested by: nwhitehorn
Approved by: re (kib)
|
227008 |
01-Nov-2011 |
qingli |
MFC 226710
The host-id/interface-id can have a specific value and is properly masked out when adding a prefix route through the "route" command. However, when deleting the route, simply changing the command keyword from "add" to "delete" does not work. The failoure is observed in both IPv4 and IPv6 route insertion. The patch makes the route command behavior consistent between the "add" and the "delete" operation.
Approved by: re (kib)
|
227007 |
01-Nov-2011 |
hselasky |
MFC r226903, r225777, r226221 and r226534: Add some new USB device IDs and some USB device quirks. Improve the USB mass storage auto quirk detection.
PR: usb/161798, usb/160911 Approved by: re (kib)
|
227005 |
01-Nov-2011 |
qingli |
MFC 226451
The IPv6 code was influx at the time of r196865 due to the L2/L3 separation rewrite changes. r196865 was committed to fix a scope violation problem in the following test scenario:
box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64
box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64
em0 and re0 are on the same link.
box-2# ping6 2001:db8:1:: PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::
the ICMPv6 response should have a source address of em1, which is 2001:db8:2::1, not the link-local address of em0.
That code is no longer necessary and breaks the IPv6-Ready logo testing, so revert it now.
Reviewed by: hrs Approved by: re (kib)
|
227002 |
01-Nov-2011 |
qingli |
MFC 226713
Exclude host routes when checking for prefix coverage on multiple interfaces. A host route has a NULL mask so check for that condition. I have also been told by developers who customize the packet output path with direct manipulation of the route entry (or the outgoing interface to be specific). This patch checks for the route mask explicitly to make sure custom code will not panic.
PR: kern/161805 Approved by: re (kib)
|
226965 |
31-Oct-2011 |
tuexen |
MFC 226869: When adding a new remote address using sctp_add_remote_addr(), return the correct net if requested.
Approved by: re@
|
226963 |
31-Oct-2011 |
pho |
MFC r226681: Only unlock if the lock is exclusive.
Approved by: re (kib) PR: kern/161956
|
226960 |
31-Oct-2011 |
tuexen |
MFC 226868: Send out control chunks which have no specific destination.
Approved by: re@
|
226956 |
31-Oct-2011 |
marcel |
MFC r226647: Add support for Boot Camp. The support is defined as follows: o Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT). o When Boot Camp is enabled, update the MBR whenever we write the GPT. o Creation of a Boot Camp enabled GPT is not supported. o Automatically disable Boot Camp when the GPT has been changed so that there's either no EFI partition or no HFS+ partition. o The first 4 partitions (by index) get mirrored in the MBR.
Requested by, discussed with and tested by: kris@pcbsd.org Approved by: re (bz@, kib@)
|
226934 |
30-Oct-2011 |
marius |
MFC: r226522
Allow to dump on Solaris swap partitions.
PR: 161764 Submitted by: Peter Jeremy Approved by: re (kib)
|
226917 |
30-Oct-2011 |
marius |
MFC: r226381
Merge from NetBSD: - Remove clause 3 and 4 from TNF licenses. - Fix memset usage. - Various cleanup. - Kill caddr_t.
Approved by: re (kib)
|
226910 |
29-Oct-2011 |
marius |
Merge from r225950:
Set the sense residual properly.
Reviewed by: ken Approved by: re (kib)
|
226906 |
29-Oct-2011 |
marcel |
MFC r226673: Don't terminate the interactive root mount prompt on mount failure. This restores the previous behaviour. While here, match '?' and '.' inputs exactly and improve the error message.
Requested by: avg@ Derived from a patch by: Arnaud Lacombe <lacombar@gmail.com> Approved by: re (kib@)
|
226904 |
29-Oct-2011 |
hselasky |
MFC r226803: Fix suspend and resume of non-super-speed USB devices in the generic XHCI driver. There appears to be some minor logic missing for this feature to work.
Approved by: re (kib)
|
226894 |
29-Oct-2011 |
attilio |
Include a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching correct utilization.
Approved by: re (kib)
|
226822 |
27-Oct-2011 |
yongari |
MFC r226695-226696: r226695: Fix a regression introduced in r218832. For TX status check, driver should use a TX list DMA tag.
r226696: Add missing bus_dmamap_sync() in setup frame transmit.
Approved by: re (kensmith)
|
226809 |
26-Oct-2011 |
kensmith |
MFC r226510,r226547: Comment out sbp(4) because it appears to cause boot failure on some systems. Add comment explaining why sbp(4) is commented out.
It was a mistake on my part to omit powerpc's GENERIC for r226510. But when I noticed the mistake I checked with the powerpc maintainer to see if I should correct the mistake Marcel said he'd prefer it be left as-is.
Approved by: re (kib)
|
226801 |
26-Oct-2011 |
glebius |
Sync pf(4) and pfsync(4) with head, merging lots of important bugfixes required for normal operation of pfsync(4). Revisions merged:
r226531 | bz | 2011-10-19 13:34:40 +0400 (ср, 19 окт 2011) | 4 lines
Fix an obvious locking bug where we would lock again rather than unlock.
r226532 | bz | 2011-10-19 14:04:24 +0400 (ср, 19 окт 2011) | 12 lines
Pseudo interfaces should go at SI_SUB_PSEUDO. However at least pfsync also depends on pf to be initialized already so pf goes at FIRST and the interfaces go at ANY. Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN and for pfsync we move to the later SI_SUB_PROTO_IF.
This is not ideal either but at least an order that should work for the moment and can be re-fined with the VIMAGE merge, once this will actually work with more than one network stack.
r226533 | bz | 2011-10-19 14:08:58 +0400 (ср, 19 окт 2011) | 4 lines
In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything.
r226535 | bz | 2011-10-19 14:16:42 +0400 (ср, 19 окт 2011) | 5 lines
Adjust the PF_ASSERT() macro to what we usually use in the network stack: PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT().
r226536 | bz | 2011-10-19 15:04:49 +0400 (ср, 19 окт 2011) | 8 lines
De-virtualize the pf_task_mtx lock. At the current state of pf locking and virtualization it is not helpful but complicates things.
Current state of art is to not virtualize these kinds of locks - inp_group/hash/info/.. are all not virtualized either.
r226544 | bz | 2011-10-19 17:13:56 +0400 (ср, 19 окт 2011) | 12 lines
Fix recursive pf locking leading to panics. Splatter PF_LOCK_ASSERT()s to document where we are expecting to be called with a lock held to more easily catch unnoticed code paths. This does not neccessarily improve locking in pfsync, it just tries to avoid the panics reported.
PR: kern/159390, kern/158873 Submitted by: pluknet (at least something that partly resembles my patch ignoring other cleanup, which I only saw too late on the 2nd PR)
r226609 | glebius | 2011-10-21 15:11:18 +0400 (пт, 21 окт 2011) | 4 lines
In FreeBSD ip_output() expects ip_len and ip_off in host byte order
PR: kern/159029
r226623 | glebius | 2011-10-22 02:28:15 +0400 (сб, 22 окт 2011) | 5 lines
Fix a race: we should update sc_len before dropping the pf lock, otherwise a number of packets can be queued on sc, while we are in ip_output(), and then we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to writing beyond our mbuf cluster.
r226655 | glebius | 2011-10-23 14:05:25 +0400 (вс, 23 окт 2011) | 5 lines
Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and deprecated flag from historical mbuf(9) allocator.
This is style only change.
r226656 | glebius | 2011-10-23 14:13:20 +0400 (вс, 23 окт 2011) | 5 lines
Absense of M_WAITOK in malloc flags for UMA doesn't equals presense of M_NOWAIT. Specify M_NOWAIT explicitly.
This fixes sleeping with PF_LOCK().
r226660 | glebius | 2011-10-23 18:59:54 +0400 (вс, 23 окт 2011) | 22 lines
Fix from r226623 is not sufficient to close all races in pfsync(4).
The root of problem is re-locking at the end of pfsync_sendout(). Several functions are calling pfsync_sendout() holding pointers to pf data on stack, and these functions expect this data to be consistent.
To fix this, the following approach was taken:
- The pfsync_sendout() doesn't call ip_output() directly, but enqueues the mbuf on sc->sc_ifp's interfaces queue, that is currently unused. Then pfsync netisr is scheduled. PF_LOCK isn't dropped in pfsync_sendout(). - The netisr runs through queue and ip_output()s packets on it.
Apart from fixing race, this also decouples stack, fixing potential issues, that may happen, when sending pfsync(4) packets on input path.
Reviewed by: eri (a quick review)
r226661 | glebius | 2011-10-23 19:08:18 +0400 (вс, 23 окт 2011) | 13 lines
- Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail() was scheduled. This lead to instant 100% state leak after first bulk update request. - After above fix, it appeared that pfsync_bulk_update() lacks locking. To fix this, sc_bulk_tmo callout was converted to an mtx one. Eventually, all pf/pfsync callouts should be converted to mtx version, since it isn't possible to stop or drain a non-mtx callout without risk of race. - Add comment that callout_stop() in pfsync_clone_destroy() lacks locking. Since pfsync0 can't be destroyed (yet), let it be here.
r226662 | glebius | 2011-10-23 19:10:15 +0400 (вс, 23 окт 2011) | 2 lines
Fix indentation, no code changed.
r226663 | glebius | 2011-10-23 19:15:17 +0400 (вс, 23 окт 2011) | 4 lines
Merge several fixes to bulk update processing from OpenBSD. Merged revisions: 1.148, 1.149, 1.150. This makes number of states on master/slave to be of a sane value.
Approved by: re (kib)
|
226796 |
26-Oct-2011 |
bz |
MFC r226527:
Fix indentation in a loop and a tiny maze of #ifdefs for just the __FreeBSD__ parts that had it wrong.
MFC r226530:
Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return and never remove state.
This fixes the problem some people are seeing that state is removed when pf is loaded as a module but not in situations when compiled into the kernel.
Approved by: re (kib)
|
226670 |
23-Oct-2011 |
brueffer |
MFC: r226406
Properly free resources in case of an error.
Approved by: re (kib)
|
226667 |
23-Oct-2011 |
brueffer |
MFC: r226398, r226442
Move the allocation of usrbufs down a few lines to avoid leaking it in case of an error.
Approved by: re (kib)
|
226640 |
22-Oct-2011 |
brueffer |
MFC: r226247, r226253
Properly free linux_gidset in case of an error.
Approved by: re (kib)
|
226637 |
22-Oct-2011 |
brueffer |
MFC: r226185
Add missing break statement to make sure all 3DES etypes really are treated the same.
Approved by: re (kib)
|
226572 |
20-Oct-2011 |
glebius |
MFhead 226401,226402:
Remove last remnants of classful addressing:
- Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr. - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011. - fix bug when we were not forwarding to a host which matches classful net address. For example router having 192.168.x.y/16 network attached, would not forward traffic to 192.168.*.0, which are legal IPs in CIDR world. - For compatibility, leave autoguessing of mask based on class.
Reviewed by: andre, bz, rwatson
Add support for IPv4 /31 prefixes, as described in RFC3021.
To run a /31 network, participating hosts MUST drop support for directed broadcasts, and treat the first and last addresses on subnet as unicast. The broadcast address for the prefix should be the link local broadcast address, INADDR_BROADCAST.
Approved by: re (kib)
|
226571 |
20-Oct-2011 |
glebius |
MFhead r226367:
Never switch directly from INIT to MASTER, since this produces nasty status flaps.
PR: kern/161123 Submitted by: Damien Fleuriot <dam my.gd> OpenBSD: ip_carp.c, rev. 1.115
Approved by: re (kib)
|
226570 |
20-Oct-2011 |
glebius |
MFhead r226338:
Restore functions in6_ifaddloop() and in6_ifremloop() that were inlined by Qing Li in his big new-ARP commit. I am going to utilize them in my newcarp work, and also these functions left declared in in6_var.h for all the time they were absent.
Reviewed by: bz
Approved by: re (kib)
|
226567 |
20-Oct-2011 |
nwhitehorn |
MFC r226410: Enforce a memory barrier in stream operations, as is done on other bus_space calls. This makes ath(4) work correctly on PowerPC.
Submitted by: adrian Tested by: andreast Approved by: re (kib)
|
226455 |
17-Oct-2011 |
qingli |
MFC 226453
The code change made in r226040 was incomplete and resulted in routes such as fe80::1%lo0 no being installed. This patch completes the original intended fix.
Reviewed by: hrs. bz Approved by: re (ken)
|
226389 |
15-Oct-2011 |
brueffer |
MFC: r226149
Fix an infinite loop in siba_bwn_suspend().
Approved by: re (kib)
|
226387 |
15-Oct-2011 |
brueffer |
MFC: r226146
Remove dead code, "error" doesn't change between this check and the previous one.
Approved by: re (kib)
|
226386 |
15-Oct-2011 |
brueffer |
MFC: r226117
Add missing va_end() in an error case to clean up after va_start() (already done in the non-error case).
Approved by: re (kib)
|
226385 |
15-Oct-2011 |
brueffer |
MFC: r226116
Add missing va_end() to clean up after va_start().
Approved by: re (kib)
|
226384 |
15-Oct-2011 |
brueffer |
MFC: r226143
Remove two dublicated assignments.
Approved by: re (kib)
|
226368 |
14-Oct-2011 |
delphij |
MFC r226082:
Return proper errno when we hit error when doing sanity check. This fixes dtrace crashes when module is not compiled with CTF data.
Submitted by: Paul Ambrose ambrosehua at gmail.com Approved by: re (kib)
|
226337 |
13-Oct-2011 |
qingli |
MFC 226120
PR: kern/159602 Submitted by: pluknet Approved by: re (kib)
|
226333 |
13-Oct-2011 |
qingli |
MFC 226114
Remove the reference held on the loopback route when the interface address is being deleted. Only the last reference holder deletes the loopback route. All other delete operations just clear the IFA_RTSELF flag.
PR: kern/159601 Submitted by: pluknet Reviewed by: discussed on net@ Approved by: re (kib)
|
226332 |
13-Oct-2011 |
qingli |
MFC 226040
The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to determine if a loopback route should be installed for an interface IPv6 address. Another condition is the address must not belong to a looopback interface.
Reviewed by: hrs Approved by: re (kib)
|
226331 |
13-Oct-2011 |
qingli |
MFC 226224
All indirect routes will fail the rtcheck, except for a special host route where the destination IP and the gateway IP is the same. This special case handling is only meant for backward compatibility reason. The last commit introduced a bug in the route check logic, where a valid special case is treated as an error. This patch fixes that bug along with some code cleanup.
Suggested by: glebius smirnoff Reviewed by: kmacy, discussed with glebius smirnoff Approved by: re (hrs)
|
226326 |
12-Oct-2011 |
qingli |
MFC 225947
A system may have multiple physical interfaces, all of which are on the same prefix. Since a single route entry is installed for the prefix (without RADIX_MPATH), incoming packets on the interfaces that are not associated with the prefix route may trigger an error message about unable to allocation LLE entry, and fails L2. This patch makes sure a valid route is present in the system, and allow the aforementioned condition to exist and treats as valid.
Reviewed by: bz Approved by: re (kib)
|
226319 |
12-Oct-2011 |
kib |
Handle page dirty mask with atomics.
MFC r225838: Use the explicitly-sized types for the dirty and valid masks.
MFC r225840: Use the trick of performing the atomic operation on the contained aligned word to handle the dirty mask updates in vm_page_clear_dirty_mask().
MFC 225841 Remove locking of the vm page queues from several pmaps.
MFC r225843: Fix grammar.
MFC r225856: Style nit.
Approved by: re (bz)
|
226315 |
12-Oct-2011 |
marius |
MFC: r226176
Recognize the Intel(R) Centrino(R) Wireless-N 130.
PR: 161162 Submitted by: Mikhail Tsatsenko Approved by: re (kib)
|
226306 |
12-Oct-2011 |
hselasky |
MFC r226219 Fix panic due to re-using in-use modem unit number.
Approved by: re (kib)
|
226304 |
12-Oct-2011 |
tuexen |
MFC 226252: Use the most significant 6 bits of the dscp instead of the least significant ones. This has changed in the latest version of the socket API ID and provides backwards compatibility and gets it in syn with the usage of the IP_TOS socket option.
Approved by: re@
|
226303 |
12-Oct-2011 |
marius |
MFC r226118:
Sync with ahc(4)/ahd(4)/sym(4) etc: Zero any sense not transferred by the device as the SCSI specification mandates that any untransferred data should be assumed to be zero.
Reviewed by: ken Approved by: re (kib)
|
226299 |
12-Oct-2011 |
andre |
MFC r226105: Add back the IP header length to the total packet length field on raw IP sockets. It was deducted in ip_input() in preparation for protocols interested only in the payload.
On raw sockets the IP header should be delivered as it at came in from the network except for the byte order swaps in some fields.
Approved by: re (kib)
|
226295 |
12-Oct-2011 |
ed |
MFC r226099:
Tab should not blank cells.
It seems I was under the impression that a tab differs from a single forward tabulation, namely that it blanks the underlying cells. This seems not to be the case. They are identical.
This should fix applications like jove(1) that use tabs instead of explicit cursor position setting.
Reported by: Brett Glass <brett lariat net>
MFC r226183:
Properly use the cursor to bound the position for CUP.
We must take the origin region into account when clamping the cursor position.
Approved by: re@ (kib)
|
226288 |
12-Oct-2011 |
marius |
MFC: r226095
Merge from r225950 (merged to stable/9 in r226067):
Set the sense residual properly.
Reviewed by: ken Approved by: re (kib)
|
226287 |
12-Oct-2011 |
qingli |
MFC 225946
This patch allows ARP to work properly in the presence of self-referencing routes. This patch is a rework of r223862.
Reviewed by: bz, zec Approved by: re (kib)
|
226278 |
12-Oct-2011 |
tuexen |
MFC 226222: Get struct sctp_net_route in tune with struct route. struct route was changed in http://svn.freebsd.org/changeset/base/225698 and since then SCTP support was broken.
Approved by: re@
|
226268 |
11-Oct-2011 |
tuexen |
MFC 226203
When moving an stcb to a new inp and we copy over the list of bound addresses, update the last used address pointer. If not, it might result in a crash if the old inp goes away.
Approved by: re@
|
226267 |
11-Oct-2011 |
tuexen |
MFC 226168 Update the inp stored in a HB-timer when moving an stcb to a new inp. Use only this stored inp when processing a HB timeout. This fixes a bug which results in a crash.
Approved by: re@
|
226254 |
11-Oct-2011 |
attilio |
MFC r226060: Skip TCP_SIGNATURE calculation for INP_TIMEWAIT case.
Sponsored by: Sandvine Incorporated Approved by: re (kib)
|
226251 |
11-Oct-2011 |
kib |
MFC r226022: Move parts of the commit log for r166167, where Tor explained the interaction between vnode locks and vfs_busy(), into comment.
Approved by: re (bz)
|
226248 |
11-Oct-2011 |
kib |
MFC r225791: Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal() do not want to deliver the signal, and debugger never get a notification of exec.
Approved by: re (bz)
|
226231 |
10-Oct-2011 |
jkim |
MFC: r226068, r226069, r226071, r226072, r226073, r226074, r226078, r226079
- Unroll inlined strnlen(9) and make it easier to read. - Inline do_sa_get() function and remove an unused return value. - Retern more appropriate errno when Linux path name is too long. - Restore the original socket address length if it was not really AF_INET6. - Make sure to ignore the leading NULL byte from Linux abstract namespace. - Use uint32_t instead of u_int32_t. Fix style(9) nits. - Remove a now-defunct variable. - Use the caculated length instead of maximum length.
Approved by: re (kib)
|
226229 |
10-Oct-2011 |
jkim |
MFC: r226029
Add strnlen() to libkern.
Approved by: re (kib)
|
226228 |
10-Oct-2011 |
andre |
MFC r226113: Prevent TCP sessions from stalling indefinitely in reassembly when reaching the zone limit of reassembly queue entries.
Approved by: re (kib)
|
226209 |
10-Oct-2011 |
rmacklem |
MFC: r226081, r226104 A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject heading "kernel panics with RPCSEC_GSS" appears to be caused by a corrupted tailq list for the client structure. Looking at the code, calls to the function svc_rpc_gss_forget_client() were done in an SMP unsafe manner, with the svc_rpc_gss_lock only being acquired in the function and not before it. As such, when multiple threads called svc_rpc_gss_forget_client() concurrently, it could try and remove the same client structure from the tailq lists multiple times. The patch fixes this by moving the critical code into a separate function called svc_rpc_gss_forget_client_locked(), which must be called with the lock held. For the one case where the caller would have no interest in the lock, svc_rpc_gss_forget_client() was retained, but a loop was added to check that the client structure is still in the tailq lists before removing it, to make it safe for multiple concurrent calls. Also, remove an extraneous "already" from a comment introduced by r226081.
Approved by: re (kib)
|
226204 |
10-Oct-2011 |
kib |
MFC r225943: Do not allow the kernel to access usermode pages without installed fault handler. Panic immediately in such situation, on i386 and amd64.
Approved by: re (bz)
|
226202 |
10-Oct-2011 |
kib |
MFC r225942: Assert that exiting process does not return to usermode.
Approved by: re (bz)
|
226199 |
10-Oct-2011 |
kib |
MFC r225894: The sigwait(3) function shall not return EINTR, according to the POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7 contains the wrapper sigwait(3) which hides EINTR from callers. The EINTR return is used by libthr to handle required cancellation point in the sigwait(3).
To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and earlier, to have right ABI for sigwait(3), transform EINTR return from sigwait(2) into ERESTART.
Approved by: re (bz)
|
226115 |
07-Oct-2011 |
delphij |
MFC r226026:
Add the 9750 SATA+SAS 6Gb/s RAID controller card driver, tws(4). Many thanks for their contiued support to FreeBSD.
This is version 10.80.00.003 from codeset 10.2.1 [1]
Obtained from: LSI http://kb.lsi.com/Download16574.aspx [1] Approved by: re (kib)
|
226092 |
07-Oct-2011 |
trasz |
MFC r225938:
Fix bug introduced in r225641, which would cause panic if racct_proc_fork() returned error -- the racct_destroy_locked() would get called twice.
MFC r225940:
Fix another bug introduced in r225641, which caused rctl to access certain fields in 'struct proc' before they got initialized in do_fork().
MFC r225944:
Move some code inside the racct_proc_fork(); it spares a few lock operations and it's more logical this way.
MFC r225981:
Actually enforce limit for inheritable resources on fork.
Approved by: re (kib)
|
226067 |
06-Oct-2011 |
ken |
MFC r225950:
Add descriptor sense support to CAM, and honor sense residuals properly in CAM.
Desriptor sense is a new sense data format that originated in SPC-3. Among other things, it allows for an 8-byte info field, which is necessary to pass back block numbers larger than 4 bytes.
This change adds a number of new functions to scsi_all.c (and therefore libcam) that abstract out most access to sense data.
This includes a bump of CAM_VERSION, because the CCB ABI has changed. Userland programs that use the CAM pass(4) driver will need to be recompiled.
camcontrol.c: Change uses of scsi_extract_sense() to use scsi_extract_sense_len().
Use scsi_get_sks() instead of accessing sense key specific data directly.
scsi_modes: Update the control mode page to the latest version (SPC-4).
scsi_cmds.c, scsi_target.c: Change references to struct scsi_sense_data to struct scsi_sense_data_fixed. This should be changed to allow the user to specify fixed or descriptor sense, and then use scsi_set_sense_data() to build the sense data.
ps3cdrom.c: Use scsi_set_sense_data() instead of setting sense data manually.
cam_periph.c: Use scsi_extract_sense_len() instead of using scsi_extract_sense() or accessing sense data directly.
cam_ccb.h: Bump the CAM_VERSION from 0x15 to 0x16. The change of struct scsi_sense_data from 32 to 252 bytes changes the size of struct ccb_scsiio, but not the size of union ccb. So the version must be bumped to prevent structure mis-matches.
scsi_all.h: Lots of updated SCSI sense data and other structures.
Add function prototypes for the new sense data functions.
Take out the inline implementation of scsi_extract_sense(). It is now too large to put in a header file.
Add macros to calculate whether fields are present and filled in fixed and descriptor sense data
scsi_all.c: In scsi_op_desc(), allow the user to pass in NULL inquiry data, and we'll assume a direct access device in that case.
Changed the SCSI RESERVED sense key name and description to COMPLETED, as it is now defined in the spec.
Change the error recovery action for a number of read errors to prevent lots of retries when the drive has said that the block isn't accessible. This speeds up reconstruction of the block by any RAID software running on top of the drive (e.g. ZFS).
In scsi_sense_desc(), allow for invalid sense key numbers. This allows calling this routine without checking the input values first.
Change scsi_error_action() to use scsi_extract_sense_len(), and handle things when invalid asc/ascq values are encountered.
Add a new routine, scsi_desc_iterate(), that will call the supplied function for every descriptor in descriptor format sense data.
Add scsi_set_sense_data(), and scsi_set_sense_data_va(), which build descriptor and fixed format sense data. They currently default to fixed format sense data.
Add a number of scsi_get_*() functions, which get different types of sense data fields from either fixed or descriptor format sense data, if the data is present.
Add a number of scsi_*_sbuf() functions, which print formatted versions of various sense data fields. These functions work for either fixed or descriptor sense.
Add a number of scsi_sense_*_sbuf() functions, which have a standard calling interface and print the indicated field. These functions take descriptors only.
Add scsi_sense_desc_sbuf(), which will print a formatted version of the given sense descriptor.
Pull out a majority of the scsi_sense_sbuf() function and put it into scsi_sense_only_sbuf(). This allows callers that don't use struct ccb_scsiio to easily utilize the printing routines. Revamp that function to handle descriptor sense and use the new sense fetching and printing routines.
Move scsi_extract_sense() into scsi_all.c, and implement it in terms of the new function, scsi_extract_sense_len(). The _len() version takes a length (which should be the sense length - residual) and can indicate which fields are present and valid in the sense data.
Add a couple of new scsi_get_*() routines to get the sense key, asc, and ascq only.
mly.c: Rename struct scsi_sense_data to struct scsi_sense_data_fixed.
sbp_targ.c: Use the new sense fetching routines to get sense data instead of accessing it directly.
sbp.c: Change the firewire/SCSI sense data transformation code to use struct scsi_sense_data_fixed instead of struct scsi_sense_data. This should be changed later to use scsi_set_sense_data().
ciss.c: Calculate the sense residual properly. Use scsi_get_sense_key() to fetch the sense key.
mps_sas.c, mpt_cam.c: Set the sense residual properly.
iir.c: Use scsi_set_sense_data() instead of building sense data by hand.
iscsi_subr.c: Use scsi_extract_sense_len() instead of grabbing sense data directly.
umass.c: Use scsi_set_sense_data() to build sense data.
Grab the sense key using scsi_get_sense_key().
Calculate the sense residual properly.
isp_freebsd.h: Use scsi_get_*() routines to grab asc, ascq, and sense key values.
Calculate and set the sense residual.
Approved by: re (kib) Sponsored by: Spectra Logic Corporation
|
226061 |
06-Oct-2011 |
ae |
MFC r225878: Add Oxford Semiconductor OXPCIe952 (0x1c38) 1 port serial card.
PR: kern/160895 Submitted by: Konstantin V. Krotov
Approved by: re (kib)
|
225971 |
04-Oct-2011 |
bz |
MFC r225885:
Fix an obvious bug from r186196 shadowing a variable, not correctly appending the new mbuf to the chain reference but possibly causing an mbuf nextpkt loop leading to a memory used after handoff (or having been freed) and leaking an mbuf here.
Reviewed by: rwatson, brooks Approved by: re (kib)
|
225970 |
04-Oct-2011 |
bz |
MFC r225837:
Pass the fibnum where we need filtering of the message on the rtsock allowing routing daemons to filter routing updates on an rtsock per FIB.
Adjust raw_input() and split it into wrapper and a new function taking an optional callback argument even though we only have one consumer [1] to keep the hackish flags local to rtsock.c.
Submitted by: multiple (see PR) Suggested by: rwatson [1] Reviewed by: rwatson PR: kern/134931 Approved by: re (kib)
|
225965 |
04-Oct-2011 |
bz |
MFC r225793:
Unbreak no-ip and no-inet6 module builds with ipfw. For now continue to build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the assumption that the private L2 hook (which hopefully eventually will be a pfil hook as well) can still be useful.
Allow building the module without inet as well.
Approved by: re (kib)
|
225963 |
04-Oct-2011 |
mav |
MFC 225953: Revert r225875, r225877: It is reported that on some chips (e.g. the 970MP) behavior of POW bit set simultaneously with modifying other bits is undefined and may cause hangs. The race should be handled in some other way, but for now just get back.
Reported by: nwitehorn Approved by: re (kib)
|
225918 |
02-Oct-2011 |
mav |
MFC r225869: - Add special support for the MFI_CMD ioctl with MFI_CMD_STP command, used by present MegaCLI version. It has some special meaning for the first s/g list entry, while the main s/g list begins from the the second entry, and those lists should remain separate after loading to the busdma map. - Fix bug in 32bit ioctl compatibility shims when s/g list consists of more then on element.
Approved by: re (kib)
|
225917 |
02-Oct-2011 |
mav |
MFC r225875, r225877: Handle the race in cpu_idle() when due to the critical section CPU could get into sleep after receiving interrupt, delaying interrupt thread execution indefinitely until the next interrupt arrive.
Reviewed by: nwhitehorn Approved by: re (kib)
|
225873 |
29-Sep-2011 |
mav |
MFC r225789: Add one more ID for the Marvell 88SE9128 6Gbps SATA controller.
Approved by: re (kib)
|
225799 |
27-Sep-2011 |
mav |
MFC r225788: Fix interrupt counters dumping on SW_WATCHDOG fire.
Approved by: re (kib)
|
225797 |
27-Sep-2011 |
attilio |
Backout r225372. Eventhandler mutex cannot be acquired in kernel context.
Sponsored by: Sandvine Incorporated Approved by: re (kib)
|
225736 |
23-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
225530 |
13-Sep-2011 |
avg |
gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1
gpt and zfs boot blocks are not nearly as size-constrained as boot2 from which they inherited their current optimization and anti-optimization options. As such the current options do not provide any benefit, but make debugging of the code much harder. Also, it has been demonstrated that combination of -mrtd and -fno-unit-at-a-time may result in mis-compilation of the boot code with the current base gcc.
Additionally, intermediate assembly file filtering is removed for zfsboot.
The new boot blocks are all compile- and boot- tested using qemu. gptzfsboot is tested with real hardware.
Reported by: Peter Jeremy <peterjeremy@acm.org> [miscompilation] Discussed with: bde, jhb Tested by: Sebastian Chmielewski <chmielsster@gmail.com> [gptzfsboot] Approved by: re (kib) MFC after: 3 weeks
|
224131 |
17-Jul-2011 |
dim |
When building some of the boot loaders with clang, and DEBUG_FLAGS or CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils.
Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears.
Reported by: dougb
|
223758 |
04-Jul-2011 |
attilio |
With retirement of cpumask_t and usage of cpuset_t for representing a mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.
Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).
This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement.
MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
|
223695 |
30-Jun-2011 |
dfr |
Add a version of the FreeBSD bootloader which can run in userland, packaged as a shared library. This is intended to be used by BHyVe to load FreeBSD kernels into new virtual machines.
|
223611 |
27-Jun-2011 |
jhb |
Revert the entry point label to 'start' to unbreak the build.
Pointy hat to: jhb
|
223597 |
27-Jun-2011 |
jhb |
- Remove the fake BPB from zfsldr. zfsldr doesn't support booting from floppies, so it will not be used as the start of an emulated floppy image on a bootable CD which is what the fake BPB was used for. - Only check that EDD packet mode is available once at the start of zfsldr rather than for each disk sector now that we read data in one sector at a time. As a result, collapse the remaining bits of read up into nread and rename nread to read. - Restore a return at the end of putstr that I removed in the previous revision.
Tested by: Henri Hennebert (earlier version) MFC after: 1 week
|
223477 |
23-Jun-2011 |
jhb |
The recent change to increase the zfsboot size to 64k made a few BIOSes unhappy (probably they don't handle crossing the 64k boundary, etc.). Fix this by changing zfsldr to use a loop reading from the disk one sector at a time. To avoid trashing the saved copy of the MBR which is used for disk I/O, read zfsboot2 at address 0x9000. This has the advantage that BTX no longer needs to be relocated as it is read into the correct location. However, the loop to relocate zfsboot2.bin can now cross a 64k boundary, so change it to use relative segments instead. (This will need further work if zfsboot2.bin ever exceeds 64k.)
While here, stop storing a relocated copy of zfsldr at 0x700. This was only used by the xread hack which has recently been removed (and even that use was dubious). Also, include the BIOS error code as hex when reporting read errors to aid in debugging.
Much thanks to Henri Hennebert for patiently testing various iterations of the patch as well as fixing the zfsboot2.bin relocation to use relative segments.
MFC after: 1 week
|
223262 |
18-Jun-2011 |
benl |
Fix clang warnings.
Approved by: philip (mentor)
|
223017 |
12-Jun-2011 |
dim |
Upgrade our copy of llvm/clang to r132879, from upstream's trunk.
|
222813 |
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
222417 |
28-May-2011 |
julian |
New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com .
Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others
|
221506 |
05-May-2011 |
dim |
Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves off some more bytes from the final boot2 image.
Submitted by: rdivacky
|
221348 |
02-May-2011 |
dim |
Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.
|
221177 |
28-Apr-2011 |
jhb |
Due to space constraints, the UFS boot2 and boot1 use an evil hack where boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks do not have the same space constraints, so remove this hack for ZFS. While here, remove commented out code to support C/H/S addressing from zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing.
MFC after: 2 weeks
|
220924 |
21-Apr-2011 |
ae |
Remove all object files during 'make clean'.
MFC after: 1 week
|
220392 |
06-Apr-2011 |
rdivacky |
Move getc() body before xgetc() so gcc does not emit a warning about function having no body.
Approved by: jhb
|
220389 |
06-Apr-2011 |
rdivacky |
Mark getc() as inline, this has no effect on gcc but helps clang.
Approved by: jhb
|
220337 |
04-Apr-2011 |
rdivacky |
Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers. This modifies CFLAGS and tweaks sio.S to use the new calling convention. The sio_init() and sio_putc() prototypes are modified so that other users of this code know the correct calling convention.
This makes the code smaller when compiled with clang.
Reviewed by: jhb Tested by: me and Freddie Cash <fjwcash gmail com>
|
219703 |
16-Mar-2011 |
ae |
The size of zfsboot2 grown up to 64 Kbytes in r219089. Increase NSECT up to 128 sectors too.
Reviewed by: jhb, pjd
|
219702 |
16-Mar-2011 |
ae |
Set control flags in putc(). This should fix zfsboot hangs in drvread().
PR: kern/153552 Reviewed by: jhb MFC after: 1 week
|
219483 |
11-Mar-2011 |
jhb |
Remove all object files during 'make clean'.
PR: kern/154888 Submitted by: arundel MFC after: 1 week
|
219452 |
10-Mar-2011 |
rdivacky |
Some more shrinking.
o bunch of variables are turned into uint8_t
o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down
o kname is explicitly initialized in main() as BSS in boot2 is not zeroed
o the setting and reading of "fmt" in load() is removed
o buf in printf() is made static to save space
Reviewed by: jhb Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
|
219186 |
02-Mar-2011 |
rdivacky |
This patch shrinks boot2 a little.
o It switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5 so that constant propagation can take place.
o It changes the ticks overflow computation as suggested by bde@.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused.
Reviewed by: jhb
|
219126 |
01-Mar-2011 |
brucec |
Remove duplicate "in".
Suggested by: Rob Farmer <rfarmer at predatorlabs.net> MFC after: 3 days
|
219096 |
28-Feb-2011 |
brucec |
Revert some of r177626. "in in" is valid in certain sentences.
PR: 121490 MFC after: 3 days
|
219089 |
27-Feb-2011 |
pjd |
Finally... Import the latest open-source ZFS version - (SPA) 28.
Few new things available from now on:
- Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode.
MFC after: 1 month
|
219079 |
27-Feb-2011 |
dim |
Clang's integrated assembler can now handle sys/boot/i386/boot2/sio.S. It used to choke on the notation "inb (%dx),%al" for "inb %dx,%al"; GNU as accepts both forms. Which notation is more 'correct' is an open question. :)
|
218926 |
21-Feb-2011 |
dim |
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable from uint16_t back to uint32_t. The actual option bitmasks (RB_* and RBX_*) assume at least a 32 bit variable.
Submitted by: rdivacky
|
218893 |
20-Feb-2011 |
dim |
Upgrade our copy of llvm/clang to r126079, from upstream's trunk.
This contains many improvements, primarily better C++ support, an integrated assembler for x86 and support for -pg.
|
218822 |
18-Feb-2011 |
dim |
Merge binutils 2.17.50 to head. This brings a number of improvements to x86 CPU support, better support for powerpc64, some new directives, and many other things. Bump __FreeBSD_version, and add a note to UPDATING.
Thanks to the many people that have helped to test this.
Obtained from: projects/binutils-2.17
|
218745 |
16-Feb-2011 |
imp |
Remove reading of symbols from a.out loaded files. Since we are tight on space for clang and a.out support is only needed for /boot/loader, they are excess bytes that serve no useful purpose other than to support really old kernels (FreeBSD < 3.2 or so). Prefer clang support over support for these old kernels and remove this code. We gain about 100 bytes of space this way.
Reviewed by: rdivacky@
|
218713 |
15-Feb-2011 |
dim |
Apply a few small optimizations to boot2's code, to make it shrink a little further. This gets us further on the way to be able to build it successfully with clang. Using in-tree gcc, this shrinks boot2.bin with 60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
Submitted by: rdivacky Reviewed by: imp
|
217033 |
05-Jan-2011 |
dim |
On i386 and amd64, consistently use the following options whenever we want to avoid using any "advanced" CPU features:
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
|
217028 |
05-Jan-2011 |
dim |
Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles under sys/boot/{i386,pc98}, since these are already added via sys/boot/{i386,pc98}/Makefile.inc.
Submitted by: arundel
|
215285 |
14-Nov-2010 |
brucec |
Fix the jump location.
|
215284 |
14-Nov-2010 |
brucec |
When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0. This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S
PR: i386/91871 Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de> MFC after: 1 week
|
215245 |
13-Nov-2010 |
nyan |
Remove unused includes.
|
215016 |
08-Nov-2010 |
jhb |
Remove support for autoloading ACPI from the loader. Leave in the code to detect ACPI and export info such as the location of the RSDP via hints as that is still useful.
|
214210 |
22-Oct-2010 |
rdivacky |
Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little.
Approved by: rpaulo (mentor) Reviewed by: jhb
|
213568 |
08-Oct-2010 |
pho |
Ensure that a make from sys/boot does not pick up include files from /usr/include.
Discussed with: kib
|
213136 |
24-Sep-2010 |
pjd |
- Split code shared by almost any boot loader into separate files and clean up most layering violations:
sys/boot/i386/common/rbx.h:
RBX_* defines OPT_SET() OPT_CHECK()
sys/boot/common/util.[ch]:
memcpy() memset() memcmp() bcpy() bzero() bcmp() strcmp() strncmp() [new] strcpy() strcat() strchr() strlen() printf()
sys/boot/i386/common/cons.[ch]:
ioctrl putc() xputc() putchar() getc() xgetc() keyhit() [now takes number of seconds as an argument] getstr()
sys/boot/i386/common/drv.[ch]:
struct dsk drvread() drvwrite() [new] drvsize() [new]
sys/boot/common/crc32.[ch] [new]
sys/boot/common/gpt.[ch] [new]
- Teach gptboot and gptzfsboot about new files. I haven't touched the rest, but there is still a lot of code duplication to be removed.
- Implement full GPT support. Currently we just read primary header and partition table and don't care about checksums, etc. After this change we verify checksums of primary header and primary partition table and if there is a problem we fall back to backup header and backup partition table.
- Clean up most messages to use prefix of boot program, so in case of an error we know where the error comes from, eg.:
gptboot: unable to read primary GPT header
- If we can't boot, print boot prompt only once and not every five seconds.
- Honour newly added GPT attributes:
bootme - this is bootable partition bootonce - try to boot from this partition only once bootfailed - we failed to boot from this partition
- Change boot order of gptboot to the following:
1. Try to boot from all the partitions that have both 'bootme' and 'bootonce' attributes one by one. 2. Try to boot from all the partitions that have only 'bootme' attribute one by one. 3. If there are no partitions with 'bootme' attribute, boot from the first UFS partition.
- The 'bootonce' functionality is implemented in the following way:
1. Walk through all the partitions and when 'bootonce' attribute is found without 'bootme' attribute, remove 'bootonce' attribute and set 'bootfailed' attribute. 'bootonce' attribute alone means that we tried to boot from this partition, but boot failed after leaving gptboot and machine was restarted. 2. Find partition with both 'bootme' and 'bootonce' attributes. 3. Remove 'bootme' attribute. 4. Try to execute /boot/loader or /boot/kernel/kernel from that partition. If succeeded we stop here. 5. If execution failed, remove 'bootonce' and set 'bootfailed'. 6. Go to 2.
If whole boot succeeded there is new /etc/rc.d/gptboot script coming that will log all partitions that we failed to boot from (the ones with 'bootfailed' attribute) and will remove this attribute. It will also find partition with 'bootonce' attribute - this is the partition we booted from successfully. The script will log success and remove the attribute.
All the GPT updates we do here goes to both primary and backup GPT if they are valid. We don't touch headers or partition tables when checksum doesn't match.
Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 2 weeks
|
212979 |
21-Sep-2010 |
dim |
When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2 and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile flags are sometimes passed via this variable, for example during the build32 stage on amd64. This caused the 32-bit libobjc build on amd64 to fail.
Instead, only replace the first instance of clang (if any, including optional path) with gcc, and leave the arguments alone.
Approved-by: rpaulo (mentor)
|
212805 |
17-Sep-2010 |
pjd |
Before VirtualBox is fixed, mark with #ifdef what has to be done to make it possible to boot from ZFS RAIDZ for example from within VirtualBox. The problem with VirtualBox is that its BIOS reports only one disk present. If we choose to ignore this report, we can find all the disks available. We can't have this work-around to be turned on by default, because some broken BIOSes report true when it comes to number of disks, but present the same disk multiple times.
|
212126 |
02-Sep-2010 |
rmacklem |
Modify pxe.c to use the version of nfs_getrootfh() that returns the file handle's size and was recently committed to lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work correcty for non-FreeBSD as well as FreeBSD NFS servers. If built with OLD_NFSV2 defined, the old code that predated this patch will be used.
Tested by: danny at cs.huji.ac.il
|
212066 |
31-Aug-2010 |
delphij |
For consistency, change all 'i386' and MACHINE_ARCH to x86.
Reviewed by: jhb MFC after: 1 week
|
212060 |
31-Aug-2010 |
dim |
Use a more robust way to substitute gcc for clang, when compiling gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using absolute paths and/or options, as in CC="/absolute/path/clang -foo".
Approved by: rpaulo (mentor)
|
211677 |
23-Aug-2010 |
imp |
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH
|
211571 |
21-Aug-2010 |
rpaulo |
Make sure the boot2 stage is compiled with gcc, as clang has no problems compiling it, but it just gets too big at the moment, even with -Os. This is not applicable to gptboot, though.
Submitted by: Dimitry Andric <dimitry at andric.com>
|
210387 |
22-Jul-2010 |
rpaulo |
Correctly setup LDADD with regards to libstand. The submitter points out that "on amd64, libstand.a is compiled for i386, but is still installed under ${WORLDTMP}/usr/lib instead of ${WORLDTMP}/usr/lib32. Even if it would be installed there, ld on amd64 is set up incorrectly with a ${TOOLS_PREFIX}/usr/lib/i386 default path, so it wouldn't link. The reason it does link under gcc is that gcc passes -L${WORLDTMP}/usr/lib twice, even for -m32 builds, which is also incorrect, but accidentally works in this case."
Submitted by: Dimitry Andric <dimitry at andric.com>
|
209162 |
14-Jun-2010 |
rdivacky |
Pass the -N flag to linked via -Wl.
Approved by: ed (mentor)
|
208789 |
03-Jun-2010 |
ed |
Use -Wl,-N instead of the undocumented -N option for GCC.
GCC forwards the -N flag directly to ld. This flag is not documented and not supported by (for example) Clang. Just use -Wl,-N.
Submitted by: Pawel Worach
|
208388 |
21-May-2010 |
jhb |
- Set 'dmadat' earlier so that we properly setup the heap if we fail to locate a high memory area for the heap using the SMAP. - Read the number of hard drive devices from the BIOS instead of hardcoding a limit of 128. Some BIOSes duplicate disk devices once you get beyond the maximum drive number.
MFC after: 1 month
|
206378 |
07-Apr-2010 |
rpaulo |
Add a copyright.
|
206376 |
07-Apr-2010 |
rpaulo |
EFI boot loader for FreeBSD/i386.
Doesn't boot a kernel yet, but it can read an ELF file from the EFI FAT partition.
|
205662 |
26-Mar-2010 |
delphij |
Our boot loader is capable of booting both i386 and amd64 kernels so call it "x86" instead of "i386".
Suggested by: jhb in response to Alexander Best's loader proposal MFC after: 1 month
|
200872 |
22-Dec-2009 |
jhb |
Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is enabled.
MFC after: 1 week
|
200631 |
17-Dec-2009 |
nyan |
Fix debug messages of bd_io().
MFC after: 1 week
|
200357 |
10-Dec-2009 |
jhb |
Don't warn about an RSDP with a corrupt checksum. The kernel does a better job about warning about these things later and this message can be confusing.
Submitted by: infofarmer MFC after: 1 week
|
200310 |
09-Dec-2009 |
jhb |
Fix a confusing typo in the EDD packet structure used in gptboot and gptzfsboot. I got the segment and offset fields reversed in the structure, but I also succeeded in crossing the assignments so the actual EDD packet ended up correct.
MFC after: 1 week
|
200309 |
09-Dec-2009 |
jhb |
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to safely allocate a heap region above 1MB. This enables {gpt,}zfsboot() to allocate much larger buffers than before. - Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers. This allows more reliable reading of compressed files in a raidz/raidz2 pool.
Submitted by: Matt Reimer mattjreimer of gmail MFC after: 1 week
|
200219 |
07-Dec-2009 |
jhb |
Improve the algorithm the loader uses to choose a memory range for its heap when using a range above 1MB.
Previously the loader would always use the last 3MB in the first memory range above 1MB for the heap. However, this memory range is also where the kernel and any modules are loaded. If this memory range is "small", then using the high 3MB for the heap may not leave enough room for the kernel and modules.
Now the loader will use any range below 4GB for the heap, and the logic to choose the "high" heap region has moved into biosmem.c. It sets two variables that the loader can use for a high heap if it desires. When a high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following memory ranges are preferred for the heap in order from best to worst: - The largest memory region in the SMAP with a start address greater than 1MB. The memory region must be at least 3MB in length. This leaves the region starting at 1MB purely for use by the kernel and modules. - The last 3MB of the memory region starting at 1MB if it is at least 3MB in size. This matches the current behavior except that the current loader would break horribly if the first region was not at least 3MB in size. - The memory range from the end of the loader up to the 640k window. This is the range the loader uses when none of the high-heap-requesting options are enabled.
Tested by: hrs MFC after: 1 week
|
200216 |
07-Dec-2009 |
jhb |
Various small whitespace and style fixes.
|
199857 |
27-Nov-2009 |
sobomax |
Whitespace-only: another instance of identation with spaces.
|
199856 |
27-Nov-2009 |
sobomax |
Whitespace on: use tabs for identation consistently.
|
199855 |
27-Nov-2009 |
sobomax |
Add new loader console type: "spinconsole". This console selects the video console which doesn't take any input from keyboard and hides all output replacing it with ``spinning'' character (useful for embedded products and custom installations).
Sponsored by: Sippy Software, Inc.
|
199806 |
25-Nov-2009 |
trasz |
Be nice, don't use the f-word.
|
199714 |
23-Nov-2009 |
rnoland |
Create a seperate ZFS enabled loader.
This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.
Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader.
New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader.
Based on a previous patch from jhb@
Reviewed by: jhb@ MFC after: 2 weeks
|
199579 |
20-Nov-2009 |
jhb |
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to fully support booting from large volumes.
Tested by: Emil Smolenski ambsd of raisa.eu.org Submitted by: Matt Reimer mattjreimer of gmail (most of the C bits) MFC after: 1 week
|
198420 |
23-Oct-2009 |
rnoland |
Correct some issues with zfs boot.
- Teach it to read gang blocks. (essentially untested) If you see "ZFS: gang block detected!", please let me know, so we can either remove the printf if it works, or fix it if it doesn't.
- If multiple partitions exist on a disk, probe them all. We also need to reset dsk->start to 0 to read the right sector here.
- With GPT, we can have 128 partitions.
- If the bootfs property has ever been set on a pool it seems that it never goes away. zpool won't allow you to add to the pool with the bootfs property set. However, if you clear the property back to default we end up getting 0 for the object number and read a bogus block pointer and fail to boot.
- Fix some error printfs. The printf in the loader is only capable of c,s and u formats.
- Teach printf how to display %llu
Reviewed by: dfr, jhb MFC after: 2 weeks
|
198079 |
14-Oct-2009 |
jhb |
Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails short read requests, so the result was that a /boot.config smaller than 512 bytes was ignored. boot2 uses fsread() instead of xfsread() to read /boot.config already, so this makes zfsboot more like boot2.
Submitted by: Johny Mattsson johny-freebsd of earthmagic org Reviewed by: dfr MFC after: 3 days
|
197082 |
10-Sep-2009 |
emaste |
If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead.
PR: i386/106493 Submitted by: Andrey Russev MFC after: 1 month
|
196326 |
17-Aug-2009 |
jhay |
Fix parse() so that the partition to boot (load /boot/loader) from can be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader
Reviewed by: jhb Approved by: re (kib)
|
195045 |
26-Jun-2009 |
rpaulo |
On special systems where the MBR and the GPT are in sync (up to the 4th slicei, Apple EFI hardware), the bootloader will fail to recognize the GPT if it finds anything else but the EFI partition. Change the check to continue detecting the GPT by looking at the EFI partition on the MBR but stopping successfuly after finding it.
PR: kern/134590 Submitted by: Christoph Langguth <christoph at rosenkeller.org> Reviewed by: jhb MFC after: 2 weeks Approved by: re (kib)
|
193720 |
08-Jun-2009 |
jhb |
Instead of packing the individual fields in the PnP structures, pack the entire structures. This trims some warnings.
Verified by: md5(1) MFC after: 1 week
|
193719 |
08-Jun-2009 |
jhb |
Don't attempt to free the GPT partition list for a disk with an empty GPT.
Submitted by: Yuri Pankov yuri.pankov of gmail MFC after: 3 days
|
193530 |
05-Jun-2009 |
jkim |
Import ACPICA 20090521.
|
193229 |
01-Jun-2009 |
jhb |
Add a missing parameter when displaying GPT partitions with an unknown UUID.
Submitted by: Pawel Worach pawel.worach | gmail MFC after: 1 week
|
192194 |
16-May-2009 |
dfr |
Add support for booting from raidz1 and raidz2 pools.
|
191111 |
15-Apr-2009 |
jkim |
A simple rewrite of biossmap.c:
- Do not iterate int 15h, function e820h twice. Instead, we use STAILQ to store each return buffer and copy all at once. - Export optional extended attributes defined in ACPI 3.0 as separate metadata. Currently, there are only two bits defined in the specification. For example, if the descriptor has extended attributes and it is not enabled, it has to be ignored by OS. We may implement it in the kernel later if it is necessary and proven correct in reality. - Check return buffer size strictly as suggested in ACPI 3.0.
Reviewed by: jhb
|
191061 |
14-Apr-2009 |
jhb |
Use a disk address instead of an int to hold the starting offset of an open partition. This fixes access to partitions whose starting offset is >= 2 TB.
Submitted by: "James R. Van Artsdalen" james jrv.org MFC after: 3 days
|
190814 |
07-Apr-2009 |
jkim |
Rewrite SMBIOS for loader:
- First three fields of system UUID may be little-endian as described in SMBIOS Specification v2.6. For now, we keep the network byte order for backward compatibility (and consistency with popular dmidecode tool) if SMBIOS table revision is less than 2.6. However, little-endian format can be forced by defining BOOT_LITTLE_ENDIAN_UUID from make.conf(5) if it is necessary. - Replace overly ambitious optimizations with more readable code. - Update comments to SMBIOS Specification v2.6 and clean up style(9) bugs.
|
190813 |
07-Apr-2009 |
jkim |
Increase sprintf(3) buffer size, which I forgot from the previous commit.
|
190599 |
31-Mar-2009 |
jkim |
Probe size of installed memory modules from loader and display it as 'real memory' instead of Maxmem if the value is available. Note amd64 displayed physmem as 'usable memory' since machdep.c r1.640 to unconfuse users. Now it is consistent across amd64 and i386 again. While I am here, clean up smbios.c a bit and update copyright date.
Reviewed by: jhb
|
189749 |
12-Mar-2009 |
jhb |
The recent change to use memory > 1MB for the heap by default broke CD booting because the CD driver did not use bounce buffers to ensure request buffers sent to the BIOS were always in the first 1MB. Copy over the bounce buffer logic from the BIOS disk driver (minus the 64k boundary code for floppies) to fix this.
Reported by: kensmith
|
189588 |
09-Mar-2009 |
jhb |
- Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT in make.conf or src.conf. - When GPT is enabled (which it is by default), use memory above 1 MB and leave the memory from the end of the bss to the end of the 640k window purely for the stack. The loader has grown and now it is much more common for the heap and stack to grow into each other when both are located in the 640k window.
PR: kern/129526 MFC after: 1 week
|
189500 |
07-Mar-2009 |
marcel |
Revert the part of change 107879 that employs the unused bytes after the disklabel in the 2nd sector for boot code. Even with both UFS1 and UFS2 supported, there's enough bytes left that we don't have to nibble from the disklabel. Thus, the entire 2nd sector is now reserved for the disklabel, which makes the bootcode compatible again with disklabels that have more than 8 partitions -- such as those created and supported by gpart.
i386: 135 bytes available amd64: 151 bytes available
Ok'd by: jhb
|
189017 |
24-Feb-2009 |
jhb |
Fix some more issues with the real mode BTX.
The old BTX passed the general purpose registers from the 32-bit client to the routines called via virtual 86 mode. The new BTX did the same thing. However, it turns out that some instructions behave differently in virtual 86 mode and real mode (even though this is under-documented). For example, the LEAVE instruction will cause an exception in real mode if any of the upper 16-bits of %ebp are non-zero after it executes. In virtual 8086 mode the upper 16-bits are simply ignored. This could cause faults in hardware interrupt handlers that inherited an %ebp larger than 0xffff from the 32-bit client (loader, boot2, etc.) while running in real mode.
To fix, when executing hardware interrupt handlers provide an explicit clean state where all the general purpose and segment registers are zero upon entry to the interrupt handler. While here, I attempted to simplify the control flow in the 'intusr' code that sets up the various stack frames and exits protected mode to invoke the requested routine via real mode.
A huge thanks to Tor Egge (tegge@) for debugging this issue.
Submitted by: tegge Reviewed by: tegge Tested by: bz MFC after: 1 week
|
188895 |
21-Feb-2009 |
ru |
Fix build when WITH_SSP is set explicitly.
Submitted by: Jeremie Le Hen
|
187917 |
30-Jan-2009 |
gabor |
- Remove superfluous comment
PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
|
187101 |
12-Jan-2009 |
jkim |
Allow VIA Nano processors to boot FreeBSD/amd64.
PR: amd64/130303 MFC after: 1 week
|
186598 |
30-Dec-2008 |
luigi |
A number of small changes to make the 'save choice to disk' safer, and re-enable it as default.
In particular:
+ re-enable the 'update' flag in the Makefile (of course!);
+ commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)" to avoid writing to disk in case of a timeout/default choice;
+ fix an off-by-one count in the partition scan code that would print the wrong name for unknown partitions;
+ unconditionally change the boot prompt to 'Boot:' instead of 'Default:' to make room for the extra code/checks/messages. Some of the changes listed below are also made to save space;
+ rearrange and fix comments for known partition types. Right now we explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys), NTFS (type 7), FAT32 (type 11). Depending on other options we also recognise Extended (type 5), FAT12 (type 1) and FAT16 < 32MB (type 4).
+ Add an entry "F6 PXE" when the code is built with -DPXE (which is a default now). Technically, F6 boots through INT18, so the prompt 'PXE' is a bit misleading. Unfortunately the name INT18 is too long and does not fit in - we could use ROM perhaps. The reason I picked 'PXE' is that on many (I believe) new systems INT18 calls PXE.
Apart from the choice of the name for PXE/ROM/INT18, this should close pending issues on the 1-sector boot0 code and we should be able to move the code to RELENG_7 when it reopens.
No boot0cfg changes are necessary.
MFC after: 3 weeks
|
186243 |
17-Dec-2008 |
dfr |
Use full 64bit arithmetic when converting file offsets to block numbers - fixes booting on filesystems with inode numbers with values above 4194304.
Submitted by: ps
|
185781 |
09-Dec-2008 |
sobomax |
Remove now unused label.
Submitted by: Christoph Mallon MFC after: 4 weeks (along with r185779 and r185780)
|
185780 |
09-Dec-2008 |
sobomax |
Optimiza assembly in the previous r185779, to save whooping 16 bytes.
Submitted by: Christoph Mallon MFC after: 4 weeks (including r185779)
|
185779 |
08-Dec-2008 |
sobomax |
Respect RBX_MUTE flag from boot[012].
MFC after: 4 weeks
|
185776 |
08-Dec-2008 |
sobomax |
Fix typo in the comment %is -> %si.
|
185579 |
03-Dec-2008 |
luigi |
Another, hopefully final set of changes to boot0 and boot0cfg.
boot0.S changes:
+ import a patch from Christoph Mallon to rearrange the various print functions and save another couple of bytes;
+ implement the suggestion in PR 70531 to enable booting from any valid partition because even the extended partitions that were previously in our kill list may contain a valid boot loader. This simplifies the code and saves some bytes;
+ followwing up PR 127764, implement conditional code to preserve the 'Volume ID' which might be used by other OS (NT, XP, Vista) and is located at offset 0x1b8. This requires a relocation of the parameter block within the boot sector -- there is no other possible workaround. To address this, boot0cfg has been updated to handle both versions of the boot code;
+ slightly rearrange the strings printed in the menus to make the code buildable with all options. Given the tight memory budget, this means that with certain options we need to shrink or remove certain labels.
and especially:
make -DVOLUME_LABEL -DPXE the default options.
This means that the newly built boot0 block will preserve the Volume ID, and has the (hidden) option F6 to boot from INT18/PXE. I think the extra functionality is well worth the change.
The most visible difference here is that the 'Default: ' string now becomes 'Boot: ' (it can be reverted to the old value but then we need to nuke 1/2 partition name or entries to make up for the extra room).
boot0cfg changes:
+ modify the code to recognise the new boot0 structure (with the relocated options block to make room for the Volume id).
+ add two options, '-i xxxx-xxxx' to set the volume ID, -e c to modify the character printed in case of bad input
PR: 127764 70531 Submitted by: Christoph Mallon (portions) MFC after: 4 weeks
|
185562 |
02-Dec-2008 |
luigi |
This commits brings in a lot of documentation and some enhancement of the boot0.S code, with a number of compile-time selectable options, the most interesting one being the ability to select PXE booting.
The code is completely compatible with the previous one, and with the boot0cfg program. Even the actual code is largely unmodified, with only minor rearrangements or fixes to make room for the new features.
The behaviour of the standard build differs from the previous version in the following, minor things:
+ 'noupdate' is the default, which means the code does not write back the selection to disk. You can enable the feature at runtime with boot0cfg, or changing the flags in the Makefile.
+ a drive number of 0x00 (floppy, or USB in floppy emulation) is now accepted as valid. Previously, it was overridden with 0x80, meaning that the partition table coming from the media was used to access sectors on a possibly different media. You can revert to the previous mode building with -DCHECK_DRIVE, and you can always use the 'setdrv' option in boot0cfg
+ certain FAT or NTFS partitions are listed as WIN instead of DOS.
+ the 'bel' character on a bad selection is replaced by a '#' to make it clear that the system is not hang even if the machine does not have a speaker. This can be reverted back at compile time, or at runtime with an upcoming boot0cfg option.
Additional features are available as compile time options, and may be become the default if deemed useful. In particular:
+ INT18/PXE boot (make -DPXE) This option enables booting through INT 18h (which on certain BIOSes can be hooked to PXE) by pressing F6. There is unfortunately no room to print the additional menu option. Also, to make room for the code, the 'Default: ' string is changed to 'Boot: '
+ print current drive number (make -DTEST) Prints a line indicating the current drive number. This is useful to figure out what is going on for machines/bioses which remap drives in sometimes surprising ways.
+ disable numeric keys in console mode (make -DONLY_F_KEYS) Not really a significant option, but it is needed to make room for the -DTEST mode.
+ disable floppy support (make -DCHECK_DRIVE) Revert to the old behaviour of only accepting 0x80 and above as valid drive numbers.
MFC after: 6 weeks
|
185346 |
26-Nov-2008 |
luigi |
Fix a typo in previous commit: must call "putn" to print a crlf, instead of "puts" which prints whatever is at %si, followed by a CRLF.
It was not noticed during tests because at that point %si points to a partition entry whose first byte is 0x80, which is both a terminator for the string and a non printable character.
Submitted by: Christoph Mallon
|
185339 |
26-Nov-2008 |
luigi |
Pass the pointer to the selected partition in %si to the next stage boot code. The bug was introduced in rev.1.13, and went unnoticed because FreeBSD's boot1 does not use it, but other systems might.
(I have been struggling for almost a full day trying to figure out why a syslinux'ed partition would not boot when started with the FreeBSD /boot/boot0, only to realize that the bug was ours!)
The space for the two extra bytes (push %si and pop %si) is reclaimed by removing an extra CRLF that is printed before booting.
The bug is not a major one but if there is time it might be a good thing to merge it into the upcoming releases.
|
185175 |
22-Nov-2008 |
dfr |
Fix amd64 build and re-enable gptzfsboot.
|
185151 |
21-Nov-2008 |
des |
Disconnect gptzfsboot from the build until dfr@ gets his act together.
|
185096 |
19-Nov-2008 |
dfr |
Add a GPT-aware variant of zfsboot which should be used in a similar manner to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or /sbin/gpt.
Tweak the /boot/loader ZFS support so that it can find ZFS pools that are contained in GPT partitions.
|
185095 |
19-Nov-2008 |
dfr |
If we free the GPT partition list in bd_open_gpt() because of an error, don't try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print.
|
185045 |
18-Nov-2008 |
ache |
Fix building without ZFS (can't find library)
|
185029 |
17-Nov-2008 |
pjd |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
|
183667 |
07-Oct-2008 |
jhb |
Use CPUID to see if the current CPU supports long mode when attemping to boot an amd64 kernel. If not, then fail the boot request with an error message. Otherwise, the boot attempt will fail with a BTX fault when trying to read the EFER MSR.
MFC after: 3 days
|
181436 |
08-Aug-2008 |
jhb |
- Initialize the vm86 structure to a known-good state. Specifically, always set the %eflags used during a BIOS call via BTX to 0x202. Previously the flags field was uninitialized garbage, and thus it was "random" if interrupts were enabled or not during BIOS calls. - Use constants from <machine/psl.h> for fields in %eflags.
MFC after: 3 days
|
181433 |
08-Aug-2008 |
jhb |
Fix the hangs reported with the real mode BTX: - I had errantly assumed that all user requests should run with interrupts enabled. User requests for software interrupts, however, need to disable interrupts (and tracing) just like hardware interrupts. - Disable alignment checking when emulating a hardware interrupt as well (based on the description of the real mode operation of the 'INT' instruction in the IA-32 manuals). - Use constants for fields in %eflags.
Tested by: bz MFC after: 3 days
|
181282 |
04-Aug-2008 |
cperciva |
Dereferencing uninitialized pointers considered harmful. Prior to this commit, calling i386_parsedev(..., X, ...) where X is "ad", "bge", or any other disk or network device name without a unit number, would result in dereferencing whatever happened to be on the stack where the variable "cp" is stored.
Found by: LLVM/Clang Static Checker
|
180208 |
03-Jul-2008 |
peter |
Set magic fbsd:nokeywords property that allows files to bypass keyword expansion. (file-specific replacement for CVSROOT/exclude)
|
180145 |
01-Jul-2008 |
nyan |
Fix off-by-one error.
MFC after: 1 week
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
179825 |
16-Jun-2008 |
olli |
Implement a workaround for a long-standing problem in libi386's time(), caused by a qemu bug. The bug might be present in other BIOSes, too.
qemu either does not simulate the AT RTC correctly or has a broken BIOS 1A/02 implementation, and will return an incorrect value if the RTC is read while it is being updated.
The effect is worsened by the fact that qemu's INT 15/86 function ("wait" a.k.a. usleep) is non-implmeneted or broken and returns immediately, causing beastie.4th to spin in a tight loop calling the "read RTC" function millions of times, triggering the problem quickly.
Therefore, we keep reading the BIOS value until we get the same result twice. This change fixes beastie.4th's countdown under qemu.
Approved by: des (mentor)
|
179631 |
07-Jun-2008 |
jhb |
Workaround a bug in the BIOS of Dell R900 machines. Specifically, each entry in the SMAP is a 20 byte structure and they are queried from the BIOS via sucessive BIOS calls. Due to an apparent bug in the R900's BIOS, for some SMAP requests the BIOS overflows the 20 byte buffer trashing a few bytes of memory immediately after the SMAP structure. As a workaround, add 8 bytes of padding after the SMAP structure used in the loader for SMAP queries.
PR: i386/122668 Submitted by: Mike Hibler mike flux.utah.edu, silby MFC after: 3 days
|
178037 |
09-Apr-2008 |
jhb |
Revert the previous change and let PROBE_KEYBOARD function identical to -P in boot2/gptboot.
|
177626 |
26-Mar-2008 |
brueffer |
Fix some "in in" typos in comments.
PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
|
177039 |
10-Mar-2008 |
jhb |
Change the BTX kernel to drop all the way out to real mode to invoke BIOS routines (V86 requests from the client and hardware interrupt handlers): - Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f to handle hardware interrupts by invoking the appropriate vector (0x8-0xf or 0x70-0x78). This allows the 8259As to use vectors 0x20-0x2f in real mode as well as protected mode will ensuring that the master 8259A doesn't share IDT space with CPU exceptions in protected mode. - Since we don't need to reserve space for page tables and a page directory anymore since dropping paging support, move the TSS and protected mode IDT up by 16k. Grow the ring 1 link stack by 16k as a result. - Repurpose the ring 1 link stack to be used as a real mode stack when invoking real mode routines either via a V86 request or a hardware interrupts. This simplifies a few things as we avoid disturbing the original user stack. - Add some more block comments to explain how the code interacts with the V86 structure as this wasn't immediately obvious from the prior comments (e.g. that we explicitly copy the seg regs for real mode out of the V86 struct onto the stack to be popped off when going into real mode, etc.). Also, document some of the stack frames we create going to real mode and back. - Remove all of the virtual 86 related code including having to simulate various instructions and BIOS calls on a trap from virtual 86 mode. - Explicitly panic if a user client attempts to perform a V86 CALL request that isn't a far call. - Bump version to 1.2.
Assuming this works ok this should fix some of the long standing issues with USB booting as well as etherboot.
MFC after: 2 weeks Submitted by: kib (some parts from his original real mode patch)
|
176882 |
06-Mar-2008 |
jhb |
In the PROBE_KEYBOARD case, always enable multiple consoles and set the serial console as the primary console if the keyboard probe fails.
MFC after: 1 week
|
176646 |
28-Feb-2008 |
jhb |
Tweak the verbose disk printing a bit: - Consolidate the code to humanize the size of a disk partition into a single function based on the code for GPT partitions and use it for GPT partitions, BSD slices, and BSD partitions. - Teach the humanize code to use KB for small partitions (e.g. GPT boot partitions now show up as 64KB rather than 0MB). - Pad a few partition type names out so that things line up in the common case.
MFC after: 1 week
|
176644 |
28-Feb-2008 |
jhb |
Rev 1.72 fixed a bug where if /boot.config changed the console its contents weren't displayed on the new console. However, the config string has been altered as part of being parsed so we only display the first option. Fix this by saving a copy of /boot.config before parsing it and displaying the saved copy after parsing.
MFC after: 1 week PR: i386/103972 Submitted by: Alexandre Belloni alexandre.belloni of netasq.com
|
176631 |
27-Feb-2008 |
jhb |
Retire the support for using paging in BTX. It hasn't been used since before 4.0.
Submitted by: kib
|
173957 |
26-Nov-2007 |
jhb |
Add a note to indicate that these files do borrow in part from mbr.s and boot1.S
Requested by: rnordier
|
173697 |
17-Nov-2007 |
jhb |
Add a trailing \0 to the read error string so that read errors don't print out two error messages.
MFC after: 3 days
|
173575 |
12-Nov-2007 |
bz |
Though we are currently not interested in the EDD3 flag, Enhanced Disk Drive Specification Ver 3.0 defines that the version of extension in AH would be 30h. Correct the check for that to be >=30h instead of >3h. MFC after: 2 months
|
173118 |
28-Oct-2007 |
jhb |
- Add constants for the different memory types in the SMAP table. - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it.
|
173040 |
26-Oct-2007 |
jhb |
Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge.
MFC after: 1 week Discussed with: imp
|
173026 |
26-Oct-2007 |
jhb |
Add . to the include path so that we follow the 'machine' symlink we create during depend on amd64.
Reported by: rwatson
|
172974 |
25-Oct-2007 |
jhb |
Break out of the I/O retry loop as soon as an I/O operation succeeds rather than always retrying operations three times.
Submitted by: nyan
|
172940 |
24-Oct-2007 |
jhb |
First cut at support for booting a GPT labeled disk via the BIOS bootstrap on i386 and amd64 machines. The overall process is that /boot/pmbr lives in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot, /boot/gptboot lives in its own dedicated GPT partition with a new "FreeBSD boot" type. This partition does not have a fixed size in that /boot/pmbr will load the entire partition into the lower 640k. However, it is limited in that it can only be 545k. That's still a lot better than the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like boot2 in that it reads /boot.config and loads up /boot/loader. Some more details: - Include uuid_equal() and uuid_is_nil() in libstand. - Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using /boot/pmbr and /boot/gptboot. Note that the disk must have some free space for the boot partition. - This required exposing the backend of the 'add' function as a gpt_add_part() function to the rest of gpt(8). 'boot' uses this to create a boot partition if needed. - Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that it can handle a filesystem > 1.5 TB. - /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O unlike boot1 since /boot/pmbr loads all of gptboot up front. The C portion of gptboot (gptboot.c) has been repocopied from boot2.c. The primary changes are to parse the GPT to find a root filesystem and to use 64-bit disk addresses. Currently gptboot assumes that the first UFS partition on the disk is the / filesystem, but this algorithm will likely be improved in the future. - Teach the biosdisk driver in /boot/loader to understand GPT tables. GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is similar to the /dev names the kernel uses (e.g. /dev/ad0p2). - Add a new "freebsd-boot" alias to g_part() for the new boot UUID.
MFC after: 1 month Discussed with: marcel (some things might still change, but am committing what I have so far)
|
172927 |
24-Oct-2007 |
jhb |
Rework the read/write support in the bios disk driver some to cut down on duplicated code and support 64-bit LBAs for GPT. - The code to manage an EDD or C/H/S I/O request are now in their own routines. The EDD routine now handles a full 64-bit LBA instead of truncating LBAs to the lower 32-bits. (MBRs and BSD labels only have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit). - All of the bounce buffer and retry logic duplicated in bd_read() and bd_write() are merged into a single bd_io() routine that takes an extra direction argument. bd_read() and bd_write() are now simple wrappers around bd_io(). - If a disk supports EDD then always use it rather than only using it if the cylinder is > 1023. Other parts of the boot code already do something similar to this. Also, GPT just uses LBAs, so for a GPT disk it's probably best to ignore C/H/S completely. Always using EDD when it is supported by a disk is an easy way to accomplish this.
MFC after: 1 week
|
172922 |
24-Oct-2007 |
jhb |
Reindent the read/write code of bd_realstrategy() so it is more readable.
MFC after: 1 week
|
172921 |
24-Oct-2007 |
jhb |
Slightly cleanup the 'bootdev' concept on x86 by changing the various macros to treat the 'slice' field as a real part of the bootdev instead of as hack that spans two other fields (adaptor (sic) and controller) that are not used in any modern FreeBSD boot code.
MFC after: 1 week
|
172591 |
12-Oct-2007 |
ps |
Do not attempt to make an NFS rpc call if using tftp
PR: kern/91720 Submitted by: Ruben Kerkhof
|
170101 |
29-May-2007 |
simokawa |
MFp4: add FireWire/dcons support in loader for i386/amd64.
It is disabled by default. You need to put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf and rebuild loader to enable it. (cd /sys/boot/i386 && make clean && make && make install)
You can find a short introduction of dcons at http://wiki.freebsd.org/DebugWithDcons
|
169842 |
21-May-2007 |
jkim |
Use lower cases for UUID string to conform RFC4122 and ISO/IEC-9834-8:2005.
|
169732 |
19-May-2007 |
kan |
Tweak inlining parameters a little. Add warning to tell us if function we declared as inline can not be inlined.
|
167914 |
26-Mar-2007 |
thomas |
Fix setting of serial port speed. A junk value was passed in AX when bioscom is called to set up serial port parameters because COMSPEED was treated as an address instead of an immediate value, causing serial port parameters to never be set.
PR: i386/110828 Reviewed by: jhb MFC after: 2 weeks
|
167814 |
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
166926 |
23-Feb-2007 |
remko |
Fix the cdboot twiddle display. I created and tested this with a custom FreeSBIE cd-image.
PR: i386/96452 Submitted by: Yuichiro Goto <y7goto at gmail dot com> MFC after: 3 days Approved by: imp (mentor)
|
164948 |
06-Dec-2006 |
jhb |
Ignore any breakpoint instructions (int 3) we encounter in vm86 mode rather than treating them as a fatal exception and halting. At least one storage BIOS (some newer mpt(4) parts) have a breakpoint instruction in their disk read routine.
MFC after: 3 days
|
164335 |
16-Nov-2006 |
ru |
Remove an unused variable.
|
163914 |
02-Nov-2006 |
ru |
Revert the last change. Masking only 2 MSBs of the virtual address to get the physical address doesn't work for all values of KVA_PAGES, while masking 8 MSBs works for all values of KVA_PAGES that are multiple of 4 for non-PAE and 8 for PAE. (This leaves us limited with 12MB for non-PAE kernels and 14MB for PAE kernels.)
To get things right, we'd need to subtract the KERNBASE from the virtual address (but KERNBASE is not easy to figure out from here), or have physical addresses set properly in the ELF headers.
Discussed with: jhb
|
163897 |
02-Nov-2006 |
marcel |
Extend struct devdesc with a unit field, called d_unit. Promote the device (kind) specific unit field to the common field. This change allows a future version of libefi to work without requiring anything more than what is defined in struct devdesc and as such makes it possible to compile said version of libefi for different platforms without requiring that those platforms have identical derivatives of struct devdesc.
|
163893 |
02-Nov-2006 |
marcel |
Don't unconditionally compile-in the bcache code. It's only used on i386/amd64 and pc98. Remove useless calls to bcache_init() from the ia64 and sparc64 loaders, as well as from the OFW common code.
|
163765 |
29-Oct-2006 |
ru |
Because the BTX mini-kernel now uses flat memory mode and clients are no longer limited to a virtual address space of 16 megabytes, only mask high two bits of a virtual address. This allows to load larger kernels (up to 1 gigabyte). Not masking addresses at all was a bad idea on machines with less than >3G of memory -- kernels are linked at 0xc0xxxxxx, and that would attempt to load a kernel at above 3G. By masking only two highest bits we stay within the safe limits while still allowing to boot larger kernels.
(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c rev. 1.71.)
Prodded by: jhb Tested by: nyan (pc98)
|
163708 |
26-Oct-2006 |
ru |
Adopt comments borrowed from aout_freebsd.c.
|
163707 |
26-Oct-2006 |
ru |
Restore support for -c and -d that were treacherously murdered in rev. 1.58. (This only costs us four bytes.)
Prodded by: bde MFC after: 3 days
|
163706 |
26-Oct-2006 |
ru |
Back out rev. 1.71 as it breaks directly loading (i386) kernels.
OK'ed by: jhb PR: i386/96430, i386/104709 MFC after: 3 days
|
163070 |
07-Oct-2006 |
pav |
- Update URL of Intel documentation
Submitted by: Rob <spamrefuse@yahoo.com> on freebsd-doc MFC after: 3 days
|
163032 |
05-Oct-2006 |
jhb |
- Fix a couple of improper uses of leal in the previous space saving commits. For some reason I thought the scale factor was a shift count rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was going to generate %eax + %edx << 4 rather than %eax + %edx * 4). What I need is to multiply by 16 to convert a real-mode (seg, offset) tuple into a flat address. However, the max multiplicand for scaled/index addressing on i386 is 8, so go back to using a shl and an add. - Convert two more inter-register mov instructions where we don't need to preserve the source register to xchg instructions to keep our space savings.
Tested by: Ian FREISLICH if at hetzner.co.za MFC after: 1 week
|
162814 |
29-Sep-2006 |
ru |
Fix most of the WARNS=2 warnings.
|
162813 |
29-Sep-2006 |
jhb |
Oops, add return values for the smap command function. We must have the warnings set weird or something because gcc didn't warn about this at all.
Submitted by: ru
|
162745 |
28-Sep-2006 |
jhb |
Tweak the code to handle intercepting BIOS calls to int 0x15 to shave another 16 bytes off of BTX (and thus boot2): - Compare against the value of %eax that is saved on the stack instead of loading it into %eax (which requires saving the current %eax on the stack). - Use %ch to examine the keyboard flag state in the BIOS to see if Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on the stack anymore.
MFC after: 1 week
|
162744 |
28-Sep-2006 |
jhb |
Optimize the int 15/87 handler for space to shave another 16 bytes off of BTX (and thus boot2): - Don't bother saving %eax, %ebx, or %ecx as it is not necessary. - Use a more compact sequence to load the base value out of a GDT entry by loading the contiguous low 24 bits into the upper 24 bits of %eax, loading the high 8 bits into %al, and using a ror to rotate the bits (2 mov's and a ror) rather than loading the pieces in smaller chunks (3 mov's and a shl). - Use movzwl + leal instead of movl + movw + shll + addl. - Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where it's ok to trash %eax. xchgl %eax, foo is a 1-byte opcode whereas the mov is a 2-byte opcode. - Use movzwl rather than xorl + movw.
MFC after: 1 week
|
162743 |
28-Sep-2006 |
jhb |
Add an 'smap' command that dumps out the BIOS SMAP.
MFC after: 1 week
|
162737 |
28-Sep-2006 |
jhb |
A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is 16-byte aligned within boot2 however, this actually trims boot2 by 16 bytes.
|
162717 |
28-Sep-2006 |
ru |
Add -march=i386 to fix amd64 build by generating the same code as i386 would do.
|
162710 |
27-Sep-2006 |
jhb |
Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register rather than just emulating mov cr0, eax. This fixes some Compaq/HP BIOS with DMA (as the BIOS tried to read cr3 so it could translate addresses if paging was enabled).
MFC after: 1 week
|
162046 |
05-Sep-2006 |
ru |
- Include <sys/reboot.h> to get the RB_* defines.
- Make the PROBE_KEYBOARD option better resemble the -P option in boot2, i.e., if keyboard isn't present then boot with both RB_SERIAL and RB_MULTIPLE set.
Reviewed by: jhb
|
160964 |
04-Aug-2006 |
yar |
Commit the results of the typo hunt by Darren Pilgrim. This change affects documentation and comments only, no real code involved.
PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
|
159096 |
31-May-2006 |
iedowse |
Increment the disk block offset after writing, not before. This fixes filesystem corruption when nextboot.conf is located after cylinder 1023. The bug appears to have been introduced at the time bd_read was copied to create bd_write.
PR: bin/98005 Reported by: yar MFC after: 1 week
|
158265 |
03-May-2006 |
jhb |
Restore the pre-5.x behavior of only beeping if the user makes a bad selection and not always beeping on startup. The two bytes for the extra 'jmp' instruction were obtained by removing recognition of BSD/OS partitions.
Requested by: many Tested by: subset of many Head nod: imp, keramida MFC after: 2 weeks
|
158023 |
25-Apr-2006 |
jhb |
Use PTOV() to convert physical addresses to appropriate virtual addresses in the loader when searching for the ACPI RSDP. (The loader runs in a flat mode with va 0 == pa 0xa000.)
|
157669 |
11-Apr-2006 |
sobomax |
Merge in timeout into A20-enable routine from cdboot/boot1.
MFC after: 1 day
|
157668 |
11-Apr-2006 |
jhb |
Drop the gateA20() function in the loader as it is unused. All the other boot loaders that load the loader already handle A20. In fact, they are required to do so in order to setup the environment that btxldr expects.
|
157667 |
11-Apr-2006 |
jhb |
Minor whitespace tweak.
|
157664 |
11-Apr-2006 |
jhb |
Tweak comment.
|
157663 |
11-Apr-2006 |
jhb |
Use the proper condition to determine that we matched an filename. Otherwise, we could match on a filename that had the wrong last character (such as /boot/loaded instead of /boot/loader).
PR: kern/95625 Submitted by: Oliver Fromme <olli@secnetix.de> MFC after: 1 month
|
157652 |
11-Apr-2006 |
sobomax |
When enabling A20 put upper limit on amount of time we wait for the keyboard controller to get ready (65K x ISA access time, visually around 1 second). If we have wait more than that amount it's likely that the hardware is a legacy-free one and simply doesn't have keyboard controller and doesn't require enabling A20 at all.
This makes cdboot working for MacBook Pro with Boot Camp.
MFC after: 1 day
|
156813 |
17-Mar-2006 |
ru |
Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html
The src.conf(5) manpage is to follow in a few days.
Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
|
156712 |
14-Mar-2006 |
jkim |
Export SMBIOS serial numbers by default. To turn it off, use 'BOOT_HIDE_SERIAL_NUMBERS' knob.
Suggested by: ceri
|
156558 |
10-Mar-2006 |
jkim |
Micro-optimize invalid UUID check.
|
156519 |
09-Mar-2006 |
jkim |
- Implement serial numbers, UUID, and asset tag (turned off by default). Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on. - Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and update copyright while I am here.
|
153589 |
21-Dec-2005 |
sobomax |
For the cases when loading bzip2-compressed kernels enabled use last 3MB of physical memory for heap instead of range between 1MB and 4MB. This makes this feature working with PAE and amd64 kernels, which are loaded at 2MB. Teach i386_copyin() to avoid using range allocated by heap in such case, so that it won't trash heap in the low memory conditions.
This should make loading bzip2-compressed kernels/modules/mfs images generally useable, so that re@ team is welcome to evaluate merits of using this feature in the installation CDs.
Valuable suggestions by: jhb
|
153536 |
19-Dec-2005 |
sobomax |
If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to provide enough room for decompression (up to 2.5MB is necessary). This should be safe to do since we load i386 kernels after 8MB mark now, so that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.
This makes bzip2-support practically useable.
|
153535 |
19-Dec-2005 |
sobomax |
Long-long time ago, when the trees were large and memory expensive amount of memory directly available to loader(8) and friends was limited to 640K on i386. Those times have passed long time ago and now loader(8) can directly access up to 4GB of RAM at least theoretically. At the same time, there are several places where it's assumed that malloc() will only allocate memory within first megabyte.
Remove that assumption by allocating appropriate bounce buffers for BIOS calls on stack where necessary.
This allows using memory above first megabyte for heap if necessary.
|
151999 |
03-Nov-2005 |
ru |
Consistently use OPT_* macros to test/set boot options.
|
151874 |
30-Oct-2005 |
scottl |
Add back some bits.
|
151452 |
18-Oct-2005 |
jkim |
Export processor socket information. New environment variables are:
smbios.socket.enabled: number of enabled sockets smbios.socket.populated: number of populated sockets
|
151382 |
16-Oct-2005 |
sobomax |
Re-implement rev.1.76 with respect to the code size.
|
151381 |
16-Oct-2005 |
sobomax |
Backout previous commit - for some reason it overflows space constrains on amd64. Better version will follow.
|
151367 |
16-Oct-2005 |
sobomax |
Add new option `q', which makes second stage loader quiet unless autoboot is disabled or fails.
MFC after: 1 week
|
150470 |
22-Sep-2005 |
ru |
Cause all flags passed by boot2 to set the respective loader(8) boot_* variable. The end effect is that all flags from boot2 are now passed to the kernel.
|
150469 |
22-Sep-2005 |
ru |
Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE: "boot_dfltroot", "boot_mute", and "boot_pause" respectively.
|
150464 |
22-Sep-2005 |
ru |
- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000 to 0x100000 in rev. 1.67.
- NOPT wasn't updated (decremented) in previous revision.
|
149213 |
18-Aug-2005 |
iedowse |
Add a "comconsole_speed" loader variable that can be used to change the serial console speed (i386 and amd64 only). If the previous stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE) then the default speed is determined from the current serial port speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED at compile time.
This makes it possible to set the serial port speed once in /boot.config and the setting will propagate to boot2, loader and the kernel serial console.
|
149212 |
18-Aug-2005 |
iedowse |
Add the ability to specify the boot2 serial console speed in /boot.config or on the "boot:" prompt line via a "-S<speed>" flag, e.g. "-h -S19200". This adds about 50 bytes to the size of boot2 and required a few other small changes to limit the size impact. This changes only affects boot2; there are further loader changes to follow.
|
148767 |
06-Aug-2005 |
ssouhlal |
The kernel is usually at /boot/kernel/kernel nowadays.
PR: i386/81756 Submitted by: trasz <trasz@buziaczek.pl>
|
148450 |
27-Jul-2005 |
jkim |
Simplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.
They are not real hints.
Reported by: des Pointed out by: peter Approved by: anholt (mentor)
|
148046 |
15-Jul-2005 |
ache |
Add -mno-sse3 for prescott/nocona
|
148006 |
14-Jul-2005 |
jkim |
Scan static SMBIOS structures and export the following environment variables to loader:
hint.smbios.0.enabled "YES" when SMBIOS is detected
hint.smbios.0.bios.vendor BIOS vendor hint.smbios.0.bios.version BIOS version hint.smbios.0.bios.reldate BIOS release date
hint.smbios.0.system.maker System manufacturer hint.smbios.0.system.product System product name hint.smbios.0.system.version System version number
hint.smbios.0.planar.maker Base board manufacturer hint.smbios.0.planar.product Base board product name hint.smbios.0.planar.version Base board version number
hint.smbios.0.chassis.maker Enclosure manufacturer hint.smbios.0.chassis.version Enclosure version
These strings can be used to detect hardware quirks and to set appropriate flags. For example, Compaq R3000 series and some HP laptops require
hint.atkbd.0.flags="0x9"
to boot. See amd64/67745 for more detail.
Note: Please do not abuse this feature to resolve general problem when it can be fixed programmatically. This must be used as a last resort.
PR: kern/81449 Approved by: anholt (mentor)
|
146874 |
01-Jun-2005 |
obrien |
Temperarly disable building in the bzip2 support by default so we can fit on the i386 floppies. Sigh, I hate floppies.
|
146840 |
31-May-2005 |
obrien |
Put bzip2 support on equal footing with gzip support. Enable bzip2 support by default, set LOADER_NO_BZIP2_SUPPORT to disable it.
Pointy hat to: sobomax
|
146698 |
27-May-2005 |
jhb |
- Add support to the loader for multiple consoles. - Teach the i386 and pc98 loaders to honor multiple console requests from their respective boot2 binaries so that the same console(s) are used in both boot2 and the loader. - Since the kernel doesn't support multiple consoles, whichever console is listed first is treated as the "primary" console and is passed to the kernel in the boot_howto flags.
PR: kern/66425 Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk MFC after: 1 week
|
146697 |
27-May-2005 |
jhb |
Fix a warning by adding a missing 'const'.
MFC after: 1 week
|
146696 |
27-May-2005 |
jhb |
Print out the commands from /boot.config after parsing them so that they output is sent to the correct console(s).
PR: kern/66425 Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk MFC after: 1 week
|
146448 |
20-May-2005 |
charnier |
Remove unused variables. Remove prototype for function that does not exist.
|
145515 |
25-Apr-2005 |
ru |
Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEED at compile time.
|
145209 |
17-Apr-2005 |
wollman |
Pass the hostname we got from DHCP to the kernel so that machines can share a read-only NFS root.
|
145158 |
16-Apr-2005 |
njl |
Extend a local buffer to prevent an overflow of the XSDT address.
Submitted by: Joerg Sonnenberger Obtained from: DragonflyBSD MFC after: 1 day
|
144837 |
09-Apr-2005 |
stefanf |
Fix 'implicit int' instance.
|
143661 |
15-Mar-2005 |
obrien |
Ensure GCC does not use FP registers in integer code. I think all we really need is -fno-sse2. I really don't like cluttering up the compiler invocation, but this bigger hammer will fix reported problems for now.
|
143476 |
12-Mar-2005 |
kan |
Allow kernels loaded by pxeboot, which was compiled with LOADER_TFTP_SUPPORT, to stll be able to mount NFS root as prescribed by DCHP configuration. Since pxeboot is using TFTP to get to the files, pxeboot can not rely on NFS to provide it a root directory hande as a side effect. pxeboot has to make RPC mount call itself.
|
141540 |
08-Feb-2005 |
des |
Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).
|
139948 |
09-Jan-2005 |
peadar |
Only update the boot sector when there is a valid drive number provided. (After squeezing a few more bytes out of boot0)
Discussed With: jhb, julian PR: 66248 Submitted By: Hans Petter Selasky MFC After: 1 week
|
139123 |
21-Dec-2004 |
ru |
NOFORTH -> NO_FORTH
|
139112 |
21-Dec-2004 |
ru |
NOSHARED -> NO_SHARED
|
139103 |
21-Dec-2004 |
ru |
Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by: core
|
138249 |
01-Dec-2004 |
scottl |
Remove the last vestiges of the userconfig option. None of this actually did anything, so this commit should be considered a NO-OP.
|
138186 |
29-Nov-2004 |
ru |
Pick up loader.rc from its old home.
|
138183 |
29-Nov-2004 |
scottl |
Disable the beastie menu. It offends some and annoys everyone else, and I'm frankly tired of the controversy. When people ask me why FreeBSD isn't user- friendly, I'll tell them that I tried. RIP.
|
138048 |
24-Nov-2004 |
jhb |
- If the COMSPEED is set to 0, then don't try to initialize the serial port and assume that the BIOS has set it up for us. This allows folks with a serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to just use the existing settings. - Purge some gratuitous cpp comments as per style(9).
Submitted by: Danny Braniss danny at cs dot huji dot ac dot il (1) MFC after: 1 month
|
138046 |
24-Nov-2004 |
jhb |
Fix comments for serial I/O function prototypes that were broken in the assembler to cpp(1) comment conversions. This allows btx to compile again when BTX_SERIAL is defined.
Reported by: Danny Braniss danny at cs dot huji dot ac dot il MFC after: 1 month
|
137419 |
08-Nov-2004 |
peter |
Remove a pre-tier-1 kernel compatability helper. This means a 6.x loader won't boot a pre-5.1 development amd64 kernel. That's no big loss though.
|
137298 |
06-Nov-2004 |
keramida |
Clean up the comments, rewording, adding missing punctuation and other minor nits.
Approved by: jhb
|
136910 |
24-Oct-2004 |
ru |
For variables that are only checked with defined(), don't provide any fake value.
|
136780 |
22-Oct-2004 |
simokawa |
Respect RB_MULTIPLE flag.
|
136779 |
22-Oct-2004 |
simokawa |
- Add FireWire subclass and OHCI interface. - Add some PCI BIOS function calls. (find_devclass, read_config, write_config)
|
135967 |
30-Sep-2004 |
ru |
Document boot_cdrom, boot_multicons, and boot_serial. Reduce diffs between help.common and loader(8). Mention that boot_userconfig is currently a no-op.
|
135538 |
21-Sep-2004 |
wes |
Trap invalid sector size 0 in disk probe, refusing to add such a device to the list. This prevents crashes on /0 errors in 'lsdev' et al.
Reviewed-by: jhb@ MT5 after: RE approval
|
135410 |
18-Sep-2004 |
jhb |
A long, long time ago in a CVS branch far away (specifically, HEAD prior to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat mode and clients were limited to a virtual address space of 16 megabytes. Because of this limitation, boot2 silently masked all physical addresses in any binaries it loaded so that they were always loaded into the first 16 Meg. Since BTX no longer has this limitation (and hasn't for a long time), remove the masking from boot2. This allows boot2 to load kernels larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE).
Submitted by: Sergey Lyubka devnull at uptsoft dot com MFC after: 1 month
|
134459 |
29-Aug-2004 |
iedowse |
Add the loader side of support for preloading ELF relocatable object format modules, which are currently only used on the amd64 platform. This initial implementation just parses enough of the module to allow it to extract dependencies and load all the bits into the right place in memory, so the kernel must still do the full relocation and linking. The details of the loaded sections are passed to the kernel by supplying a copy of the ELF section header table as module metadata with the MODINFOMD_SHDR tag.
|
134431 |
28-Aug-2004 |
yar |
Don't be too smart, just try packet mode of INT13 first. This way of operation is more robust than the "AI" used before.
Add flags to mbr accessible from make.conf as BOOT_MBR_FLAGS. Only one flag is defined now, "allow using packet mode", which is 0x80 in accord with the rest of i386 boot code. The "packet" flag is on by default.
PR: i386/70241 Submitted by: Valentin Nechayev <netch <@> netch.kiev.ua> (inital version) Discussed with: jhb (by Valentin Nechayev) Tested on: bochs (with EDD turned on or off by patching the BIOS), PCs
|
134430 |
28-Aug-2004 |
yar |
Try packet mode of INT13 on a hard disk first if not prohibited by the flag, fall back to the old INT13/AH=02 function if that fails. This way of operation is less likely to fail with modern BIOSes and large disks of strange geometries.
PR: i386/70241 Submitted by: Valentin Nechayev <netch <@> netch.kiev.ua> (inital version) Discussed with: jhb (by Valentin Nechayev) Tested on: bochs (with EDD turned on or off by patching the BIOS), PCs
|
134382 |
27-Aug-2004 |
yar |
B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with naming of other boot-related make vars.
|
134357 |
27-Aug-2004 |
obrien |
In conjunction with having boot0cfg(8) default boot0 to packet mode.
Submitted by: Tor.Egge@cvsup.no.freebsd.org
|
133154 |
05-Aug-2004 |
kan |
Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not have clear idea on boot2 BSS size and leaves portion of it not zeroed out. btxcsu.s is in much better position for this job.
Obtained from: DragonflyBSD (with minor adjustments)
|
132870 |
30-Jul-2004 |
kan |
Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimization breaks boot in spectacular ways otherwise.
|
132864 |
30-Jul-2004 |
kan |
Clean up local memcpy implementation to take void * parameters.
|
132764 |
28-Jul-2004 |
kan |
Define our own memcpy here instead of relying on GCC to provide one.
|
130943 |
22-Jun-2004 |
jhb |
Update the copyright to use a 3 clause BSD license rather than one that is less clear about allowing redistribution of modified copies.
Requested by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com
|
130942 |
22-Jun-2004 |
jhb |
Remove a bogus increment of %di when scanning the list of loader paths. %di will already point to the character after the nul char when the 'repnz scasb' terminates.
Submitted by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com
|
130632 |
17-Jun-2004 |
phk |
Save a couple of bytes for the SIO case.
|
130603 |
16-Jun-2004 |
phk |
Unspam sys/boot, the dev_t commit should not have touched these.
Spotted by: peter
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130579 |
16-Jun-2004 |
phk |
Premptively fix GCC3.4 issue: add break; after empty default: clauses.
PR: 65493 Submitted by: Pawel Worach <sajd@telia.com>
|
130343 |
11-Jun-2004 |
phk |
Merge boot0 and boot0sio so they behave the same.
|
129993 |
02-Jun-2004 |
phk |
Some embedded platforms have no keyboard controller. Give up waiting for it to react after a timeout.
|
129702 |
25-May-2004 |
njl |
Use the correct location of the EBDA for searching for the RSDP. The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.
Pointed out by: robert.moore AT intel.com
|
129240 |
14-May-2004 |
ru |
Back out last revision that unnecessarily changed valid assembler line comments and damaged the CVS history.
Prompted by: bde, jhb
|
129239 |
14-May-2004 |
ru |
Partly back out last revision that unnecessarily changed valid assembler line comments and damaged the CVS history.
Prompted by: bde, jhb
|
129195 |
14-May-2004 |
jdp |
Fix a potential stack buffer overflow on systems whose ACPI OEMID fills its field (6 characters). In that case the OEMID is not null-terminated, and the sprintf that was used would copy up to the next null byte, which could be pretty far away.
|
128741 |
29-Apr-2004 |
ru |
Convert block comments into C-style that is understood by cpp(1). Keep line comments in assembler style. A few lines that match the '^[[:space:]]+#' regexp still need to be fixed, somehow.
OK'ed by: bde, jhb
|
128725 |
28-Apr-2004 |
ru |
Thanks to David's patches, we can now simplify these makefiles further, and just use PROG directly (without FILES).
Suggested by: bde
|
128724 |
28-Apr-2004 |
ru |
Properly merge boot0sio.s and boot0.s into boot0.S.
|
128723 |
28-Apr-2004 |
ru |
Switch to using C99 comments in assembler preprocessed with cpp(1).
|
128722 |
28-Apr-2004 |
ru |
- Properly merge boot0sio.s and boot0.s into boot0.S. boot0sio.s was repo-copied to boot0.S.
- Rename boot0ext.s to boot0ext.S, to stay consistent with other preprocessed asm files around here, and for better portability.
Repocopied by: joe
|
128718 |
28-Apr-2004 |
ru |
Temporary precaution measure until repocopy requests are processed: don't forget to clean generated .s sources.
|
128716 |
28-Apr-2004 |
ru |
After talking to Bruce Evans and reading more standards specs, switch to using C99-style comments everywhere in preprocessed assembler. The reason is that lines starting with the regexp '^[[:space:]]#' are treated as preprocessing directives, and while it seems to work now with GCC, it's not necessarily has to work. Use C99 comments `//' for the trailing comments to save whitespace.
|
128709 |
28-Apr-2004 |
ru |
Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment.
|
128708 |
28-Apr-2004 |
ru |
Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment.
|
128707 |
28-Apr-2004 |
ru |
- Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment. - Preserve as(1) style comments for the rest.
|
128694 |
27-Apr-2004 |
ru |
Removed now redundant CLEANFILES assignments.
Not read enough of my patch by: obrien ;)
|
128691 |
27-Apr-2004 |
phk |
Change from '#' to "//" comment character to allow CPP preprocessing.
Merge boot0.s and boot0sio.s into boot0_512.s controlled by "#ifdef SIO".
Add Makefile magic to generate boot0.s and boot0sio.s from boot0_512.s.
The compile boot0 and boot0sio have unchanged MD5 checksums.
|
128651 |
25-Apr-2004 |
obrien |
Use a more compact syntax for passing the "binary" options to 'ld'.
|
128649 |
25-Apr-2004 |
obrien |
Simplify the building of our i386 'binary' boot components by directly producing them using 'ld' options rather than post-processing with 'objcopy'.
Idea by: Ryan Sommers <ryans@gamersimpact.com>
|
128471 |
20-Apr-2004 |
obrien |
Fix a last second typo in 'vi' that caused a problem.
|
128451 |
20-Apr-2004 |
obrien |
White space style cleanup.
|
128441 |
19-Apr-2004 |
obrien |
MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch.
|
127458 |
26-Mar-2004 |
obrien |
Bring back jhb's two sector (1024 bytes) 'boot0' [rev 1.22] as 'boot0ext'.
|
126958 |
14-Mar-2004 |
bde |
Fixed misspellings of 0 as NULL.
|
126891 |
12-Mar-2004 |
trhodes |
These are changes to allow to use the Intel C/C++ compiler (lang/icc) to build the kernel. It doesn't affect the operation if gcc.
Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary.
Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c
1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c
1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c
and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes)
Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc.
Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: -arch Submitted by: netchild
|
126312 |
27-Feb-2004 |
ru |
For some reason crt0.o needs to be linked first for pxeboot(8) to work. This is odd because loader(8) doesn't suffer from this problem. Perhaps pxeboot bootstrap can be fixed to handle this better. Anyway, PXE booting should work again.
|
125932 |
17-Feb-2004 |
ru |
Re-add sio.S, and properly deal with assembler files.
Repocopied by: joe
|
125901 |
16-Feb-2004 |
obrien |
Fix the AMD64 build: this file shouldn't exist.
|
125753 |
12-Feb-2004 |
ru |
Fixed the fatal bug introduced in previous commit: don't strip kgzldr.o -- kgzipping with such a loader produces bad images.
|
125751 |
12-Feb-2004 |
ru |
Clean CLEANFILES.
|
125722 |
11-Feb-2004 |
ru |
kzip(8) is long dead.
|
125693 |
11-Feb-2004 |
ru |
Get rid of unnecessary use of m4(1) by using cpp(1) instead. (John tells me there were problems when trying this before, but it appears to be safe these day.)
OK'ed by: jhb Repocopied by: joe
|
125621 |
09-Feb-2004 |
ru |
- Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1).
XXX: boot2 couldn't be converted as it's actually two programs.
Tested on: i386, amd64
|
125581 |
07-Feb-2004 |
ru |
Argh, unbreak "make depend" for AMD64.
Reported by: kris
|
125566 |
07-Feb-2004 |
ru |
- Removed -elf which is not a valid gcc(1) option anymore. - Removed -ffreestanding; it's enforced by ../Makefile.inc.
|
125564 |
07-Feb-2004 |
ru |
Generate .depend file.
|
125556 |
07-Feb-2004 |
ru |
Untangle building of AMD64 boot code.
Tested on: amd64 (sledge)
|
125537 |
06-Feb-2004 |
ru |
First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program, - use sys.mk transformation rules where possible, - only create the "machine" symlink on AMD64, - removed MAINTAINER lines in individual makefiles, - added the LIBSTAND defitinion to <bsd.libnames.mk>, - somewhat better contents in .depend files.
Tested on: i386, amd64 Prodded by: bde
|
125517 |
06-Feb-2004 |
ru |
Inherit BINDIR from a parent Makefile.inc.
|
125516 |
06-Feb-2004 |
ru |
Only include ../Makefile.inc once in loader/Makefile.
|
124818 |
21-Jan-2004 |
jhb |
If a transfer to or from a floppy disk crosses a 64k boundary, we have to use a bounce buffer for the actual transfer to avoid crossing a 64k boundary. To do this, we malloc a buffer twice as big as we need and then find an aligned block within that buffer to do the transfer. The check to see which part of the block we use used the wrong variable for part of the condition meaning that in certain edge cases we would ask the BIOS to cross a 64k boundary. The BIOS request would then fail resulting in file transfers that just magically fail in the middle without any apparent reason. Specifically, my tests for the splitfs boot floppies managed to trigger this edge case.
MFC after: 1 week X-MFC-info: along with fixes to libstand filesystems
|
124445 |
12-Jan-2004 |
jhb |
- Use constant for shift when converting file length in bytes to a sector count. - Fix the twiddle output so that it actually spins. - Save %cx around BIOS calls to read in sectors from the disc as at least one BIOS trashes %cx when called to read off of a USB CD-ROM drive.
Submitted by: Martin Nilsson <martin@gneto.com> MFC after: 1 week
|
124179 |
06-Jan-2004 |
obrien |
Allow one to specify the com port settings for boot0sio.
|
123476 |
11-Dec-2003 |
jhb |
- Change the lookup() function to report success or failure using the carry flag rather than explicitly halting if a lookup failed. - Add a loop around the call to lookup() to traverse an array of nul-terminated strings for possible paths to the boot loader. A double nul character denotes the end of the list. - Add a new message to say that the boot failed if all of the path lookups for a boot loader file failed. - Add '/boot/loader' as a second boot path. If you build an ISO using risky options to mkisofs such as -U then the loader will be called '/boot/loader' rather than '/BOOT/LOADER;0'. This allows cdboot to work with such risky ISO images. - Bump version to 1.2 to denote added functionality.
The basic idea as well as some of the code were provided by the submitter, but I added some extra code to use a loop rather than hard-code just 2 possible paths.
PR: misc/43543 Submitted by: kientzle MFC after: 1 week
|
123470 |
11-Dec-2003 |
jhb |
Properly fix a typo that the previous revision made even worse.
|
123336 |
09-Dec-2003 |
obrien |
Sync these two files.
|
123302 |
08-Dec-2003 |
obrien |
Hook boot0sio to the build. Use 'boot0cfg -b /boot/boot0sio' to use.
|
123301 |
08-Dec-2003 |
bms |
Add a serial console capable version of the FreeBSD boot manager. This has been lying around my tree(s) for the past year or so. It could do with TLC.
Requested by: obrien Sponsored by: Weyland-Yutani Corporation
|
122942 |
21-Nov-2003 |
dcs |
With the beastie menu a problem was introduced in which selecting a different kernel to boot with kernel="NAME" would load the kernel and loader.conf-selected modules from /boot/NAME, but it would not change module_path. So, for instance, the automatically loaded acpi.ko would come from /boot/kernel/acpi.ko, *always*.
Mind you, this happened for unassisted boot. If you interrupted, typed "unload" and then "boot NAME", it would Do The Right Thing.
The source of the problem is the double initialization with beastie's loader.rc. One would happen inside "start", and would load the kernel. The next one would happen later in the loader.rc script, resetting module_path.
Because module_path is set to the Right Value by the functions in support.4th that actually load the kernel, when beastie.4th proceeded to boot module_path would remain wrong, as the kernel was already loaded.
This can be corrected by removing either initialization, and also by changing the command used by beastie.4th from "boot" to "boot-conf", which makes sure you use the right kernel and modules.
I chose to remove the second initialization, since this let you interrupt (or confirm) boot before beastie even comes up. I avoid also doing the boot-conf change because that would simply cause the kernel and modules to be loaded twice (in fact, that was my original patch, until, in writing this very commit message, I saw the error of my ways).
This commit changes the semantics of module loading when using the beastie menu. Now it does what one would expect it to, but not what it was actually doing, so something may break for unusual setups depending on broken behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)
Approved by: re (scottl)
|
122923 |
20-Nov-2003 |
jhb |
Update the size of the OS string table that wasn't updated in the previous commit that removed the UNIX entry.
Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Approved by: re (rwatson)
|
122806 |
16-Nov-2003 |
phk |
When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value.
This makes a difference if the BIOS does a near jump before a far jump.
Detective work and patch by: Adrian Steinmann <ast@marabu.ch>
|
122749 |
15-Nov-2003 |
bde |
Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old value as reserved for internal use in boot blocks, because RB_PAUSE broke binary compatibility by usurping the RB_DUAL flag. Probably no one except me has boot blocks for which this matters, since most boot blocks based on biosboot including pc98's boot2 can't boot elf kernels, and /boot/loader doesn't properly pass flags set by the previous stage.
reboot.h: Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for internal use in boot blocks.
boot2.c: Added comments to inhibit usurping of other flags.
Approved by: guido, imp MFC after: 1 week
|
122463 |
11-Nov-2003 |
bde |
Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous commit broke the world because it depended on namespace pollution that was only in my version of <machine/bootinfo.h>. The include was removed in rev.1.63 after the last reference to it went away in rev.1.61.
|
122433 |
10-Nov-2003 |
bde |
Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong comment about this flag in rev.1.61. It is not historical like the comment said; it is the flag that says that most of what is laboriously put in the bootinfo struct is actually there. Newer kernels were bootable by even the broken boot2 without losing anything except the symbol table, but older kernels need at least the memory sizes.
Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5 bytes. The fix can be done in only 4 bytes by fixing some code that was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value of "opts" and fix RBX_MASK to not clobber it.)
|
122177 |
06-Nov-2003 |
jhb |
Fix an incorrect quote character in an M4 test conditon. Basically, one of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly enabled.
|
120118 |
16-Sep-2003 |
bde |
Don't repeat selected defines from ns16550.h or sioreg.h. Just include ns16550.h. The missing installation of ns16550.h was fixed long ago and the misplaced defines in sioreg.h were fixed recently.
|
119714 |
03-Sep-2003 |
phk |
Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console.
|
119482 |
25-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor copyright style cleanups.
|
119253 |
22-Aug-2003 |
imp |
Many newer CF do not handle having the entire track read from them at boot time. Instead, read it a sector at a time. While this sounds like a significant slowdown, I've not been able to measure any signficant difference.
Submitted by: luigi Reviewed by: jhb, sam (both a while ago) MFC After: 3 days
|
118607 |
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
118604 |
07-Aug-2003 |
njl |
Null terminate the OEM hint. This rids my laptop of the smiley face that would follow the 6 valid chars of the table entry.
|
117529 |
13-Jul-2003 |
njl |
Add include file so this builds with new acpica
Reported by: Kevin Oberman <oberman@es.net>
|
117160 |
02-Jul-2003 |
ru |
Revert non-style part of the recent two deltas that dealt with using as(1) to compile plain assembler source files; bsd.lib.mk has been fixed (in revision 1.147).
|
117075 |
30-Jun-2003 |
ru |
Switch to using bsd.prog.mk; this gives us back the standard .s.o transformation rule.
|
117052 |
30-Jun-2003 |
ru |
Revision 1.13, besides its useful part, replaced bsd.prog.mk by bsd.lib.mk and thus broke the build since AFLAGS were not taken into considered anymore, as bsd.lib.mk currently has wrong .s.o rule that uses cc(1) instead of as(1).
Revision 1.14 reverted to using as(1), and revision 1.15 brought AFLAGS back to the business, but revision 1.14 also broke "make clean".
To fix this, but not break anything that was fixed in revisions 1.13-1.15, we revert mostly to revision 1.13 except for switching back to using bsd.prog.mk. This gives us back the default .s.o rule from sys.mk that uses as(1), and fixes "make clean" by restoring the full contents of OBJS.
Also fixed LDFLAGS.
|
116864 |
26-Jun-2003 |
peter |
Build on amd64. Yes, I know this isn't particularly nice.
|
116451 |
16-Jun-2003 |
iedowse |
When looking for the ':' separator in the root path, don't go past the terminating '\0'. Since the initialisation of rootpath in libstand/bootp.c may copy junk into the rest of the buffer, it was possible for the code to find a ':' after the '\0' and do the wrong thing.
Reviewed by: ps MFC after: 1 week
|
115964 |
07-Jun-2003 |
obrien |
Add ${AFLAGS} to 'as' invocation.
|
115941 |
07-Jun-2003 |
obrien |
Don't use a C compiler to assemble a pure asm file.
|
115899 |
06-Jun-2003 |
kuriyama |
Tweak make values and targets not to build kgzldr.o at installation stage.
Reviewed by: bde
|
115670 |
02-Jun-2003 |
obrien |
Don't use a C compiler to assemble a pure asm file.
|
115638 |
01-Jun-2003 |
obrien |
Accpet '1'..'5' in place of F1..F5 for serial console users.
Reviewed by: Bruce M Simpson <bms@spc.org>
|
115423 |
31-May-2003 |
scottl |
Enable the new bootloader for i386 only. The new loader.rc is will only be installed if an old one does not exist, i.e. only during install, not during upgrades.
Approved by: re
|
115410 |
30-May-2003 |
scottl |
Add a new bootloader menu. Pull in screen.4th and frames.4th from the examples directory to support it. This is installed only on i386 for now. It will be enabled in a later commit.
Approved by: re
|
115091 |
17-May-2003 |
peter |
Fix a bug in the AMD64 trampoline. I misunderstood the implicit 32->64 bit zero extend. This changes a movl to an orq.
Approved by: re (amd64 bits)
|
114933 |
12-May-2003 |
peter |
Revert leftover AMD64 disable-acpi-module stuff.
|
114920 |
11-May-2003 |
peter |
For amd64 kernels, repeat the 1GB mapping over the entire address space instead of just at 0GB and 1GB marks. This gives more flexibility for the choice of KERNBASE.
Approved by: re (amd64 stuff)
|
114385 |
01-May-2003 |
peter |
Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes.
|
114380 |
01-May-2003 |
peter |
Nuke; repocopied to elf32_freebsd.c where it lives on.
|
114379 |
01-May-2003 |
peter |
Enable the i386 loader to load and run an amd64 kernel. If this puts things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set.
Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64.
|
114339 |
30-Apr-2003 |
peter |
ACPI will always be present on AMD64 - it will never be an autodetect module.
|
114246 |
29-Apr-2003 |
njl |
Support functions for the new ACPI import. * AcpiOsDerivePciId(): finds a bus number, given the slot/func and the acpi parse tree. * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to override the value for _OS.
Ideas from: takawata, jhb Reviewed by: takawata, marcel Tested on: i386, ia64
|
113083 |
04-Apr-2003 |
phk |
Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>
Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well.
Adjust includes in sys/boot accordingly.
|
111490 |
25-Feb-2003 |
ru |
Fixed CLEANFILES.
Submitted by: cron
|
109886 |
26-Jan-2003 |
phk |
Build a file "boot" which consists of boot1 and boot2 concatenated.
There is little if any reason to treat the two components separately and it will simplify disklabel(8) and libdisk if we didn't.
|
109559 |
20-Jan-2003 |
phk |
Use NEXTDOSPART instead of MAX_SLICES.
|
109498 |
18-Jan-2003 |
obrien |
Simplify the Makefile by just using our standard PROG variable.
|
109235 |
14-Jan-2003 |
imp |
Save 4 more bytes by not initializing opts to 0. This moves it from the data section to the bss section givig us initialization for free.
Noticed by: bde
|
109197 |
13-Jan-2003 |
imp |
Fix interactive booting: o Revision 1.38 introduced the -n flag. It conflicted with the RB_BOOTINFO flag, so was in effect always on. Change the -n flag to be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed /boot.config would render the system unbootable because the user was unable to enter anything at all on the command line. o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit out and do not otherwise use it.
Reviewed by: jhb MFC after: 3 days
|
108476 |
31-Dec-2002 |
obrien |
RIP liloldr. It is not complete (the LILO root= specification isn't passed to our loader for instance), it has not been touched in over 2 years. Linux has moved on to GRUB, so this is OBE now. If someone creeps up to work on it, it could become a port.
|
108149 |
21-Dec-2002 |
obrien |
-mno-align-long-strings can make things smaller, so lets use it in hopes that it does here.
|
108119 |
20-Dec-2002 |
imp |
Put back the casts to unsigned. While no strictly necessary for its current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything.
Submitted by: bde
|
108100 |
19-Dec-2002 |
jake |
Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.
|
108016 |
18-Dec-2002 |
imp |
I didn't intend to delete this rm from the Makefile. It snuck in at the last second before the commit.
# likely we can remove this hack now that gcc generates better aligned code # in the align to word case.
Noticed by: bde
|
108005 |
17-Dec-2002 |
imp |
Reduce diffs with Peter's expanded diffs: 1) Put back the keyboard printing printf, at the cost of 58 bytes. 2) Minor tweak to getstr at no apparent cost.
|
108000 |
17-Dec-2002 |
imp |
Make both UFS1 and UFS2 fit on the same boot blocks. These are a subset of Peter's patchs that are believed to be safe.
Makefile tweaks: o -fomit-frame-pointer o Change default to building both UFS1 and UFS2 bootblocks.
Lots of boot2 tweaks: o lookup is only ever called with kname, so use it directly. o inline memsize o getstr are only ever called with cmd, so hardware that. o tweaks to the parsing code to test after the conversion rather than before since we tested after anyways. o eliminate support for %x in printf. o eliminate a few bytes in printfs. o Tweak the boot banner. o eliminate support for wd and " " devices (I might add wd back to keep bde happy). o eliminate support for a few arguments.
This takes us from -162 bytes free to 67 bytes free.
I've tested this only on a few systems, so be careful when updating to this change.
Submitted by: peter, imp, ian
|
107889 |
15-Dec-2002 |
obrien |
Remove unneeded casts. Add others to make WARNS=5 happy.
|
107879 |
14-Dec-2002 |
phk |
Employ the unused bytes after the disklabel in the second sector. This makes it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the traditional 16 sectors.
Remove assorted now unneeded hackery.
UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably not within our reach, ever.
|
107878 |
14-Dec-2002 |
phk |
Remove unnecessary call to fsread().
|
107875 |
14-Dec-2002 |
phk |
Always use the smaller GCC builtin memcpy
|
107874 |
14-Dec-2002 |
phk |
Remove unused variable.
|
107869 |
14-Dec-2002 |
phk |
Don't fill in the table with the BIOS idea about disk-geometry, we don't use it. This saves a surprising number of bytes.
|
107788 |
12-Dec-2002 |
ru |
Uniformly refer to a file system as "file system".
Approved by: re
|
106385 |
03-Nov-2002 |
phk |
Correctly recognize both bogus and genuine BSD disklabels.
Don't expect me to participate in a discussion which is which.
Sponsored by: DARPA & NAI Labs.
|
104683 |
08-Oct-2002 |
jhb |
Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2 to run at 0xc000 by changing its virtual start address from 0x1000 to 0x2000.
Tested by: phk
|
104680 |
08-Oct-2002 |
phk |
Now that ufsread.c doesn't do 64bit divide remainder operations, don't bother with libkern.
Sponsored by: DARPA & NAI Labs.
|
104679 |
08-Oct-2002 |
phk |
Save a couple of bytes by not returning ints nobody care about.
Sponsored by: DARPA & NAI labs
|
104673 |
08-Oct-2002 |
green |
Reinstate rev 1.36 with an important line that got missed. Note this also improves the "random undocumented offsets into various memory spaces" a little bit.
|
104671 |
08-Oct-2002 |
phk |
Remove unused TYPE_WD and TYPE_WFD.
|
104670 |
08-Oct-2002 |
phk |
Correctly calculate dmadat: We need to take the address of _end, it's contents is irrelevant and likely to be zero;
This doesn't change the resultant value, but it does save a couple of bytes because &_end is constant.
|
104668 |
08-Oct-2002 |
phk |
Unbreak boot2 by backing out rev 1.36 to Makefile, which does not work as advertised:
bang# pwd /bang/src/sys/boot/i386/boot2 bang# make clean >& /dev/null bang# cvs -q update -r 1.35 Makefile >& /dev/null bang# make >& /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x725 bang# cvs -q update -r 1.36 Makefile > & /dev/null bang# make clean > & /dev/null bang# make > & /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x25 bang#
|
104666 |
08-Oct-2002 |
phk |
Save four bytes by shortening a string two chars.
Sponsored by: DARPA & NAI Labs.
|
104636 |
07-Oct-2002 |
green |
Correct a bug in adding 0x700 to a number.
|
104635 |
07-Oct-2002 |
phk |
Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.
Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.
Conditionally build the necessary 64bit math for boot2 if UFS12.
Sponsored by: DARPA & NAI Labs.
|
104632 |
07-Oct-2002 |
phk |
Change the comment character from # to // in boot1.s and run it through CPP so we can conditionalized things.
Sponsored by: DARPA & NAI Labs
|
104629 |
07-Oct-2002 |
phk |
Correctly adjust for moved start address.
It seems that the existence of a "depend" target in src/sys/boot is not to be taken as an indication that it actually does what one would expect, at least it clearly threw my testing off.
Apologies to: jhb
|
104620 |
07-Oct-2002 |
phk |
Correctly compensate for both offset and unoffset on-disk BSD disklabels.
Sponsored by: DARPA & NAI Labs.
|
104618 |
07-Oct-2002 |
phk |
Move MEM_USR a page upwards to make space for larger UFS1 boot2.
Load 4 sectors more than we used to. This is harmless overhead for the UFS1_ONLY case, but sufficient for boot2(UFS1+2).
Sponsored by: DARPA & NAI Labs
|
104612 |
07-Oct-2002 |
phk |
Move the definition of UFS1_ONLY into the Makefiles where it belongs.
Sponsored by: DARPA & NAI Labs.
|
104315 |
01-Oct-2002 |
iwasaki |
Don't call INT 12H anymore in boot program. Many recent machine have a broken INT 12H (Get base memory size) implementation and boot program stops if INT 12H is called.
This commit should solve the problem at very first step of FreeBSD installation occurred on newer some machines.
Reviewed by: bde, jhb MFC after: 1 week
|
104272 |
01-Oct-2002 |
phk |
Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.
These two new copies are still intact copies of disklabel.h and therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them in programs which already include <sys.disklabel.h> is currently a no-op.
This commit adds a number of such #includes.
Once I have verified that I have fixed all the places which need fixing, I will commit the updated versions of the three #include files.
Sponsored by: DARPA & NAI Labs.
|
104234 |
30-Sep-2002 |
peter |
Use as's --defsym switch to compensate for the loss of the M4 substitution of SIOPRT which broke kgzldr and therefore make release.
Pointed out by: murray
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
103436 |
17-Sep-2002 |
peter |
Initiate deorbit burn for the i386-only a.out related support. Moves are under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that.
Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
102960 |
05-Sep-2002 |
iwasaki |
Parse hint.acpi.0.disabled correctly. Now that hint.acpi.0.disabled="0" won't disable acpi as expected.
Pointed-out by: bde
|
102807 |
01-Sep-2002 |
kan |
Restore Rev. 1.40 (remove "Keyboard yes/no" printf). GCC 3.2 overflows boot2 by 12 bytes, this patch brings it back within the boundaries, with 12 bytes available for future bloat.
Approved by: obrien
|
102623 |
30-Aug-2002 |
jhb |
Revert previous untested revision. The i386 loader consists of three parts: At the front is btxldr, in the middle is BTX itself (our mini-kernel), and then the 'client' (loader.bin) which is the actual loader itself. boot2 just executes a raw ELF or a.out binary with the only setup provided being that a bootinfo structure is passed on the stack. Now, since loader.bin is a BTX client, the loader needs to be able to locate a BTX kernel for the client to execute in the context. Thus, just like pxelder, btxldr uses the a.out header on the loader binary to find the BTX kernel stored in the loader and set it up. It does _not_ just reuse the BTX kernel that boot2 invoked it with. This is because it can't assume that it will _have_ a "spare" BTX kernel lying around. For example, when cdboot loads the loader there isn't an existing BTX kernel. In fact, cdboot will only work with an a.out loader as well since it also "borrows" the BTX kernel in the loader binary (which it finds by parsing the a.out header) just as pxeldr does. The only difference between cdboot and pxeldr is where they get /boot/loader from.
If we wanted to make /boot/loader be an actual ELF binary we would need to change the following utilites to handle that (and they all have to be able to handle locating the BTX kernel inside of an ELF binary somehow): - btxldr - pxeldr - cdboot
If we didn't want to require a flag day but make the transition smooth then we need to be able to support both a.out and ELF versions of /boot/loader which isn't exactly trivial since all three of these utilities are written in assembly.
Pointy-hat to: peter
|
102612 |
30-Aug-2002 |
iwasaki |
s/hint.acpi.0.disable/hint.acpi.0.disabled/
Fix device hints entry for disabling acpi(4). This also should fix the arbitration with apm(4) when both drivers are enabled.
Note that your /boot/device.hints needs to be updated if you want to stop auto-loading acpi.ko or disable acpi(4).
|
102591 |
29-Aug-2002 |
peter |
Try #2 at having /boot/loader default to ELF. Have pxeldr build its own a.out version of loader.bin rather than depend on ../loader/loader being a.out.
|
102588 |
29-Aug-2002 |
peter |
Actually remove the stale a.out kld support. This is the stuff that was never updated for the metadata infrastructure.
|
102556 |
29-Aug-2002 |
peter |
Initiate deorbit burn of i386 a.out kld "support" in loader. Note that this was quite broken, it never was updated for metadata support. The a.out kld file support was never really used, as it wasn't necessary. You could always load elf kld's, even in an a.out kernel.
|
101602 |
09-Aug-2002 |
iwasaki |
Add help about hint.acpi.0.disable.
|
101558 |
09-Aug-2002 |
obrien |
Restore autoloading of ACPI module.
Document the approved ways of disabling it. Submitted by: Daniel O'Connor <doconnor@gsoft.com.au>
|
101556 |
09-Aug-2002 |
obrien |
Don't auto load ACPI -- it causes trouble with my laptop and is TOTALLY undocumented how to control its loading and queries to freebsd-current go unanswered.
|
100872 |
29-Jul-2002 |
ru |
Drop support for COPY, -c has been the default mode of install(1) for a long time now.
Approved by: bde
|
99976 |
14-Jul-2002 |
charnier |
The .Nm bootloader
|
99682 |
09-Jul-2002 |
iwasaki |
Resolve conflicts arising from the ACPI CA 20020611 import.
|
99170 |
30-Jun-2002 |
iwasaki |
Fix a build problem for the ACPI CA 20020404 import. Add definition of COMPILER_DEPENDENT_INT64 and also fix definition of COMPILER_DEPENDENT_UINT64.
Pointed-out by: Michael Nottebrock <michaelnottebrock@gmx.net>
|
98556 |
21-Jun-2002 |
phk |
Revert the part of Kirks UFS2 commit which added divdi3.c and moddi3.c to libi386, this issue was resolved already in a cleaner way.
|
98542 |
21-Jun-2002 |
mckusick |
This commit adds basic support for the UFS2 filesystem. The UFS2 filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t.
Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used).
Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
|
98472 |
20-Jun-2002 |
peter |
Add boot_serial and boot_multicons variables to set RB_SERIAL and RB_MULTIPLE since this seems to be the easiest way to add these flags for non-forth loaders etc.
|
97867 |
05-Jun-2002 |
phk |
Add explicit dependency on ufsread.c
|
97860 |
05-Jun-2002 |
phk |
Preparation for UFS2 commit:
Factor the ufs reading code out of the i386/boot2 loader so it can be reused by for instance sparc64.
Sponsored by: DARPA and NAI Labs.
|
96843 |
18-May-2002 |
phk |
Fix one of the va_arg() with less than int sized type probelms.
|
96654 |
15-May-2002 |
jhay |
DEV_BSIZE lives in sys/param.h and not in machine/param.h anymore.
|
96533 |
13-May-2002 |
ru |
Align CLEANFILES with revision 1.25 changes.
|
96532 |
13-May-2002 |
ru |
Fixed CLEANFILES after bsd.lib.mk sweep.
|
96513 |
13-May-2002 |
ru |
Removed now unused INTERNALSTATICLIB. INTERNALLIB now implies NOPIC and NOPROFILE. Removed gratuitous NOMAN.
|
96512 |
13-May-2002 |
ru |
Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB. INTERNALLIB now means to build static library only and don't install anything. Added a NOINSTALLLIB knob for libpam/modules. To not build any library at all, just do not set LIB.
|
96460 |
12-May-2002 |
bde |
Saved 176 bytes by compiling with -fno-guess-branch-probability. The default of -fguess-branch-probablility causes time optimizations (?) like rewriting `if (foo) x++;' as `if (!foo) goto forth; back: ; ...; forth: x++; goto back;". This is pessimizes space especially well on i386's because one short branch gets converted to 2 long ones.
Removed -fno-align-foo since it is implied by -Os. Previous commit messages seem to have overstated the new alignment bugs in gcc. The only case that affects boot2 is that -fno-align-functions (or equivalently -falign-functions=1) actually gives -falign-functions=2. This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1. The default case where the optimization level is 1 and no alignment options are given is more broken. All alignments are minimal, modulo the bug in FUNCTION_BOUNDARY. This is caused by toplev.c setting defaults too early.
Some hacks in previous commits ar not needed now, but may as well be kept until gcc is fixed. The previous on in the Makefile saved 96 bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data due to unrelated bloat in the alignment of large objects. There aren't even any options to control alignment of data.
|
96455 |
12-May-2002 |
obrien |
Back out last commit. I expect our bsd.*.mk gods to remove the need for defining so many extra things in addition to INTERNALLIB. We don't like repetitive C code and we shouldn't for make code either.
|
96426 |
11-May-2002 |
peter |
Save about 60 bytes by #define memcpy __builtin_memcpy and removing the function we provided. Restore the Keyboard: yes/no printf for the probe diagnostics. We end up with 40 bytes free.
|
96425 |
11-May-2002 |
peter |
Reconnect boot2. I'm sure I'll regret this though. :-)
|
96424 |
11-May-2002 |
peter |
Use a crowbar and duct-tape to make boot2 fit again. This gets it down to 4 bytes free. I removed a printf (the Keyboard yes/no) since it is of marginal value and sed'ed the generated asm output to remove the unwanted aligns. There's probably a better way to gain a few extra bytes than losing the printf. Shortening strings is probably a better option but this should get us over the hurdle.
|
96415 |
11-May-2002 |
obrien |
NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using INTERNALLIB now.
|
96327 |
10-May-2002 |
jhb |
- Axe -mpreferred-stack-boundary=2 as -Os turns this on by default. - Axe -fdata-sections as turning it on or off makes no difference. If it did make a difference it would serve to bloat boot2 even further with extra padding. - Axe -fforce-addr. This gets us 32 bytes so we are down to only being 64-bytes over.
We still can't compile this with gcc 3.1. The problem seems to be that the -fno-align-foo options don't actually work. Comparing the new and old output it turns out that gcc is 4-byte padding all the functions and labels and what not despite the passed in arguments thus adding the unfortunate bloat to boot2.
|
96309 |
10-May-2002 |
obrien |
Don't be redundant.
|
96306 |
10-May-2002 |
obrien |
-ffreestanding is the word for /sys.
|
96305 |
10-May-2002 |
obrien |
Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1.
|
94956 |
17-Apr-2002 |
ru |
Install files via FILES, there's no reason to compare them before installing.
|
94952 |
17-Apr-2002 |
ru |
Really unbreak it this time (clean and install were still broken).
|
94510 |
12-Apr-2002 |
ru |
Unbreak this as well. At the extra bonus of fixing the contents of the .depend file.
Not really my day.
|
94411 |
11-Apr-2002 |
pb |
Code cleanup, no functional change. Patch adapted from PR.
PR: i386/36015 Submitted by: thomas@cuivre.fr.eu.org MFC after: 1 week
|
93352 |
28-Mar-2002 |
obrien |
Needs a.out support built into the loader.
|
93044 |
23-Mar-2002 |
pb |
Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR: i386/36016 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Reviewed by: rnordier MFC after: 1 week
|
92494 |
17-Mar-2002 |
sobomax |
Add splitfs vfs layer into libstand, which allows loading big kernels and modules split across several physical medias. Following is how it works:
The splitfs code, when asked to open "foo" looks for a file "foo.split" which is a text file containing a list of filenames and media names, e.g.
foo.aa "Kernel floppy 1" foo.ab "Kernel floppy 2" foo.ac "Kernel and modules floppy"
For each file segment, the process is:
- try to open the file - prompt "Insert the disk labelled <whatever> and press any key..." - try to open the file - return error if file could not be located
RE team is free to use this feature in the upcoming 5.0-DP1.
Reviewed by: msmith, dcs
|
92225 |
13-Mar-2002 |
ru |
Implement -m and -p loader(8) "boot" command options in boot2. (This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.)
|
89481 |
17-Jan-2002 |
iedowse |
Oops, the previous revision (1.35) broke booting from floppies because the buffers we use could end up spanning a 64k boundary. Unfortunately it causes too much bloat (228 -> 72 bytes free) to just reinstate the old malloc() function.
Instead, define a structure that contains all 4 buffers which must not cross 64k boundaries. We allocate a 64k-aligned instance in main() using the magic that was in the old boot2 malloc() function. This brings the free space down to 168 bytes, but that is still better than it was before revision 1.35 (136 bytes).
Reported by: Mike Brancato <funnyguy@digitalsmackdown.net> Pointy-hat to: iedowse
|
89368 |
14-Jan-2002 |
iedowse |
Make the i386 boot2 fully blocksize-agnostic, as has already been done with boot1 on the alpha. We use 4k buffers regardless of the actual filesystem block size.
Remove the simple malloc() implementation, as it is no longer used.
|
89240 |
10-Jan-2002 |
jhb |
Unrevert revision 1.12. Revision 1.14 backed this out saying it was backing out the 1024 sector boot0, but revision 1.12 had nothing to do with that. Instead, it documented various compile time options for boot0 and allowed them to be overridden via make.conf or options on the make command line.
|
89154 |
09-Jan-2002 |
iedowse |
Increase BSIZEMAX from 8k to 16k, so that we can reliably boot from filesystems with 16k blocks.
|
88874 |
04-Jan-2002 |
jhb |
Don't turn on RB_CDROM if the rootdev is a BIOS cd device for now as this breaks when cdboot is used with an MFS root.
|
87636 |
11-Dec-2001 |
jhb |
- Add 'fwrite' and 'fseek' words for writing to and seeking on files. - Change the 'fopen' keyword to accept a mode parameter. Note that this will break existing 4th scripts that use fopen. Thus, the loader version has been bumped and loader.4th has been changed to check for a sufficient version on i386 and alpha. Be sure that you either do a full world build or install or full build and install of sys/boot after this since loader.old won't work with the new 4th files and vice versa.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
87633 |
11-Dec-2001 |
jhb |
Add support for writing to BIOS disks.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
87620 |
10-Dec-2001 |
guido |
Add new boot flag to i386 boot: -p. This flag adds a pausing utility. When ran with -p, during the kernel probing phase, the kernel will pause after each line of output. This pausing can be ended with the '.' key, and is automatically suspended when entering ddb.
This flag comes in handy at systems without a serial port that either hang during booting or reser. Reviewed by: (partly by jlemon) MFC after: 1 week
|
87599 |
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
86164 |
07-Nov-2001 |
jhb |
Remove a few more debugging bits and turn on twiddle output while reading from the CD. This turns off the dual console output to COM1.
|
86094 |
05-Nov-2001 |
jhb |
- If we are booted via cdboot, use bc_add() to instantiate the cd0 device from the loader. - Cleanup extract_currdev() some and add support for setting the currdev to cd0 when booted via cdboot.
|
86093 |
05-Nov-2001 |
jhb |
Hook up the bioscd driver and the cd9660 filesystem.
|
86091 |
05-Nov-2001 |
jhb |
Add a device driver for the BIOS device for CD-ROM's booted via El Torito no emulation mode. Unlike other BIOS devices, this device uses 2048 byte sectors. Also, the bioscd driver does not have to worry about slices or partitions.
|
86001 |
04-Nov-2001 |
jhb |
Trim all the extra debugging output including hexdumps, debug messages, etc. The only bit of debugging left is performing dual output to both the screen and COM1. Also, the twiddle is still disabled since it seems to do weird things to the serial dump. cdboot now has 880 bytes to spare.
|
86000 |
04-Nov-2001 |
jhb |
Axe the old cdldr.
|
85999 |
04-Nov-2001 |
jhb |
Use the new cdboot instead of cdldr.
|
85998 |
04-Nov-2001 |
jhb |
This is a new CD bootstrap utility designed to replace cdldr. According to the El Torito standard for CD booting, a CD may boot in "No emulation" mode without using a floppy image. In this mode, the BIOS loads a program off of the CD into memory and creates a BIOS device using 2048 byte sectors for the CD. According to the standard, this program can be up to 0xFFFF virtual (512-byte) sectors long. The old cdldr depended on this by having the BIOS load the entire loader and the small cdldr stub as one binary similar to pxeboot so that cdldr didn't have to read the CD to find the loader. However, the NT no emulation loader just uses 1 disk sector (4 virtual sectors), so it seems that at least some BIOS writers just did enough to get NT to boot by only loading 1 sector and ignoring the sector count. Thus, while cdldr should have worked in theory, it doesn't in practice. This replacment fits entirely in 1 sector and includes simple ISO 9660 support. It looks for /boot/loader on the CD and loads it up using the BIOS. This allows us to not have to depend on the limited size of floppy images but use a full GENERIC kernel for CD-ROM installs in the future, among other things.
This version of cdboot is a bit bloated as it includes some useful debugging routines that people can pull to use in other x86 assembly modules. Even with all the debugging cruft, we still have 272 bytes to spare.
|
85995 |
03-Nov-2001 |
jhb |
Whoops, missed these bits in the previous commit.
|
85994 |
03-Nov-2001 |
jhb |
Add support for sending messages to the serial console which is helpful when debugging boot problems. It is not on by default but is enabled via the BTX_SERIAL variable. The port and speed can be set via the same variables used by boot2 and the loader.
|
85993 |
03-Nov-2001 |
jhb |
Add support for outputting multiple lines when dumping memory during the register dump. Change the default to bump 2 lines of output (32 bytes) instead of 1 line (16 byte).
|
85990 |
03-Nov-2001 |
jhb |
Add support for trace traps by returning from them just as for breakpoint traps rather than halting. Ideally, we should avoid printing the 'BTX halted' message for debug register dumps.
|
85989 |
03-Nov-2001 |
jhb |
Output a newline at the end of a dump so that there are blank lines between dumps when using breakpoints or tracing.
|
85805 |
01-Nov-2001 |
peter |
Fix the ILLEGAL fdisk table that is there for supporting "dangerously dedicated" mode. This was specifying that there are 256 (illegal!) heads on the disk. If bioses store that in a byte, and it gets truncated to 0, then that almost certainly causes the infamous divide-by-zero nightmare.
This is also most likely the reason why the Thinkpad T20/A20 series were locking up when FreeBSD was installed. This is also the most likely reason why a boot1 being present causes an IA64 box to lock up at boot. (removing the "part4" stuff from boot1.s fixes the IA64 boxes and would most likely have fixed the T20/A20 and some TP600E series thinkpads)
|
85376 |
23-Oct-2001 |
jlemon |
Set RB_MULTIPLE (multiple console support) if the kernel is booted with the -D flag.
|
85374 |
23-Oct-2001 |
jlemon |
Allow the RBX_DUAL flag to appear in bootinfo.
|
84461 |
04-Oct-2001 |
jhb |
Whitespace fixes.
|
84371 |
02-Oct-2001 |
yokota |
Fix the ANSI color escape sequence \E[m.
- Corretly map the ansi color number to a PC BIOS color. - Handle multiple arguments to the escape sequence.
|
84354 |
02-Oct-2001 |
yokota |
Fix the local macro: isvisible().
- The space char (0x20) IS a visible char :-)
|
84277 |
01-Oct-2001 |
yokota |
Fix the function CD(): "Clear to the end of the screen".
- When the video BIOS is called to clear the region (x, y)-(79, 24) (by scrolling), the slashed region in Fig.1 is cleared. CD() is supposed to clear the region shown in Fig.2. x x +-------+ +-------+ | | | | y| ////| y| ////| | ////| |///////| | ////| |///////| +-------+ +-------+ Fig.1 Fig.2
- Don't move the cursor during this operation.
|
84276 |
01-Oct-2001 |
yokota |
This is white-space only change. No functional difference.
- Be consistent about placing spaces around keywords and operators; don't mix statements like "if(A==B)" and "if (X == Y)", "return(0)" and "return (-1)", "P=10" and "Q = 0", etc.
- Consitently indent lines. It's not good to indent by 8 columns in one part of the file, and by 4 columns in the other part.
|
83616 |
18-Sep-2001 |
sobomax |
Add support for loading bzip2-compressed kernels and modules. This support is turned off by default and could be enabled by defining LOADER_BZIP2_SUPPORT make variable. Also make gzip support optional (turned on by default) - it could be turned off via LOADER_NO_GZIP_SUPPORT make variable.
Please note, that due to limit on the amount of memory available to the loader(8), it is possible to load modules/kernels compressed with the smallest block size supported by the bzip2 - 100k (`-1' bzip2(1) option), however even in this mode bzip2(1) usually provides better compression ratio than gzip(1) in its best compression mode.
MFC after: 1 month
|
83368 |
12-Sep-2001 |
ru |
Create backup copies using install(1).
|
83321 |
11-Sep-2001 |
peter |
Implement the long-awaited module->file cache database. A userland tool (kldxref(8)) keeps a cache of what modules and versions are inside what .ko files. I have tested this on both Alpha and i386.
Submitted by: bp
|
82542 |
30-Aug-2001 |
msmith |
Mention that the ACPI module load can be disabled by unsetting $acpi_load
|
82531 |
30-Aug-2001 |
msmith |
Teach the loader how to find the system ACPI information, and autoload the ACPI module if the system apperars to be ACPI compliant.
This is an initial cut; the load should really be done by Forth support code, and we should check both the BIOS build date and a blacklist.
|
82133 |
22-Aug-2001 |
peter |
OK, now I am scared of pxeldr. It had /boot/loader appended onto the end of it and decoded the headers.
Submitted by: jhb
|
82128 |
22-Aug-2001 |
peter |
Generate an ELF /boot/loader instead of fake a.out. The fake a.out wrapper did not work with old a.out-only bootblocks anyway. :-(
|
81367 |
09-Aug-2001 |
mp |
Allow for text section alignment to properly align the "end" symbol at the actual end of the section. The new gas (binutils) puts in additional padding which was misaligning the concatenated btx loader.
Reported by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>, Harti Brandt <brandt@fokus.gmd.de> Tested by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>, David Wolfskill <dhw@whistle.com>, ps Reviewed by: jhb MFC after: 1 day
|
81363 |
09-Aug-2001 |
jhb |
Trim trailing whitespace.
|
80751 |
31-Jul-2001 |
jhb |
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect the first sector of the emulated floppy to contain a valid MS-DOS BPB that it can modify. Since boot1 is the first sector of boot.flp, this resulted in the BIOS overwriting part of boot1: specifically the function used to read in sectors from the disk.
Submitted by: Mark Peek <mark@whistle.com> Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> PR: i386/26382 Obtained from: NetBSD, OpenBSD (the example BPB) MFC after: 1 month
|
80203 |
23-Jul-2001 |
kris |
s/adress/address/
Inspired by: OpenBSD MFC After: 1 week
|
80084 |
21-Jul-2001 |
rnordier |
Unset MAINTAINER.
|
78522 |
21-Jun-2001 |
peter |
Remove -DNEW_LINKERSET, it is not used here anymore. This is now native.
|
77273 |
27-May-2001 |
rnordier |
Fix reboot buglet when BOOT_BTX_NOHANG is defined.
Submitted by: Umesh Krishnaswamy <umesh@juniper.net>
|
76224 |
02-May-2001 |
obrien |
* include/elf.h has been repo copied to include/elf-hints.h, and it no longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible.
This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
|
74850 |
27-Mar-2001 |
ru |
MAN[1-9] -> MAN.
|
74592 |
21-Mar-2001 |
jhb |
Always disable paging when exiting back to real mode after receiving a fatal trap. Also, reload the GDT register to point to BTX's GDT before playing around with the segment registers to return to real mode. This is helpful if the kernel causes a fatal exception before it has setup its own IDT and fault handlers. For example, if one happens to break mtx_init(). Without these changes BTX would recursively page fault (if paging was not disabled) or triple fault and reset the CPU (without the GDT reload) instead of providing a potentially useful register dump.
Reviewed by: rnordier
|
74265 |
14-Mar-2001 |
ps |
Don't set the gateway address if the netmask is zero or we're on the same network. PXE does not do netmask calculations, so if the gateway is set it will use it.
Submitted by: peter & FreeBSD cluster ACLs
|
72640 |
18-Feb-2001 |
asmodai |
Preceed/preceeding are not english words. Use precede or preceding.
|
72091 |
06-Feb-2001 |
asmodai |
Fix typo: seperate -> separate.
Seperate does not exist in the english language.
|
70177 |
19-Dec-2000 |
rnordier |
Fix column alignment (whitespace-only change).
|
69985 |
13-Dec-2000 |
rnordier |
Strip the .comment and .note sections when stripping. There's no point in retaining this info, particularly under BTX.
|
69921 |
12-Dec-2000 |
rnordier |
Add a magic number, for easier identification of boot0. At present, this is used only by libdisk.
|
69395 |
30-Nov-2000 |
jhb |
Set the proper bit in the howto flags for a serial console rather than setting the index of the bit. (0xc vs. 0x1000)
|
69391 |
30-Nov-2000 |
ps |
Add support for probing the keyboard from pxeboot which will behave exactly the same as passing -P to boot2.
Submitted by: jhb
|
69027 |
22-Nov-2000 |
ru |
mdoc(7) police: do not split author names in the AUTHORS section.
|
68854 |
17-Nov-2000 |
ru |
mdoc(7) police: use certified section headers wherever possible.
|
68362 |
05-Nov-2000 |
ps |
Honor the ip address given in the root-path dhcp option.
PR: 21743 Submitted by: Brian Candler <B.Candler@pobox.com>
|
68314 |
04-Nov-2000 |
rnordier |
Support a.out: avoid (%dx) in in/out instructions, and use an m4 macro to supply underscores for externals.
|
68310 |
04-Nov-2000 |
ps |
MF4: Add LOADER_TFTP_SUPPORT make.conf flag.
|
68264 |
02-Nov-2000 |
jhb |
The Number of Fixed Disks at memory location 0x475 is only 1 byte, not a 2 byte word. This fixes machines that probe 30-odd hard drives during boot in the loader.
Submitted by: Helpful folks at Tyan via ps
|
68136 |
01-Nov-2000 |
mph |
"it's" --> "its" (possessive).
Correct a malformed sentence.
|
66556 |
02-Oct-2000 |
rnordier |
Go back to occupying just a single sector, reverting r1.17 - r1.20. Taking over the sector following the MBR causes problems on some machines, and the actual gains are fairly small in terms of how the space is presently used.
Since we need a number of further features (eg. handling extended partitions) that can't be readily accommodated in the basic boot0 design anyway, rather choose to implement the additional stuff separately and concentrate on compatibility rather than features here.
|
66555 |
02-Oct-2000 |
rnordier |
Set MAINTAINER.
|
66133 |
20-Sep-2000 |
archie |
Add support for the "nullconsole" console type, for systems with neither a video console nor a serial port. Use it if the RB_MUTE flag is set.
Submitted by: Doug Ambrisko <ambrisko@whistle.com> Reviewed by: jhb
|
65685 |
10-Sep-2000 |
dcs |
Bump up version as a result of the recent changes to kernel path, and boot-conf&boot semantic changes.
Also, make it 1.0.
Reminded by: peter (even though he doesn't know it)
|
65640 |
09-Sep-2000 |
rnordier |
Correct BSD/OS slice type.
PR: 21099 Submitted by: Alan Clegg <abc@bsdi.com>
|
65598 |
08-Sep-2000 |
imp |
Look for libstand in the built tree rather than in /usr/lib. This likely could be done better, but the tree is broken and I wanted to get a fix into the tree.
Reviewed by: msmith
|
65499 |
05-Sep-2000 |
msmith |
Fix a bug which prevents parsing this Makefile without having a previously-built loader binary elsewhere.
|
65498 |
05-Sep-2000 |
msmith |
Export the salient configuration items in a non-pxe-specific namespace to allow commonality between varying platforms. This is a step towards parsing the diskless configuration information with MI code inside the kernel.
Export the interface hardware address to the kernel, so that it is possible to determine the boot interface with certainty.
Export the NFS filehandle for the root mount to the kernel, so that the kernel does not need to perform a mount RPC call.
|
65063 |
24-Aug-2000 |
jhb |
Add a new compile-time tweak to BTX. If you set the make(1) variable BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so that it reboots after a fault instead of hanging forever.
Requested by: ps Approved by: rnordier
|
64550 |
11-Aug-2000 |
peter |
Add -mpreferred-stack-boundary=2 to CFLAGS for i386. This and libstand reduces /boot/loader from 163840 bytes to 155648 and pxeboot from 165888 bytes to 157696 bytes.
|
64527 |
11-Aug-2000 |
ps |
Add support to send the string 'PXEClient' as the Vendor class 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.
|
64522 |
11-Aug-2000 |
ps |
Pass along the interesting variables we were given from DHCP so we can utilize them in the kernel and with kenv.
|
64385 |
08-Aug-2000 |
rnordier |
Typo/spelling fixes.
|
64260 |
04-Aug-2000 |
jhb |
Argh! Fix a brainfart of mine. In the old boot0, we relocated ourself to 0x600 via a 'rep movsw'. Once that was done, %cx was zero, so we could simply use 'movb' to update the lower byte of %cx in preparation for zeroing out the fake partition entry used to boot to other drives via F5. Well, in the new boot0, we don't actually relocate ourselves, instead it is easier to create the fake partition entry first and then just use it to get the BIOS to load all of boot0 into memory at 0x600. However, since we aren't doing the relocate code anymore, we don't know that %cx == 0 when we hit the 'movb' to setup %cx for clearning the fake partition entry. Thus, if %ch != 0 when the BIOS started boot0, then it would end up zeroing a lot more memory than just 8 words. The solution is to do a word move of $8 into %cx.
Debugging help from: David Wolfskill <dhw@whistle.com>
|
64187 |
03-Aug-2000 |
jhb |
Cleanup warnings. Most of these are signed/unsigned warnings, as well as some added const's.
|
64186 |
03-Aug-2000 |
jhb |
Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter for lsdev when printing out slice information. Now, you only get the sizes and LBA's of slices if you use 'lsdev -v'.
|
63328 |
17-Jul-2000 |
jhb |
Oops. Remove some debugging code used to display a hexdump of the sector we just loaded from the disk. The code to call it was commented out, and it easily fit into the extra sector, but remove it anyway as it is unneeded.
|
63321 |
17-Jul-2000 |
jlemon |
Unbreak the build -- no manual page for this yet.
|
63315 |
17-Jul-2000 |
jlemon |
Hook up liloldr
|
63314 |
17-Jul-2000 |
jlemon |
This is `liloboot', which creates a file which can be treated like a Linux kernel image, and is designed to be dropped into a Linux system and booted via LILO. Once booted, the user is greeted by the FreeBSD loader. This still isn't quite complete, as the the root= specification from LILO isn't currently passed to the loader yet.
|
63032 |
12-Jul-2000 |
jhb |
The new and improved boot0, v1.1. This version adds the following: - Autodetection and support of the BIOS EDD extensions to work around the 1024 cylinder limit on all but really ancient BIOS's. - To work around some BIOS's which break when EDD is used with older drives, we only attempt to use EDD if the cylinder is > 1023. - Since this new code required more space than we had left, expand boot0 to 2 sectors (1024 bytes) in length. - Add support for boot0 being multiple sectors using predefined constants. If boot0 needs to be extended in the future, all that is required is bumping the NUM_SECTORS constant. - Now that we have more room to work with, add a few more fs type descriptions while making others more verbose.
|
62787 |
07-Jul-2000 |
jhb |
Remove commented out NOMAN variable.
|
62665 |
06-Jul-2000 |
jhb |
- Inline all the functions that are only called once. This results in a savings of 68 bytes in boot2. - Also add a comment warning that you can't remove the empty exit() function.
|
62660 |
06-Jul-2000 |
jhb |
Doh. The disklabel is not 0x200 bytes of zeros, but it is 0x200 bytes long.
|
62658 |
06-Jul-2000 |
jhb |
Clarify the comments in here a bit. The first sector of boot2 is not just zeros, it is actually the disklabel itself. boot2.ldr is simply a placeholder in the boot2 binary.
|
62657 |
06-Jul-2000 |
jhb |
Emulate the WBINVD instruction when it is called by the BIOS.
|
62242 |
29-Jun-2000 |
jhb |
Change the fault message to say 'BTX halted' isntead of 'System halted' to avoid confusion.
Submitted by: George Scott <George.Scott@its.monash.edu.au>
|
62229 |
29-Jun-2000 |
jhb |
Rework the detecting of the rdmsr and wrmsr instructions in the v86 monitor so that the codepath is cleaner and easier to maintain in the future.
|
62176 |
27-Jun-2000 |
jhb |
- Don't blindly assume that there are 8 hard drives installed. Instead, use the BIOS Equipment List to determine how many hard drives are installed and if the drive number we received in %dl is valid. - Don't bother to disable interrupts when setting up the stack. The 8086 and beyond implicitly disable interrupts after an instruction that sets %ss (for example, a pop or a mov) so that you can safely set %ss and %sp in two consecutive instructions. An exception to this is the lss instruction, which can set both registers simultaneously and thus doesn't need this hack. - Add support for EDD BIOS extensions to support booting off of hard drives of nearly arbitrary length.
|
62146 |
26-Jun-2000 |
jhb |
Comment this.
|
62138 |
26-Jun-2000 |
jhb |
Add in support for EDD to support large disks via LBA. This uses a method similar to that of the loader to avoid potentially breaking older drives in that we only use EDD if the desired cylinder is > 1023.
|
61836 |
19-Jun-2000 |
jhb |
Comment this bad boy. Hopefully the next person that comes along won't have to spend a few hours reading the code to figure all this out.
|
61823 |
19-Jun-2000 |
jhb |
- Add some more details to the 'lsdev' output for FAT file systems. - Add in support for the EDD (Enhanced Disk Drive) BIOS extensions to use LBA mode for accessing drives past cylinder 1024. This should allow us to load a kernel from anywhere on a newer drive up to 2 TB. Part of this came from the PR below.
PR: i386/13847 Submitted by: Tor Egge <Tor.Egge@fast.no>
|
61743 |
17-Jun-2000 |
jhb |
Add support for emulating the RDMSR and WRMSR instructions into BTX. In theory, this should allow the K7V Athlon motherboard to boot ok with boot virus protection enabled. However, I have no hardware to test this. It shouldn't break anything though. :)
Prodded by: Kelly Yancey <kbyanc@posi.net>
|
61659 |
14-Jun-2000 |
ps |
Delay calling the device cleanup routines until the absolute last moment. We were cleaning up after PXE too early and the module dependancy code would not be able to load any files if it needed too.
|
61627 |
13-Jun-2000 |
ru |
Treat \t and \n inside /boot.config as whitespaces.
PR: 19215
|
61377 |
07-Jun-2000 |
dcs |
Bump loader version due to copyin, copyout, setenv&cia.
|
60846 |
24-May-2000 |
jhb |
Convert the short stub of real-mode code into 16-bit assembly.
|
60823 |
23-May-2000 |
jhb |
Grrr, fix a silly 'movl' -> 'movw' typo in both pxeldr and cdldr. Also, remove unnecessary cruft from the Makefiles for both.
|
60822 |
23-May-2000 |
jhb |
Clean up some more 16-bit code and get rid of more m4 macros.
|
60821 |
23-May-2000 |
jhb |
Clean up all of the 16-bit assembly code in the x86 bootstrap to work with the new binutils. Now that we have a decent assembler, all the old m4 macros are no longer needed. Instead, straight assembly can be used since as(1) now understands 16-bit addressing, branches, etc. Also, several bugs have been fixed in as(1), allowing boot0.s to be further cleaned up.
|
60703 |
19-May-2000 |
dcs |
This file got repo-copied to common/.
|
60702 |
19-May-2000 |
dcs |
Move man page directives to common/Makefile.inc.
|
60684 |
18-May-2000 |
dcs |
Make corrections to allow for Alpha.
|
60277 |
09-May-2000 |
dwhite |
Remove metion of the 'magic options.' Apparently PXE doesn't require the special options on 0.99c (it mumbles something about 'PXE server not found' but works anyway), and it won't work at all with PXE 2.0.
|
60046 |
05-May-2000 |
jhb |
Switch to using the .code16 as(1) directive and using 16-bit assembly code instead of using 32-bit code and having to just "know" that it's really 16-bit instructions when things run. This also allows the code to use fewer macros and more actual assembly statements, which eases maintenance. Unfortunately, due to as(1) brokenness, we still use m4 macros for all 16-bit addresses, and all short jumps (i.e., 8-bit relative addresses in the jump instruction) must be wrapped in .code32 directives to avoid useless bloat by as(1). This also fixes a few problems that were preventing boot0 from compiling with the latest and greatest version of as(1).
|
60023 |
05-May-2000 |
ps |
Remove the static heap. It is unknown why it was needed in the beginning, but it no longer is required. This has been tested with many different revisions of the PXE rom from Intel.
|
60006 |
04-May-2000 |
dcs |
Make documentation on recently added heap? command reflect reality.
|
60005 |
04-May-2000 |
dcs |
Add "heap?" to loader's man page.
|
60003 |
04-May-2000 |
dcs |
Further improve ordering.
|
60002 |
04-May-2000 |
dcs |
Sort entries in FreeBSD-specific FICL commands.
|
59887 |
02-May-2000 |
dwhite |
Add man page for pxeboot.
Reviewed By: asmodai
|
59855 |
01-May-2000 |
ps |
Wrap the failure warnings around PXE_DEBUG in the cleanup routine. It does not matter if they fail, so dont print anything about it unless we are debugging.
|
59854 |
01-May-2000 |
bp |
Update loader logic to distinguish modules vs. files. Add support for module metadata. The old way of dependancy handling will be supported for a while.
Reviewed by: peter
|
59768 |
29-Apr-2000 |
ps |
Fall back to /pxeroot as the location of the NFS exported directory if we are not given one by dhcp. Remove extra includes while I am here.
Reminded by: jlemon
|
59767 |
29-Apr-2000 |
jlemon |
Teach the loader about the ext2fs filesystem, extended partitions, and the new readdir function.
|
59686 |
27-Apr-2000 |
ps |
Make PXE do a dhcp request to find out where its files are. The DHCP server is no longer required to also act as the NFS/TFTP server.
|
59673 |
27-Apr-2000 |
ps |
Don't report errors when we UDP_WRITE fails with a status of 1.
|
59659 |
26-Apr-2000 |
jhb |
Now that we are compiling PXE into libi386, we don't need ../libi386 in .PATH anymore.
|
59644 |
26-Apr-2000 |
ps |
Bring support in for Intel Wired for Management 1.1 (PXE 0.99 and below). This did not work previously because interrupts were disabled when PXE calls were being made, and they must be enabled. This should also allow us to be compliant with all newer PXE rom's from Intel.
For PXE 0.99, this has been tested using the Intel N440BX motherboard and I am confident it will work on the Intel L440GX motherboard.
Lots of help/information from: jhb, peter
I would like to thank Michael Johnston <michael.johnston@intel.com>, Mike Henry <mike.henry@intel.com>, and all the other PXE developers at Intel for their help, and information in helping solve this problem.
|
59634 |
26-Apr-2000 |
jhb |
Don't disable interrupts when calling a vm86 mode interrupt or routine from user mode. Don't disable interrupts when returning from vm86 mode to user mode either. Now, we only disable interrupts before calling a hardware interrupt handler, which is the only time we _should_ be disabling interrupts.
Because of this, err, feature, any routine that one called in vm86 mode had to re-enable interrupts by setting the interrupt flag or interrupts would remain disabled even after the routine returned. For example, I have a simple debugging routine that uses a vm86 mode function to dump any arbitrary memory word that I use to read the BIOS timer or any other memory location. This function does 1 load instruction from memory and then returns. Since it didn't re-enable interrupts, the first time I called it to read the BIOS timer, it disabled interrupts. This also affected the PXE bootstrap as it needs interrupts enabled while it is processing. This patch fixes both of those situations so that those functions do not worry about having to enable interrupts. Hardware interrupt handlers worked fine with the old code because they always enable interrupts as part of their routine.
If you have any problems with the loader after this commit, please let me know. I'd like to MFC it in a week or two since PXE support needs it.
Noticed by: ps, Michael Johnston <michael.johnston@intel.com>
|
59473 |
21-Apr-2000 |
ps |
Move the building of the PXE module into libi386.
|
59456 |
21-Apr-2000 |
ps |
Make the loader a little smarter about when it is and is not allowed to call PXE.
|
59455 |
21-Apr-2000 |
ps |
Don't call the PXE cleanup routine if PXE is not enabled. This should fix the "Invalid partition table" error people were seeing.
|
59408 |
20-Apr-2000 |
ps |
Add a cleanup function. This is needed for PXE where you should shutdown the UNDI and unload the stack.
|
59390 |
19-Apr-2000 |
ps |
Use !PXE api over PXENV+ api. Magic trampoline by: peter (at 4am and after a good whipping at airhockey) Do a better job of returning and detecting errors.
|
59150 |
11-Apr-2000 |
jhb |
Add a missing dependency: boot2 depends on the BTX kernel.
|
59100 |
08-Apr-2000 |
jkh |
Nuke duplicate struct declaration from somebody's paste-o
|
59087 |
08-Apr-2000 |
ps |
Make PXE use the UDP API. This allows for both TFTP and NFS support. You may specify TFTP or NFS via compile time options in the loader, but not both at this time.
Also, remove a warning about not knowing how to boot from network devices. We can obviously do that now.
|
58999 |
04-Apr-2000 |
ps |
Add a missing PXE API call and structure.
|
58993 |
04-Apr-2000 |
ps |
Add all the PXE related structures from the 2.1 PXE spec from Intel. Fix exsisting code to match the spec.
|
58713 |
28-Mar-2000 |
jhb |
Mega i386 loader commit. - Don't hard code 0x10000 as the entry point for the loader. Instead add src/sys/boot/i386/Makefile.inc which defines a make variable with the entry point for the loader. Move the loader's entry point up to 0x20000, which makes PXE happy. - Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE, instead use m4 to achieve this. Also, add a BTXLDR_VERBOSE knob in the btxldr Makefile to turn this option on. - Redo parts of cdldr's Makefile so that it now builds and installs cdboot instead of having i386/loader/Makefile do that. Also, add in some more variables to make the pxeldr Makefile almost identical and thus to ease maintainability. - Teach cdldr about the a.out format. Cdldr now parsers the a.out header of the loader binary and relocates it based on that. The entry point of the loader no longer has to be hardcoded into cdldr. Also, the boot info table from mkisofs is no longer required to get a useful cdboot. - Update the lsdev function for BIOS disks to parse other file systems (such as DOS FAT) that we currently support. This is still buggy as it assumes that a floppy with a DOS boot sector actually has a MBR and parses it as such. I'll be fixing this in the future. - The biggie: Add in support for booting off of PXE-enabled network adapters. Currently, we use the TFTP API provided by the PXE BIOS. Eventually we will switch to using the low-level NIC driver thus allowing both TFTP and NFS to be used, but for now it's just TFTP.
Submitted by: ps, alfred Testing by: Benno Rice <benno@netizen.com.au>
|
58098 |
15-Mar-2000 |
jhb |
Remove some extra spammage that made it into this commit. This will be revisited later with a better fix, or at least one that compiles. :)
Approved by: dcs
|
58081 |
15-Mar-2000 |
dcs |
Pass an unit number to bcache_strategy, so it can flush the cache when necessary. Pass an absolute block number too, instead of receiving a relative one in realstrategy(), as bcache_strategy() requires this.
The fix is sligthly different from the one in the PR.
PR: 17098 Submitted by: John Hood <jhood@sitaranetworks.com>
|
57254 |
16-Feb-2000 |
jhb |
This patch to BTX fixes several small things:
1) Fix a bug in the int15 function 87 emulation where we only copied half of what the BIOS asked for. This caused the Mylex RAID adapter to go haywire and start trashing memory when you tried to boot from it. 2) Don't use interrupt 19 to reboot. Instead, set the reboot flag to a warm boot and jump to the BIOS's reboot handler. int 19 doesn't clear memory or restore the interrupt vector table, and thus really isn't safe. For example, when booting off of PXE, the PXE BIOS eats up a chunk of memory for its internal data and structures. Since we rebooted via int 19, using the 'reboot' command in the loader resulted in that memory not being reclaimed by the BIOS. Thus, after a few PXE boots, the system was out of lower memory. 3) Catch any int 19 calls made by a BTX client or a user pressing Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly. This fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting the user with a BTX fault.
Approved by: jkh Found by: 1) by msmith
|
57090 |
09-Feb-2000 |
ru |
Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by: jkh, msmith, sos Approved by: jkh
|
56992 |
04-Feb-2000 |
luigi |
Add a NOFORTH variable so we can build a smaller loader without Forth support, for use with PicoBSD
Approved-By: jordan
|
56903 |
30-Jan-2000 |
jhb |
Fix bogon in previous commit. Re-enable Forth in the loader.
Noticed by: dcs Approved by: jkh
|
56752 |
28-Jan-2000 |
jhb |
Allow for cdldr to be built in ${.OBJDIR}/../cdldr/cdldr instead of only looking for it in ${.CURDIR}/../cdldr/cdldr. This fixes world.
|
56693 |
27-Jan-2000 |
jhb |
Add the new cdldr CD bootstrap loader. This patch includes the following:
- Fix btxldr to preserve a NULL bootinfo pointer when it copies the kernel arguments. - Add the cdldr bootstrap program. This program is tacked onto the beginning of the standard 3rd stage boot loader (/boot/loader) to form the CD boot loader (/boot/cdboot). When a CD is booted, the cdboot file is copied into memory instead and executed. The cdldr stub emulates the environment normally provided by boot2 and then starts the loader. This booting method does not emulate a floppy drive, but boots directly off of the CD. This should fix the problems some BIOS's have with emulating a 2.88 MB floppy image. - Add support to the loader to recognize that it has been booted by cdldr instead of boot2 and use a simpler method of extracting the BIOS boot device.
|
56691 |
27-Jan-2000 |
jhb |
Fix brokenness introduced with the PAGING conditional variable. The value of %cr0 wasn't reloaded into %eax before being modified to turn protected mode off if PAGING was not defined. The result was that the processor did not exit protected mode, so when it tried to jump to segment 0x0 in the next instruction to clear the prefetch cache like one should when leaving protected mode, it actually tried to jump to a null selector, causing a GPF.
|
55211 |
29-Dec-1999 |
msmith |
Substantially revamp the way that we determine the amount of memory available for our use. Use the same search order for BIOS memory size functions as the kernel will later use.
Allow the loader to use all of the detected physical memory (this will greatly help people trying to load enormous memory disk images).
More correctly handle running out of memory when loading an object.
Use the end of base memory for the top of the heap, rather than blindly hoping that there is 384k left.
Add copyrights to a couple of files I forgot.
|
54294 |
08-Dec-1999 |
phk |
Remove BAD144 support, it has already been disabled for some time.
|
53637 |
23-Nov-1999 |
dcs |
Add machine-specific include path to ficl's sysdep.h. Wishes I had gone to bed earlier.
Pointed by: peter
|
53174 |
15-Nov-1999 |
obrien |
Add -fdata-sections, which is a new GCC 2.95 optimization. Remove -fschedule-insns as it wasn't such a big win with 2.95 after all.
Add the *BIG* win "-mpreferred-stack-boundary=2" optimiztion submitted by Dima. GCC 2.95 ensures the stack frame is always properly [opitimally] aligned by surrounding every function call by code simular to "addl $-12, %esp" / "addl $12, %esp". Here we need the reduction in space, with speed not an issue.
|
53159 |
14-Nov-1999 |
obrien |
Return this file to its pre-spammed version. Thanks to some new compiler optimizations, we can go from 3 bytes free with the spammed version, to 279 bytes free with the full version.
|
53135 |
14-Nov-1999 |
obrien |
Enter complier upgrade mode again. We need to cut 169 bytes from this: Remove some printf() calls, reduce size of buffers, and abbreviate some strings.
Hopefully the boot people will fix this spamage after the cut over to Gcc 2.95.2 as the system compiler.
|
53134 |
13-Nov-1999 |
obrien |
Turn on the -fforce-addr and -fschedule-insns optimizations. Adding either one gives us an additional 32 bytes of additional space available when using EGCS 1.1.2. With GCC 2.95.2 -fforce-addr gives us 12 more bytes, and adding -fschedule-insns gives us an additional 4 bytes.
|
52545 |
27-Oct-1999 |
jhb |
If PAGING is defined then actually turn it on when entering protected mode.
|
52395 |
19-Oct-1999 |
dcs |
Make the "machine" target a prequisite to all source files.
Hinted-at by: bde
|
52173 |
12-Oct-1999 |
jhb |
aThis patch updates the BTX to emulate the BIOS function "Copy Extended Memory" called as function 0x87 of interrupt 0x15. Since the Mylex RAID adapter's BIOS used this function to access memory (actually PCI bus space) beyond 16 MB, this patch also allows BTX to address all 4 Gig of possible address space on i386+. Since the loader does not have room for 4 MB of page tables, this was done by turning off paging.
Paging was turned off via a compile time setting which defaults to off. To enable paging, simply define the make variable PAGING.
rnordier might want to clean this up later.
Submitted by: W. Gerald Hicks <wghicks@bellsouth.net>, Bosko Milekic <bmilekic@ares.dsuper.net> Reviewed by: msmith Required by: Mylex RAID adapter's BIOS
|
52148 |
12-Oct-1999 |
brian |
Blank out the twiddly thing when outputting the ``BTX loader'' message.
|
50822 |
03-Sep-1999 |
julian |
Remove accidental cut&paste garbage in a comment.
|
50820 |
03-Sep-1999 |
julian |
Comment the boot manager. So I don't have to work it all out again :-)
Reviewed by: rnordier@freebsd.org
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
49191 |
28-Jul-1999 |
nik |
Fix some typos.
PR: docs/11955 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
|
49060 |
24-Jul-1999 |
rnordier |
Recognise NetBSD slices.
Submitted by : Lars Koeller <lkoeller@cc.fh-lippe.de> PR : 12772
|
48952 |
21-Jul-1999 |
msmith |
Walk around the end of all the silly guessing of device types and unit numbers that we have been doing in the past, and read /etc/fstab off the proposed root filesystem to determine the actual device name and vfs type for the root filesystem. These are then exported to the kernel via the environment variable vfs.root.mountfrom.
|
48919 |
20-Jul-1999 |
rnordier |
Reintroduce LBA (cyl > 1023) support in the bootblocks, enabled by means of a build option.
|
48913 |
19-Jul-1999 |
rnordier |
Activate kgzldr.
|
48912 |
19-Jul-1999 |
rnordier |
Use M4FLAGS for m4.
|
48908 |
19-Jul-1999 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r48907, which included commits to RCS files with non-trunk default branches.
|
48351 |
29-Jun-1999 |
peter |
Reconcile all the loader newvers.sh's into one common one.
|
48135 |
23-Jun-1999 |
ru |
-mdoc fix.
|
48083 |
21-Jun-1999 |
rnordier |
Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel. This should resolve the problem raised in PR 12315, and incidentally makes it easier to determine what geometry the BIOS is actually using (by way of boot -v and dmesg).
|
48037 |
19-Jun-1999 |
rnordier |
Provide for enabling/disabling each slice individually.
|
48034 |
19-Jun-1999 |
rnordier |
Fix use of e_phoff in place of e_phnum.
|
48033 |
19-Jun-1999 |
rnordier |
Correct and clarify some comments.
|
48010 |
18-Jun-1999 |
rnordier |
Change active flag handling; sanity check passed drive number; pass partition pointer to bootstrap; optimise away 10 bytes; cosmetics.
|
47727 |
04-Jun-1999 |
ghelmer |
Modify the boot loader to recognize the -C flag and pass the RB_CDROM flag to the kernel to mount a CDROM as the root filesystem. Alternatively, the boot_cdrom env var can be set.
As Mike Smith noted, "-C is the "wrong" way to do this", but this is an acceptable stopgap in lieu of a better way.
PR: bin/11884 Reviewed by: msmith@freebsd.org
|
47473 |
24-May-1999 |
rnordier |
Activate mbr.
|
47472 |
24-May-1999 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r47471, which included commits to RCS files with non-trunk default branches.
|
47395 |
22-May-1999 |
rnordier |
Fix a reference to the mysterious Mike Smisth.
|
47312 |
18-May-1999 |
rnordier |
Drop some non-existent commented-out targets.
|
47011 |
11-May-1999 |
jb |
Found the needle in the haystack!
Use colons instead of semi-colons in the default init_path to behave like UNIX instead of DOS.
Suggested by: bde Reminded by: des (with no hint as to *which* man page).
|
46354 |
03-May-1999 |
jkoshy |
Correct typos.
PR: docs/11445 Submitted by: Kazuo Horikawa <horikawa@jp.freebsd.org>
|
46074 |
25-Apr-1999 |
dcs |
Make man page reflect reality on parsing rules. Now I know Jordan never read this man page... :-)
|
46009 |
24-Apr-1999 |
dcs |
Move loader.conf.5, while it is still in it's first revision.
|
46005 |
24-Apr-1999 |
dcs |
Add loader.4th man page (worst man page I ever wrote -- reviews are welcomed). Correct a nasty bug in loader.4th before anyone notices, add a couple of features.
|
45881 |
20-Apr-1999 |
des |
Make the location of init(8) tunable at boot time.
|
45759 |
18-Apr-1999 |
dcs |
Installs a default loader.rc if none exists. Document loader.conf.
|
45335 |
05-Apr-1999 |
rnordier |
Fix damage introduced in previous commit.
|
45334 |
05-Apr-1999 |
rnordier |
Optimize better for space. Thanks to: jdp
|
45309 |
04-Apr-1999 |
obrien |
Remove the string ">>> FreeBSD/i386 BOOT". I need to reduce the size of boot2 by 16 bytes. I expect this to be temperary until the boot2 authors can do the proper fix.
|
45175 |
31-Mar-1999 |
joerg |
Make <DEL> an alternative rubout character for command input; many serial terminals use this as their default rubout key.
|
44861 |
18-Mar-1999 |
dcs |
Avoid copying m_args if none exists. (Perhaps this is a better solution, Doug?)
|
44840 |
17-Mar-1999 |
dcs |
Version bump: kvm & dictionary size.
|
44780 |
15-Mar-1999 |
dcs |
The man page, version 0.1.
|
44622 |
10-Mar-1999 |
dcs |
Install new loader.rc stuff.
|
44572 |
08-Mar-1999 |
dcs |
Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
|
44357 |
01-Mar-1999 |
rnordier |
Save option, rather than slice, selected. This permits unattended booting from other than drive 0, as the F5 keypress is saved and "replayed."
Requested (some time ago) by: archie
|
44296 |
26-Feb-1999 |
rnordier |
Implement "setdrv" option
|
44274 |
25-Feb-1999 |
rnordier |
Emulate a V86 "movl %cr0,%eax" instruction.
Feedback and testing: Kurt Hopfensperger <kjhmdjd@ix.netcom.com>
|
44243 |
24-Feb-1999 |
msmith |
Don't try protecting page 0; it seems that BIOS writers now feel it's appropriate to check for Windows95 by polling for state in low memory, with fatal results.
Submitted by: rnordier@freebsd.org
|
43759 |
08-Feb-1999 |
dcs |
Bumb up loader's version.
Reviewed by: Michael Smith <msmith@freebsd.org>
|
43374 |
29-Jan-1999 |
rnordier |
Check size of partition before using it.
|
43205 |
25-Jan-1999 |
rnordier |
Fix a couple of further bugs: missing argument to sprintf() and "==" used for "=".
|
43137 |
24-Jan-1999 |
msmith |
Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR: bin/9651 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
|
43115 |
24-Jan-1999 |
msmith |
Document root_disk_unit
|
43114 |
24-Jan-1999 |
msmith |
biosdisk.c Implement a new variable 'root_disk_unit' which supersedes 'num_ide_disks' and makes it possible to explicitly set the root device unit number regardless of type considerations.
bootinfo.c If we can't calculate a dev_t for the root disk, complain and don't proceed to boot with an invalid boot device.
|
43113 |
24-Jan-1999 |
msmith |
Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't guess this value well in anything other than the simplest of situations.
|
43068 |
22-Jan-1999 |
rnordier |
Fix read error not being detected.
|
43059 |
22-Jan-1999 |
rnordier |
Push version numbers up to 1.00. This is just intended to reflect that the BTX code can be regarded as stable: there are no associated code changes.
Suggested by: obrien
|
42807 |
18-Jan-1999 |
msmith |
Transition from using Perl to using awk for our text-manipulation needs. This removes the dependancy on Perl for the generation of the loader, allowing the world to be built on a perl-free system.
Submitted by: Joe Abley <jabley@clear.co.nz>
|
42638 |
13-Jan-1999 |
rnordier |
In the event of a disk error, boot2 is expecting an error code to be returned: give it one
|
42519 |
11-Jan-1999 |
rnordier |
Drop boot.help support.
|
42510 |
11-Jan-1999 |
msmith |
Preserve the previous loader as loader.old.
Note no matching commit for the Alpha, as the alpha boot0 stage does not have the ability to prompt for user input.
PR: kern/9406 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
|
42493 |
10-Jan-1999 |
msmith |
Disable kzipping the loader; it seems to be breaking the aout-to-elf build
|
42488 |
10-Jan-1999 |
steve |
Remove redundant line of code.
PR: 9364 Submitted by: Daniel C. Sobral <dcs@newsguy.com>
|
42480 |
10-Jan-1999 |
rnordier |
Use etc/make.conf settings for serial port and speed.
Submitted by: rvb Reviewed by: bde
|
42478 |
10-Jan-1999 |
peter |
Damn, I thought I had committed this already, but it seems not.
Move the relocated boot1 and arg transfer space from 0x600/0x800 to 0x700/0x900. In theory this should make no difference, apart from the fact that Buslogic controllers happen to use a few bytes at 0x600 for some sort of scratch space for it's int 0x13 hook (!!!), causing the machine to crash badly when the boot2 code makes it's callbacks into boot1 for disk IO.
Submitted by: Robert Nordier <rnordier@freebsd.org>
|
42446 |
09-Jan-1999 |
msmith |
Explicitly look for kzip in /usr/bin, again this is a stopgap, to avoid making kzip a build tool.
|
42420 |
09-Jan-1999 |
msmith |
kzip the loader, this shrinks it to about 60% of its original size. Note that this is a stopgap with dependancies on the a.out tools.
|
42419 |
09-Jan-1999 |
msmith |
Extend bd_print() so that it displays slices and partitions on disks.
|
42291 |
04-Jan-1999 |
peter |
Fix a potential sign extension bug on 8-bit chars. Outputting a backspace isn't supposed to be destructive.. It isn't on most terminals, nor on the standard bios output (vs. TERM_EMU mode)
|
42274 |
04-Jan-1999 |
msmith |
Restore dependancy to build loader.help here
|
42268 |
03-Jan-1999 |
msmith |
Reenable generation of the loader.help file
|
42207 |
31-Dec-1998 |
abial |
Add back ability to make beeps when using new TERM_EMU.
Submitted by: W Gerald Hicks <wghicks@bellsouth.net>
|
42002 |
22-Dec-1998 |
abial |
Add simple terminal emulator, compatible with cons25. Currently supported capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind -DTERM_EMU - should it cause any problems, you can remove this define to get back the old behaviour.
You'll find some examples how to use it in src/share/examples/bootforth.
Reviewed by: jkh
|
41838 |
16-Dec-1998 |
msmith |
Disable build/install of boot.help until we sort out how to construct it in the makeworld environment.
|
41822 |
15-Dec-1998 |
msmith |
Reformat help to improve subtopic display appearance, other minor cleaning. The 'help' command in the loader should now be usable and hopefully informative.
|
41821 |
15-Dec-1998 |
msmith |
Build the composite help file from the generic and architecture-specific help files, sorting topics and subtopics to allow maximum flexibility.
|
41587 |
07-Dec-1998 |
ache |
unlocalize date Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
|
41540 |
05-Dec-1998 |
rnordier |
Revise some comments and labels.
|
41412 |
29-Nov-1998 |
rnordier |
Drop EDD support detection, though retain configurable use of disk packet interface. Add booteasy-style F5 support. Add no-update option. Implement various space optimizations and consistency fixes.
|
41285 |
22-Nov-1998 |
rnordier |
Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
|
41139 |
13-Nov-1998 |
msmith |
Add a new variable $num_ide_disks which is used to offset the unit number for SCSI disks when converting from BIOS unit numbers to da unit numbers.
Prompted by Kevin Street <street@iname.com>
|
41107 |
12-Nov-1998 |
jkh |
bootforth seems to be working well enough for me and others to turn on by default. If it causes trouble, it's very easy to switch off again.
|
41085 |
11-Nov-1998 |
rnordier |
Revise error messages.
|
41013 |
08-Nov-1998 |
rnordier |
Prevent boot.config being parsed more than once.
|
41010 |
08-Nov-1998 |
rnordier |
Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while loading. This eliminates noise when loading boot/loader; and when loading a kernel, they generally flash by too fast to be intelligible anyway.
|
41008 |
08-Nov-1998 |
rnordier |
boot1: Eliminate EDD detection and optional use of disk packet interface. Do some general consistency fixes and space optimizations. Use of some freed-up space to defend against possible BIOS misfeatures.
boot2: Revise disk read interface to provide for boot1 changes. Free up space for this.
|
40940 |
05-Nov-1998 |
rnordier |
Make use of BIOS int 0x13 extensions configurable, and disabled by default.
|
40884 |
04-Nov-1998 |
msmith |
Turn off -g accidentally left in from testing.
|
40879 |
04-Nov-1998 |
jkh |
Respect ${.OBJDIR} properly when looking for libficl.a
|
40877 |
04-Nov-1998 |
msmith |
Add required parts for BootForth building (currently disabled and untested). Only suitable for i386 at the moment, as we are missing setjmp/longjmp on the Alpha.
|
40834 |
02-Nov-1998 |
msmith |
Implement a simple LRU block cache. By default this is initialised to 16k, and will bypass transfers for more than 8k. Blocks are invalidated after 2 seconds, so removable media should not confuse the cache.
The 8k threshold is a compromise; all UFS transfers performed by libstand are 8k or less, so large file reads thrash the cache. However many filesystem metadata operations are also performed using 8k blocks, so using a lower threshold gives poor performance.
Those of you with an eye for cache algorithms are welcome to tell me how badly this one sucks; you can start with the 'bcachestats' command which will print the contents of the cache and access statistics.
|
40833 |
02-Nov-1998 |
rnordier |
Revise a few comments.
|
40807 |
01-Nov-1998 |
rnordier |
Ignore, rather than emulate, an i386 'hlt' instruction (though for most practical purposes, this should be indistinguishable from a more strictly correct approach).
Feedback and testing: msmith
|
40775 |
31-Oct-1998 |
msmith |
- Add a new command 'lsdev' to list devices which might be likely to host filesystems. - New 'help' command and data in the help.* files (not yet installed), provides topic and subtopic help, indexes, etc. - Don't crash if the user tries to set an invalid console. Be helpful instead. - Expand tabs (badly) on the i386 video console. - Some minor cosmetic changes.
|
40753 |
30-Oct-1998 |
luoqi |
Fix an uninitialized variable in the `dangerously dedicated disk' case.
|
40745 |
30-Oct-1998 |
msmith |
Make the BTX loader much more quiet about what it's doing. This removes most of the "what the (*^&%(*^ was that?" stuff that normally flies by.
|
40705 |
28-Oct-1998 |
msmith |
Simplify the "is a character ready" test, so that we don't return a false negative for keypresses with zero ascii values. This is in line with the comconsole test, rather than being more ambitious.
Submitted by: rnordier
|
40675 |
27-Oct-1998 |
rnordier |
Avoid interruptions while talking to keyboard controller.
|
40674 |
27-Oct-1998 |
rnordier |
biosboot compatibility fix: change behavior of backspace in getstr(). Noticed by: abial
Optimize away a few bytes to make space for the above.
|
40620 |
23-Oct-1998 |
msmith |
Clean the ${BASE}.sym file as well.
|
40619 |
23-Oct-1998 |
msmith |
Remove a debugging copy of offsetof() that snuck in.
|
40618 |
23-Oct-1998 |
msmith |
Enable the PCI BIOS PnP enumerator.
|
40617 |
23-Oct-1998 |
msmith |
PnP enumerator using the PCI BIOS. This is needlessly complex due to the lack of a simple "enumerate all PCI devices" function.
|
40601 |
22-Oct-1998 |
msmith |
PnP BIOS enumerator; mostly useful for hunting PnP devices that are supported by the system BIOS rather than supporting ISA PnP.
|
40600 |
22-Oct-1998 |
msmith |
Add a dependancy on the BTX crt0 object Add the biospnp handler to the pnp handler array Drop some old debugging code
|
40599 |
22-Oct-1998 |
msmith |
Add biospnp.c
|
40598 |
22-Oct-1998 |
msmith |
Pop the return address off the stack before making a V86_CALLF call; this allows us to implement what look like C function calls from user space "directly" to v86 mode code. (Used for calling the PnP BIOS)
|
40556 |
21-Oct-1998 |
msmith |
Bye-bye setdefs.
|
40555 |
21-Oct-1998 |
msmith |
- Enable PnP and ISA PnP code. - Use the ISA PnP enumerator. - Use the new linker set code, throw out the gensetdefs stuff. - Produce an intermediate loader image that has symbols stripped, to aid - in debugging. - Supply ISA port access functions required for ISA PnP
|
40554 |
21-Oct-1998 |
msmith |
Don't depend on being part of the kernel tree. If we are, use the kernel's <machine> includes rather than the system's.
|
40541 |
20-Oct-1998 |
rnordier |
Make serial port, data format, and bps configurable.
|
40524 |
19-Oct-1998 |
rnordier |
Make configurable (a) whether to use int 0x13 extensions; (b) timeout value. Ignore failure to update mbr sector. Disable interrupts while using extended registers. Default to F1 not F2.
|
40493 |
17-Oct-1998 |
rnordier |
Set BINMODE to 444.
|
40477 |
17-Oct-1998 |
rnordier |
Fix some glitches in the input routine: Don't display a \b if not acting on it. Don't process binary zero chars (which result from pressing function keys, etc. on the PC).
|
40476 |
17-Oct-1998 |
rnordier |
Having probed the keyboard, turn off the -P flag.
|
40474 |
17-Oct-1998 |
rnordier |
Treat all options as toggles (ie. -c -c is the same no -c). Since the boot.config settings are persistent, this seems to provide a useful override capability, and should break only on broken boot.config's.
Output a cosmetic newline if booting with no input.
|
40472 |
17-Oct-1998 |
rnordier |
biosboot compatibility fix: If we have a boot.config command, display it.
|
40471 |
17-Oct-1998 |
rnordier |
biosboot compatibility fix: Read boot.help before parsing boot.config. We were parsing boot.config first, which could result in boot.help being read from a different location (or not found), which would probably just cause surprise, without being useful.
|
40416 |
15-Oct-1998 |
rnordier |
Fix path to sio.s
|
40404 |
15-Oct-1998 |
rnordier |
Add serial, dual, and probe-keyboard support.
|
40393 |
15-Oct-1998 |
peter |
Get the last used address via a more conservative method, don't depend on the module chain being in increasing address order.
|
40358 |
14-Oct-1998 |
rnordier |
Activate boot2.
|
40338 |
14-Oct-1998 |
peter |
Try and get the sys/* and machine/* includes via relative paths. This saves having to do a 'make includes' after touching any header file for the boot code.
|
40336 |
14-Oct-1998 |
peter |
Align to sizeof(long) rather than sizeof(int32_t). It needs to be long because this code is shared with the alpha. I hope the alpha can read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).
|
40330 |
14-Oct-1998 |
rnordier |
Fix btx include path.
|
40326 |
14-Oct-1998 |
rnordier |
Include <bsd.prog.mk>. Add install target (to /boot for now).
|
40325 |
13-Oct-1998 |
rnordier |
Fix flow of control after directory listing; enable EDD support; cosmetics.
|
40323 |
13-Oct-1998 |
rnordier |
Make v86.ctl default more explicit; simplify read error-handling; twiddle.
|
40320 |
13-Oct-1998 |
rnordier |
Adjust NDEV value. Optimize reading of system time.
|
40314 |
13-Oct-1998 |
rnordier |
Change to a 15-sector boot2. Refine slice-handling.
|
40308 |
13-Oct-1998 |
rnordier |
Don't use an absolute path to objcopy. Noticed by: Scott Mace <smace@intt.org>
|
40307 |
13-Oct-1998 |
rnordier |
Improve drive recognition and handling.
|
40270 |
12-Oct-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r40269, which included commits to RCS files with non-trunk default branches.
|
40269 |
12-Oct-1998 |
rnordier |
New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023; multiple 0xa5 slices; etc.
|
40245 |
12-Oct-1998 |
rnordier |
Drop .MAKEFLAGS: hack.
|
40244 |
12-Oct-1998 |
rnordier |
Do without head and tail: they're pretty unnecessary here anyway.
|
40243 |
12-Oct-1998 |
rnordier |
Use rather than for linking. This allows the new rather than stale version of libstand.a to be found.
After this change, the new boot code is apparently building correctly in a make world.
|
40218 |
11-Oct-1998 |
rnordier |
Override for ELF.
|
40217 |
11-Oct-1998 |
rnordier |
Override for ELF. Override .s.o suffix rule.
|
40216 |
11-Oct-1998 |
peter |
Fix a warning that's been bugging me for ages.
|
40212 |
11-Oct-1998 |
peter |
Only call vidc_init() once (unless forced). Cosmetic change to the init-time character eater (like, make it increment the index counter - if there's a problem, it would sit there in an infinite loop instead of only running 10 times).
|
40211 |
11-Oct-1998 |
peter |
Fix comconsole mode. The int 0x14 read and status commands were reversed. Also, make sure we set %dx each time around otherwise the commands suddenly start trying to work on things like com92 instead of com1. Make sure comc_init() is only run once. Cosmetic change to init-time character eater.
|
40210 |
11-Oct-1998 |
peter |
Warn that one of the DEBUG statements has a v86 recursion bug.
|
40209 |
11-Oct-1998 |
peter |
Fix comment to match code
|
40182 |
10-Oct-1998 |
rnordier |
Fix a typo. Output another newline before invoking bootstrap.
|
40149 |
09-Oct-1998 |
rnordier |
Turn off the new /sys/boot stuff (except boot0) unless OBJFORMAT is elf. (The BTX client must be ELF, though it is packaged as a.out for compatibility.)
|
40146 |
09-Oct-1998 |
peter |
Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff should be MD code since one day we'll have to recover pages from deleted preload data. MI code can't be expected to know how to deal with pmap internals, assuming it gets done via pmap that is. :-)
|
40145 |
09-Oct-1998 |
peter |
Turn symbol table info passing back on, although it's probably not particularly useful in this form. KLD can deal with it much better. setenv kernelname moved earlier.
|
40144 |
09-Oct-1998 |
peter |
Remove kernelname setenv, the common code does it. Use the metadata for symtab pointers, mainly to keep it common with elf_freebsd.c.
|
40124 |
09-Oct-1998 |
rnordier |
Get this building as a.out or ELF.
With thanks to: jdp
|
40107 |
09-Oct-1998 |
msmith |
Remove some debugging code. Do a much better job of DWIM with partial device specifications. Fix the module metadata build process, which was completely broken. Use a larger read buffer when copying large objects in; this improves performance marginally and will avoid flushning any small caches we might choose to implement.
|
40034 |
07-Oct-1998 |
peter |
Fix that pesky boot aguments parsing bug. (I think :-)
|
40032 |
07-Oct-1998 |
msmith |
Request the flags back when checking for keyboard status. Submitted by: rnordier
|
40017 |
07-Oct-1998 |
msmith |
Enable the DOS filesystem. NOTE: you will have to rebuild libstand in order to be able to build again.
|
40016 |
07-Oct-1998 |
msmith |
- Drain the keyboard buffer when initialising. - Be pedantic about the return from int 16 fn 01.
|
39989 |
06-Oct-1998 |
msmith |
bootinfo.c Strip any device name information from the kernel name before passing it in.
biosdisk.c Be more strict about matching device names to slice entries. Only allow unsliced syntax on unsliced disks.
|
39988 |
06-Oct-1998 |
rnordier |
Fix for "get base memory" bug found and mostly fixed by Mike.
|
39987 |
06-Oct-1998 |
msmith |
The BIOS memory size is only a word. Some BIOSsen have garbage in the other 16 bits we were reading here, causing loss of arguments.
|
39986 |
06-Oct-1998 |
msmith |
Build boot0 as well.
|
39980 |
05-Oct-1998 |
rnordier |
Install in /boot.
|
39974 |
05-Oct-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r39973, which included commits to RCS files with non-trunk default branches.
|
39962 |
04-Oct-1998 |
rnordier |
Adjust setting of argument pointer for BTX 0.87.
|
39961 |
04-Oct-1998 |
rnordier |
Allocate space for storing of arguments at the end of conventional memory.
|
39960 |
04-Oct-1998 |
msmith |
Don't include ELF symbol information yet - it causes the ELF DDB to explode.
|
39944 |
04-Oct-1998 |
msmith |
Improve the handling of the initial bootdev value from the previous loader. Remove some unused code.
|
39943 |
04-Oct-1998 |
msmith |
biosdisk.c Allocate space for, and copy, NDOSPART slice entries from the MBR, not just one. Add some extra debugging while we're at it.
elf_freebsd.c Initialise the symbol table start/end pointers in case we don't have them.
|
39931 |
03-Oct-1998 |
rnordier |
Missing newline in heap command display. Noticed by: jkh
|
39930 |
03-Oct-1998 |
rnordier |
For system calls, reboot without prompting; for exceptions, display message and await reset.
|
39921 |
03-Oct-1998 |
rnordier |
Map all BTX system pages readable at ring 3. This resolves the firmware problem first raised in connection with PR 8105, although unrelated.
|
39919 |
03-Oct-1998 |
rnordier |
bootinfo bi_vesa no longer exists.
|
39902 |
02-Oct-1998 |
msmith |
Consolidate the bootinfo-loading code, greatly simplifying the _exec functions.
|
39901 |
02-Oct-1998 |
msmith |
Fix an egregious precedence bug.
|
39897 |
02-Oct-1998 |
msmith |
Set $currdev according to our best guess at the BIOS device that the previous bootstrap loaded us from.
|
39896 |
02-Oct-1998 |
msmith |
aout_freebsd.c Use bd_getdev() to work out a dev_t for the root device. Allow $rootdev to override $currdev as the root device.
biosdisk.c Save the slice table and disklabel when opening a disk. Add bd_getdev(), which attempts to return a dev_t corresponding to a given device. Cases which it still doesn't get right: - The inevitable da-when-wd-also-exists - Disks with no slice table (the slice number is not set correctly) The first is difficult to get right, the second will be fixed in an upcoming commit.
comconsole.c vidconsole.c getchar() should return an 8-bit value; some BIOSsen pack extra information in %eax.
libi386.h Remove some stale prototypes, add new ones.
|
39895 |
02-Oct-1998 |
msmith |
Mark exit() as __attribute__((__noreturn__))
|
39887 |
02-Oct-1998 |
peter |
First shot at loading elf symbols. Things are a bit strange because of the ..umm.. "wierd" way binutils lays out the file. The section headers are nearly at the end of the file and this is a problem when loading from a .gz file which can't seek backwards (or has a limited reverse seek, ~2K from memory).
This is intended to be compatable with the ddb/db_elf.c code and the alpha/libalpha/elf_freebsd.c layout. I've studied these (which are NetBSD derived) but did it a bit differently. Naturally the process is similar since it's supposed to end up with the same result.
|
39857 |
01-Oct-1998 |
jkh |
Override STRIP so installation doesn't try to strip the loader.
|
39851 |
30-Sep-1998 |
peter |
Make 'make install' do something that might be useful.
|
39850 |
30-Sep-1998 |
peter |
Stop libi386.a from being installed..
|
39834 |
30-Sep-1998 |
peter |
Turn on i386-elf
|
39833 |
30-Sep-1998 |
peter |
i386 ELF loader startup backend. On an ELF kernel booted with the 3-stage bootblocks, the kernel shows up as the primary module:
[3:24am]~-100# kldstat Id Refs Address Size Name 1 1 0xf0100000 ff00000 /kernel ^^^^ oops.. :-)
Based heavily on aout_freebsd.c. Hmm.. There's so much in common that these could probably be combined and just check the metadata to see which format it is.
|
39832 |
30-Sep-1998 |
peter |
Save booted kernel name. Cosmetic cleanups.
|
39831 |
30-Sep-1998 |
peter |
Fix typos.. The vector for "int 0x12" (get base mem) is not written in hex as "0x1a". :-) Fix a comment about the extended memory checks, that's int 0x15.
|
39756 |
29-Sep-1998 |
peter |
The bootinfo struct was getting clobbered or not passed through correctly. Presumably VTOP doesn't work for static objects. The easiest way to get it working was to reserve some space after the environment strings and copy the bootinfo struct there. Also, set RB_BOOTINFO, it's needed.
I got the code to load and run an unmolested kernel OK for the first time with this system a few minutes ago - at last!. I did have to stop it looking at the floppy though as BTX was trapping a mode 14 fault when it look for /boot/boot.conf when no disk was in the drive. (I'm booting from a scsi disk (bios disk 0x80)).
Now to teach it about ELF and modules :-)
|
39733 |
28-Sep-1998 |
peter |
Only bcopy the correct amount of data from the buffer in case it is ever in an overrun situation.
|
39731 |
28-Sep-1998 |
peter |
Reactivate the a.out kernel loader code.
|
39730 |
28-Sep-1998 |
peter |
Missing return value that was kinda important.
|
39729 |
28-Sep-1998 |
peter |
Argh, I don't believe how much time I wasted looking for this... Bytes of extended memory = (extkb * 1024), not (extkb + 1024)
|
39725 |
28-Sep-1998 |
peter |
The comconsole mode is accessed as 'comconsole' not 'com'.
|
39724 |
28-Sep-1998 |
peter |
MBR magic is 0x55aa not 0xffaa.
|
39723 |
28-Sep-1998 |
peter |
Precedence bug (?) causing probe problems.
|
39673 |
26-Sep-1998 |
dfr |
* Add old UFS compatibility code to alpha/boot1. * Fix a raft of warnings, printf and otherwise. * Allocate the correct amount in mod_searchmodule to prevent an overflow. * Fix the makefiles so they work outside my home directory (oops).
|
39664 |
26-Sep-1998 |
msmith |
Recover the arguments passed in from the previous load stage, use them to set the default console. Print malloc stats from the new libstand allocator.
|
39662 |
26-Sep-1998 |
msmith |
The BIOS can't perform a floppy operation where the destination crosses a physical 64k boundary. Allocate a bounce buffer for such a transaction.
|
39646 |
25-Sep-1998 |
peter |
Make these compile when there is an obj dir.
|
39474 |
19-Sep-1998 |
msmith |
Make libstand movable.
This completes the basic work required to make the loader work with BTX. We now have a third-stage bootstrap shared by the i386 and Alpha.
|
39473 |
19-Sep-1998 |
msmith |
- Improve debugging code. - Make the "what do we do with a drunken disklabel" if-then-else-regardless tangle easier to read. - Don't count on the v86 structure being preserved between loop iterations, as it may be trampled eg. by the DEBUG call.
|
39450 |
18-Sep-1998 |
msmith |
Enable the biosdisk driver, duplicate -lstand as it both calls and is called by the i386 platform library.
|
39449 |
18-Sep-1998 |
msmith |
Synch with development version. Compiles and opens but doesn't work yet.
|
39447 |
18-Sep-1998 |
msmith |
We lost all the files in crt/, so define the BIOS sector size here instead.
|
39441 |
17-Sep-1998 |
msmith |
Initial integration of the i386 bootloader and BTX.
- Discard large amounts of BIOS-related code in favour of the more compact BTX vm86 interface. - Build the loader module as ELF, although the resulting object is a.out, make gensetdefs 32/64-bit sensitive and use a single copy of it. - Throw away installboot, as it's no longer required. - Use direct bcopy operations in the i386_copy module, as BTX maps the first 16M of memory. Check operations against the detected size of actual memory.
|
39274 |
15-Sep-1998 |
rnordier |
Add exec syscall.
|
39178 |
14-Sep-1998 |
msmith |
Resynch with working sources before BTX integration.
- Use format-independant module allocator. - Conditionalise ISA PnP support. - Simplify PnP enumerator interface. - Improve module/object searching. - Add missing depend/install targets in BTX makefiles. - Pass the kernel environment and module data in extended bootinfo fields. - Add a pointer to the end of the kernel + modules in bootinfo. - Fix parsing of old-style kernel arguments.
|
39165 |
14-Sep-1998 |
rnordier |
Add BTX startup/interface code.
|
39125 |
13-Sep-1998 |
rnordier |
Enable client entry point support.
|
39091 |
12-Sep-1998 |
rnordier |
Add btxldr, a BTX loader for ELF clients.
|
39089 |
12-Sep-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r39088, which included commits to RCS files with non-trunk default branches.
|
39088 |
12-Sep-1998 |
rnordier |
BTX (aka the boot extender) is an i386 kernel that hosts 32-bit bootstrap programs, and provides page-level protection, hardware interrupt reflection, a virtual-8086 mode interface to BIOS, etc.
|
38764 |
03-Sep-1998 |
msmith |
Bootstrap updates.
- Move some startup code from MD to MI sections - Add a 'copyout' and some copyout-related functions. These will be obsoleted when BTX is available for the 386 and the kernel load area becomes directly addressable. - Add the ability load an arbitrary file as a module, associating and arbitrary type string with it. This can be used eg. for loading splash-screen images etc. - Add KLD module dependancy infrastructure. We know how to look for dependancies inside KLD modules, how to resolve these dependancies and what to do if things go wrong. Only works for a.out at the moment, due to lack of an MI ELF loader. Attach KLD module information to loaded modules as metadata, but don't pass it to the kernel (it can find it itself). - Load a.out KLD modules on a page boundary. Only pad the a.out BSS for the kernel, as it may want to throw symbols away. (We might want to do this for KLD modules too.) - Allow commands to be hidden from the '?' display, to avoid cluttering it with things like 'echo'. Add 'echo'. - Bring the 'prompt' command into line with the parser syntax. - Fix the verbose 'ls'; it was using an uninitialised stack variable. - Add a '-v' flag to 'lsmod' to have it display module metadata as well (not terribly useful for the average user) - Support a 'module searchpath' for required modules. - The bootstrap file on i386 is now called 'loader' to permit the /boot directory to use that name. - Discard the old i386 pread() function, as it's replaced by arch_readin()
|
38712 |
31-Aug-1998 |
msmith |
Bootloader update.
- Implement a new copyin/readin interface for loading modules. This allows the module loaders to become MI, reducing code duplication. - Simplify the search for an image activator for the loaded kernel. - Use the common module management code for all module metadata. - Add an 'unload' command that throws everything away. - Move the a.out module loader to MI code, add support for a.out kld modules.
Submitted by: Alpha changes fixed by Doug Rabson <dfr@freebsd.org>
|
38466 |
21-Aug-1998 |
msmith |
This commit was generated by cvs2svn to compensate for changes in r38465, which included commits to RCS files with non-trunk default branches.
|
38465 |
21-Aug-1998 |
msmith |
This is the new unified bootstrap, sometimes known previously as the '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.
|