summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Only delete the route if arplookup() tried to create it. Do not deletebms2003-10-031-8/+13
| | | | | | | | | RTF_STATIC routes. Do not check for RTF_HOST so as to avoid being DoSed when an RTF_GENMASK route exists in the table. Add a more verbose comment about exactly what this code does. Submitted by: ru
* Swap the syscall caller frame info (i.e. the return pointer andmarcel2003-10-033-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | frame marker) and the syscall stub frame info in the trap frame. Previously we stored the stub frame info in (rp,pfs) and the caller frame info in (iip,cfm). This ends up being suboptimal for the following reasons: 1. When we create a new context, such as for an execve(2), we had to set the (rp,pfs) pair for the entry point when using the syscall path out of the kernel but we need to set the (iip,cfm) pair when we take the interrupt way out. This is mostly just an inconsistency from the kernel's point of view, but an ugly irregularity from gdb(1)'s point of view. 2. The getcontext(2) and setcontext(2) syscalls had to swap the (rp,pfs) and (iip,cfm) pairs to make the context compatible with one created purely in userland. Swapping the (rp,pfs) and (iip,cfm) pairs is visible to signal handlers that actually peek at the mcontext_t and to gdb(1). Since this change is made for gdb(1) and we don't care about signal handlers that peek at the mcontext_t because we're still a tier 2 platform, this ABI breakage is academic at this moment in time. Note that there was no real reason to save the caller frame info in (iip,cfm) and the stub frame info in (rp,pfs).
* Revert rev. 1.86, I've fixed make(1) (make/dir.c,v 1.32).ru2003-10-021-1/+1
| | | | PR: bin/34062
* Make the i810 AGP device create a "drmsub" child device. This will be attachedanholt2003-10-022-4/+62
| | | | | | to by the DRM for i8xx devices. Submitted by: Keith Whitwell <keith@tungstengraphics.com>
* Introduce a uiomove_frombuf helper routine that handles computing andnectar2003-10-026-60/+50
| | | | | | | | | | | | | | | validating the offset within a given memory buffer before handing the real work off to uiomove(9). Use uiomove_frombuf in procfs to correct several issues with integer arithmetic that could result in underflows/overflows. As a side-effect, the code is significantly simplified. Add additional sanity checks when computing a memory allocation size in pfs_read. Submitted by: rwatson (original uiomove_frombuf -- bugs are mine :-) Reported by: Joost Pol <joost@pine.nl> (integer underflows/overflows)
* Remove wrong usage of BUF_REFCNT().simokawa2003-10-021-1/+0
| | | | Spotted by: phk
* Be kind to 64bit architectures.simokawa2003-10-021-5/+5
|
* If requested to Sleep for less than our hz granularity (e.g., 10 ms),njl2003-10-021-6/+13
| | | | | | use DELAY instead of tsleep. Submitted by: peter
* Reimplement pagezero() using "movnti".alc2003-10-021-39/+11
|
* MFp4: Change struct fw_xfer to reduce memory copy in fwmem_*() functions.simokawa2003-10-0213-657/+804
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And many changes. * all - Major change of struct fw_xfer. o {send,recv}.buf is splitted into hdr and payload. o Remove unnecessary fields. o spd is moved under send and recv. - Remove unnecessary 'volatile' keyword. - Add definition of rtcode and extcode. * firewire.c - Ignore FWDEVINVAL devices in fw_noderesolve_nodeid(). - Check the existance of the bind before call STAILQ_REMOVE(). - Fix bug in the fw_bindadd(). - Change element of struct fw_bind for simplicity. - Check rtcode of response packet. - Reduce split transaction timeout to 200 msec. (100msec is the default value in the spec.) - Set watchdog timer cycle to 10 Hz. - Set xfer->tv just before calling fw_get_tlabel(). * fwohci.c - Simplifies fwohci_get_plen(). * sbp.c - Fix byte order of multibyte scsi_status informations. - Split sbp.c and sbp.h. - Unit number is not necessary for FIFO¤ address. - Reduce LOGIN_DELAY and SCAN_DELAY to 1 sec. - Add some constants defineded in SBP-2 spec. * fwmem.c - Introduce fwmem_strategy() and reduce memory copy.
* Remove the global variable 'cmask', which was used to initialize therwatson2003-10-022-5/+2
| | | | | | | | | fd_cmask field in the file descriptor structure for the first process indirectly from CMASK, and when an fd structure is initialized before being filled in, and instead just use CMASK. This appears to be an artifact left over from the initial integration of quotas into BSD. Suggested by: peter
* Use __BEGIN_DECLS and __END_DECLS around userland function prototypesrwatson2003-10-022-0/+4
| | | | | | | so that mac.h may be more safely included in userland C++ applications. PR: bin/56595 Submitted by: "KONDOU, Kazuhiro" <kazuhiro@alib.jp>
* Create a tunable for net.isr.enable so that it may be set fromrwatson2003-10-021-0/+1
| | | | inception, rather than having to wait for the boot to finish.
* Commit Bosko's patch to clean up the PSE/PG_G initialization to andpeter2003-10-0117-170/+180
| | | | | | | | | | | | | | | | | | | | | avoid problems with some Pentium 4 cpus and some older PPro/Pentium2 cpus. There are several problems, some documented in Intel errata. This patch: 1) moves the kernel to the second page in the PSE case. There is an errata that says that you Must Not point a 4MB page at physical address zero on older cpus. We avoided bugs here due to sheer luck. 2) sets up PSE page tables right from the start in locore, rather than trying to switch from 4K to 4M (or 2M) pages part way through the boot sequence at the same time that we're messing with PG_G. For some reason, the pmap work over the last 18 months seems to tickle the problems, and the PAE infrastructure changes disturb the cpu bugs even more. A couple of people have reported a problem with APM bios calls during boot. I'll work with people to get this resolved. Obtained from: bmilekic
* Temporarily turn net.isr.enable back off again until patches torwatson2003-10-011-1/+1
| | | | correct potential nits in packet ordering are resolved.
* add randomtab for ip6_randomflowlabel().ume2003-10-011-0/+11
| | | | Obtained from: KAME
* Enable net.isr.enable by default, causing "delivery to completion"rwatson2003-10-011-1/+1
| | | | | | | | | | | | | | | (direct dispatch) in interrupt threads when the netisr in question isn't already active. If a netisr is already active, or direct dispatch is already in progress, we queue the packet for later delivery. Previously, this option was disabled by default. I have measured 20%+ performance improvements in IP packet forwarding with this enabled. Please report any problems ASAP, especially relating to stack depth or out-of-order packet processing. Discussed with: jlemon, peter Sponsored by: DARPA, Network Associates Laboratories
* randomize IPv6 flowlabel when RANDOM_IP_ID is defined.ume2003-10-015-4/+20
| | | | Obtained from: KAME
* use arc4random()ume2003-10-012-14/+3
|
* - include opt_random_ip_id.hume2003-10-013-1/+7
| | | | - we don't need to obtain microtime when using ip6_randomid.
* we don't need ip6_id when RANDOM_IP_ID is defined.ume2003-10-013-0/+6
|
* include opt_random_ip_id.hume2003-10-011-0/+2
|
* Don't compiled ip6_randomid() in if RANDOM_IP_ID is not defined.ume2003-10-012-0/+6
|
* Obey RANDOM_IP_ID.ume2003-10-011-0/+5
| | | | Requested by: sam
* randomize IPv6 fragment ID.ume2003-10-014-1/+251
| | | | Obtained from: KAME
* Fix indentionticso2003-10-011-1/+1
| | | | Noticed by: johan
* Don't call makedev().ticso2003-10-012-14/+23
| | | | Cache result of make_dev() and use it when calling destroy_dev().
* Remove extra parentheses from the __GNUC_PREREQ__ macro.mux2003-10-011-1/+1
| | | | Prodded by: bde
* Fix the problem with accessing certain FLASH devices. The problemsos2003-10-011-3/+7
| | | | | | | was that accessing the status reg could occour too fast, confusing the logic in the flash part. Could not have been located without: HW donated by: Jonas Bülow <jonas@servicefactory.se>
* - Add a memory barrier before the sse2_pagezero() function returns. Thisjeff2003-10-011-0/+1
| | | | | | | code uses write combining which must be committed to memory prior to other uses of this page. Spotted by: alc
* By popular demand, added the "static ARP" per-interface option.ru2003-10-012-2/+5
|
* Fix a bug in fwdev_clone().simokawa2003-10-011-1/+1
| | | | Spotted by: grog
* - Hide more #ifdef logic in a new invlcaddr inline. This function flushesjeff2003-10-011-15/+13
| | | | | | the full tlb if you're on an I386or does an invlpg otherwise. Glanced at by: peter
* - Define an inline pagezero() to select the appropriate full-page zeroingjeff2003-10-011-16/+20
| | | | | function from one of bzero, i686_pagezero, or sse2_pagezero. - Use pagezero() in the three pmap functions that need to zero full pages.
* - Add ss2_pagezero() for zeroing pages using the movnti instruction. Thisjeff2003-10-012-0/+15
| | | | | instruction is enabled with SSE2 but does not use SSE registers. It is a "non-temporal" move which bypasses the cache and does not dirty lines.
* Use __register_t instead of register_t, otherwise <sys/types.h> is apeter2003-10-011-24/+24
| | | | prerequisite for <ucontext.h> on amd64. Oops.
* - Correct a problem with the last commit. The CMAP ptes need to be zeroedjeff2003-10-011-5/+5
| | | | | | | | | prior to invalidating the TLB to be certain that the processor doesn't keep a cached copy. Discussed with: pete Paniced: tegge Pointy Hat: The usual spot
* Allow the compiler to micro-optimize byte swapping functions bymux2003-09-301-15/+24
| | | | | | | | evaluating them at compile time rather than at run time. As for x86 and amd64, this requires GCC and it's enabled only if __OPTIMIZE__ is defined (ie, if at least -O is used). Reviewed by: jake
* Use __predict_false() in the KASSERT() macro. We expect this testmux2003-09-301-1/+5
| | | | to fail most of the time.
* Introduce new __predict_false(exp) and __predict_true(exp) keywords.mux2003-09-301-0/+36
| | | | | | | | | | | | Their purpose is to give explicit hints to the compiler to judge the likelyhood of a test to succeed or fail. Not all architectures have support for such optimizations, but for those who do, it can give a nice performance improvement in hot loops. Obviously, this should be used very rarely in very specific code. Reviewed by: peter Obtained from: OpenBSD
* Define a new __GNUC_PREREQ__(maj, min) to test if we have a specificmux2003-09-301-6/+16
| | | | | | | version of GCC or later and use it where appropriate. It makes this file more readable. Obtained from: OpenBSD
* Revert 1.24. It causes a hang on shutdown for Marcel. This is due tonjl2003-09-301-9/+1
| | | | | | | | | | | | AcpiEnterSleepState() calling a long AcpiOsStall() with interrupts disabled. This fix will instead be added to ACPI-CA. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
* Fix a (fortunately harmless) signed / unsigned bug.des2003-09-301-1/+2
|
* Reduce diffs against KAME. No functional change.ume2003-09-301-15/+7
| | | | Obtained from: KAME
* Reduce diffs against KAME. No functional change.ume2003-09-302-9/+4
| | | | Obtained from: KAME
* - On my Pentium4-M laptop, invalpg takes ~1100 cycles if the page is found injeff2003-09-306-45/+42
| | | | | | | | | | the TLB and ~1600 if it is not. Therefore, it is more effecient to invalidate the TLB after operations that use CMAP rather than before. - So that the tlb is invalidated prior to switching off of a processor, we must change the switchin functions to switchout functions. - Remove td_switchout from the thread and move it to the x86 pcb. - Move the code that calls switchout into swtch.s. These changes make this optimization truely x86 specific.
* - Pick up a correct path_id for the bus on AC_PATH_REGISTERED.simokawa2003-09-301-6/+12
| | | | - Call cam_periph_invalidate() only if the periph is found.
* Sync style and comments with latest KAME to reduce diffs.ume2003-09-301-71/+64
| | | | | | No functional change. Obtained from: KAME
* GEOMify.phk2003-09-301-78/+39
|
* MFi386: Do not depend on LEAPYEAR() macro boolean values being 0 or 1.peter2003-09-301-2/+3
| | | | MFi386: Add quality field for timer0
OpenPOWER on IntegriCloud