summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
AgeCommit message (Collapse)Author
2014-03-11Simpler RM7000 L2 cache initialization code (no longer matches what pmon2000Miod Vallat
did, but less awkward). Also make sure that the code changing the K0SEG CCA value has enough nops, before returning to cached space, to match the recommended procedure in the RM52xx and RM7000 erratas.
2014-03-11lint is gone, and the 'lint' conditional was never in the implementationPhilip Guenther
namespace, so stop changing behavior when it's #defined ok beck@ krw@
2014-03-11remove #if(n)def __LP64__ from the mips64 codebase, as mips32 never really ↵Jasper Lievisse Adriaanse
went anywhere. ok miod@
2014-03-10Support PMAP_NOCACHE in pmap_enter() flags. If set when mapping a managedMiod Vallat
page, the pte is created uncached. Make sure pmap_enter_pv() honours the cache bits of the pte, instead of assuming it will only get called for cached pages. Have it set PV_UNCACHED in the pv flags for the page, if this is the first use of this page and the mapping is not cached. Only check for a virtual aliasing cache condition if the new mapping is cached.
2014-03-10n64 is the default, drop the o32/o64 register assignment conditionals.Miod Vallat
2014-03-09Rework the per-cpu cache information. Use a common struct to store the lineMiod Vallat
size, the number of sets, and the total size (and the set size, for convenience) per cache (I$, D$, L2, L3). This allows cpu.c to print the number of ways (sets) of L2 and L3 caches from the cache information, rather than hardcoding this from the processor type.
2014-02-22Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is alignedMiod Vallat
to a 16 byte boundary in csu (similar to what the other arches where _STACKALIGNBYTES != _ALIGNBYTES do). This is necessary for long double variables on the stack to be correctly aligned.
2014-02-08Replace ARC_Call2(), used to invoke the `return-to-PROM' routines with aMiod Vallat
PROM-compatible stack, with a sligthly different ARC_Call_Via_Pointer(), which uses a global function pointer variable instead of computing the address from the ARCBios parameter block; said variable being set in bios_ident(). No functional change... yet. Tested on IP22(24), IP30 and IP32.
2014-02-08Allow page table entries to be either 32 bits wide (the existing state of theMiod Vallat
code), or 64 bits wide, if option MIPS_PTE64. 64-bit ptes allow for physical memory beyond 16GB (34 bits) to be addressable by the pmap code.
2014-01-30Move declaration of struct vm_page_md from <machine/vmparam.h> toMiod Vallat
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
2014-01-24Do not protect struct vm_page_md with defined(_KERNEL), for userland uvmMiod Vallat
grovellers need to know it to be able to get the right size for struct vm_page.
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
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.