summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
Commit message (Collapse)AuthorAgeFilesLines
* Back out M_* changes, per decision of the TRB.imp2003-02-191-4/+4
| | | | Approved by: trb
* Initiate de-orbit burn for USE_PCI_BIOS_FOR_READ_WRITE. This has beenpeter2003-02-181-2/+0
| | | | | | | | | | | | | | #if'ed out for a while. Complete the deed and tidy up some other bits. We need to be able to call this stuff from outer edges of interrupt handlers for devices that have the ISR bits in pci config space. Making the bios code mpsafe was just too hairy. We had also stubbed it out some time ago due to there simply being too much brokenness in too many systems. This adds a leaf lock so that it is safe to use pci_read_config() and pci_write_config() from interrupt handlers. We still will use pcibios to do interrupt routing if there is no acpi.. [yes, I tested this] Briefly glanced at by: imp
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Implement fpclassify():mike2003-02-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'. This was developed by David Schultz and myself with input from bde and fenner. PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions)
* i386/i386/tsc.c was repo-copied from i386/isa/clock.c.phk2003-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove all the stuff that does not relate to the TSC. Change the calibration to use DELAY(1000000) rather than trying to check it against the CMOS RTC, this drastically increases precision: Using 25 samples on a Athlon 700MHz UP machine I find: stddev min max average CMOS 22200 Hz -74980 Hz 34301 Hz 704928721 Hz DELAY 1805 Hz -1984 Hz 2678 Hz 704937583 Hz (The difference between the two averages is not statistically significant.) expressed in PPM of the frequency: stddev min max CMOS 31.49 PPM -106.37 PPM 48.66 PPM DELAY 2.56 PPM 2.81 PPM 3.80 PPM This code will not be used until a followup commit to sys/isa/clock.c and sys/pc98/pc98/clock.c which will only happen after some field testing.
* Make get_cyclecount() use binuptime() when no tsc is available: it is cheaper.phk2003-02-051-4/+4
|
* Split statclock into statclock and profclock, and made the method for drivingjake2003-02-033-12/+13
| | | | | | | | | | | | | statclock based on profhz when profiling is enabled MD, since most platforms don't use this anyway. This removes the need for statclock_process, whose only purpose was to subdivide profhz, and gets the profiling clock running outside of sched_lock on platforms that implement suswintr. Also changed the interface for starting and stopping the profiling clock to do just that, instead of changing the rate of statclock, since they can now be separate. Reviewed by: jhb, tmm Tested on: i386, sparc64
* Reversion of commit by Davidxu plus fixes since applied.julian2003-02-011-1/+2
| | | | | | | | I'm not convinced there is anything major wrong with the patch but them's the rules.. I am using my "David's mentor" hat to revert this as he's offline for a while.
* Make tsc_freq a 64bit quantity.phk2003-01-291-1/+1
| | | | Inspired by: http://www.theinquirer.net/?article=7481
* Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() asscottl2003-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | counterparts to bus_dmamem_alloc() and bus_dmamem_free(). This allows the caller to specify the size of the allocation instead of it defaulting to the max_size field of the busdma tag. This is intended to aid in converting drivers to busdma. Lots of hardware cannot understand scatter/gather lists, which forces the driver to copy the i/o buffers to a single contiguous region before sending it to the hardware. Without these new methods, this would require a new busdma tag for each operation, or a complex internal allocator/cache for each driver. Allocations greater than PAGE_SIZE are rounded up to the next PAGE_SIZE by contigmalloc(), so this is not suitable for multiple static allocations that would be better served by a single fixed-length subdivided allocation. Reviewed by: jake (sparc64)
* Remove BDE_DEBUGGER.jake2003-01-281-4/+0
| | | | Discussed with: bde
* Fix KSE related patch.julian2003-01-261-2/+1
| | | | | Make it compile for the SMP case.. statclock_process() has changed prototypes.
* Clean up some junk defines, and GC the TPR options.peter2003-01-231-23/+0
|
* Nuke CHEAP_TPR stuff, including LOPRIO_LEVEL (bogus) and ALLHWI_LEVELpeter2003-01-232-34/+0
| | | | | (which we never used). There is no need to tweak the TPR anymore and only causes problems.
* - Move enable_sse()'s prototype to machine/md_var.h.jhb2003-01-222-4/+3
| | | | | | | | - Sort definition of cpu_* variables appropriately. - Move cpu_fxsr out of the magic non-BSS set of variables and stick it in the BSS along with hw_instruction_sse (make the latter static as well). Submitted by: bde (partially)
* Rename cpuid_cpuinfo to cpu_procinfo. bde requested that I rename thisjhb2003-01-222-2/+2
| | | | | | | variable to something in the cpu_* namespace since that's what all the other cpuid variables were named and cpu_procinfo is what I came up with. Requested by: bde
* Bah, add in a missing space char I noticed when MFC'ing this.jhb2003-01-221-1/+1
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* o Move the contents of <machine/floatingpoint.h> over tomarcel2003-01-192-88/+80
| | | | | | | | | | | | | | | <machine/ieeefp.h> where it belongs. o Remove the i386 specific inclusion of <machine/floatingpoint.h> from <ieeefp.h>, now that including <machine/ieeefp.h> is enough for all architectures. o Allow <machine/ieeefp.h> to inline the functions exposed by the headers by checking for _IEEEFP_INLINED_ in the MI header. When defined, prototypes are not given and it is assumed that the MD headers, when inlining only a subset of the functions provide prototypes for the functions not being inlined. Based on patch from: Terry Lambert <tlambert2@mindspring.com> Tested with: make release.
* A driver for the System Management Application Programmdodd2003-01-171-0/+91
| | | | | | | | Interface (SMAPI) BIOS, which is present on some IBM Thinkpad models (560, 600, 770 to name a few.) The SMAPI BIOS provides access to System Information, System Configuration, and Power Management.
* Rework part of the previous processor name changes so that we readjhb2003-01-091-1/+0
| | | | | | | | cpu_exthigh and cpu_brand in printcpuinfo() instead of in identify_cpu(). We also only do it for known-good values of cpu_vendor which is a bit more conservative. Reviewed by: bde (mostly)
* - Add a cpu_exthigh variable to hold the highest extended cpuid valuejhb2003-01-081-0/+2
| | | | | | | | | returned from cpuid 0x80000000. - Add a cpu_brand char array to hold the processor name returned by cpuid 0x80000002-0x80000004 on AMD, Intel, Transmeta, and possibly other CPUs. - Use cpuid to set cpu_exthigh and read the processor name if it is present in identify_cpu().
* Enumerate logical hyperthread CPUs manually if they aren't already listedjhb2003-01-081-0/+80
| | | | | | | | | | | | | | | | in the mptable. The way this works is that we determine if the system has hyperthreading and how many logical CPU's should be in each physical CPU by using the information returned by cpuid. During the first pass of the mptable, we build a bitmask of the APIC IDs of the CPUs listed in the mptable. We then scan that bitmask to see if the CPUs are already listed by the mptable, or if there are any APIC IDs already in use that would conflict with the APIC IDs of the logical CPUs. If that test succeeds, then we fixup the count of application processors. Later on during the second pass of the mptable we create fake processor entries for logical CPUs and add them to the system. We only need this type of fixup hack when using the mptable to enumerate CPUs. The ACPI MADT table properly enumerates all logical CPUs.
* Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid withjhb2003-01-081-0/+1
| | | | %eax of 1 and set it in identify_cpu().
* - Fix the name of the hyperthreading cpuid feature flag to be HTT insteadjhb2003-01-081-1/+9
| | | | | of HHT. - Document fields returned in %ebx by a cpuid with %eax of 1.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-012-4/+4
| | | | especially in troff files.
* MB_LEN_MAX is not MD, move it to the MI limits.h.tjr2002-12-222-2/+0
|
* Align the FPU state in the ucontext and sigcontext to 16 bytesdeischen2002-12-022-6/+8
| | | | | | | | | to accomodate the new SSE/XMM floating point save/restore instructions. This commit is mostly from bde and includes some style nits. Approved by: re (jhb)
* Fix for non-GCC compilers.obrien2002-11-271-4/+3
| | | | Approved by: re (jhb)
* Add getcontext, setcontext, and swapcontext as system calls.deischen2002-11-162-12/+5
| | | | | | | | | | | Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin
* Properly parenthesize the DBREG_DRX macro's variables to allow foralfred2002-11-071-1/+1
| | | | DBREG_DRX(&dbregs, n) usage.
* 1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code,davidxu2002-11-072-1/+2
| | | | | | | | | | remove global variable in_vm86call, set vm86 calling flag in PCB flags. 2.Fix vm86 BIOS calling preempted problem by changing vm86_lock mutex type from MTX_DEF to MTX_SPIN. vm86pcb is not remembered in thread struct, when the thread calling vm86 BIOS is preempted by interrupt thread, and later switching back to the thread would cause incorrect context be loaded into CPU registers, this leads to kernel crash.
* Note that the sched_lock protects md_ldt of struct mdproc.jhb2002-10-251-1/+1
|
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-254-4/+54
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Use the correct values for LDBL_*. Libc doesn't completely supportimp2002-10-251-9/+10
| | | | | | | | | | | | | | long doubles at the moment (printf truncates them to doubles). However, long doubles to appear to work to the ranges listed in this commit on both -stable (4.5) and -current. There may be some slight rounding issues with long doubles, but that's an orthogonal issue to these constants. I've had this in my local tree for 3 months, and in my company's local tree for 15 months with no ill effects. Obtained from: NetBSD Not likely to like it: bde
* Very minor whitespace/style nit.markm2002-10-231-2/+1
|
* Change the definition of the debugging registers to be an array, sophk2002-10-201-9/+6
| | | | | | | that we can index into it, rather than do pointer gymnastics on a structure containing 8 elements. Verified by: MD5 hash on the produced .o files.
* Add the !define(COMPILING_LINT)pirzyk2002-10-171-1/+1
| | | | | | pass the pointy hat... Requested by: Juli Mallett <jmallett@FreeBSD.org>
* put an #error directive when SMP and CPU_DISABLE_CMPXCHG are setpirzyk2002-10-171-0/+3
| | | | | | | together. Requested by: Lars Eggart <larse@isi.edu> Enlighted how to do it by: John Baldwin <jhb@freebsd.org>
* Be consistent about functions being static.phk2002-10-161-1/+1
| | | | Spotted by: FlexeLint.
* The a.out md_coredump stuff isn't referenced anywhere anymore, andpeter2002-10-151-10/+0
| | | | hasn't been filled in for ages.. Nuked.
* Add a knob to turn on and off the CMPXCHG instruction on > i386 IA32 systems.pirzyk2002-10-141-1/+1
| | | | | | | This is most beneficial for vmware client os installs. Reviewed by: jmallet, iedowse, tlambert2@mindspring.com MFC After: never, -STABLE does not currently use this instruction
* Add standards visibility conditionals. Change any uses of sigset_t tomike2002-10-131-4/+8
| | | | struct __sigset to avoid depending on objects from <sys/signal.h>.
* Add conditionals to allow va_list to be defined in other headers.mike2002-10-061-0/+4
|
* o Add conditionals to allow va_list to be defined in other headers.mike2002-10-061-4/+10
| | | | | o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes. o Restrict the definition of va_copy() to C99 environments.
* Fix namespace issues by using visibility conditionals frommike2002-10-051-1/+3
| | | | <sys/cdefs.h>.
* style(9) <machine/setjmp.h> headers so they look mostly the same.mike2002-10-041-5/+10
|
* New bus_dma interfaces for use by crypto device drivers:sam2002-10-041-0/+23
| | | | | | | | o bus_dmamap_load_mbuf o bus_dmamap_load_uio Test on i386. Known to compile on alpha and sparc64, but not tested. Otherwise untried.
* Add another temporary hack to allow running older i386 binaries.deischen2002-10-041-6/+6
| | | | | | | | This will be removed when new versions of syscalls sigreturn() and sigaction() are added (mini is working on this but is in the middle of a move). This should fix the problem of cvsupd dying.
* Removed bits related to MBRs now that they have a proper home inbde2002-10-021-20/+0
| | | | <sys/diskmbr.h>.
OpenPOWER on IntegriCloud