summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Move UPCALL related data structure out of kse, introduce a newdavidxu2003-01-265-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-0/+3
| | | | | of the scheduler. - Add SCHED_4BSD as the scheduler for all kernel config files in cvs.
* 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.
* Now that TPR isn't bogusly raised at boot, there is no need to clearpeter2003-01-231-8/+0
| | | | it at context switch.
* Dont raise the TPR register at initialization time. It only causespeter2003-01-231-2/+0
| | | | problems and we only ever clear it.
* - 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-227-9/+9
| | | | | | | 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
|
* Needs wlan for wi.imp2003-01-211-0/+1
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-2127-49/+49
| | | | 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
* Fix typo in comment: inlcude -> include.olgeni2003-01-201-1/+1
|
* 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.
* - Removed unecesary code.mdodd2003-01-186-110/+96
| | | | | - Correct smapi32_new() asm (still doesn't work.) - Attach to mainboard not isa.
* A driver for the System Management Application Programmdodd2003-01-179-0/+1183
| | | | | | | | 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.
* 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).
* Add machdep.elan_freq sysctl which can be used to set the CPU clockphk2003-01-152-3/+92
| | | | | | | | | | | frequency in Hz. The default is still 33.333 MHz. Please notice that the number is round to a multiple of four internally so it may not read back exactly the same as written. Add compile time ELAN_XTAL option to override the 33.333 MHz default. Add compile time ELAN_PPS option to enable code for high precision (250 nanoseconds) timestamping of external signals.
* - Add inline functions for {ll,l,}abs() to libkern.mdodd2003-01-151-11/+0
| | | | - Remove hand rolled abs() functions.
* Bow to the whining masses and change a union back into void *. Retaindillon2003-01-132-3/+3
| | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
* Change struct file f_data to un_data, a union of the correct structdillon2003-01-122-3/+3
| | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
* 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-094-29/+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-083-0/+28
| | | | | | | | | 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-083-0/+3
| | | | %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
|
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-017-10/+10
| | | | especially in troff files.
* Return an error when r/w is requested on an unsupported device instead ofnjl2002-12-311-0/+3
| | | | | | | looping. Submitted by: Sean Kelly <smkelly@zombie.org> Pointed out by: bde
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Change the ident so people know a kernel built with this has SMP support.obrien2002-12-301-0/+2
|
* Sync with GENERIC rev 1.371.obrien2002-12-301-2/+10
|
* Using our new wonderful include directive, save our x86 SMP users fromobrien2002-12-301-0/+10
| | | | | having to edit GENERIC to build a useful kernel. This also opens the possibility of including an SMP kernel in the release.
* Add the if_bge driver. I can't find any reason why it's not here, and it'sscottl2002-12-281-0/+1
| | | | pretty common on Dell servers and other high-end boxes.
* Add code to ddb to allow backtracing an arbitrary thread.julian2002-12-281-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | (show thread {address}) Remove the IDLE kse state and replace it with a change in the way threads sahre KSEs. Every KSE now has a thread, which is considered its "owner" however a KSE may also be lent to other threads in the same group to allow completion of in-kernel work. n this case the owner remains the same and the KSE will revert to the owner when the other work has been completed. All creations of upcalls etc. is now done from kse_reassign() which in turn is called from mi_switch or thread_exit(). This means that special code can be removed from msleep() and cv_wait(). kse_release() does not leave a KSE with no thread any more but converts the existing thread into teh KSE's owner, and sets it up for doing an upcall. It is just inhibitted from being scheduled until there is some reason to do an upcall. Remove all trace of the kse_idle queue since it is no-longer needed. "Idle" KSEs are now on the loanable queue.
* Assert that the page queues lock is held in pmap_testbit().alc2002-12-281-1/+1
|
* Set %bx register instead of %di register, see vbe3.0, page 45.davidxu2002-12-261-1/+1
|
* - Hold the page queues lock around calls to vm_page_wakeup() andalc2002-12-241-2/+8
| | | | vm_page_flag_clear().
* Outdent the string rather than use concatenation.phk2002-12-231-2/+2
|
* MB_LEN_MAX is not MD, move it to the MI limits.h.tjr2002-12-222-2/+0
|
* Export the physical address of the RSDP to userland by meansmarcel2002-12-181-11/+29
| | | | | | | | | | of the `machdep.acpi_root' sysctl. This is required on ia64 because the root pointer hardly ever, if at all, lives in the first MB of memory and also because scanning the first MB of memory can cause machine checks. This provides a save and reliable way for ACPI tools to work with the tables if ACPI support is present in the kernel. On ia64 ACPI is non-optional.
* Back out 1.19 to rethink approachnjl2002-12-171-2/+2
| | | | Requested by: julian@
OpenPOWER on IntegriCloud