summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Stop calling _init/_fini methods from crt1 for dynamic binaries. Dokib2012-03-1116-180/+187
| | | | | | | | | | | | | call preinit, init and fini arrays methods from crt1 for static binaries. Mark new crt1 with FreeBSD-specific ELF note. Move some common crt1 code into new MI file ignore_init.c, to reduce duplication. Also, conservatively adjust nearby sources for style. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks
* Add support for preinit, init and fini arrays. Some ABIs, inkib2012-03-1113-14/+230
| | | | | | | | | | | | | | | | | | | | | | | | particular on ARM, do require working init arrays. Traditional FreeBSD crt1 calls _init and _fini of the binary, instead of allowing runtime linker to arrange the calls. This was probably done to have the same crt code serve both statically and dynamically linked binaries. Since ABI mandates that first is called preinit array functions, then init, and then init array functions, the init have to be called from rtld now. To provide binary compatibility to old FreeBSD crt1, which calls _init itself, rtld only calls intializers and finalizers for main binary if binary has a note indicating that new crt was used for linking. Add parsing of ELF notes to rtld, and cache p_osrel value since we parsed it anyway. The patch is inspired by init_array support for DragonflyBSD, written by John Marino. Reviewed by: kan Tested by: andrew (arm, previous version), flo (sparc64, previous version) MFC after: 3 weeks
* Add a header with definitions useful for constructing ELF notes.kib2012-03-111-0/+38
| | | | | Reviewed by: kan MFC after: 3 weeks
* ELF image can have several PT_NOTE program headers. Look for the ELFkib2012-03-111-20/+27
| | | | | | | | brand note in each header, instead of using only first one. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks
* Upgrade the netgraph vlan node to support 802.1q, encapsulation type,adrian2012-03-112-150/+427
| | | | | | | | | | | | | | | | | | | | | | | | PCP and CFI fields. * Ethernet_type for VLAN encapsulation is tunable, default is 0x8100; * PCP (Priority code point) and CFI (canonical format indicator) is tunable per VID; * Tunable encapsulation to support 802.1q * Encapsulation/Decapsulation code improvements New messages have been added for this netgraph node to support the new features. However, the legacy "vlan" id is still supported and compiled in by default. It can be disabled in a future release. TODO: * Documentation * Examples PR: kern/161908 Submitted by: Ivan <rozhuk.im@gmail.com>
* - remove an extra parenthesis in a closing brace;luigi2012-03-111-1/+6
| | | | | | | - add the macro NETMAP_RING_FIRST_RESERVED() which returns the index of the first non-released buffer in the ring (this is useful for code that retains buffers for some time instead of processing them immediately)
* Update comment.kib2012-03-111-1/+1
| | | | Submitted by: gianni
* Fix a bug introduced in r223938; on big-endian machines coping a 32-bitmarius2012-03-111-0/+15
| | | | | | | | | | | | | 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. MFC after: 3 days
* Remove fifo.h. The only used function declaration from the header iskib2012-03-1114-54/+7
| | | | | | migrated to sys/vnode.h. Submitted by: gianni
* Reenable -Winline on MIPS now that we're not compiling Cavium's errorjmallett2012-03-111-3/+0
| | | | decoding stuff, which is impossibly-huge.
* Disable the Simple Executive's error decoding/reporting code.jmallett2012-03-118-25/+19
|
* Do not try to use libfdt in FreeBSD.jmallett2012-03-111-0/+2
|
* Remove files not needed by FreeBSD.jmallett2012-03-1114-3387/+0
|
* Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD tojmallett2012-03-11303-31860/+294164
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make use of it where possible. This primarily brings in support for newer hardware, and FreeBSD is not yet able to support the abundance of IRQs on new hardware and many features in the Ethernet driver. Because of the changes to IRQs in the Simple Executive, we have to maintain our own list of Octeon IRQs now, which probably can be pared-down and be specific to the CIU interrupt unit soon, and when other interrupt mechanisms are added they can maintain their own definitions. Remove unmasking of interrupts from within the UART device now that the function used is no longer present in the Simple Executive. The unmasking seems to have been gratuitous as this is more properly handled by the buses above the UART device, and seems to work on that basis.
| * Import Cavium Octeon SDK 2.3.0 Simple Executive from cnusers.org.jmallett2012-03-11286-31773/+293873
| |
* | Disable -Winline on MIPS in preparation for the import of the latest versionjmallett2012-03-111-0/+3
| | | | | | | | | | | | of the Cavium Simple Executive, which violates large function growth rules in such a way that simply increasing the large function growth parameter is insufficient.
* | Stop some of the output from wrapping at 80 characters.adrian2012-03-111-3/+5
| |
* | Fix promiscuous mode with if_octm:jmallett2012-03-111-11/+18
| | | | | | | | | | | | | | | | | | | | | | o) The MAC set must occur before the multicast list is set up as the former will enable the CAM unconditionally, while promiscuous mode disables it, so if promiscuous mode is to be set this must occur after the MAC is programmed. o) The multicast list must be set up unconditionally as even if flags have not changed, if the interface has gone through a reinitialization, the state of the CAM as changed by the MAC initialization could be incorrect. o) Call octm_init when flags change, even if the interface is already running.
* | Remove some headers not used by kernel or world and which are not present injmallett2012-03-108-329/+0
| | | | | | | | other ports.
* | regennetchild2012-03-1010-14/+1166
| |
* | - add comments to syscalls.master and linux(32)_dummy about which linuxnetchild2012-03-104-2/+204
| | | | | | | | | | | | | | | | | | | | kernel version introduced the sysctl (based upon a linux man-page) - add comments to sscalls.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 MFC after: 1 month
* | ServerWorks HT1000 HPET reported to have problems with IRQs >= 16.mav2012-03-101-0/+8
| | | | | | | | | | | | | | | | Lower (ISA) IRQs are working, but allowed mask is not set correctly. Block both by default to allow HP BL465c G6 blade system to boot. Reported by: Attila Nagy <bra@fsn.hu> MFC after: 1 week
* | Stick the if_drv_flags access (check and modify) behind the ifq lock.adrian2012-03-101-9/+18
| | | | | | | | | | | | Although access to the flags to check/set OACTIVE is racy due to how the default if_start() function works, this should remove any races with read/modify/write between threads.
* | Fix a panic introduced in a previous commit - non-beaconing modes (eg STA)adrian2012-03-102-14/+3
| | | | | | | | | | | | | | | | | | | | | | don't setup the avp mcast queue. This is a bit annoying though - it turns out the mcast queue isn't initialised for STA mode but it's then touched to see whether anything is in it. That should be fixed in a subsequent commit. Noticed by: gperez@entel.upc.edu PR: kern/165895
* | Revert r175376 and tune cpufreq(4) frequency comparison logic instead.mav2012-03-101-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using 25MHz equality threshold, look for the nearest value when handling dev.cpu.0.freq sysctl and for exact match when it is expected. ACPI may report extra level with frequency 1MHz above the nominal to control Intel Turbo Boost operation. It is not a bug, but feature: dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ... In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz. I've found that my Core i7-870 based system has Intel Turbo Boost disabled by default and without this change it was absolutely invisible and hard to control. MFC after: 2 weeks
* | Fix reversed logic in previous commit that broke build and earned me quite thejmallett2012-03-101-2/+2
| | | | | | | | | | | | pointy hat. Submitted by: bz
* | Fix wrong asresp frame parsing in iwi_checkforqos().iwasaki2012-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 8.0-RELEASE, iwi(4) doesn't send any data frames in infrastructure mode. Bacause of the condition `while (frm < efrm)', IEEE80211_VERIFY_LENGTH() was checking item length beyond the ieee80211_frame region, and returned from iwi_checkforqos() without setting flags, capinfo and associd. In infrastructure mode associd is required, so this problem causes discarding mbuf in ieee80211_start(). PR: kern/165819 Tested/Reviewed/Supported by: bschmidt and adrian MFC after: 1 week
* | MFi386: revisions 232570 and 232754nyan2012-03-101-7/+15
| | | | | | | | | | Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel.
* | Idle ticks optimization:mav2012-03-103-23/+46
| | | | | | | | | | | | | | | | | | | | | | - Pass number of events to the statclock() and profclock() functions same as to hardclock() before to not call them many times in a loop. - Rename them into statclock_cnt() and profclock_cnt(). - Turn statclock() and profclock() into compatibility wrappers, still needed for arm. - Rename hardclock_anycpu() into hardclock_cnt() for unification. MFC after: 1 week
* | Remove useless thread_{lock,unlock}() in raccd.trasz2012-03-101-4/+1
| |
* | Perform even more style changes.ed2012-03-101-4/+8
| | | | | | | | | | | | | | | | - Remove unneeded whitespace for function calls. - Add empty line at the top of functions without local variables. - Change while (1) to for (;;). MFC after: 1 week
* | Fix whitespace.ed2012-03-101-35/+29
| | | | | | | | MFC after: 1 week
* | Move determination of socket buffer sizes from startup to the first time agavin2012-03-102-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | socket is used. The previous code structure assumed that AF_INET sockets were always available, which is an invalid assumption on IPv6-only systems. This merges the fololowing revisions from NetBSD: src/usr.bin/ftp/main.c 1.120 src/usr.bin/ftp/util.c 1.156 PR: bin/162661 Tested by: bz Obtained from: NetBSD MFC after: 1 week
* | Cross-reference sigqueue(2) and kill(2).trasz2012-03-102-2/+4
| |
* | Optimize tls_get_addr_common(). The change provides around 30% speedupkib2012-03-101-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for TLS microbenchmark using global-dynamic TLS model on amd64 (which is default for PIC dso objects). Split the slow path into tls_get_addr_slow(), for which inlining is disabled. This prevents the registers spill on tls_get_addr_common() entry. Provide static branch hint to the compiler, indicating that slow path is not likely to be taken. While there, do some minimal style adjustments. Reported and tested by: davidxu MFC after: 1 week
* | Add brackets around bare '-1' used as the macro body.kib2012-03-101-8/+8
| | | | | | | | | | Noted by: bde MFC after: 1 week
* | Use ABI to determine bus_addr_t for cnMIPS.jmallett2012-03-101-1/+1
| |
* | o) Remove some CPU_CNMIPS-related magical thinking about the status register'sjmallett2012-03-103-16/+2
| | | | | | | | | | contents for user programs. o) Conditionalize the installation of an XTLB handler on ABI, not CPU family.
* | Get rid of mainbus.c. The version in nexus.c is being used and isjmallett2012-03-102-335/+0
| | | | | | | | perfectly-sufficient and equally-crufty.
* | Don't truncate physical addresses to 32-bits.jmallett2012-03-101-4/+4
| |
* | Reduce diffs with freebsd32_sysarch.jmallett2012-03-101-12/+8
| |
* | After r232403, DMA transactions does not cross 4GB boundary foryongari2012-03-102-37/+6
| | | | | | | | all PCI devices. Remove driver workaround for 4GB boundary issue.
* | o) Bump INTRCOUNT_COUNT to 256, since Octeon already has >128.jmallett2012-03-101-5/+5
| | | | | | | | | | | | | | | | XXX It would be good to use a better way to size intrcnt. o) Fix literal 4s that are supposed to be sizeof (u_long). XXX Why the * 2 here? Is this an artifact of a different system that this code came from? We seem to allocate twice as much space for intrcnt as we admit to in sintrcnt.
* | Don't flood the cabq/mcastq with frames.adrian2012-03-105-4/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a very noisy 2.4GHz environment (with HT/40 enabled, making it worse) I saw the following occur: * the air was considered "busy" a lot of the time; * the cabq time is quite short due to staggered beacons being enabled; * it just wasn't able to keep up TX'ing CABQ frames; * .. and the cabq would swallow up all the TX ath_buf's. This patch introduces a twiddle which allows the maximum cabq depth to be set, forcing further frames to be dropped. It defaults to the TX buffer count at the moment, so the default behaviour isn't changed. I've also started fleshing out a similar setup for the data path, so it doesn't swallow up all the available TX buffers and preventing management frames (such as ADDBA) out. PR: kern/165895
* | Enforce that wtap requires VIMAGE to be useful.adrian2012-03-101-0/+7
| |
* | Make boot2 build with Clang again.jkim2012-03-092-6/+6
| | | | | | | | | | Submitted by: dim (bsd.sys.mk) Reviewed by: dim, jhb
* | Document that we may end up with some suboptimal handling of dataadrian2012-03-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frames with stations in power saving mode. I'm not (yet) sure how to handle TX'ing aggregates frames to stations that are in power saving mode, or whether that's even a feasible thing to do. So in order to (mostly) not forget, leave a couple of comments in the code. The code presently assumes that the aggregation TID state for an ath_node is locked not by the ath_node lock or a node+TID lock, but behind the hardware queue said TID maps to. This assumption is going to be incorrect for stations in power saving mode as we'll be TX'ing frames on the multicast queue. In any case, I'm afraid its a "later problem". :/
* | Should the mcast queue be locked here? In case more multicast trafficadrian2012-03-091-0/+2
| | | | | | | | | | | | | | comes along? This commit was brought to you via an Atheros AR5210, associated to an 3x3 HT40 11na access point. Yes, this driver still works with it.
* | Export intrcnt correctly when running under 32-bit compatibility.jmallett2012-03-091-0/+18
| | | | | | | | Reviewed by: gonzo, nwhitehorn
* | Perform the parameter validation before assigning it to a signed intpho2012-03-091-2/+2
| | | | | | | | | | | | | | variable. This fixes the problem seen with readdir(3) fuzzing. Submitted by: bde MFC after: 1 week
OpenPOWER on IntegriCloud