summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/param.h
Commit message (Collapse)AuthorAgeFilesLines
* Give large kernel stack to the initial thread . Otherwise, ZFSkib2015-08-041-0/+5
| | | | | | | | overflows the stack during root mount in some configurations. Tested by: Fabian Keil <freebsd-listen@fabiankeil.de> (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()kib2015-07-021-0/+3
| | | | | | | | | | | | | macros on amd64 and i386. Move the definition to machine/param.h. kgdb defines INKERNEL() too, the conflict is resolved by renaming kgdb version to PINKERNEL(). On i386, correct the lowest kernel address. After the shared page was introduced, USRSTACK no longer points to the last user address + 1 [*] Submitted by: Oliver Pinter [*] Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Add config option PAE_TABLES for the i386 kernel. It switches pmap tokib2015-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | use PAE format for the page tables, but does not incur other consequences of the full PAE config. In particular, vm_paddr_t and bus_addr_t are left 32bit, and max supported memory is still limited by 4GB. The option allows to have nx permissions for memory mappings on i386 kernel, while keeping the usual i386 KBI and avoiding the kernel data sizing problems typical for the PAE config. Intel documented that the PAE format for page tables is available starting with the Pentium Pro, but it is possible that the plain Pentium CPUs have the required support (Appendix H). The goal is to enable the option and non-exec mappings on i386 for the GENERIC kernel. Anybody wanting a useful system on 486, have to reconfigure the modern i386 kernel anyway. Discussed with: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h inattilio2013-05-071-0/+4
| | | | | | | | | order to match the MAXCPU concept. The change should also be useful for consolidation and consistency. Sponsored by: EMC / Isilon storage division Obtained from: jeff Reviewed by: alc
* Remove redundant definitions of _ALIGN and _ALIGNBYTES.tijl2013-04-211-13/+2
|
* Fix the VM_BCACHE_SIZE_MAX definition on i386 to match the maximalkib2013-03-271-1/+4
| | | | | | | | | | | | | | | | buffer map size, auto-tuned on the 4GB machine. Having the maxbcache bigger than the buffer map causes the transient bio map sizing logic to assume that there is enough KVA to use approximately 90MB (buffer map is sized to 110MB, and maxbcache is 200MB). The increase in the KVA usage caused other big KVA consumers, like nvidia.ko, to fail the initialization. Change the definition for both PAE and non-PAE cases, since PAE is even more KVA-starved. Reported and tested by: David Wolfskill Discussed with: alc Sponsored by: The FreeBSD Foundation
* Parly revert r239255: reinstate a default maxswzone on i386, where KVA isdes2012-08-271-0/+14
| | | | scarce, but set it slightly higher so we can handle 8 GB of swap.
* As discussed on -current, remove the hardcoded default maxswzone.des2012-08-141-8/+0
| | | | MFC after: 3 weeks
* Add the possibility to specify from kernel configs MAXCPU value.attilio2011-07-191-0/+2
| | | | | | | | | | This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU. No MFC is previewed for this patch. Tested by: pluknet Approved by: re (kib)
* Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h tojhb2011-06-221-0/+1
| | | | | the x86 tree. The $PIR code is still only enabled on i386 and not amd64. While here, make the qpi(4) driver on conditional on 'device pci'.
* Add a new sysctl for reporting all of the supported page sizes.alc2009-09-181-0/+2
| | | | | Reviewed by: jhb MFC after: 3 weeks
* Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating anphk2009-09-081-6/+6
| | | | | architecture specific include file containing the _ALIGN* stuff which <sys/socket.h> needs.
* Cleanup ALIGNED_POINTER:sam2009-07-051-0/+7
| | | | | | | | | | | o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v) o define as "1" on amd64 and i386 where there is no restriction o make the type returned consistent with ALIGN o remove _ALIGNED_POINTER o make associated comments consistent Reviewed by: bde, imp, marcel Approved by: re (kensmith)
* Bump CACHE_LINE_SIZE to 128 for x86. Intel's manuals explicitly recommendjhb2009-05-181-1/+1
| | | | using 128 byte alignment for locks. (See IA-32 SDM Vol 3A 7.11.6.7)
* Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizingrwatson2009-04-201-2/+0
| | | | | | | | | | | | a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1] Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2] Suggested by: bde [1], jhb [2] MFC after: 2 weeks
* Add description and cautionary note regarding CACHE_LINE_SIZE.rwatson2009-04-191-0/+4
| | | | | MFC after: 2 weeks Suggested by: alc
* For each architecture, define CACHE_LINE_SHIFT and a derivedrwatson2009-04-191-0/+5
| | | | | | | | | | | | | CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available. Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems). MFC after: 2 weeks Discussed on: arch@
* Bump MAXCPU to 32 now that 32 CPU x86 systems exist.jhb2008-10-011-1/+1
| | | | | Tested by: rwatson, mdtansca Approved by: peter
* add NPGPTD_SHIFT for the nkpt calculationkmacy2008-09-251-0/+2
| | | | MFC after: 1 month
* When building a kernel module, define MAXCPU the same as SMP sojb2008-03-271-2/+2
| | | | that modules work with and without SMP.
* By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT intoimp2006-01-091-0/+3
| | | | | | | | param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __. Submitted by: bde, jhb, scottl, many others.
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withru2005-12-061-7/+0
| | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
* Remove UAREA_PAGES.das2004-11-201-1/+0
| | | | Reviewed by: arch@
* Turn PREEMPTION into a kernel option. Make sure that it's defined ifscottl2004-09-021-5/+0
| | | | | | FULL_PREEMPTION is defined. Add a runtime warning to ULE if PREEMPTION is enabled (code inspired by the PREEMPTION warning in kern_switch.c). This is a possible MT5 candidate.
* Give up trying to make preemption dependent on SCHED_4BSDjulian2004-09-011-4/+1
| | | | the list of breakages was getting too long
* Don't ask for this for modules. no modules need to know about preemption at ↵julian2004-09-011-1/+1
| | | | the moment
* Protect the PREEMPTION logic with #ifdef _KERNEL to fix the build.scottl2004-09-011-0/+2
|
* Only turn preemption for 4bsd.julian2004-09-011-0/+3
| | | | it's still poison for ULE.
* Give the 4bsd scheduler the ability to wake up idle processorsjulian2004-09-011-2/+0
| | | | | | when there is new work to be done. MFC after: 5 days
* Turn off PREEMPTION by default while it gets debugged. It's been causingscottl2004-08-011-0/+3
| | | | | 4 weeks of problems including deadlocks and instant panics. Note that the real bugs are likely in the scheduler.
* Implement preemption of kernel threads natively in the scheduler ratherjhb2004-07-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than as one-off hacks in various other parts of the kernel: - Add a function maybe_preempt() that is called from sched_add() to determine if a thread about to be added to a run queue should be preempted to directly. If it is not safe to preempt or if the new thread does not have a high enough priority, then the function returns false and sched_add() adds the thread to the run queue. If the thread should be preempted to but the current thread is in a nested critical section, then the flag TDF_OWEPREEMPT is set and the thread is added to the run queue. Otherwise, mi_switch() is called immediately and the thread is never added to the run queue since it is switch to directly. When exiting an outermost critical section, if TDF_OWEPREEMPT is set, then clear it and call mi_switch() to perform the deferred preemption. - Remove explicit preemption from ithread_schedule() as calling setrunqueue() now does all the correct work. This also removes the do_switch argument from ithread_schedule(). - Do not use the manual preemption code in mtx_unlock if the architecture supports native preemption. - Don't call mi_switch() in a loop during shutdown to give ithreads a chance to run if the architecture supports native preemption since the ithreads will just preempt DELAY(). - Don't call mi_switch() from the page zeroing idle thread for architectures that support native preemption as it is unnecessary. - Native preemption is enabled on the same archs that supported ithread preemption, namely alpha, i386, and amd64. This change should largely be a NOP for the default case as committed except that we will do fewer context switches in a few cases and will avoid the run queues completely when preempting. Approved by: scottl (with his re@ hat)
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Migrate the thread stack management functions from the machine-dependentalc2003-06-141-2/+1
| | | | | | | | | | | | | | | | to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms. Two details: 1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0. 2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab().
* - Add support for PAE and more than 4 gigs of ram on x86, dependent on thejake2003-03-301-0/+5
| | | | | | | | | | kernel opition 'options PAE'. This will only work with device drivers which either use busdma, or are able to handle 64 bit physical addresses. Thanks to Lanny Baron from FreeBSD Systems for the loan of a test machine with 6 gigs of ram. Sponsored by: DARPA, Network Associates Laboratories, FreeBSD Systems
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-251-6/+6
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* - Added macros NPGPTD, NBPTD, and NPDEPTD, for dealing with the size of thejake2003-02-231-1/+5
| | | | | | | | | 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
* Initiate deorbit burn for the i386-only a.out related support. Moves arepeter2002-09-171-7/+0
| | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha
* Reduce the maximum KVA reserved for swap meta structures from 70 to 32 MB.dillon2002-08-311-3/+5
| | | | | | Reduce the swap meta calculation by a factor of 2, it's still massive overkill. X-MFC after: immediately
* Move MI stuff out of MD param.h files.phk2002-05-141-48/+0
| | | | It can all still be overridden in the MD files should need suddenly arise.
* KSE Milestone 2julian2001-09-121-2/+5
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Optionize UPAGES for the i386. As part of this I split some of the lowpeter2001-08-251-0/+3
| | | | | | | | | | level implementation stuff out of machine/globaldata.h to avoid exposing UPAGES to lots more places. The end result is that we can double the kernel stack size with 'options UPAGES=4' etc. This is mainly being done for the benefit of a MFC to RELENG_4 at some point. -current doesn't really need this so much since each interrupt runs on its own kstack.
* Limit the amount of KVM reserved for the buffer cache and for swap-metadillon2001-08-201-0/+16
| | | | | | | | | | | | | | | information. The default limits only effect machines with > 1GB of ram and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and kern.maxbcache. This has the effect of leaving more KVM available for sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad adds memory to a machine and then sees the kernel panic on boot due to running out of KVM. Also change the default swap-meta auto-sizing calculation to allocate half of what it was previously allocating. The prior defaults were way too high. Note that we cannot afford to run out of swap-meta structures so we still stay somewhat conservative here.
* Fix CMSG and ALIGN macro usage.asmodai2000-11-081-13/+25
| | | | | | | | | | | | | | | | | | | Previously we had to include <machine/param.h> or <sys/param.h> bogusly due to the fact that <sys/socket.h> CMSG macros needed the ALIGN macro, which was defined in param.h. However, including param.h was a disaster for namespace pollution. This solution, as contributed by shin a while ago, fixes it elegantly by wrapping the definitions around some namespace pollution preventer definitions. This patch was long overdue. This should allow any network programmer to use <sys/socket.h> as before. PR: 19971, 20530 Submitted by: Martin Kaeske <MartinKaeske@lausitz.net> Mark Andrews <Mark.Andrews@nominum.com> Patch submitted by: shin Reviewed by: bde
* Implement write combining for crashdumps. This is useful whenps2000-10-171-0/+1
| | | | | | | | | | | | | | | | | | write caching is disabled on both SCSI and IDE disks where large memory dumps could take up to an hour to complete. Taking an i386 scsi based system with 512MB of ram and timing (in seconds) how long it took to complete a dump, the following results were obtained: Before: After: WCE TIME WCE TIME ------------------ ------------------ 1 141.820972 1 15.600111 0 797.265072 0 65.480465 Obtained from: Yahoo! Reviewed by: peter
* Cleanup comment in machine/param.h regarding mbuf-related sizes, and get ridbmilekic2000-10-081-7/+3
| | | | | of MCLOFSET, which does not appear to be used anywhere anymore, and if it is, it probably shouldn't be.
* Move MAXCPU from machine/smp.h to machine/param.h to fix breakageps2000-09-231-3/+3
| | | | | with !SMP kernels. Also, replace NCPUS with MAXCPU since they are redundant.
* Change the mbuf size from 128 -> 256. Increasing the mbuf header sizejlemon2000-03-291-1/+1
| | | | | | | | caused some headers not to fit in MHLEN any more. This matches the current size on the alpha, so it shouldn't cause problems. Problem observed by: Geoff Rehmet <geoff@is.co.za> Originally suggested by: shin
* Reclaim UPAGES_HOLE (8k) that was chopped out of process address space.peter1999-12-111-2/+0
| | | | | | | The UPAGES have not been there since Jan '96, but the hole was preserved for BSD/OS binary compatability. This has been fixed other ways (%ebx now has a pointer to PS_STRINGS), and the stack is nowhere near where it used to be so this hack isn't required anymore.
* Back out a portion of the last commit. DFLTPHYS and MAXPHYS cannotdillon1999-09-221-4/+0
| | | | | | | | | be set by a kernel conf option due to the struct buf structural dependancy (sizing of b_pages[]) creating a conflict with modules (which are not compiled with kernel config options overrides). We'll be able to sysctl these two later on when the buffer subsystem is revamped.
* Change default block size for user VBLK device access from 2K to PAGE_SIZEdillon1999-09-221-1/+7
| | | | | | (4K on an i386, 8K on an alpha). Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
OpenPOWER on IntegriCloud