summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
AgeCommit message (Collapse)Author
2017-08-12Add a dummy (for now) <machine/reloc.h> for mips64 to fix build.Visa Hankala
OK guenther@
2017-07-30Define MAXCPUS per mips64 port.Visa Hankala
2017-07-22Rename variables for clarity.Visa Hankala
It does not seem necessary to provide initial value for `sicode'. When `signal' gets set, `sicode' is set as well. OK deraadt@, kettenis@
2017-07-22Bring SIGBUS and SIGSEGV handling better in line with the otherVisa Hankala
architectures. OK kettenis@, deraadt@
2017-07-12remove CPU_LIDSUSPEND/machdep.lidsuspendMartin Natano
"fire away!" tedu
2017-07-03Use copyin32() instead of copyin() in RDHWR emulation.Visa Hankala
This reduces emulation time about 5%.
2017-06-29kill RCSID macros; discussed with millertTheo de Raadt
2017-06-22Improve the coalescing of instruction cache flushes on R8000 in orderVisa Hankala
not to perform redundant work. There is no direct way to flush the cache; rather, the kernel evicts unwanted bits from the cache by executing a block of instructions, which is expensive. With this diff, make build time decreases about 0.4%. Diff from miod@
2017-06-17Invalidate remote TLB entries by address range. This reducesVisa Hankala
the number of IPIs required when removing mappings.
2017-06-13Do not invalidate remote TLB entries with new mappings because theVisa Hankala
virtual addresses really should not have TLB hits. This reduces IPIs.
2017-06-13Tweak order of operands to check constant `cache_valias_mask' first.Visa Hankala
2017-06-11Define register_splx_handler() in one place.Visa Hankala
2017-06-11Fix TLB size computation on OCTEON II and III. The CPUs have utilizedVisa Hankala
the whole TLB space even before this. However, TLB initialization on boot and TLB flush on ASID wraparound have been incomplete. These have caused crashes of processes.
2017-06-08Move loongson/octeon/sgi unmap_startup() under arch/mips64.Visa Hankala
2017-05-30Kill db_sym_t.Martin Pieuchot
ok deraadt@, kettenis@, jasper@
2017-05-29Kill SPINLOCK_SPIN_HOOK, use CPU_BUSY_CYCLE() instead.Martin Pieuchot
ok visa@, kettenis@
2017-05-29Reduce code duplication. The local-CPU-only case is now handledVisa Hankala
without a lock in smp_rendezvous_cpus().
2017-05-29Invalidate OCTEON icache after TLB ASID wraparound, otherwise userspaceVisa Hankala
might execute stale instructions. The cache is virtually tagged and does not seem to pick up TLB alterations automatically.
2017-05-28Do not allow NULL callback at rendezvous and clear callbackVisa Hankala
pointer at the end to catch errors faster.
2017-05-28Use fast path if remote call is not needed.Visa Hankala
Note that rendezvous calls are no longer necessarily serialized systemwide.
2017-05-28mips64_multicast_ipi() excludes current CPU.Visa Hankala
The caller does not have to do that.
2017-05-27Check cache_valias_mask earlier in the expression. The value is zeroVisa Hankala
on most systems, so this tweak should save an iota of CPU time.
2017-05-24Add an idle cycle implementation for R4600/R5000/RM7000 CPUs and theirVisa Hankala
derivatives. This lets the kernel utilize the CPUs' Standby Mode to reduce the power consumption of an idle system. Suggested by and input from miod@. He also tested this patch on an RM7000 O2.
2017-05-21Enable radeondrm(4) on loongson to get accelerated graphicsVisa Hankala
with the RS780E chipset. OK kettenis@, jsg@
2017-05-19Replace __cpu_cas() with atomic_cas_ulong().Visa Hankala
OK kettenis@
2017-05-19Implement copyin32(9) for mips64.Visa Hankala
OK kettenis@
2017-05-15Make atomic.h ready to be included in userland.Martin Pieuchot
- keep setbits/clearbits inside _KERNEL ok visa@
2017-05-11Set up IPI handling on the primary CPU before booting secondary CPUs.Visa Hankala
This ensures the IPI handler is in place before the first IPI is sent. Drop the comment about xheart because it is somewhat misleading. Discussed with miod@
2017-05-10Hook up HPET as a timecounter.Visa Hankala
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-22Recognize Loongson 3A2000/3B2000 processors.Visa Hankala
2017-04-20Get TCB address using the RDHWR instruction instead of __get_tcb().Visa Hankala
This gives fast access to the address on systems that implement the UserLocal register. TCB caching is still used when running in the single-threaded mode in order not to penalize old systems. The kernel counterpart of this change must be in place before using this diff! With guenther@
2017-04-20Make TCB address available to userspace via the UserLocal register.Visa Hankala
This lets programs get the address without a system call on OCTEON II and later. Add UserLocal load emulation for systems that do not implement the RDHWR instruction or the UserLocal register. OK guenther@
2017-04-20Hook up mutex(9) to witness(4).Visa Hankala
2017-04-13Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itPhilip Guenther
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB macro can be unifdef'ed as always defined. ok kettenis@ visa@ jsing@
2017-04-10Use __ASSEMBLER__ instead of __LANGUAGE_ASSEMBLY.Visa Hankala
The latter is not defined by clang. OK guenther@, kettenis@
2017-04-07Add prid for CN72xx/CN73xx.Visa Hankala
2017-04-02Bring back the wait instruction into the idle loop, but only on octeon.Visa Hankala
This lets an idle SoC run a bit cooler. Tested on CN5020, CN6120 and CN7130.
2017-03-02Add a new sysctl machdep.lidaction. The sysctl works as follows:Martin Natano
machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
2017-02-19Add IPI counter.Visa Hankala
2017-02-12Split up fork1():Philip Guenther
- FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter. luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
2017-02-08In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptPhilip Guenther
leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
2017-01-21Add _MIPS_ISA_MIPS32 and _MIPS_ISA_MIPS64 defines for clang.Visa Hankala
OK deraadt@ phessler@ mpi@
2017-01-21p_comm is the process's command and isn't per thread, so move it fromPhilip Guenther
struct proc to struct process. ok deraadt@ kettenis@
2017-01-03Remove #define __SWAP_BROKEN from mips64. The architecture nowVisa Hankala
has a proper pmap_collect() implementation, and the current uvm_swapout_threads() code does not need other MD interfaces. OK miod@
2017-01-02Allow freeing of newly empty directory pages.Visa Hankala
2016-12-30Ansify pmap_copy().Visa Hankala
2016-12-30When entering a mapping on write access, compute the PTE after makingVisa Hankala
the page dirty. This lets the system avoid an extra TLB modify fault because the TLB mapping now allows writes immediately. Noticed by miod@
2016-12-23Tweaks suggested by miod@Visa Hankala
2016-12-22Extend the size of user virtual address space from 2GB to 1TB on mips64Visa Hankala
by adding another level to page directories. This improves ASLR and complements W^X added earlier on some systems, giving a notable update to the architecture's security. Besides, there is now more room for running tasks that hog memory. Testing help from deraadt@ and fcambus@. Platforms tested: loongson, octeon, sgi/IP27 and sgi/IP30 (IP30 also with 4KB pages).