#
85caa4b9 |
| 22-Aug-2022 |
cheloha <cheloha@openbsd.org> |
mips64, octeon, loonson: trigger deferred clock interrupts from splx(9)
As with powerpc, powerpc64, and riscv64, on mips64 platforms we need to isolate the clock interrupt schedule from the MD clock
mips64, octeon, loonson: trigger deferred clock interrupts from splx(9)
As with powerpc, powerpc64, and riscv64, on mips64 platforms we need to isolate the clock interrupt schedule from the MD clock interrupt code. To do this, we need to stop deferring clock interrupt work until the next tick and instead defer the work until we logically unmask the clock interrupt from splx(9).
Add a boolean (ci_clock_deferred) to the cpu_info struct to note whether we need to trigger the clock interrupt by hand, and then do so from splx(9) by calling md_triggerclock().
Currently md_triggerclock is only ever set to cp0_trigger_int5(). The routine takes great care to ensure that INT5 has fired or will fire before returning.
There are some loongson machines that use glxclk instead of CP0. They can be switched to use CP0 later.
With input and advice from visa@ and miod@.
Compiled and extensively tested by visa@ and miod@ on various octeon and loongson machines. No issues seen on octeon machines. miod@ saw some odd things on loongsoon, but suggests that all issues are probably unrelated to this patch.
Link: https://marc.info/?l=openbsd-tech&m=165929192702632&w=2
ok visa@, miod@
show more ...
|
#
bfc185c1 |
| 01-May-2021 |
visa <visa@openbsd.org> |
Retire OpenBSD/sgi.
OK deraadt@
|
#
4cab4d08 |
| 29-Apr-2021 |
visa <visa@openbsd.org> |
Remove unused RM7000 ICR handling.
|
#
3af74596 |
| 05-Jun-2020 |
visa <visa@openbsd.org> |
cpu_rnd_messybits() for mips64
Use CP0 Count as a basis. Also take noise from virtual memory activity by including BadVAddr.
OK deraadt@ dlg@
|
#
592093c1 |
| 16-Aug-2016 |
visa <visa@openbsd.org> |
Remove RM7000/RM9000-specific performance counter code. It originates from PMON2000 and has not been enabled on OpenBSD.
Suggested by and ok miod@ (after seeing a quad_t cleanup patch of mine)
|
#
7b6ae6a5 |
| 03-Oct-2012 |
miod <miod@openbsd.org> |
Split ever-growing mips <machine/cpu.h> into what 99% of the kernel needs, which will remain in <machine/cpu.h>, and a new mips_cpu.h containing only the goriest md details, which are only of interes
Split ever-growing mips <machine/cpu.h> into what 99% of the kernel needs, 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.
show more ...
|
#
a4a4ed5c |
| 29-Sep-2012 |
miod <miod@openbsd.org> |
Basic R8000 processor support. R8000 processors require MMU-specific code, exception-specific code, clock-specific code, and L1 cache-specific code. L2 cache is per-design, of which only two exist: S
Basic R8000 processor support. R8000 processors require MMU-specific code, 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.
show more ...
|
#
3b05e32e |
| 29-Sep-2012 |
miod <miod@openbsd.org> |
Introduce assembly macros for specific processor hazards: tlb update, status register update, status register update causing a change to the interrupt enable flag, and a few other arcane ones. <mips6
Introduce assembly macros for specific processor hazards: tlb update, status 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.
show more ...
|
#
bf78cf46 |
| 23-Jun-2012 |
miod <miod@openbsd.org> |
Fix ITLBNOPFIX macro definition on RM7000-capable kernels, and use it in cp0_set_config() for consistency.
|
#
89e78ff6 |
| 28-Mar-2012 |
miod <miod@openbsd.org> |
Work in progress support for the SGI Indigo, Indigo 2 and Indy systems (IP20, IP22, IP24) in 64-bit mode, adapated from NetBSD. Currently limited to headless operation, input and video drivers will g
Work in progress support for the SGI Indigo, Indigo 2 and Indy systems (IP20, IP22, IP24) in 64-bit mode, adapated from NetBSD. Currently limited to headless operation, input and video drivers will get ported soon.
Should work on all R4000, R4440 and R5000 based systems. L2 cache on R5000SC Indy not supported yet (coming soon), R4600 not supported yet either (coming soon as well).
Tested to boot multiuser on: Indigo2 R4000SC, Indy R4000PC, Indy R4000SC, Indy R5000SC, Indigo2 R4400SC. There are still glitches in the Ethernet driver which are being looked at.
Expansion support is limited to the GIO E++ board; GIO boards with PCI-GIO bridges not ported yet due to the lack of hardware, and this kind of driver does not port blindly.
Most of this work comes from NetBSD, polishing and integration work, as well as putting as many ``R4x00 in 64-bit mode'' erratas as necessary, by yours truly.
More work is coming, as well as trying to get some easy way to boot install kernels (as older PROM can only boot ECOFF binaries, which won't do for the kernel).
show more ...
|
#
1d6e3571 |
| 11-Sep-2010 |
syuu <syuu@openbsd.org> |
move machine dependent GET_CPU_INFO(), getcurcpu(), setcurcpu() to arch/sgi. ok miod@
|
#
afdabf13 |
| 28-Apr-2010 |
syuu <syuu@openbsd.org> |
Storeing current cpu_info address into LLAddr register, for curcpu(). Instead of previous implementation, we won't use physical cpuid to fetch curcpu(). This requires to implement IP27/35 SMP. Implem
Storeing current cpu_info address into LLAddr register, for curcpu(). 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@
show more ...
|
#
c1805af1 |
| 09-Jan-2010 |
miod <miod@openbsd.org> |
Move cache information from global variables to per-cpu_info fields; this allows processors with different cache sizes to be used.
Cache management routines now take a struct cpu_info * as first par
Move cache information from global variables to per-cpu_info fields; this allows processors with different cache sizes to be used.
Cache management routines now take a struct cpu_info * as first parameter.
show more ...
|
#
4af83dbe |
| 19-Nov-2009 |
miod <miod@openbsd.org> |
All callers of updateimask() immediately enable interrupts afterwards, so do it in updateimask() itself. No functional change.
|
#
d7f337fb |
| 22-Oct-2009 |
miod <miod@openbsd.org> |
Change the #define controlling use of RM7k/RM9k coprocessor 0 ICR to RM7000_ICR, instead of IMASK_EXTERNAL, since they are actually different concepts. This code remains disabled since RM7000_ICR is
Change the #define controlling use of RM7k/RM9k coprocessor 0 ICR to RM7000_ICR, instead of IMASK_EXTERNAL, since they are actually different concepts. This code remains disabled since RM7000_ICR is not defined anywhere at the moment.
show more ...
|
#
c74138ca |
| 22-May-2009 |
miod <miod@openbsd.org> |
Drop almost unused <machine/psl.h> on sgi; move USERMODE() definition from there to trap.c which is its only user. This also cleans up multiple inclusion of <machine/cpu.h> (because <machine/psl.h> i
Drop almost unused <machine/psl.h> on sgi; move USERMODE() definition from 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.
show more ...
|
#
036841f2 |
| 18-Oct-2007 |
miod <miod@openbsd.org> |
No need to include <machine/pte.h> here.
|
#
c284574d |
| 16-Jul-2007 |
miod <miod@openbsd.org> |
Replace bunches of nops with the ITLBNOPFIX macro, which generates fewer nops unless we compile for early RM7000 flavours, which we usually don't do.
|
#
b6d33b31 |
| 16-Jul-2007 |
miod <miod@openbsd.org> |
Change idle_mask to be made of the cop0 SR bits unshifted and the cop0 IC bits shifted, instead of the other way around; this shaves a few instructions.
|
#
ed9f9aaa |
| 20-Oct-2004 |
pefo <pefo@openbsd.org> |
Fix some 64 bit address problems. Some function names made more unique. Other changes for the upcoming Origin 200 support.
|
#
ce3a1ab7 |
| 10-Sep-2004 |
pefo <pefo@openbsd.org> |
Fix LEAF usage adding new extra arg. spotted by miod.
|
#
2a2ff943 |
| 10-Aug-2004 |
deraadt <deraadt@openbsd.org> |
spacing
|
#
41feffef |
| 09-Aug-2004 |
pefo <pefo@openbsd.org> |
Big cleanup. Removed some unused obsolete stuff and fixed copyrights on some files. Arcbios support is now in, thus detects memorysize and cpu clock frequency.
|
#
f58c7388 |
| 06-Aug-2004 |
pefo <pefo@openbsd.org> |
initial mips64
|