summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Remove the KDTRACE option again because of the complaints about havingjb2006-11-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | it as a default. For the record, the KDTRACE option caused _no_ additional source files to be compiled in; certainly no CDDL source files. All it did was to allow existing BSD licensed kernel files to include one or more CDDL header files. By removing this from DEFAULTS, the onus is on a kernel builder to add the option to the kernel config, possibly by including GENERIC and customising from there. It means that DTrace won't be a feature available in FreeBSD by default, which is the way I intended it to be. Without this option, you can't load the dtrace module (which contains the dtrace device and the DTrace framework). This is equivalent to requiring an option in a kernel config before you can load the linux emulation module, for example. I think it is a mistake to have DTrace ported to FreeBSD, but not to have it available to everyone, all the time. The only exception to this is the companies which distribute systems with FreeBSD embedded. Those companies will customise their systems anyway. The KDTRACE option was intended for them, and only them.
* Build in kernel support for loading DTrace modules by default. Thisjb2006-11-041-0/+3
| | | | | | | | | | | | | | adds the hooks that DTrace modules register with, and adds a few functions which have the dtrace_ prefix to allow the DTrace FBT (function boundary trace) provider to avoid tracing because they are called from the DTtrace probe context. Unlike other forms of tracing and debug, DTrace support in the kernel incurs negligible run-time cost. I think the only reason why anyone wouldn't want to have kernel support enabled for DTrace would be due to the license (CDDL) under which DTrace is released.
* Add a cnputs() function to write a string to the console withjb2006-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | a lock to prevent interspersed strings written from different CPUs at the same time. To avoid putting a buffer on the stack or having to malloc one, space is incorporated in the per-cpu structure. The buffer size if 128 bytes; chosen because it's the next power of 2 size up from 80 characters. String writes to the console are buffered up the end of the line or until the buffer fills. Then the buffer is flushed to all console devices. Existing low level console output via cnputc() is unaffected by this change. ithread calls to log() are also unaffected to avoid blocking those threads. A minor change to the behaviour in a panic situation is that console output will still be buffered, but won't be written to a tty as before. This should prevent interspersed panic output as a number of CPUs panic before we end up single threaded running ddb. Reviewed by: scottl, jhb MFC after: 2 weeks
* Fix a typo resulting in truncated linux32 signal trampoline code copiedkib2006-10-311-1/+1
| | | | | | | to the usermode. Usually, signal handler segfaulted on return. Reviewed by: jhb MFC after: 3 days
* regen after linux_io_* backoutnetchild2006-10-293-47/+8
|
* Backout the linux aio stuff. Several problems where identified and thenetchild2006-10-292-7/+5
| | | | | | | | | | | | | | | dynamic nature (if no native aio code is available, the linux part returns ENOSYS because of missing requisites) should be solved differently than it is. All this will be done in P4. Not included in this commit is a backout of the changes to the native aio code (removing static in some places). Those changes (and some more) will also be needed when the reworked linux aio stuff will reenter the tree. Requested by: rwatson Discussed with: rwatson
* Removed some SMP ifdefs so that using the TSC as a cputime clock isbde2006-10-291-10/+5
| | | | | | | | | | | | | | | not completely decided at config time. Just don't default to using the TSC if there are multiple active CPUs. Also, don't default to using the TSC if it is broken. SMP ifdefs are still used to disallow using perfmon since perfmon is always broken if SMP is just configured. This only helps much for SMP kernels running on 1 CPU. The overheads for using the i8254 cputime clock were a bit too high on 486/33's, and now on multi-GHz CPUs they are usually in the 99-99.9% range. Switching from the old default of an i8254 clock to the TSC works poorly because the overheads are not recalibrated. Use the same condition for declaring perfmon stuff as for using it.
* In the userland .mcount():bde2006-10-281-7/+5
| | | | | | | | | | | - Don't use a frame pointer. Our callers need a frame pointer, but we could only use one to support things that aren't supported. (These things are: - profiling of profiling - debugging of profiling. The core ENTRY() macro doesn't support forcing a frame pointer for debugging, so don't do more here.) - Ensure that we are in the text section and have normal alignment. - Use the normal syntax for `.type'.
* regen (prctl addition)netchild2006-10-283-5/+9
|
* i386/include/profile.h:bde2006-10-281-5/+1
| | | | | | | | | | | | Fixed a syntax error for the (!__KERNEL && !__GNUCLIKE_ASM) case in rev.1.36. Apparently, this case has never been reached even by lint. Submitted by: stefanf {amd64,i386}/include/profile.h: In case the above case is actually reached, break it properly by providing null support that will fail at link time instead of a stub that gives wrong (null) profiling at runtime.
* MFP4:netchild2006-10-282-2/+2
| | | | | | | Implement prctl(). Submitted by: rdivacky Tested with: LTP
* In MCOUNT_OVERHEAD(label), actually use the `label' parameter. We werebde2006-10-281-1/+1
| | | | | still using the global label named "profil", and this worked accidentally because all callers use the same name.
* Cleaned up includes. <machine/profile.h> was unused. <machine/timerreg.h>bde2006-10-281-7/+1
| | | | | | | | was only used in the GUPROF case, so the messes to get its i386 prerequisites included shouldn't have been needed. Fixed some style bugs. Quote #error contents, and don't repeat an #error directive on amd64.
* Removed all traces of HIDENAME() in amd64 and i386 kernel code. Usingbde2006-10-282-16/+12
| | | | | | | | | | | | | | | | this used to be slightly cleaner than using ifdefs in a few places to support both a.out and elf, but using it now just causes messes and unportabilities. It seems to be impossible to implement the elf HIDENAME() portably in cpp (since token pasting of "." and <name> is invalid). */prof_machdep.c: - Removed all uses of CNAME(). CNAME() is easy enough to use in pure asm code, but using it in inline asm requires messy quoting. The core pure asm code has been hacked on more and all uses of CNAME() in it have already gone away. Just assume the elf convention here too. - Removed now-uneeded include of <machine/asmacros.h>. - Removed the workaround for a namespace conflict with this include.
* Don't call mexitcount or provide a stub mexitcount to call whenbde2006-10-272-13/+4
| | | | | | profiling is configured but high resolution profiling is not configured. Only functions in *.[Ss] called the stub, so efficiency was not significantly affected.
* Remove the KSE option now that it's in DEFAULTS on these arches/machines.jb2006-10-261-1/+0
| | | | | | | | | The 'nooption' kernel config entry has to be used to turn KSE off now. This isn't my preferred way of dealing with this, but I'll defer to scottl's experience with the io/mem kernel option change and the grief experienced over that. Submitted by: scottl@
* Add 'options KSE' to the kernel config DEFAULTS on all arches/machinesjb2006-10-261-0/+3
| | | | | | | | | | | except sun4v. This change makes the transition from a default to an option more transparent and is an attempt to head off all the compliants that are likely from people who don't read UPDATING, based on experience with the io/mem change. Submitted by: scottl@
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-263-0/+9
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* Move "device splash" back to MI NOTES and "files", it's MI.ru2006-10-231-2/+0
|
* Eliminate unnecessary PG_BUSY tests.alc2006-10-221-1/+1
|
* MFi386: 1.13: Fix booting with ps2 keyboards.ru2006-10-211-1/+0
|
* Move more MD devices and options out of MI NOTES.des2006-10-201-3/+57
|
* Don't show debug registers in "show registers". Special registers shouldbde2006-10-201-1/+2
| | | | | | | be displayed specially, and debug registers are among of the least interesting special registers (far behind %cr3). The debug registers are still accessible as variables and displayed in another bogus place ("show watches").
* The VGA_DEBUG option only exists on {amd64,i386,ia64}.des2006-10-201-3/+2
| | | | Also remove 'device io' from amd64 NOTES; DEFAULTS takes care of it.
* Remove references to pccard.confimp2006-10-191-2/+2
|
* o Add keyword volatile for user mutex owner field.davidxu2006-10-171-2/+2
| | | | | | o Fix type consistent problem by using type long for old umtx and wait channel. o Rename casuptr to casuword.
* Add one more include to fix the case of !DDB and !atpic.jhb2006-10-161-0/+1
|
* Add a newline to the printf().hrs2006-10-151-1/+1
| | | | | Spotted by: Peter Carah <pete@altadena.net> MFC after: 3 days
* regen (linux AIO stuff)netchild2006-10-153-8/+47
|
* MFP4 (with some minor changes):netchild2006-10-152-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the linux_io_* syscalls (AIO). They are only enabled if the native AIO code is available (either compiled in to the kernel or as a module) at the time the functions are used. If the AIO stuff is not available there will be a ENOSYS. From the submitter: ---snip--- DESIGN NOTES: 1. Linux permits a process to own multiple AIO queues (distinguished by "context"), but FreeBSD creates only one single AIO queue per process. My code maintains a request queue (STAILQ of queue(3)) per "context", and throws all AIO requests of all contexts owned by a process into the single FreeBSD per-process AIO queue. When the process calls io_destroy(2), io_getevents(2), io_submit(2) and io_cancel(2), my code can pick out requests owned by the specified context from the single FreeBSD per-process AIO queue according to the per-context request queues maintained by my code. 2. The request queue maintained by my code stores contrast information between Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks (struct aiocb). FreeBSD IO control block actually exists in userland memory space, required by FreeBSD native aio_XXXXXX(2). 3. It is quite troubling that the function io_getevents() of libaio-0.3.105 needs to use Linux-specific "struct aio_ring", which is a partial mirror of context in user space. I would rather take the address of context in kernel as the context ID, but the io_getevents() of libaio forces me to take the address of the "ring" in user space as the context ID. To my surprise, one comment line in the file "io_getevents.c" of libaio-0.3.105 reads: Ben will hate me for this REFERENCE: 1. Linux kernel source code: http://www.kernel.org/pub/linux/kernel/v2.6/ (include/linux/aio_abi.h, fs/aio.c) 2. Linux manual pages: http://www.kernel.org/pub/linux/docs/manpages/ (io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2)) 3. Linux Scalability Effort: http://lse.sourceforge.net/io/aio.html The design notes: http://lse.sourceforge.net/io/aionotes.txt 4. The package libaio, both source and binary: http://rpmfind.net/linux/rpm2html/search.php?query=libaio Simple transparent interface to Linux AIO system calls. 5. Libaio-oracle: http://oss.oracle.com/projects/libaio-oracle/ POSIX AIO implementation based on Linux AIO system calls (depending on libaio). ---snip--- Submitted by: Li, Xiao <intron@intron.ac>
* MFP4 (106538 + 106541):netchild2006-10-152-0/+11
| | | | | | Implement CLONE_VFORK. This fixes the clone05 LTP test. Submitted by: rdivacky
* Revert my previous commit, I mismerged this to the wrong place.netchild2006-10-151-1/+0
| | | | Pointy hat to: netchild
* MFP4 (106541): Fix the clone05 test in the LTP.netchild2006-10-151-0/+1
| | | | Submitted by: rdivacky
* MFP4 (107144[1]): Implement CLONE_FS on i386[1] and amd64.netchild2006-10-151-1/+7
| | | | Submitted by: rdivacky [1]
* Move the 2 additional #includes down into the #ifndef DEV_ATPIC section.jhb2006-10-131-2/+2
|
* Attempt to fix the GENERIC kernel build which has been failing onjb2006-10-131-0/+2
| | | | tinderbox for a couple of days.
* Fix nodevice atpic compile.jhb2006-10-122-1/+8
| | | | Pointy hat to: jhb
* Change the x86 interrupt code to suspend/resume interrupt controllersjhb2006-10-108-56/+127
| | | | | | | | | | | | | | | | | | (PICs) rather than interrupt sources. This allows interrupt controllers with no interrupt pics (such as the 8259As when APIC is in use) to participate in suspend/resume. - Always register the 8259A PICs even if we don't use any of their pins. - Explicitly reset the 8259As on resume on amd64 if 'device atpic' isn't included. - Add a "dummy" PIC for the local APIC on the BSP to reset the local APIC on resume. This gets suspend/resume working with APIC on UP systems. SMP still needs more work to bring the APs back to life. The MFC after is tentative. Tested by: anholt (i386) Submitted by: Andrea Bittau <a.bittau at cs.ucl.ac.uk> (3) MFC after: 1 week
* Oops, fix sign bug in #ifdef for value of INTRCNT_COUNT.jhb2006-10-101-2/+2
| | | | | | PR: kern/99870 Submitted by: jkim MFC after: 3 days
* - Remove SCHED_ULE from GENERIC to better avoid foot-shooting bysimon2006-10-051-1/+0
| | | | | | | | | | | unsuspecting users. - Add a comment in NOTES about experimental status of SCHED_ULE. - Make warning about experimental status in sched_ule(4) a bit stronger. Suggested and reviewed by: dougb Discussed on: developers MFC after: 3 days
* Move some declaration of 32-bit signal structures into filedavidxu2006-10-051-21/+5
| | | | freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.
* PR:jb2006-10-041-25/+0
| | | | | | | | | | | | | | Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one. Add the additional ELF types defines in Sun's "Linker and Libraries" manual.
* Use utc_offset() where applicable, and hide the internals of itphk2006-10-021-2/+2
| | | | as static variables.
* Second part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-022-23/+0
| | | | | | | | | | | Split subr_clock.c in two parts (by repo-copy): subr_clock.c contains generic RTC and calendaric stuff. etc. subr_rtc.c contains the newbus'ified RTC interface. Centralize the machdep.{adjkerntz,disable_rtc_set,wall_cmos_clock} sysctls and associated variables into subr_clock.c. They are not machine dependent and we have generic code that relies on being present so they are not even optional.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-024-3/+3
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Extend comment explaining why code is conditional at !defined(SCHED_ULE).sobomax2006-09-271-0/+4
| | | | Suggested by: ru
* Since ULE doesn't honor hlt_cpus_mask don't compile code that preventssobomax2006-09-271-1/+1
| | | | | | | | timer interrupt servicing for disabled HTT cores in ULE case. Should be probably fixed in ULE code instead, but we have no real maintainer for ULE to do it. PR: 103697
* Added COMPAT_FREEBSD6 option.ru2006-09-261-0/+1
|
* Stop reloading %fs and %gs, since it causes the base address fromdavidxu2006-09-231-4/+0
| | | | | | | | GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_SET_GSBASE, the change fixed a crash for 32bit libthr after signal handler returned and normal code is accessing thread pointer, for example: movl %gs:8, %eax.
* Update the ipmi(4) driver:jhb2006-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split out the communication protocols into their own files and use a couple of function pointers in the softc that the commuication protocols setup in their own attach routine. - Add support for the SSIF interface (talking to IPMI over SMBus). - Add an ACPI attachment. - Add a PCI attachment that attaches to devices with the IPMI interface subclass. - Split the ISA attachment out into its own file: ipmi_isa.c. - Change the code to probe the SMBIOS table for an IPMI entry to just use pmap_mapbios() to map the table in rather than trying to setup a fake resource on an isa device and then activating the resource to map in the table. - Make bus attachments leaner by adding attach functions for each communication interface (ipmi_kcs_attach(), ipmi_smic_attach(), etc.) that setup per-interface data. - Formalize the model used by the driver to handle requests by adding an explicit struct ipmi_request object that holds the state of a given request and reply for the entire lifetime of the request. By bundling the request into an object, it is easier to add retry logic to the various communication backends (as well as eventually support BT mode which uses a slightly different message format than KCS, SMIC, and SSIF). - Add a per-softc lock and remove D_NEEDGIANT as the driver is now MPSAFE. - Add 32-bit compatibility ioctl shims so you can use a 32-bit ipmitool on FreeBSD/amd64. - Add ipmi(4) to i386 and amd64 NOTES. Submitted by: ambrisko (large portions of 2 and 3) Sponsored by: IronPort Systems, Yahoo! MFC after: 6 days
OpenPOWER on IntegriCloud