Commit Graph

104 Commits

Author SHA1 Message Date
christos
1dc335c017 SA_SIGINFO changes. 2003-09-06 22:03:09 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
drochner
31f515916f -make cpu_feature unsigned, just like ci_feature_flags
-clean up duplicate declaration of cpu_info_primary
2003-06-26 16:41:32 +00:00
kristerw
5c192de38a Use __asm instead of asm, to make lint happy. 2003-05-20 22:53:35 +00:00
fvdl
4b293b5851 Share some common cache info cpuid code between i386 and x86_64. 2003-04-25 21:54:29 +00:00
fvdl
93d2b9ee12 Add some underscores in curcpu() to avoid a -Wshadow. 2003-03-18 22:29:58 +00:00
fvdl
a3b7772adf Move the CPU identification out of machdep.c into a seperate file. 2003-03-01 16:37:51 +00:00
fvdl
a33bcafdf1 Redirect some includes to x86/foo.h 2003-02-26 21:28:59 +00:00
nakayama
64eb1178ab Share i386/tsc_microtime.c with alpha and sparc64 as kern_microtime.c.
(approved by martin)
2003-02-05 12:18:01 +00:00
thorpej
a50e3bc1cb Merge the nathanw_sa branch. 2003-01-17 22:58:53 +00:00
fvdl
c2ff6d5b83 Add various external declarations to accomodate ACPI MP probing as an
alternate method to MPBIOS probing. Move some stuff common to the two
methods into mpconfig.h
2003-01-07 18:48:44 +00:00
jdolecek
30f7194bc4 use the __HAVE_CPU_MAXPROC hook to limit kern.maxproc to number
of available GDT slots
add code in init386() to force maxproc to be maximum cpu_maxproc()

this fixes port-i386/1635 by John Kohl
2002-12-16 18:31:08 +00:00
junyoung
6e278393ba Don't pollute struct cpu_info with throwaway variables. 2002-12-06 14:47:07 +00:00
junyoung
281fa073dc Display the extended feature flags with non-Intel processors rather than
the standard flags. See also PR#19163.

Before:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>

After:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features c3cbf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features c3cbf9ff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMXX,MMX>
cpu0: features c3cbf9ff<FXSR,SSE,3DNOW2,3DNOW>

While I'm here, amd_cpuid_cpu_cacheinfo() is an info function rather
than a probe function.
2002-12-06 02:38:25 +00:00
fvdl
f91cba76ea Add ci_apicid field. 2002-11-28 21:43:55 +00:00
fvdl
ae4b76c8d3 New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.
2002-11-22 15:23:35 +00:00
perry
1547f39c5a /*CONTCOND*/ a while (0) macro 2002-11-02 07:15:07 +00:00
fvdl
d1cbc91464 Remove ci_lapic_ints from struct cpu_info again, it isn't needed anymore. 2002-10-06 20:40:27 +00:00
fvdl
be146319cd Keep size of struct cpu_info independent of DIAGNOSTIC/LOCKDEBUG
(was done in rev. 1.81, got lost in the MP merge).
2002-10-06 18:31:21 +00:00
fvdl
85eaacd06e Add per-CPU local apic redir table (2 pointers). 2002-10-06 14:28:17 +00:00
fvdl
a2e301721c cpu_swapin now exists, so remove the empty define. 2002-10-06 12:37:35 +00:00
fvdl
df3dd8684d Add mask for TLB IPI rendezvous, and stackpointers + TSS structures
for TSS gates per CPU.

XXX struct cpu_info is getting to be a bit large
2002-10-05 21:22:31 +00:00
fvdl
26ab868e68 Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
2002-10-01 12:56:36 +00:00
jdolecek
f4e3c06369 always include ci_s*_locks in struct cpu_info, so that the size doesn't depend
on DIAGNOSTIC/LOCKDEBUG settings
2002-07-09 22:28:30 +00:00
matt
075e474458 Eliminate commons. 2002-05-12 23:16:52 +00:00
mycroft
bfea3f39cb Wire CLKF_BASEPRI() to 0 on this platform. (See tech-kern.) 2002-05-08 18:45:49 +00:00
christos
d47da1254f Fix comments. 2002-01-31 17:41:38 +00:00
christos
e59d5895b1 add a new function to the cpu struct's that can be called to print extra
cpu information after initialization.
2001-12-27 15:24:34 +00:00
christos
e36e7f175a Add transmeta crusoe cpu support from toshi. 2001-11-17 08:21:43 +00:00
thorpej
f0449fd933 - Rename cpu_use_fxsave to i386_use_fxsave.
- If we detect SSE/SSE2 support in the CPU, enable SSE exceptions
  and set i386_has_{sse,sse2} as appropriate.
- Expose i386_use_fxsave and i386_has_{sse,sse2} through sysctl
  as machdep.{osfsxr,sse,sse2}.
2001-08-02 22:04:28 +00:00
thorpej
99a7f640fe Add support for saving/restoring SSE/SSE2 state using FXSAVE/FXRSTOR.
Reviewed by Frank.
2001-08-02 21:04:43 +00:00
thorpej
4b584bf5bb Add several more Intel cache info entries, and fetch the CFLUSH
line size if we have the CFLUSH insn.
2001-08-01 19:50:48 +00:00
thorpej
8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
mrg
67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
thorpej
5c15afd718 Rearrange the cache info fetching code some more, and add support
for fetching cache info for AMD processors.
2001-05-03 00:35:37 +00:00
thorpej
f89ed957f1 - Keep cache/tlb info in the cpu_info structure.
- Add "associativity" to the cache_info structure.
- Add a (*cpu_cacheinfo)() function pointer, like we have a
  (*cpu_setup)() function pointer.  Cache info in the `cpuid'
  is vendor-specific.
2001-05-02 21:07:01 +00:00
nathanw
3862a24d20 Remove prototype for long-defunct i386_user_cleanup().
Remove duplicate prototype for i386_{set,get}_ldt() from sys_machdep.c.

Change i386_iopl() and i386_{set,get}_{ldt,ioperm}() to take a second
argument of "void *" instead of "char *", for consistency with other syscalls.
2001-02-14 01:29:45 +00:00
mycroft
66610a4779 Introduce PROC_PC(), which is used to get a process's user PC. If this is
defined, call addupc_intr() directly from statclock() in the system time case,
using the same P_OWEUPC path if the copyin/copyout fails.
Use this in i386 to remove profiling code from the normal userret() path.
2000-12-10 19:29:30 +00:00
jdolecek
97669de104 make i386_nocpuid_cpus[] and i386_cpuid_cpus[] const - this pushes
another ~1.4KB to text section
2000-11-16 17:00:17 +00:00
thorpej
4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
mycroft
43a543fa88 Implement CLKF_INTR(), to count interrupt time separately. 2000-06-04 21:27:38 +00:00
thorpej
a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
thorpej
8c5710a861 - Declare biosbasemem and biosextmem in <machine/cpu.h>, don't extern
them everywhere they're used.
- Avoid integer overflow when converting bios{base,ext}mem (in units of
  kilobytes) to bytes.
2000-04-21 18:37:20 +00:00
simonb
9308187dbf Remove redundant decl of consinit() - it's in <sys/systm.h>.
Remove duplicate definition of delay() - we only need one in this file.
2000-03-29 03:54:03 +00:00
thorpej
fd21635b22 Extern cpu_id and cpu_vendor[] here. 2000-03-28 19:16:05 +00:00
drochner
799634df70 next step in getting machdep.c maintainable - put bus_space related
stuff into a separate file
2000-01-26 18:47:59 +00:00
drochner
b7b6c4bb4f machdep.c is becoming an unmaintainable mess
put console initialisation into a separate file
1999-12-21 12:34:11 +00:00
enami
de37487d49 - Export initrtclock().
- Call it from apm_resume().

This fixes timer problem on some laptop after hybernation (PR#4808).
Reviewd by: fvdl@netbsd.org
1999-11-06 01:14:00 +00:00
fvdl
a4e89ca2a1 Define CPU_FPU_PRESENT sysctl value. 1999-10-06 20:04:53 +00:00
thorpej
28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00