summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Assert that the kernel map's system mutex is held in pmap_growkernel().alc2003-02-151-0/+1
|
* - Add a mutex for synchronizing the use of CMAP/CADDR 1 and 2.alc2003-02-141-9/+12
| | | | | - Eliminate small style differences between pmap_zero_page(), pmap_copy_page(), etc.
* Fix the style of the SCHED_4BSD commit.obrien2003-02-131-1/+1
|
* Oops. I mis-remembered about the P4 problems. It was 5.0-DP2 thatpeter2003-02-131-3/+3
| | | | | was shipped with DISABLE_PG_G and DISABLE_PSE, not 5.0-REL. *blush* Disable the code - but still leave it there in case its still lurking.
* Turn of PG_PS and PG_G for Pentium-4 cpus at boot time. This is sopeter2003-02-131-2/+30
| | | | that we can stop turning off PG_G and PG_PS globally for releases.
* Remove kptobj. Instead, use VM_ALLOC_NOOBJ.alc2003-02-121-9/+2
|
* Switch to using the TSC code in i386/i386/tsc.c.phk2003-02-111-114/+1
|
* Implement fpclassify():mike2003-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* MF alphaalc2003-02-081-0/+12
| | | | - Synchronize access to the allpmaps list with a mutex.
* Commit some cosmetic changes I had laying around and almost includedpeter2003-02-071-5/+2
| | | | with another commit. Unwrap a line. Unexpand a pmap_kenter().
* This file has no longer any content from the original Berkeley file sophk2003-02-051-25/+3
| | | | | | replace the UCB copyright with a FreeBSD 2 clause thing. Remove some no longer relevant comments.
* i386/i386/tsc.c was repo-copied from i386/isa/clock.c.phk2003-02-052-1188/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
|
* Fix a problem in bus_dmamap_load_{mbuf,uio} when the first mbuf or the firstharti2003-02-041-11/+16
| | | | | | | | | | | | uio segment is empty. In this case no dma segment is create by bus_dmamap_load_buffer, but the calling routine clears the first flag. Under certain combinations of addresses of the first and second mbuf/uio buffer this leads to corrupted DMA segment descriptors. This was already fixed by tmm in sparc64/sparc64/iommu.c. PR: kern/47733 Reviewed by: sam Approved by: jake (mentor)
* Split the global timezone structure into two integer fields tophk2003-02-032-4/+4
| | | | | | | | | | prevent the compiler from optimizing assignments into byte-copy operations which might make access to the individual fields non-atomic. Use the individual fields throughout, and don't bother locking them with Giant: it is no longer needed. Inspired by: tjr
* Split statclock into statclock and profclock, and made the method for drivingjake2003-02-039-53/+91
| | | | | | | | | | | | | 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
* - Make allpmaps static.alc2003-02-031-3/+4
| | | | | | - Use atomic subtract to update the global wired pages count. (See also vm/vm_page.c revision 1.233.) - Assert that the page queue lock is held in pmap_remove_entry().
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-2/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Put replace spaces with tabs in keeping with the rest of the file.joe2003-02-011-1/+1
|
* Reversion of commit by Davidxu plus fixes since applied.julian2003-02-019-17/+15
| | | | | | | | 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-294-17/+22
| | | | Inspired by: http://www.theinquirer.net/?article=7481
* Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() asscottl2003-01-292-8/+32
| | | | | | | | | | | | | | | | | | | | 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-286-287/+5
| | | | Discussed with: bde
* Merge pmap_testbit() and pmap_is_modified(). The latter is the only calleralc2003-01-281-29/+9
| | | | of the former.
* Fix KSE related patch.julian2003-01-263-6/+3
| | | | | Make it compile for the SMP case.. statclock_process() has changed prototypes.
* Move UPCALL related data structure out of kse, introduce a newdavidxu2003-01-266-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data structure called kse_upcall to manage UPCALL. All KSE binding and loaning code are gone. A thread owns an upcall can collect all completed syscall contexts in its ksegrp, turn itself into UPCALL mode, and takes those contexts back to userland. Any thread without upcall structure has to export their contexts and exit at user boundary. Any thread running in user mode owns an upcall structure, when it enters kernel, if the kse mailbox's current thread pointer is not NULL, then when the thread is blocked in kernel, a new UPCALL thread is created and the upcall structure is transfered to the new UPCALL thread. if the kse mailbox's current thread pointer is NULL, then when a thread is blocked in kernel, no UPCALL thread will be created. Each upcall always has an owner thread. Userland can remove an upcall by calling kse_exit, when all upcalls in ksegrp are removed, the group is atomatically shutdown. An upcall owner thread also exits when process is in exiting state. when an owner thread exits, the upcall it owns is also removed. KSE is a pure scheduler entity. it represents a virtual cpu. when a thread is running, it always has a KSE associated with it. scheduler is free to assign a KSE to thread according thread priority, if thread priority is changed, KSE can be moved from one thread to another. When a ksegrp is created, there is always N KSEs created in the group. the N is the number of physical cpu in the current system. This makes it is possible that even an userland UTS is single CPU safe, threads in kernel still can execute on different cpu in parallel. Userland calls kse_create to add more upcall structures into ksegrp to increase concurrent in userland itself, kernel is not restricted by number of upcalls userland provides. The code hasn't been tested under SMP by author due to lack of hardware. Reviewed by: julian
* - Remove a redundant scheduler option.jeff2003-01-261-1/+0
| | | | | Pointy hat to: jeff Spotted by: dillon
* - Introduce the SCHED_ULE and SCHED_4BSD options for compile time selectionjeff2003-01-261-0/+2
| | | | | of the scheduler. - Add SCHED_4BSD as the scheduler for all kernel config files in cvs.
* Nuke CHEAP_TPR stuff, including LOPRIO_LEVEL (bogus) and ALLHWI_LEVELpeter2003-01-231-17/+0
| | | | | (which we never used). There is no need to tweak the TPR anymore and only causes problems.
* Now that TPR isn't bogusly raised at boot, there is no need to clearpeter2003-01-232-16/+0
| | | | it at context switch.
* - Move enable_sse()'s prototype to machine/md_var.h.jhb2003-01-225-15/+9
| | | | | | | | - 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-228-10/+10
| | | | | | | 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-219-24/+24
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Resolve relative relocations in klds before trying to parse the module'sjake2003-01-211-6/+26
| | | | | | | | | | | | metadata. This fixes module dependency resolution by the kernel linker on sparc64, where the relocations for the metadata are different than on other architectures; the relative offset is in the addend of an Elf_Rela record instead of the original value of the location being patched. Also fix printf formats in debug code. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: 46732 Tested on: alpha (obrien), i386, sparc64
* 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.
* wi now needs wlansam2003-01-161-0/+1
| | | | Reviewed by: imp
* Merge all the various copies of vm_fault_quick() into a singledillon2003-01-161-17/+0
| | | | portable copy.
* Merge all the various copies of vmapbuf() and vunmapbuf() into a singledillon2003-01-151-74/+0
| | | | | | | | portable copy. Note that pmap_extract() must be used instead of pmap_kextract(). This is precursor work to a reorganization of vmapbuf() to close remaining user/kernel races (which can lead to a panic).
* Remove earlysetcpuclass() as it has been OBE.jhb2003-01-092-17/+0
| | | | Suggested by: bde
* Rework part of the previous processor name changes so that we readjhb2003-01-095-53/+28
| | | | | | | | 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)
* Consistently use spaces in between arguments to strcmp(). Whitespacejhb2003-01-081-3/+3
| | | | only.
* - Use cpu_exthigh instead of executing cpuid again to retrieve it for thejhb2003-01-081-36/+51
| | | | | | | | | | | | | | | | | print_AMD_foo() functions. - Add a brand name table for the brand index provided on Intel CPU's in %ebx after cpuid 1. - For Intel CPUs, if we don't get a processor name from the extended cpuid then use the brand index in cpuid_cpuinfo to pick a name from the brand table and copy that name into cpu_brand. - Replace the duplicated code to use the extended cpuid to replace cpu_model with the processor name in the AMD and Transmeta sections of printcpuinfo() with generic code that replaces cpu_model with cpu_brand if cpu_brand is not an empty string. We also trim leading spaces from cpu_brand prior to doing this since at least some processor names (notably those of Intel CPUs) have leading spaces in the name. - Give print_AMD_features() its own private regs[] array since printcpuinfo() doesn't use the one it has anymore.
* - Add a cpu_exthigh variable to hold the highest extended cpuid valuejhb2003-01-084-0/+52
| | | | | | | | | 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().
* Bah, get the test for more than one logical CPU right so we don't boguslyjhb2003-01-081-1/+1
| | | | | claim a CPU has HT support when it lists 0 or 1 logical CPU's per physical processor.
* Enumerate logical hyperthread CPUs manually if they aren't already listedjhb2003-01-083-0/+240
| | | | | | | | | | | | | | | | 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.
* If the boot processor supports hyperthreading and contains more than onejhb2003-01-081-0/+9
| | | | | logical CPU, display the number of logical CPUs per physical processor underneath the list of CPU features.
* Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid withjhb2003-01-084-0/+4
| | | | %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.
* Document bit 31 of the cpuid features word as PBE (Pending Break Enable).jhb2003-01-031-1/+1
|
OpenPOWER on IntegriCloud