summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove an unneeded extern declaration of cp_time.jhb2000-09-081-2/+0
|
* Really fix USER_LDT. (Don't use currentldt as an L-value.)jake2000-09-081-1/+1
|
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-071-26/+62
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Clean up some low level bootstrap code:peter2000-08-111-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks. With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely). There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that. The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
* Don't skip IOAPIC id conflict detection when only one pci bus is present.tegge2000-08-101-6/+4
| | | | | PR: 20312 Reviewed by: Steve Roome <steve@sse0691.bri.hp.com>
* Be more verbose when changing APIC ID on an IO APIC.tegge2000-08-061-2/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allow cpu entries in the MP table to contain APIC IDs out of range. Don't write outside array boundaries if an IO APIC entry in the MP table contains an APIC ID out of range. Assign APIC IDs for all IO APICs according to section 3.6.6 in the Intel MP spec: - If the current APIC ID on an IO APIC doesn't conflict with other IO APICs or CPUs, that APIC ID should be used. The copy of the MP table must be updated if the corresponding APIC ID in the MP table is different. - If the current APIC ID was in conflict with other units, the corresponding APIC ID specified in the MP table is checked for conflict. - If a conflict is still found then fall back to using a new unique ID. The copy of the MP table must be updated. - IDs out of range is considered to be in conflict. During these operations, the IO_TO_ID array cannot be used, since any conflict would have caused information loss. The array is then corrected, since all APIC ID conflicts should have been resolved. PR: 20312, 18919
* Further fixes for multiple-IO-APIC systems from Tor Egge:msmith2000-05-311-7/+2
| | | | | | | | | | | | | | | | | | | | | | | Further experimentation showed that some Dell 2450 machines with the prevention kludge installed still got T_RESERVED traps. CPU interrupt vector 0x7A was observed to be triggered. This might have been the bitwise OR of two different vectors sent from each of the IOAPICs at the same time. IOAPIC #0: 0x68 --> irq 8: RTC timer interrupt IOAPIC #1: 0x32 --> irq 18: scsi host adapter or network interface ---- 0x7a --> T_RESERVED Both IOAPICs had ID 0. Appendix B.3 in the MP spec indicates that the operating system is responsible for assigning unique IDs to the IOAPICs. The enclosed patch programs the IOAPIC IDs according to the IOAPIC entries in the MP table. Submitted by: tegge
* Commit major SMP cleanups and move the BGL (big giant lock) in thedillon2000-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syscall path inward. A system call may select whether it needs the MP lock or not (the default being that it does need it). A great deal of conditional SMP code for various deadended experiments has been removed. 'cil' and 'cml' have been removed entirely, and the locking around the cpl has been removed. The conditional separately-locked fast-interrupt code has been removed, meaning that interrupts must hold the CPL now (but they pretty much had to anyway). Another reason for doing this is that the original separate-lock for interrupts just doesn't apply to the interrupt thread mechanism being contemplated. Modifications to the cpl may now ONLY occur while holding the MP lock. For example, if an otherwise MP safe syscall needs to mess with the cpl, it must hold the MP lock for the duration and must (as usual) save/restore the cpl in a nested fashion. This is precursor work for the real meat coming later: avoiding having to hold the MP lock for common syscalls and I/O's and interrupt threads. It is expected that the spl mechanisms and new interrupt threading mechanisms will be able to run in tandem, allowing a slow piecemeal transition to occur. This patch should result in a moderate performance improvement due to the considerable amount of code that has been removed from the critical path, especially the simplification of the spl*() calls. The real performance gains will come later. Approved by: jkh Reviewed by: current, bde (exception.s) Some work taken from: luoqi's patch
* Allow SMP systems with an MCA bus to work properly.mdodd2000-01-131-4/+6
| | | | Reviewed by: peter
* Allow SMP && NCPU == 1 to work. From now on, there's no restriction on theluoqi2000-01-071-2/+4
| | | | | value of NCPU relative to the number of cpus physically present, the actual number of cpus utilized will be the smaller of the two.
* ISA device drivers use the ISA source interrupt number in locations wheretegge2000-01-041-6/+64
| | | | | | | | | | | | | | the low level interrupt handler number should be used. Change setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X}) for any ISA interrupt X mentioned in the MP table. Remove an assumption in the driver for the system clock (clock.c) that interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y is handled by low level interrupt handler Y (Xintr${Y}) but don't assume that low level interrupt handler 0 (Xintr0) is used. Don't allocate two low level interrupt handlers for the system clock. Reviewed by: NOKUBI Hirotaka <hnokubi@yyy.or.jp>
* Moved scheduling-related code to kern_synch.c so that it is easier to fixbde1999-11-271-8/+1
| | | | | | | | and extend. The new function containing the code is named schedclock() as in NetBSD, but it has slightly different semantics (it already handles incrementation of p->p_cpticks, and it should handle any calling frequency). Agreed with in principle by: dufault
* Eliminate remaining part of incorrect PCI bus numbering sanity check on ↵tegge1999-10-151-7/+0
| | | | systems with more than one PCI bus.
* Zap unneeded #includespeter1999-10-111-2/+0
| | | | Submitted by: phk
* Set up FPU state on the AP.peter1999-09-051-0/+4
| | | | Tested by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-3/+2
| | | | may not compile, I can't test it.
* Implement an all-CPU shootdown-style rendezvous facility. This allowsmsmith1999-07-201-1/+85
| | | | | | | | | | | the caller to specify a function to be guarded between an entry and exit barrier, as well as pre- and post-barrier functions. The primary use for this function is synchronised update of per-cpu private data. The implementation is almost (but not quite) MI; with a better mechanism for masking per-CPU interrupts it could probably be hoisted. Reviewed by: peter (partially)
* Changes in the way that the APs are started appears to have removed themsmith1999-06-231-11/+3
| | | | | | | problem with having more CPUs than NCPU. PR: kern/4255 Submitted by: peter
* Do not setup 4M pdir until all APs are up.luoqi1999-06-231-8/+9
|
* Remove an unnecessary panic when sparse PCI bus numbering is encountered.msmith1999-06-221-3/+1
| | | | | | This is found eg. on some Compaq Proliant systems. Submitted by: peter
* Unifdef VM86.jlemon1999-06-011-4/+1
| | | | Reviewed by: silence on on -current
* Unbreak VESA on SMP.luoqi1999-05-121-2/+3
|
* Make sure the mem_range_AP_init() prototype is seen where it's needed, andpeter1999-05-081-1/+3
| | | | #ifdef SMP around it for fun.
* Add a hook that can be called to initialise a slave processor's memorymsmith1999-04-301-1/+4
| | | | | | | | | | range attributes after they have been extracted from the master. Hook up the i686 MP code to do this for each AP. Be more careful about printing the default memory type for the i686. Suggestions from: luoqi
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-113/+54
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* Backout early start of APs since it caused some machines to hang.tegge1999-04-131-4/+1
|
* Add prototype for wait_ap().tegge1999-04-111-1/+4
|
* Let BSP wait until all APs are initialized.tegge1999-04-101-1/+4
|
* Disable the mtrr copy calls, it doesn't work with the i686_mem.c stuff.peter1999-04-071-1/+7
| | | | This should make it compile/link again.
* The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpubde1999-03-051-3/+3
| | | | | | numbers as chars or use bogus casts in an attempt to unmisrepresnt them. In top, don't assume that 0xff is the only negative cpu number when cpu numbers are (mis)represented.
* Don't call assign_apic_irq with a value for irq that is out of range.tegge1999-02-261-2/+2
|
* Introduce machine-dependent macro pgtok() to convert page count to numberluoqi1999-02-191-5/+5
| | | | | of kilobytes. Its definition for each architecture could be optimized to avoid potential numerical overflows.
* Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). Thisluoqi1999-02-191-3/+2
| | | | | | | is the preparation step for moving pmap storage out of vmspace proper. Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* Make more messages conditional on bootverbosejkh1999-01-201-3/+5
|
* Silence warnings.eivind1999-01-121-3/+3
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-2/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* Attempt to handle interrupts delivered to all IO APICs by using the firsttegge1998-11-261-2/+17
| | | | IO APIC with a sufficient number of pins.
* Staticize.eivind1998-11-261-3/+3
|
* mp_machdep.c: Set a vector to boot code (PC-98).kato1998-10-101-4/+4
| | | | locore.s: Tell the bios to warmboot next time (PC-98).
* PC-98 doesn't have CMOS ram.kato1998-10-101-2/+8
|
* BIOS ROM base address is 0xe8000 on PC-98.kato1998-10-081-1/+6
|
* Maintain a mapping from irq number to (ioapic number, int pin) tuple,tegge1998-09-061-14/+115
| | | | | | | | | | | | and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
* Fixed printf format errors. Only one left in LINT on i386's.bde1998-08-241-2/+2
|
* Presently there is only one `currentldt' variable for all cpusmsmith1998-08-181-1/+5
| | | | | | | | | | | | in a SMP system. Unexpected things could happen if each cpu has a different ldt setting and one cpu tries to use value of currentldt set by another cpu. The fix is to move currentldt to the per-cpu area. It includes patches I filed in PR i386/6219 which are also user ldt related. PR: i386/7591, i386/6219 Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* pmap.c:bde1998-08-161-4/+4
| | | | | | | | | | | | | | | | | Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to (uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's to (u_long) just to do arithmetic on them. mp_machdep.c: Cast pointers to (uintptr_t) instead of to (u_long). Don't forget to cast pointers to (void *) first or to recover from integral possible integral promotions, although this is too much work for machine-dependent code. vm code generally avoids warnings for pointer vs long size mismatches by using vm_offset_t to represent pointers; pmap.c often uses plain `unsigned int' instead of vm_offset_t and didn't use u_long elsewhere, but this style was messed up by code apparently imported from mp_machdep.c.
* Add forwarding of roundrobin to other cpus. This gives a more regulartegge1998-05-171-10/+48
| | | | | | | | | | | update of cpu usage as shown by top when one process is cpu bound (no system calls) while the system is otherwise idle (except for top). Don't attempt to switch to the BSP in boot(). If the system was idle when an interrupt caused a panic, this won't work. Instead, switch to the BSP in cpu_reset. Remove some spurious forward_statclock/forward_hardclock warnings.
* For SMP, use prv_PPAGE1/prv_PMAP1 instead of PADDR1/PMAP1.tegge1998-05-171-1/+3
| | | | | get_ptbase and pmap_pte_quick no longer generates IPIs. This should reduce the number of IPIs during heavy paging.
* Attempt to set write combining mode for graphics devices.dyson1998-05-111-59/+5
|
OpenPOWER on IntegriCloud