Age | Commit message (Collapse) | Author |
|
machdep.c, and internal clock interrupting on level 5, still in clock.c; this
will allow other clock sources to be used in the near future. (delay() will
remain tied to the internal clock)
|
|
ok kettenis
|
|
MI float.h which pulls in and defines the values that are needed from
there, and repair sys/limits.h so that it defines the values it needs
as well (depending on POSIX version, XPG version, etc). guenther has
a more exact selection of that coming for limits.h.
this also fixes a few mistakes for the vax.
reviewed by kettenis and guenther.
|
|
handling of a partial last line in IOSyncDCache. No functional change.
|
|
size being not larger than 4KB, use Hit operations on the pa instead of Index
operations on the va for each set in the SyncDCachePage routine, when running
with such a cache.
|
|
smallest possible size; and on kernels with 16KB pages, where no virtual
aliasing happens, use Hit operations on the pa instead of index operations
on the va for all sets in the SyncDCachePage routine.
Tested by mikeb@ on IP32 and myself on IP27/28/30/35
|
|
|
|
cache lines and sizes are already there, after all.
The ConfigCache cache routine is responsible for filling these function
pointers; cache routine invocation macros are updated to use the cpu_info
fields, but may still be overriden in <machine/cpu.h> on platforms where
only one set of cache routines is used.
|
|
which will be easier to maintain on the long run. Be sure to rm cache_r*.d in
your kernel compile directories after updating.
|
|
in cp0_set_config() for consistency.
|
|
|
|
was a nice trick, but this register is only 32-bit wide and will be
sign-extended, which requires all cpu_info structs to be allocated within 2GB
physical - something which may not be possible on some configurations.
This diff changes IP30.MP kernels to no longer use LLAddr to store curcpu,
but use unused fields of the MPConf structure in low memory, indexed with the
physical processor id, which can be obtained from the Heart PRID register.
|
|
stop abusing another field, and will be used by more routines RSN.
No functional change.
|
|
make future maintainance easier.
|
|
Note that this would only affect 4KB page size IP22 kernels, which is not the
default IP22 configuration, and which noone not out of his or her mind would do.
In other words: this is a correctness fix with no impact on Real Life (c)(R)TM
|
|
memory allocation pattern, exposing aliasing bugs in the mips64 pmap, on
kernels where virtual aliasing may happen (that is, IP32 kernels on R5000,
R10000 and R12000 O2).
Fix these (or at least, sweep them better under the rug) by:
- always flush caches in pmap_copy_page() and pmap_zero_page(), if the
destination page is mapped uncached.
- when removing a mapping of a managed page which has been forced uncached
due to virtual aliasing conflict, map it back cached as soon as the
remaining mappings are non conflicting.
- writeback, instead of simply invalidating, pool pages and page table
pages, upon release, for there might be stale data in the cache.
While these, apply more paranoia and only perform cache operations on pages
which have been mapped with the cache enabled.
Initially reported by mikeb@ on an R12k O2 (that will teach me to use an
RM7000-powered O2, without virtual aliasing, to test IP32 kernels).
Verified on an R5k O2, as well as a custom IP30 kernel with page size
forced to 4KB (to introduce virtual aliasing).
This diff tested on O2 (R5k, RM7k, R12k), IP30, IP35, as well as on
Loongson (no aliasing) by mikeb@ and I.
|
|
without virtual aliasing, or for pages which are not currently mapped
cached. 1+% speed increase on sgi IP27 and loongson kernels.
Tested on LS2F, R4400, R5000, R12000 and R16000.
|
|
- replace masking with large `power of two minus one' constants with a pair of
shifts, this is shorter code and does not require the at register.
- merge R5000 and RM52xx setup, as the configuration register layout is the same
on both processors.
- In Mips5k_IOSyncDCache(), delay building the call frame until we know we
will not perform a leaf call. Replace leaf calls with jumps to the
appropriate routines.
Tested on R5000, RM5271 and RM7000.
|
|
|
|
.S code when masking the upper bits, instead of hardcoding them. Makes code
easier to understand (and also I might have a need to reduce PFN width on
some particular CPU models in the future).
No change in generated code.
|
|
|
|
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.
|
|
|
|
behalf of curproc.
|
|
initial setup to be complete before switching to our trap handlers.
However, change guarded_{read,write}_* to clear BEV in the coprocessor 0
status register, and restore it afterwards, to use our fault handlers within
these functions. This makes these functions usable from consinit().
|
|
layout in 64-bit mode. Found the hard way, of course.
|
|
|
|
from a fork syscall done by the parent. Use __tfork, not rfork
here to match the ktrace records for the parent (CALL __tfork,
RET __tfork). ok guenther
|
|
|
|
to a word boundary.
|
|
|
|
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).
|
|
Indy PROM versions use different year bases - after all, using 1970 instead
of the previously used value of 1940 smelled like a bug, and probably was,
so this eventually got fixed in later PROM versions.
Instead of hardcoding a year base depending upon the system, we will now ask
ARCBios for its current year, and compare it to what can be read from the RTC
registers to figure out what year base is in use by the PROM.
|
|
(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).
|
|
rather than abusing <machine/cpu.h>.
|
|
of previous computation fix.
|
|
|
|
|
|
|
|
for IP numbers under 30 (Octane), and add a few interesting ones.
No functional change, except making my life easier for upcoming work.
|
|
by anything yet, but has been lying in one of my trees for too long.
|
|
pages. This will allow R5000-based systems with physical memory fitting in
CKSEG0 to use 16KB pages and direct maps (since only XKPHYS accesses trigger
the XKPHYS coherency errata on these processors).
Tested on IP32, IP30 and IP27 (and loongson too as well).
|
|
my face then...) depends upon PMAP_PREFER_ALIGN to be a power of two, minus one.
On mips64 with 4KB pages, the runtime variable used to compute PMAP_PREFER_ALIGN
had the low PAGE_SHIFT bits zeroed (for no good reason I'd say). Don't bother
zeroing them anymore.
|
|
trampolines) to them; this makes sure there is no risk of pending writes
being lost when we clear the caches. Of course, this would be a bug in the
cache handling routines, but having our vectors correctly set will help
debugging the issue.
Tested on sgi and loongson.
|
|
subspaces in the CCA_NC uncached memory space. However, being coherent,
there was never a need for bus_dma to use uncached addresses.
This means that, on the only systems where uncached_base was not set to
PHYS_TO_XKPHYS(0, CCA_NC), it was never used.
Remove the variable, and replace PHYS_TO_UNCACHED() with
PHYS_TO_XKPHYS(, CCA_NC). No functional change.
|
|
a nop on R5k and RM52xx, but actually required on RM7k.
|
|
InvalidatePage_* cache operations on RM52xx and RM7k, as strongly recommended
by the manual.
|
|
fix various typos in comments, harmonize a few of them, and rename the internal
InvalidateSecondaryPage define to InvalidatePage_S for consistency.
No change in generated code.
|
|
past, pull that code out seperately.
ok guenther miod
|
|
the right type, noone will ever fiddle with the internals.
discussed with jsing
|