summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/include/cpu.h
AgeCommit message (Collapse)Author
2010-10-24Move build_trampoline() and setregs() to a common location for all mips ports.Miod Vallat
2010-10-02Added octeon specific cop0 registers. ok miod@Takuya ASADA
2010-09-28Implement a per-cpu held mutex counter if DIAGNOSTIC on all non-x86 platforms,Miod Vallat
to complete matthew@'s commit of a few days ago, and drop __HAVE_CPU_MUTEX_LEVEL define. With help from, and ok deraadt@.
2010-09-21Replace the old floating point completion code with a C interface to theMiod Vallat
MI softfloat code, implementing all MIPS IV specified floating point operations. Tested on R5000, R10000, R14000 and Loongson2F.
2010-09-20cache operations for octeon. ok miod@Takuya ASADA
2010-09-17Protect a few more defines with _KERNEL checks, and also allow some of themMiod Vallat
to be visible if _STANDALONE. This will eventually be used by the upcoming new-and-improved loongson bootblocks (in the works).
2010-09-13Added OCTEON in cpu type. ok miod@Takuya ASADA
2010-09-12Stricter types in MipsEmulateBranch(), and related cleanups.Miod Vallat
No functional change.
2010-09-11move machine dependent GET_CPU_INFO(), getcurcpu(), setcurcpu() to arch/sgi. ↵Takuya ASADA
ok miod@
2010-08-30ddbcpu for sgi. ok miod@Takuya ASADA
2010-04-28Storeing current cpu_info address into LLAddr register, for curcpu().Takuya ASADA
Instead of previous implementation, we won't use physical cpuid to fetch curcpu(). This requires to implement IP27/35 SMP. Implemented getcurcpu() and setcurcpu() for it, smp_malloc() renamed alloc_contiguous_pages() because now it only allocate by page. ok miod@
2010-02-28Pass L2 cache size in struct cpu_hwinfo, so that bootstrap of secondaryMiod Vallat
processors can display correct data. Now cpu1 on octane is correctly reported in dmesg.
2010-02-28Add an explicit `delay constant' member to struct cpu_info, so that it canMiod Vallat
be decoupled from the nominal processor speed. While there, make sure delay() gets a proper delay constant if invoked before cpu0 attaches (how could I miss that when introducing struct cpu_hwinfo?!?)
2010-01-18Define IPL_SCHED as IPL_CLOCK, not IPL_HIGH.Miod Vallat
2010-01-09Make interrupt depth counters per-cpu.Miod Vallat
2010-01-09Move cache information from global variables to per-cpu_info fields; thisMiod Vallat
allows processors with different cache sizes to be used. Cache management routines now take a struct cpu_info * as first parameter.
2010-01-09Define struct cpu_hwinfo, to hold hardware specific information about eachMiod Vallat
processor (instead of sys_config.cpu[]), and pass it in the attach_args when attaching cpu devices. This allows per-cpu information to be gathered late in the bootstrap process, and not be limited by an arbitrary MAX_CPUS limit; this will suit IP27 and IP35 systems better. While there, use this information to make sure delay() uses the speed information from the cpu it is invoked on.
2010-01-08MP-safe FPU handling. ok miod@Takuya ASADA
2009-12-30curcpu()->ci_curpmap added. ok miod@Takuya ASADA
2009-12-28MP-safe pmap implemented, enable IPI in interrupt handler to avoid deadlock.Takuya ASADA
ok miod@
2009-12-25Pass both the virtual address and the physical address of the memory rangeMiod Vallat
when invoking the cache functions. The physical address is needed when operating on physically-indexed caches, such as the L2 cache on Loongson processors. Preprocessor abuse makes sure that the physical address computation gets compiled out when running on a kernel compiled for virtually-indexed caches only, such as the sgi kernel.
2009-12-07Support for 16KB page size kernels; page size is now set in <machine/param.h>Miod Vallat
rather than <mips64/param.h>. For now, kernels are kept at 4KB to give people some time to build 16KB compatible binaries; this will change before the end of this release cycle. Use of 16KB page size kernels yields a 18% speedup (which, offset by the 1.6% slowdown caused by the pmap changes, yields a 16.6% overall speedup).
2009-11-25IP30 IPI implementation.Takuya ASADA
Also few xheart modification for SMP. ok miod@
2009-11-24smp_malloc() implemented.Takuya ASADA
This function allocates memory using malloc or uvm_pglistalloc, then returns XKPHYS address of allocated memory. It's for avoid using virtual address on secondary cpus in early stage, and also in TLB handler. ok miod@
2009-11-22SMP support on MIPS clock.Takuya ASADA
ok miod@
2009-11-19Rename KSEG* defines to CKSEG* to match their names in 64 bit mode; alsoMiod Vallat
define more 64 bit spaces.
2009-10-30Support IP30 secondary cpu bootup. ok miod@Takuya ASADA
2009-10-22Completely overhaul interrupt handling on sgi. Cpu state now only stores aMiod Vallat
logical IPL level, and per-platform (IP27/IP30/IP32) code will from the necessary hardware mask registers. This allows the use of more than one interrupt mask register. Also, the generic (platform independent) interrupt code shrinks a lot, and the actual interrupt handler chains and masking information is now per-platform private data. Interrupt dispatching is generated from a template; more routines will be added to the template to reduce platform-specific changes and share as much code as possible. Tested on IP27, IP30, IP32 and IP35.
2009-10-22With the splx() changes, it is no longer necessary to remember which interruptMiod Vallat
sources were masked and saved in ci_ipending, as splx() will unmask what needs to be unmasked anyway. ci_ipending only now needs to store pending soft interrupts, so rename it to ci_softpending.
2009-10-22Replace intrmask_t with uint32_t. This types only describes interrupt masksMiod Vallat
in the coprocessor 0 status register (coupled with ICR on rm7k/rm9k), and may be completely alien to real hardware interrupt masks, so don't make things unnecessary confusing.
2009-10-07ipending, cpl moved into cpu_infoTakuya ASADA
OK miod@
2009-09-30curproc, curprocpaddr moved into cpu_infoTakuya ASADA
OK miod@
2009-09-15cpu status flag, cpuid added to cpu_info.Takuya ASADA
cpu_info pointer array, cpu_info iterator, cpu_number() implementation added. constraint modifier fixed in lock.h to output correct assembly. calling proc_trampoline_mp in exception.S.
2009-08-06Make sure <machine/cpu.h> includes <machine/intr.h> when included with _LOCOREMiod Vallat
defined; cp0access.S relies on this.
2009-08-06Work in progress support for Loongson2E/2F processors; need option CPU_LOONGSON2Miod Vallat
in the kernel to be brought in, due to invasive differences in tlb operation. Comes with a separate cache operations file due to the cache being R5k-style with R10k-style way number encoding.
2009-06-10Switch sgi to per-process AST, and move ast() from interrupt.c to trap.cMiod Vallat
where it can use userret() instead of duplicating it.
2009-06-02Add an r10k-specific cop0 control register.Miod Vallat
2009-05-22Drop almost unused <machine/psl.h> on sgi; move USERMODE() definition fromMiod Vallat
there to trap.c which is its only user. This also cleans up multiple inclusion of <machine/cpu.h> (because <machine/psl.h> includes it) in many places.
2009-03-26Remove cpu_wait(). It's original use was to be called from the reaper soOwain Ainsworth
MD code would free resources that couldn't be freed until we were no longer running in that processor. However, it's is unused on all architectures since mikeb@'s tss changes on x86 earlier in the year. ok miod@
2008-10-15make random(9) return per-cpu values (by saving the seed in the cpuinfo),Theo de Raadt
which are uniform for the profclock on each cpu in a SMP system (but using a different seed for each cpu). on all cpus, avoid seeding with a value out of the [0, 2^31-1] range (since that is not stable) ok kettenis drahn
2008-10-10Add empty cpu_unidle() macros for architectures that currently don't doArtur Grabowski
anything special to prod a cpu to leave the idle loop in signotify. powerpc, i386, amd64 and sparc64 will follow soon so that everyone has the same interface to wake an idling cpu.
2008-10-10Define MAXCPUS on all architectures.Artur Grabowski
For now, sparc64 is arbitrarily set to 256 (only architecture that didn't have a practical limit in the code on the number of cpus).
2008-10-09Implement CPU_INFO_UNIT for everyone, not just MP kernels.Artur Grabowski
ok miod@
2008-07-18Add a macro that clears the want_resched flag that need_resched sets.Artur Grabowski
Right now when mi_switch picks up the same proc, we didn't clear the flag which would mean that every time we service an AST we would attempt a context switch. For some architectures, amd64 being probably the most extreme, that meant attempting to context switch for every trap and interrupt. Now we clear_resched explicitly after every context switch, even if it didn't do anything. Which also allows us to remove some more code in cpu_switchto (not done yet). miod@ ok
2008-04-07Add ``guarded'' word read and write routines, to be used by machine-dependentMiod Vallat
code soon. Similar to what ddb does, but does not need ddb to be compiled in.
2008-04-07Define more cache coherency attributes, as well as R10k space identifiers.Miod Vallat
Define a symbolic ``cached'' attribute, to be used for cached mappings regardless of the system's cache coherency.
2007-12-18add power(4), a driver for the power button found on SGI O2's.Jasper Lievisse Adriaanse
when machdep.kbdreset is set, and the correct interrupt is fired, the machine gets shut down. with help from and ok jsing@, ok miod@
2007-11-25spelling fixes, from Martynas Venckus;Jason McIntyre
2007-07-18bus_dmamem_map() maps with a single segment in directly-translated XKPHYSMiod Vallat
space, either cache coherent for regular mappings and uncached for BUS_DMA_COHERENT mappings, as done on all other platforms with direct mappings.
2007-06-18Use a shorter form to load XKPHYS constants in .S code, shaves a few textMiod Vallat
bytes, no functional change.