Age | Commit message (Collapse) | Author |
|
ok guenther millert kettenis
|
|
ok miod
|
|
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@
|
|
|
|
list in loongson's <machine/autoconf.h> directly. <mips64/archtype.h> is
intended to be only used on ARCBios-like platforms.
|
|
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.
|
|
This allows MI code to support both 32-bit ARCS systems, as well as 64-bit
R8000 and R1x000 systems.
While there, #if 0 out ARCBios routines currently not used by the kernel.
|
|
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.
|
|
|
|
as some odd mips designs need moro than 32 bits in there. This causes a lot
of mechanical changes everywhere getsr() is used.
|
|
|
|
knowledge to <machine/pte.h>. Add specific routines for tlb handling setup
(at cpu initialization time) and tlb ASID wrap.
|
|
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.
|
|
move from/to register instructions, as well as a NOP macro. These will be
used in a later diff to allow specific processors to use slightly different
instructions or encodings.
|
|
such statements with it.
|
|
for all the compat layers which are now gone. Linux compat still works
because it always used another method in any case, and nothing looks at
p_os anymore.
ok jsing
|
|
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)
|
|
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.
|
|
|
|
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.
|
|
in cp0_set_config() for consistency.
|
|
stop abusing another field, and will be used by more routines RSN.
No functional change.
|
|
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.
|
|
|
|
.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.
|
|
|
|
layout in 64-bit mode. Found the hard way, of course.
|
|
|
|
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>.
|
|
|
|
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.
|
|
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.
|
|
the right type, noone will ever fiddle with the internals.
discussed with jsing
|
|
|
|
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN
ok deraadt@
|
|
Since the underlying types of the int_fast types are set by machine/_types.h,
put internal macros in that same file and define the exposed
INT_FAST*_{MIN,MAX} macros from those.
ok millert@, kettenis@
|
|
ok guenther@
|
|
Yeeloong, but with a 7" display with a 800x480 resolution, and no webcam.
There are still problems to get it booting from disk from PMON (colour me
unsurprised), which are being looked at. Loading the boot blocks from a FAT
USB stick, to then boot the kernel from the disk, is a reliable workaround
in the meantime.
Tested by Ban Keong Yee (bankeong dot yee on gmail) who is the ``lucky''
owner of such a machine, thanks for your time!
|
|
i386. Stop abusing it on other archs for controling a shutdown by
pressing the soft power button:
* Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it
allows a power button shutdown.
* Make acpi(4)/acpibtn(4) honor hw.allowpowerdown.
* Switch the various power button intercepts on landisk, sgi, sparc64
and zaurus over to hw.allowpowerdown.
* Garbage collect the machdep.kbdreset sysctl on all archs other than
amd64 and i386.
ok miod@
|
|
|
|
The new world order of pmemrange makes this data completely redundant
(being dealt with by the pmemrange constraints instead). Remove all code
that messes with the freelist.
While touching every caller of uvm_page_physload() anyway, add the flags
argument to all callers (all but one is 0 and that one already used
PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue
without it.
Should shrink the code a bit, as well.
matthew@ pointed out some mistakes i'd made.
``freelist death, I like. Ok.' ariane@
`I agree with the general direction, go ahead and i'll fix any fallout
shortly'' miod@ (68k 88k and vax i could not check would build)
|
|
Doesn't matter much since C++ ABI used by GCC doesn't mangle variable
names; however technically is required by Section 7.5 of the C++ spec.
Discussed with/OK guenther@, matthew@.
|
|
This will enable future uvm_map code to make intelligent decisions during
allocation.
|