summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
AgeCommit message (Collapse)Author
2014-01-19Initialize ci_randseed better using arc4random() + a trick. Remove theTheo de Raadt
libkern srandom() API since it is not suitable for this use. ok kettenis miod
2014-01-08Be sure to have pmap_extract() return FALSE for existing, but non-valid userMiod Vallat
pmap ptes. Found the hard way by tobiasu@.
2013-12-19Use shifts instead of integer multiplication by the page size in theMiod Vallat
Octeon-specific code paths. No functional change. ok bcallah@ pirofti@
2013-12-19recognize octeon 2 cpus; as found in the lanner mr326Jasper Lievisse Adriaanse
ok miod@
2013-12-18Provide MI symbol _STACKALIGNBYTESTheo de Raadt
2013-11-261 << 31 cleanup. Eitan Adler pointed out that there has been aTheo de Raadt
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
2013-07-13unify register_t to long on all platformsTheo de Raadt
ok miod kettenis
2013-07-05Take II, this time without flubbing off_t: : move several internalPhilip Guenther
type definitions that are the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@ kettenis@ otto@
2013-07-04backout previous; off_t must be signed and there might be other C++ APIOtto Moerbeek
breakage lurking; ok kettenis@
2013-07-04To ease future changes, move several internal type definitions that arePhilip Guenther
the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@
2013-06-28Fix unitialized variable; Maxime Villard.Miod Vallat
Interestingly enough, gcc did not warn about this because the register allocator had optimized the uninitialized `eva' local into using the same register as the initialized `va' local. Therefore it had been initialized. *facepalm*
2013-06-03Convert some internal APIs to use timespecs instead of timevalsPhilip Guenther
ok matthew@ deraadt@
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
2013-05-29Add PMAP_PA_MASK to mips64. Needed for loongson hibernate.Paul Irofti
Okay miod@.
2013-05-21remove unused cpu_lock code (where it is truly unused). it is notTed Unangst
part of the future we have planned. middling ok from a few
2013-05-09Do not panic when running the MP kernel on a single-processor system; foundMiod Vallat
the hard way by tobiasu@
2013-04-21In inittodr(), be sure to only invoke tc_setclock() once. Fixes huge uptimeMiod Vallat
when the clock is bad and we switch to the filesystem time.
2013-03-28Add STRONG_ALIAS macros to be used from assembly code in libc andMartynas Venckus
libm. While at it, remove now unused workarounds for lint. Agreed by kettenis@, guenther@, matthew@.
2013-03-28Add __strong_alias macros for all architectures to be able to aliasMartynas Venckus
another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
2013-03-26PGSHIFT and PGOFSET are now contained inside the kernel namespace.Theo de Raadt
2013-03-25PGSHIFT -> PAGE_SHIFTTheo de Raadt
2013-03-25ALIGNBYTES/ALIGN/ALIGNED_POINTER can move to the MI file.Theo de Raadt
2013-03-23refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedTheo de Raadt
to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
2013-03-12Fix kernel profiling on MP systems by using per-CPU buffers and teachMartin Pieuchot
kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
2013-02-12Back out per-CPU kernel profiling, it shouldn't modify a public headerMartin Pieuchot
at this moment.
2013-02-11Fix kernel profiling on MP systems by using per-CPU buffer. PreviouslyMartin Pieuchot
various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
2013-02-09No longer define EXEC_SCRIPT (probably coming from old PefoBSD). Also,Miod Vallat
DB_ELFSIZE ought to be defined in <machine/db_machdep.h>, not <machine/exec.h>
2013-01-16On second thought, do not unconditionnaly register the cpu throttling codeMiod Vallat
on all Loongson2F systems yet; Gdium does not have a separate scheduling clock yet and can't afford throttling until then.
2013-01-16Do not register the internal cpu timer-based timecounter if we support cpuMiod Vallat
throttling.
2013-01-16cpu_coredump() also needs to invoke vn_rdwr() without IO_NODELOCKED; onlyMiod Vallat
affects a.out binaries' core dumps.
2013-01-15Loongson: Add a stat clock for the lemote machines.Paul Irofti
The stat clock is implemented so that it also covers, at least according to the tests I've done, Torek's paper on randomized sampling. Most of the bits for randomizing the stat ticks were taken from sparc's implementation and adapted to the companion chip's MFGPT frequencies. Before this my lemote showed a 8% cpu usage for the cpuhog example from Torek's paper even though openssl speed showed differences up to 27% when ran with and without cpuhog. With the new stat clock it shows cpuhog around 18-22%, which I think is the proper value. Okay miod@.
2013-01-14Loongson: Replace the system clock provided by the CPU with a GLX MFGPT.Paul Irofti
CPU throttling was not possible due to the fact that the system clock was the CPU clock. So slowing down the CPU would also slow down the passing of time. This commit adds a driver for the MFGPT1 clock from the AMD companion chip found on lemote and hooks it up as the system clock. It also changes the frequency value of hz from the default, which was 100, to 128. That's because the scaling on MFGPT clocks is represented by powers of two. Okay miod@.
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-12-04Only pull in sys/cdefs.h if neededTheo de Raadt
ok miod
2012-12-02Determine whether we're currently on the alternative signal stackPhilip Guenthe
dynamically, by comparing the stack pointer against the altstack base and size, so that you get the correct answer if you longjmp out of the signal handler, as tested by regress/sys/kern/stackjmp/. Also, fix alt stack handling on vax, where it was completely broken. Testing and corrections by miod@, krw@, tobiasu@, pirofti@
2012-11-05unifdef -D __HAVE_TIMECOUNTERMiod Vallat
2012-10-03Don't include <mips64/archtype.h> unless you really need it.Miod Vallat
2012-10-03Do not use <mips64/archtype.h> for loongson model numbers, but rather put theMiod Vallat
list in loongson's <machine/autoconf.h> directly. <mips64/archtype.h> is intended to be only used on ARCBios-like platforms.
2012-10-03Split ever-growing mips <machine/cpu.h> into what 99% of the kernel needs,Miod Vallat
which will remain in <machine/cpu.h>, and a new mips_cpu.h containing only the goriest md details, which are only of interest to a handful set of files; this is similar in spirit to what alpha does, but here <machine/cpu.h> does not include the new file.
2012-09-29Do not hardcode ARCBios vector base, but rather compute it at runtime.Miod Vallat
This allows MI code to support both 32-bit ARCS systems, as well as 64-bit R8000 and R1x000 systems. While there, #if 0 out ARCBios routines currently not used by the kernel.
2012-09-29Basic R8000 processor support. R8000 processors require MMU-specific code,Miod Vallat
exception-specific code, clock-specific code, and L1 cache-specific code. L2 cache is per-design, of which only two exist: SGI Power Indigo2 (IP26) and SGI Power Challenge (IP21) and are not covered by this commit. R8000 processors also are 64-bit only processors with 64-bit coprocessor 0 registers, and lack so-called ``compatibility'' memory spaces allowing 32-bit code to run with sign-extended addresses and registers. The intrusive changes are covered by #ifdef CPU_R8000 stanzas. However, trap() is split into a high-level wrapper and a new function, itsa(), responsible for the actual trap servicing (which name couldn't be helped because I'm an incorrigible punster). While an R8000 exception may cause (via trap() ) multiple exceptions to be serviced, non-R8000 processors will always service one exception in trap(), but they are nevertheless affected by this code split.
2012-09-29Forgot this in previous commitMiod Vallat
2012-09-29Store the base value of coprocessor 0 system register, when running userland,Miod Vallat
into a global. This allows R12000 O2 systems to set the DSD bit in once for all, instead of having to set it every time in setregs().
2012-09-29Sort cpu and fpu list, and don't bother printing those we don't run on (yet).Miod Vallat
2012-09-29Handle the coprocessor 0 cause and status registers as a 64 bit value now,Miod Vallat
as some odd mips designs need moro than 32 bits in there. This causes a lot of mechanical changes everywhere getsr() is used.
2012-09-29Avoid an unnecessary copyin() call in the SYS__syscall handling path.Miod Vallat
2012-09-29Add a few more coprocessor 0 cause and config registers defines.Miod Vallat
2012-09-29Kill the mostly unused VMTLB_xxx and VMNUM_xxx defines. Move all tlbMiod Vallat
knowledge to <machine/pte.h>. Add specific routines for tlb handling setup (at cpu initialization time) and tlb ASID wrap.
2012-09-29Introduce assembly macros for specific processor hazards: tlb update, statusMiod Vallat
register update, status register update causing a change to the interrupt enable flag, and a few other arcane ones. <mips64/asm.h> will provide (supposedly sane) defaults, and <machine/asm.h> may override these with better tuned versions. Use these macros instead of random strings of nop in the various .S files requiring hazard workarounds.
2012-09-29Move proc_trampoline, which is not really exception processing, from exception.SMiod Vallat
to context.S, to eventually allow alternate versions of exception.S to be used.