<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/arch/mips64/include/cache.h, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/mips64/include/cache.h?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/mips64/include/cache.h?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2016-12-21T13:59:57Z</updated>
<entry>
<title>Add a driver for OCTEON MMC host controller.</title>
<updated>2016-12-21T13:59:57Z</updated>
<author>
<name>visa</name>
<email>visa@openbsd.org</email>
</author>
<published>2016-12-21T13:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=abbc172345bef93ecfbbd3bdfe82c6baa3e1be4c'/>
<id>urn:sha1:abbc172345bef93ecfbbd3bdfe82c6baa3e1be4c</id>
<content type='text'>
Tested on EdgeRouter Pro, and Shasta.

OK mpi@
</content>
</entry>
<entry>
<title>Some implementations of HitSyncDCache() call pmap_extract() for va-&gt;pa</title>
<updated>2016-01-05T05:27:54Z</updated>
<author>
<name>visa</name>
<email>visa@openbsd.org</email>
</author>
<published>2016-01-05T05:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1a4be959874b243fae354f168658578a5ac6d1b4'/>
<id>urn:sha1:1a4be959874b243fae354f168658578a5ac6d1b4</id>
<content type='text'>
conversion. Because pmap_extract() acquires the PTE mutex, a "locking
against myself" panic is triggered if the cache routine gets called in
a context where the mutex is already held.

In the pmap, all calls to HitSyncDCache() are for a whole page. Add a
new cache routine, HitSyncDCachePage(), which gets both the va and the
pa of a page. This removes the need of the va-&gt;pa conversion. The new
routine has the same signature as SyncDCachePage(), allowing reuse of
the same routine for cache implementations that do not need differences
between "Hit" and non-"Hit" routines.

With the diff, POWER Indigo2 R8000 boots multiuser again. Tested on sgi
GENERIC-IP27.MP and octeon GENERIC.MP, too.

Diff from miod@, ok kettenis@
</content>
</entry>
<entry>
<title>Some bits for Loongson 3A support.</title>
<updated>2015-08-15T22:31:38Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2015-08-15T22:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f8fa4920b8f2ba8b0c10836c6de848ecc5d934e1'/>
<id>urn:sha1:f8fa4920b8f2ba8b0c10836c6de848ecc5d934e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Due the virtually indexed nature of the L1 instruction cache on most mips</title>
<updated>2014-03-31T20:21:18Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2014-03-31T20:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=80941abe4795b1ae42f269cba3f89638f49ba0de'/>
<id>urn:sha1:80941abe4795b1ae42f269cba3f89638f49ba0de</id>
<content type='text'>
processors, every time a new text page is mapped in a pmap, the L1 I$ is
flushed for the va spanned by this page.

Since we map pages of our binaries upon demand, as they get faulted in, but
uvm_fault() tries to map the few neighbour pages, this can end up in a
bunch of pmap_enter() calls in a row, for executable mappings. If the L1
I$ is small enough, this can cause the whole L1 I$ cache to be flushed
several times.

Change pmap_enter() to postpone these flushes by only registering the
pending flushes, and have pmap_update() perform them. The cpu-specific
cache code can then optimize this to avoid unnecessary operations.

Tested on R4000SC, R4600SC, R5000SC, RM7000, R10000 with 4KB and 16KB
page sizes (coherent and non-coherent designs), and Loongson 2F by mikeb@ and
me. Should not affect anything on Octeon since there is no way to flush a
subset of I$ anyway.
</content>
</entry>
<entry>
<title>Basic R8000 processor support. R8000 processors require MMU-specific code,</title>
<updated>2012-09-29T21:37:01Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2012-09-29T21:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=a4a4ed5c8cec53549246aa9dfdb1cf81ba631dd3'/>
<id>urn:sha1:a4a4ed5c8cec53549246aa9dfdb1cf81ba631dd3</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Do not output unnecessary semicolons when expanding macros. No functional change</title>
<updated>2012-06-24T20:20:37Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2012-06-24T20:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=3242691667bb9212dcc1b30bea73f73f05591c33'/>
<id>urn:sha1:3242691667bb9212dcc1b30bea73f73f05591c33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rework the signature of the cache handling routines again. It makes more sense</title>
<updated>2012-04-21T12:20:30Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2012-04-21T12:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b94f5bc55b27044860ce98464ed855a66733c4ba'/>
<id>urn:sha1:b94f5bc55b27044860ce98464ed855a66733c4ba</id>
<content type='text'>
to pass both the virtual and physical addresses of the page to clean to
SyncDCachePage, which is the only routine using `Index' operations on the data
cache, which might be virtually indexed at some levels but physically indexed
at others. On the other hand, it does not make any sense to pass a physical
address to routines using `Hit' operations (and they were discarding them
anyway).

In addition to making things cleaner, this fixes sporadic userland misbehaviour
(read: SIGSGEV) on RM7000 O2 systems.
</content>
</entry>
<entry>
<title>Make the logic for PMAP_PREFER() and the logic, inside pmap, to do the</title>
<updated>2012-04-06T20:11:18Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2012-04-06T20:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=25b86d72ad3ba32acdcaaebcc06c2e3cf2ef9d6c'/>
<id>urn:sha1:25b86d72ad3ba32acdcaaebcc06c2e3cf2ef9d6c</id>
<content type='text'>
necessary cache coherency work wrt similar virtual indexes of different
physical pages, depending upon two distinct global variables, instead of
a shared one. R4000/R4400 VCE requires a 32KB mask for PMAP_PREFER, which
is otherwise not necessary for pmap coherency (especially since, on these
processors, only L1 uses virtual indexes, and the L1 size is not greater
than the page size, as we are using 16KB pages).
</content>
</entry>
<entry>
<title>Move cache handling routines related definitions to a dedicated header file,</title>
<updated>2012-03-25T13:52:52Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2012-03-25T13:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=737df64e4556218c51a72ff0f578a34df468c175'/>
<id>urn:sha1:737df64e4556218c51a72ff0f578a34df468c175</id>
<content type='text'>
rather than abusing &lt;machine/cpu.h&gt;.
</content>
</entry>
</feed>
