summaryrefslogtreecommitdiff
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Initialize eflags in fake frame to default value rather than random one.David Xu2003-03-081-0/+1
| | | | | | | | | | The random value sometimes causes macro CLKF_USERMODE to return true because PSL_VM bit is set and really shoudn't be, this causes statclock() to execute in wrong path, and further breaks KSE code and kernel crashes when executing threaded program. Notes: svn path=/head/; revision=111975
* Instrument sysarch() MD privileged I/O access interfaces with a MACRobert Watson2003-03-061-0/+6
| | | | | | | | | | | | | | check, mac_check_sysarch_ioperm(), permitting MAC security policy modules to control access to these interfaces. Currently, they protect access to IOPL on i386, and setting HAE on Alpha. Additional checks might be required on other platforms to prevent bypass of kernel security protections by unauthorized processes. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111939
* Replace calls to WITNESS_SLEEP() and witness_list() with equivalent callsJohn Baldwin2003-03-041-7/+2
| | | | | | | to WITNESS_WARN(). Notes: svn path=/head/; revision=111883
* Wrap the hyperthreading support code with the HTT kernel option.John Baldwin2003-03-043-0/+63
| | | | | | | | | Hyperthreading support is now off unless the HTT option is added. MFC-after: 3 days Notes: svn path=/head/; revision=111878
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-032-26/+16
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Expand some #ifdef's to fix I386_CPU compile.John Baldwin2003-02-271-1/+3
| | | | | | | Reported by: Andy Farkas <andyf@speednet.com.au> Notes: svn path=/head/; revision=111638
* Remove some long unused declarations. (For example, the PV flags have notAlan Cox2003-02-271-6/+0
| | | | | | | been used since revision 1.8, roughly nine years ago.) Notes: svn path=/head/; revision=111636
* Change the process flags P_KSES to be P_THREADED.Julian Elischer2003-02-273-3/+3
| | | | | | | This is just a cosmetic change but I've been meaning to do it for about a year. Notes: svn path=/head/; revision=111585
* Implemented "nooption" and "nomakeoption" config(8) tokens.Ruslan Ermilov2003-02-261-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed memory leak in the "nodevice" option implementation. Use these instead of sed(1) in MD NOTES. Use a single makefile (sys/conf/makeLINT.mk) to generate LINT for all architectures. (Previous versions missed the LINT dependency on Makefile, and i386 version also missed the dependency on ${NOTES}.) Fixed bugs in the previous NOTES conversion using the "nodevice" token and sed(1): - i386 LINT lost "device pst". - pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD options, and got needless DPT_* options. - Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV to sparc64 LINT so that it has a chance to config(8). This basically returns us to where we were before. Notes: svn path=/head/; revision=111582
* Better to not know anything about KSE.David Xu2003-02-261-2/+0
| | | | Notes: svn path=/head/; revision=111535
* Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.Maxime Henrion2003-02-263-3/+3
| | | | | | | | It was bogusly set to 64 * 1024 or 128 * 1024 because it was bogusly reused in the BUS_DMAMAP_NSEGS definition. Notes: svn path=/head/; revision=111524
* Move most everything back to a MI NOTES, and use "nodevice" in MD NOTESDavid E. O'Brien2003-02-251-2/+3
| | | | | | | | | | Where needed. Use 'sed' for now in place of "nooptions". Add a sparc64 MD NOTES. Reviewed by: arch@ Notes: svn path=/head/; revision=111500
* - Added inlines pmap_is_current, pmap_is_alternate and pmap_set_alternateJake Burkholder2003-02-252-26/+41
| | | | | | | | | | | for testing and setting the current and alternate address spaces. - Changed PTDpde and APTDpde to arrays to support multiple page directory pages. ponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111493
* Remove an unsafe KASSERT.David Xu2003-02-251-1/+0
| | | | Notes: svn path=/head/; revision=111477
* Cleanup of the d_mmap_t interface.Maxime Henrion2003-02-252-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386 Notes: svn path=/head/; revision=111462
* - Removed UMAXPTDI and UMAXPTEOFF.Jake Burkholder2003-02-242-3/+1
| | | | | | | | | | | | - Changed VM_MAXUSER_ADDRESS to be defined in terms of PTDPTDI. In order for assumptions about the recursive page table map to work it must be the base of the recursive map. Any pte offset that's not NPTEPG will break these assumptions. Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111440
* The mpbiosreason variable does not used for pc98.Yoshihiro Takahashi2003-02-243-0/+6
| | | | Notes: svn path=/head/; revision=111428
* Use the direct mapping of IdlePTD setup in locore for proc0's page directory,Jake Burkholder2003-02-241-8/+2
| | | | | | | | | | | instead of allocating another page of kva and mapping it in again. This was likely an oversight in revision 1.174 (cut and paste from pmap_pinit). Discussed with: peter, tegge Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111385
* Allow machines with one CPU and a valid mp table to boot an SMP kernel.Tor Egge2003-02-233-0/+6
| | | | Notes: svn path=/head/; revision=111382
* Previous commit missed a 1 that should be NGPTD, and an NPDEPG that shouldJake Burkholder2003-02-234-3/+4
| | | | | | | | | be NPDEPTD. Grumble. Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111372
* - Added macros NPGPTD, NBPTD, and NPDEPTD, for dealing with the size of theJake Burkholder2003-02-236-15/+17
| | | | | | | | | | | | page directory. - Use these instead of the magic constants 1 or PAGE_SIZE where appropriate. There are still numerous assumptions that the page directory is exactly 1 page. Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111363
* - Added macros PDESHIFT and PTESHIFT, use these instead of magic constantsJake Burkholder2003-02-235-10/+14
| | | | | | | | | | in locore. - Removed the macros PTESIZE and PDESIZE, use sizeof instead in C. Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111299
* The root of the splay tree maintained within the pm_pteobj always refersAlan Cox2003-02-222-26/+9
| | | | | | | | to the last accessed pte page. Thus, the pm_ptphint is redundant and can be removed. Notes: svn path=/head/; revision=111272
* unsigned -> pt_entry_t.Jake Burkholder2003-02-221-4/+4
| | | | | | | Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=111271
* Fix fumble in rev 1.525. pmap_kenter()'s second argument is a physicalPeter Wemm2003-02-201-1/+1
| | | | | | | | | address, not a page index. Laughed at by: jake Notes: svn path=/head/; revision=111167
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-199-24/+24
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Initiate de-orbit burn for USE_PCI_BIOS_FOR_READ_WRITE. This has beenPeter Wemm2003-02-183-149/+28
| | | | | | | | | | | | | | | | | #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 Notes: svn path=/head/; revision=111068
* Move a bunch of flags from the KSE to the thread.Julian Elischer2003-02-176-11/+7
| | | | | | | | | | | I was in two minds as to where to put them in the first case.. I should have listenned to the other mind. Submitted by: parts by davidxu@ Reviewed by: jeff@ mini@ Notes: svn path=/head/; revision=111032
* - Split the struct kse into struct upcall and struct kse. struct kse willJeff Roberson2003-02-171-6/+4
| | | | | | | | | | soon be visible only to schedulers. This greatly simplifies much the KSE code. Submitted by: davidxu Notes: svn path=/head/; revision=111028
* - Move ke_sticks, ke_iticks, ke_uticks, ke_uu, ke_su, and ke_iu back intoJeff Roberson2003-02-171-2/+2
| | | | | | | | | | the proc. These counters are only examined through calcru. Submitted by: davidxu Tested on: x86, alpha, UP/SMP Notes: svn path=/head/; revision=111024
* Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDBPoul-Henning Kamp2003-02-161-5/+5
| | | | | | | will not have a dev_t. Notes: svn path=/head/; revision=111017
* Remove #include <sys/dkstat.h>Poul-Henning Kamp2003-02-164-4/+0
| | | | Notes: svn path=/head/; revision=111002
* Assert that the kernel map's system mutex is held in pmap_growkernel().Alan Cox2003-02-151-0/+1
| | | | Notes: svn path=/head/; revision=110955
* - Add a mutex for synchronizing the use of CMAP/CADDR 1 and 2.Alan Cox2003-02-141-9/+12
| | | | | | | | - Eliminate small style differences between pmap_zero_page(), pmap_copy_page(), etc. Notes: svn path=/head/; revision=110845
* Fix the style of the SCHED_4BSD commit.David E. O'Brien2003-02-131-1/+1
| | | | Notes: svn path=/head/; revision=110831
* Oops. I mis-remembered about the P4 problems. It was 5.0-DP2 thatPeter Wemm2003-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. Notes: svn path=/head/; revision=110781
* Turn of PG_PS and PG_G for Pentium-4 cpus at boot time. This is soPeter Wemm2003-02-131-2/+30
| | | | | | | that we can stop turning off PG_G and PG_PS globally for releases. Notes: svn path=/head/; revision=110780
* Remove kptobj. Instead, use VM_ALLOC_NOOBJ.Alan Cox2003-02-121-9/+2
| | | | Notes: svn path=/head/; revision=110747
* Switch to using the TSC code in i386/i386/tsc.c.Poul-Henning Kamp2003-02-111-114/+1
| | | | Notes: svn path=/head/; revision=110687
* Implement fpclassify():Mike Barcroft2003-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) Notes: svn path=/head/; revision=110566
* MF alphaAlan Cox2003-02-081-0/+12
| | | | | | | - Synchronize access to the allpmaps list with a mutex. Notes: svn path=/head/; revision=110532
* Commit some cosmetic changes I had laying around and almost includedPeter Wemm2003-02-071-5/+2
| | | | | | | with another commit. Unwrap a line. Unexpand a pmap_kenter(). Notes: svn path=/head/; revision=110480
* This file has no longer any content from the original Berkeley file soPoul-Henning Kamp2003-02-051-25/+3
| | | | | | | | | replace the UCB copyright with a FreeBSD 2 clause thing. Remove some no longer relevant comments. Notes: svn path=/head/; revision=110379
* i386/i386/tsc.c was repo-copied from i386/isa/clock.c.Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=110370
* Make get_cyclecount() use binuptime() when no tsc is available: it is cheaper.Poul-Henning Kamp2003-02-051-4/+4
| | | | Notes: svn path=/head/; revision=110368
* Fix a problem in bus_dmamap_load_{mbuf,uio} when the first mbuf or the firstHartmut Brandt2003-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) Notes: svn path=/head/; revision=110335
* Split the global timezone structure into two integer fields toPoul-Henning Kamp2003-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 Notes: svn path=/head/; revision=110299
* Split statclock into statclock and profclock, and made the method for drivingJake Burkholder2003-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 Notes: svn path=/head/; revision=110296
* - Make allpmaps static.Alan Cox2003-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(). Notes: svn path=/head/; revision=110254
* Consolidate MIN/MAX macros into one place (param.h).Alfred Perlstein2003-02-021-2/+0
| | | | | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=110232