summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* o We don't have to keep track of the PIC, nor do we have to make suremarcel2008-03-051-28/+39
| | | | | | | it's probed first. The PowerPC platform code deals with everything. As such, probe devices in order of their location in the memory map. o Refactor the ocpbus_alloc_resource for readability and make sure we set the RID in the resource as per the new convention.
* o Various fixes related to PCI Express:marcel2008-03-051-37/+65
| | | | | | | | | | | | | | | | | | | | | | | | | - Even for the PCI Express host controller we need to use bus 0 for configuration space accesses to devices directly on the host controller's bus. - Pass the maximum number of slots to pci_ocp_init() because the caller knows how many slots the bus has. Previously a PCI or PCI-X bus underneath a PCI Express host controller would not be enumerated properly. o Pull the interrupt routing logic out of pci_ocp_init() and into its own function. The logic is not quite right and is expected to be a bit more complex. o Fix/add support for PCI domains. The PCI domain is the unit number as per other PCI host controller drivers. As such, we can use logical bus numbers again and don't have to guarantee globally unique bus numbers. Remove pci_ocp_busnr. Return the highest bus number ito the caller of pci_ocp_init() now that we don't have a global variable anymore. o BAR programming fixes: - Non-type0 headers have at most 1 BAR, not 0. - First write ~0 to the BAR in question and then read back its size. Obtained from: Juniper Networks (mostly)
* Initialize mnt_stat.f_iosize before autostarting UFS1 extattrs.kib2008-03-051-0/+1
| | | | | | | | | | | | | | It is normally initialized by ffs_statfs() after ffs_mount finished. The extattr autostart code calls the ufs_lookup(), that uses value above to iterate over the directory blocks, see bmask initialization in the ufs_lookup() and ufsdirhash. Having the filesystem with root directory spanning more then one block would result in reading a random kernel memory. PR: kern/120781 Test case provided by: rwatson MFC after: 1 week
* Oops, I accidently concatenated uslcom.[c4] multiple times before therink2008-03-051-1676/+0
| | | | | | commit :-/ Quickly fix before things get broken... Pointyhat to: me
* Import uslcom(4) from OpenBSD - this is a driver for Silicon Laboratoriesrink2008-03-058-0/+2137
| | | | | | | | CP2101/CP2102 based USB serial adapters. Reviewed by: imp, emaste Obtained from: OpenBSD MFC after: 2 weeks
* Change float_t and double_t to long double on i386. All floating pointbde2008-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | expressions on i386 are evaluated in the range of the long double type, so this is wrong in a different but hopefully less worse way than before. Since expressions are evaluated in long double registers, there is no runtime cost to using long double instead of double to declare intermediate values (except in cases where this avoids compiler bugs), and by careful use of float_t or double_t it is possible to avoid some of the compiler bugs in this area, provided these types are declared as long double. I was going to change float.h to be less broken and more usable in combination with the change here (in particular, it is more necessary to know the effective number of bits in a double_t when double_t != double, since DBL_MANT_DIG no longer logically gives this, and LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default rounding precision. However, this was too hard for now. In particular, LDBL_MANT_DIG is used a lot in libm, so it cannot be changed. One thing that is completely broken now is LDBL_MAX. This may have sort of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at runtime gave +Inf, but you could at least compare with it), but starting with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at compile time in the default rounding precision.
* Oops, back out previous commit since it was to the wrong file.bde2008-03-051-5/+4
|
* Change float_t and double_t to long double on i386. All floating pointbde2008-03-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | expressions on i386 are evaluated in the range of the long double type, so this is wrong in a different but hopefully less worse way than before. Since expressions are evaluated in long double registers, there is no runtime cost to using long double instead of double to declare intermediate values (except in cases where this avoids compiler bugs), and by careful use of float_t or double_t it is possible to avoid some of the compiler bugs in this area, provided these types are declared as long double. I was going to change float.h to be less broken and more usable in combination with the change here (in particular, it is more necessary to know the effective number of bits in a double_t when double_t != double, since DBL_MANT_DIG no longer logically gives this, and LDBL_MANT_DIG doesn't give it either with FreeBSD-i386's default rounding precision. However, this was too hard for now. In particular, LDBL_MANT_DIG is used a lot in libm, so it cannot be changed. One thing that is completely broken now is LDBL_MAX. This may have sort of worked when it was changed from DBL_MAX in 2002 (adding 0 to it at runtime gave +Inf, but you could at least compare with it), but starting with gcc-3.3.1 in 2003, it is always +Inf due to evaluating it at compile time in the default rounding precision.
* Expand the nfs_opts array to include all possible stringrodrigc2008-03-051-1/+4
| | | | | | | | | | | mount options that mount_nfs could pass down, if it passed down string mount options. Right now, mount_nfs jut passes down a single mount option named "nfs_args" with a fully initialized 'struct nfs_args'. In future commits, we will add code to the kernel for parsing stringified NFS mount options, so that we can convert mount_nfs to pass string options from userspace to kernel, instead of an initialized struct nfs_args.
* In nfs_mount(), default initialize struct nfs_argsrodrigc2008-03-051-1/+25
| | | | | | | | | | | | | | the same way that it is default initialized in revision 1.77 of mount_nfs.c. Right now, this is a no-op, because currently we initialize struct nfs_args in mount_nfs in userspace, and pass it down into the kernel via nmount(), so we overwrite whatever we initialize here with the value passed in from userspace. However, this lays the groundwork for moving away from passing struct nfs_args from userspace to kernel via nmount(), so that we can instead pass string mount options via nmount() which can be parsed in the kernel. This will make it easier to add new NFS mount options.
* - Don't overwrite the recently allocated 'nset' in cpuset_setthread() byjeff2008-03-051-1/+1
| | | | | | | | passing it to cpuset_which(). Pass in 'set' instead. This argument is not used but for convenience cpuset_which() nulls all incoming parameters. Submitted by: davidxu
* Add rl(4) supportkevlo2008-03-051-0/+2
|
* Plug memory leak in jumbo buffer allocation failure path.yongari2008-03-051-4/+12
| | | | | | | | | | | | Patch in the PR was modified to check active jumbo buffers in use and other possible jumbo buffer leak. Jumbo buffer usage in lge(4) still wouldn't be reliable due to lack of driver lock in local jumbo buffer allocator. Either introduce a new lock to protect jumbo buffer or switch to UMA backed page allocator for jumbo frame is required. PR: kern/78072
* - Verify that when a user supplies a mask that is bigger than the kerneljeff2008-03-052-26/+100
| | | | | | | | | | mask none of the upper bits are set. - Be more careful about enforcing the boundaries of masks and child sets. - Introduce a few more CPU_* macros for implementing these tests. - Change the cpusetsize argument to be bytes rather than bits to match other apis. Sponsored by: Nokia
* Add detection of isolation state.yongari2008-03-051-0/+5
| | | | PR: kern/76710
* Change the default port range for outgoing connections by introducingrpaulo2008-03-042-44/+29
| | | | | | | | | | | | | | | | IPPORT_EPHEMERALFIRST and IPPORT_EPHEMERALLAST with values 10000 and 65535 respectively. The rationale behind is that it makes the attacker's life more difficult if he/she wants to guess the ephemeral port range and also lowers the probability of a port colision (described in draft-ietf-tsvwg-port-randomization-01.txt). While there, remove code duplication in in_pcbbind_setup(). Submitted by: Fernando Gont <fernando at gont.com.ar> Approved by: njl (mentor) Reviewed by: silby, bms Discussed on: freebsd-net
* Add support for automatic promotion of 4KB page mappings to 2MB pagealc2008-03-042-105/+1081
| | | | | | | | | mappings. Automatic promotion can be enabled by setting the tunable "vm.pmap.pg_ps_enabled" to a non-zero value. By default, automatic promotion is disabled. (Expect this to change.) Reviewed by: ups Tested by: kris, Peter Holm
* Implement 128 items node name hash for faster name search.mav2008-03-041-47/+70
| | | | Increase node ID hash size from 32 to 128 items.
* Force an explicit dependency on opt_global.h for all module object filesjhb2008-03-041-0/+7
| | | | | | | | | when building modules as part of a kernel build just as we do for kernel object files. MFC after: 1 week Reported by: kmacy, kris Reviewed by: ru
* Continue on-going campaign to replace lockmgr locks with sx locks whererwatson2008-03-042-12/+14
| | | | | | | | | the specific semantics of ockmgr aren't required: update UFS1 extended attributes to protect its data structures using an sx lock. While here, update comments on lock granularity. MFC after: 2 weeks
* Move setting of MNTK_MPSAFE flag before UFS1 extended attributerwatson2008-03-041-3/+3
| | | | | | | | auto-start so that the flag is set before we start performing I/O in the auto-start routine. MFC after: 2 weeks Suggested by: kib
* Fix incorrect field name.mav2008-03-041-1/+1
|
* Fix the Giant leak in the nfsrv_remove().kib2008-03-041-2/+6
| | | | | Reported by: pluknet <pluknet gmail com> MFC after: 1 week
* Make it possible to continue working after calling doadump()ru2008-03-041-0/+1
| | | | manually from debugger. (This got broken in rev. 1.122.)
* Also comment-out options MPC85XX. We don't define CCSRBAR_* without E500.marcel2008-03-041-1/+1
|
* Comment-out cpu E500. We can't yet build it with AIM at the same time.marcel2008-03-041-1/+1
|
* Add the pic_ipi method. While here, eliminate the unused openpic_ocpbus_softcmarcel2008-03-041-9/+4
| | | | struct.
* When unloading kld, don't forget to flush the nat pointers.piso2008-03-031-0/+7
|
* Import the omitted gdb_machdep.c for PowerPC kernel.raj2008-03-031-2/+57
| | | | | Approved by: cognet (mentor) MFp4: e500
* Connect MPC85XX to the PowerPC build.raj2008-03-034-2/+98
| | | | | | | | | | | | | | | | | The kernel config file is KERNCONF=MPC85XX, so the usual procedure applies: 1. make buildworld TARGET_ARCH=powerpc 2. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX This default config uses kernel-level FPU emulation. For the soft-float world approach: 1. make buildworld TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 2. disable FPU_EMU option in sys/powerpc/conf/MPC85XX 3. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX Approved by: cognet (mentor) MFp4: e500
* Use more compact LIST instead of TAILQ for session hash.mav2008-03-031-62/+32
| | | | | Add all listening hooks into LIST to simplify searches. Use ng_findhook() instead of own equal implementation.
* Support for Freescale integrated Three-Speed Ethernet Controller (TSEC).raj2008-03-033-0/+2287
| | | | | | | | | | | | | | TSEC is the MAC engine offering 10, 100 or 1000 Mbps speed and is found on different Freescale parts (MPC83xx, MPC85xx). Depending on the silicon version there are up to four TSEC units integrated on the chip. This driver also works with the enhanced version of the controller (eTSEC), which is backwards compatible, but doesn't take advantage of its additional features (various off-loading mechanisms) at the moment. Approved by: cognet (mentor) Obtained from: Semihalf MFp4: e500
* Recognize the quad-port Cicada (Vitesse) CS8204 10/100/1000TX PHY.raj2008-03-032-1/+4
| | | | | | | | This PHY is found on many embedded development boards: among others MPC8555CDS evaluation systems use it. Approved by: cognet (mentor) MFp4: e500
* Support for Freescale QUad Integrated Communications Controller.raj2008-03-0311-0/+1456
| | | | | | | | | | | | | The QUICC engine is found on various Freescale parts including MPC85xx, and provides multiple generic time-division serial channel resources, which are in turn muxed/demuxed by the Serial Communications Controller (SCC). Along with core QUICC/SCC functionality a uart(4)-compliant device driver is provided which allows for serial ports over QUICC/SCC. Approved by: cognet (mentor) Obtained from: Juniper MFp4: e500
* Initial support for Freescale PowerQUICC III MPC85xx system-on-chip family.raj2008-03-0326-3/+9576
| | | | | | | | | | | | | | | | | | | | | | | | | | The PQ3 is a high performance integrated communications processing system based on the e500 core, which is an embedded RISC processor that implements the 32-bit Book E definition of the PowerPC architecture. For details refer to: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8555E This port was tested and successfully run on the following members of the PQ3 family: MPC8533, MPC8541, MPC8548, MPC8555. The following major integrated peripherals are supported: * On-chip peripherals bus * OpenPIC interrupt controller * UART * Ethernet (TSEC) * Host/PCI bridge * QUICC engine (SCC functionality) This commit brings the main functionality and will be followed by individual drivers that are logically separate from this base. Approved by: cognet (mentor) Obtained from: Juniper, Semihalf MFp4: e500
* Rework and extend PowerPC headers definitons towards Book-E/e500 CPUs support.raj2008-03-0310-139/+730
| | | | | | Approved by: cognet (mentor) Obtained from: Juniper, Semihalf MFp4: e500
* Raise a bit ipfw kld priority.piso2008-03-031-1/+1
| | | | Discussed on: net-, ipfw-.
* Convert to be a 2-clause bsd-only license.kevlo2008-03-031-7/+0
| | | | Pointed out by: rwatson
* Don't map memory/IO resource in device probe and just use PCIyongari2008-03-032-83/+51
| | | | | | vendor/revision/sub device id of the hardware to probe it. This is the same way as NetBSD does and it enhances readabilty a lot.
* Don't allow jumbo frame on 8139C+ controller.yongari2008-03-032-3/+13
| | | | While I'm here add a check for minimal MTU length.
* Add KMOD target.kmacy2008-03-031-0/+1
| | | | Discovered by: Takahashi Yoshihiro
* Implement WOL.yongari2008-03-032-1/+147
| | | | Tested by: Fabian Keil ( freebsd-listen AT fabienkeli DOT de )
* Make session ID generator to use session ID hash.mav2008-03-021-40/+37
| | | | Make session ID generator thread-safe.
* Don't auto-start or allow extattrctl for UFS2 file systems, as UFS2 hasrwatson2008-03-021-0/+18
| | | | | | | native extended attributes. This didn't interfere with the operation of UFS2 extended attributes, but the code shouldn't be running for UFS2. MFC after: 2 weeks
* Unbreak after cpuset: initialize td_cpuset in sched_fork_thread().marcel2008-03-021-0/+2
|
* Rather than copying out the full audit trigger record, which includesrwatson2008-03-021-1/+1
| | | | | | | | a queue entry field, just copy out the unsigned int that is the trigger message. In practice, auditd always requested sizeof(unsigned int), so the extra bytes were ignored, but copying them out was not the intent. MFC after: 1 month
* Replace lockmgr lock protecting nwfs vnode hash table with an sx lock.rwatson2008-03-021-12/+15
| | | | MFC after: 1 month
* Replace lockmgr lock protecting smbfs node hash table with sx lock.rwatson2008-03-023-9/+10
| | | | MFC after: 1 month
* Fix bugs when allocating and passing information of current lifetime andbz2008-03-022-6/+29
| | | | | | | | | | | | soft lifetime [1] introduced in rev. 1.21 of key.c. Along with that, fix a related problem in key_debug printing the correct data. While there replace a printf by panic in a sanity check. PR: 120751 Submitted by: Kazuaki ODA (kazuaki aliceblue.jp) [1] MFC after: 5 days
* Unify and generalize PowerPC headers, adjust AIM code accordingly.raj2008-03-0212-105/+240
| | | | | | | | | | | | | | | | | | | | Rework of this area is a pre-requirement for importing e500 support (and other PowerPC core variations in the future). Mainly the following headers are refactored so that we can cover for low-level differences between various machines within PowerPC architecture: <machine/pcpu.h> <machine/pcb.h> <machine/kdb.h> <machine/hid.h> <machine/frame.h> Areas which use the above are adjusted and cleaned up. Credits for this rework go to marcel@ Approved by: cognet (mentor) MFp4: e500
OpenPOWER on IntegriCloud