| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
OK deraadt@ mpi@
|
|
|
|
| |
required by upcoming MI mutex change.
|
|
|
|
| |
OK guenther@
|
| |
|
| |
|
|
|
|
|
|
|
| |
addresses. While there, pave the way for BUS_DMA_64BIT (not working
yet).
Diff from miod@; OK dlg@
|
|
|
|
|
|
|
|
|
| |
this is so drivers can advertise that they can handle 64 dma addresses
to the platform. it may choose to handle dmamaps differently based
on this flag.
tweaks and ok tom@
ok kettenis@
|
|
|
|
| |
OK miod@
|
|
|
|
|
|
| |
For coherency with other archs and in order to use it in MI code.
ok visa@, tobiasu@
|
|
|
|
|
|
| |
signalling as a workaround to a limitation in the hub interrupt code,
to allow four CPUs per node. At the moment, multi-node setups are not
supported.
|
|
|
|
| |
substitute for hardware documentation.
|
| |
|
|
|
|
|
| |
LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning
through all these files. No functional change.
|
| |
|
|
|
|
|
|
|
| |
sgi, are identical. Put one implementation in mips64 and drop the
platform-specific copies, to remove duplicated code.
ok miod@
|
|
|
|
| |
kernels and we no longer have any.
|
|
|
|
|
|
|
|
| |
this basically copies the sgi implementation to mips64 and removes
it from the rest. this way they get an optimised UP mutex implementation
and correct asserts on all platforms.
ok miod@ jmatthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is like src/sys/arch/alpha/alpha/mutex.c r1.14.
this changes sgi mutexes so they record which cpu owns the lock
rather than just if the lock is held or not. the diagnostics compare
the owner to the current cpus curcpu() address so they can actually
tell if the current cpu holds the lock instead of whether any cpu
holds the lock.
instead of using custom asm to implement a cas this uses atomic_cas_ptr.
while im here i also shuffled the code. on MULTIPROCESSOR systems
instead of duplicating code between mtx_enter and mtx_enter_try,
mtx_enter simply loops on mtx_enter_try until it succeeds.
this also provides an alternative implementation of mutexes on
!MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes
wont contend on UP boxes, theyre basically wrappers around spls.
we can just do the splraise, stash the owner as a guard value for
DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never
fail, so we can just call mtx_enter and return 1.
tested by and ok miod@
|
|
|
|
| |
for DMA, back when this was applicable.
|
|
|
|
|
|
| |
BUS_DMA_NOCACHE (or BUS_DMA_COHERENT if the platform does not have coherent
caches) will use PMAP_NOCACHE when invoking pmap_enter(), to avoid creating
cached mappings, and then evicting them from the cache.
|
|
|
|
|
|
|
| |
size, the number of sets, and the total size (and the set size, for convenience)
per cache (I$, D$, L2, L3).
This allows cpu.c to print the number of ways (sets) of L2 and L3 caches from
the cache information, rather than hardcoding this from the processor type.
|
|
|
|
|
|
|
|
|
|
|
| |
we block all interrupts that can grab the kernel lock. The simplest way to
achieve this is to make sure mutexes always raise the ipl to the highest
level that has interrupts that grab the kernel lock. This will allow us
to have "mpsafe" interrupt handlers at lower priority levels.
No change for non-MULTIPROCESSOR kernels.
ok miod@
|
|
|
|
| |
ok miod
|
|
|
|
| |
ok guenther@
|
|
|
|
| |
ok miod@, mikeb@
|
|
|
|
|
|
|
|
|
|
| |
Most of the hard work by mpi@, who provided the initial diff.
Fixes for sparc from myself. Tested on sgi and sparc myself.
Compiles and detects zstty on my powerbook, compile tested on
sparc64 by me. Real testing with zs device on sparc64 by miod@
who also gave a lot of help and feedback.
ok miod@, mpi@
|
|
|
|
|
| |
another symbol without weak attribute. To be used in libc and libm
soon. Agreed by kettenis@, guenther@, matthew@.
|
|
|
|
|
|
|
| |
to keep definitions our of user space. The MD files now follow a consistant
order -- all namespace intrusion is at the tail can be cleaned up
independently. locore, bootblocks, and libkvm still see enough visibility to
build. Checked on 90% of platforms...
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
ARCBios environment variable OSLoadOptions to "nosog". Now everyone
can enjoy running O2 without an SGI monitor and don't turn vegetarian
afterwards. All the essential bits come from NetBSD's crmfb driver
except they've chosen to use a "SyncOnGreen" variable not saved by
the ARCS. Pointers and corrections from and ok miod, jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
controller. In this mode, access to physical memory are not allowed to
bypass the cache, and this allows the memory subsystem to run faster.
Of course, some device drivers will require uncached memory access (e.g.
for proper HPC DMA descriptor operation).
New ip22-specific functions to switch between `fast mode' and `slow mode'
are introduced.
hpc(4) now provides read and write routines to fetch a dma descriptor from
uncached memory into a local copy, and update it from said modified copy.
On systems without the ECC MC, these will do nothing and operation will
continue to access the uncached memory directly. On systems with the ECC MC,
they will perform a copy, and the writeback will be done in slow mode.
bus_dmamem_map() requests for DMA memory with BUS_DMA_COHERENT set in flags,
which would return uncached memory, will now always fail on systems with
the ECC memory controller. Drivers which really need uncached memory, and
are aware of this particular setup, will now pass
BUS_DMA_COHERENT | BUS_DMA_BUS1, which will let the request succeed.
sq(4) will use all of the above to work mostly unmodified on ECC MC systems
in fast mode.
Finally, fast mode is enabled after autoconf.
Tested on IP22 and IP28.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is inverted on Indigo, this just means that Indigo does not use the same
values as the later models. It does not mean that the Indigo is using wrong
values, which is how I first read this. In reality, Indigo systems use the
expected values of these signals being active low, while later designs
use active high signals.
So yes, some systems have inverted values - but the ones which need
compensating are not those I thought.
Change the logic to do TRT, but keep the device flags check, to be able to
force the other behaviour if the kernel guesses wrongly. Tested on Indigo,
Indy and Indigo 2.
|
|
|
|
|
| |
to, so make this controllable with device flags, and default to non-bogus
wiring.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
narrow these in the various ipXX_machdep.c. On IP22-like systems, narrow
them to 28 bit physical addresses, but unpessimize this by extending this
to 32 bit after autoconf, if no 28-bit limited hpc(4) device has been found.
Since physical memory on these systems start at 128MB, this means that Indigo
systems with more than 128MB memory will behave correctly (and so will Indy
systems with E++ boards and more than 128MB memory).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>.
|
|
|
|
|
|
|
|
| |
restrict to 4KB if the kernel is configured with R5000 or RM7000 family support.
Allow the kernel configuration to override this if it knows better (e.g. an
upcoming kernel configuration with support for R5000, but where physical
memory on R5000 systems fits within the first 512MB).
|
|
|
|
|
| |
bus_space_tag on sgi, but rather always provide at least a dummy asm("sync")
flavour. Saves a function pointer test at runtime.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
- add nearbyint, nearbyintf and nearbyintl implemented using fenv
|
|
|
|
|
|
| |
hubs are known during autoconf. Then, pick the most populated 2GB window
as our DMA memory window. xbridge(4) can thus program the correct settings
regardless of the order in which the xbow(4) attach.
|
|
|
|
|
|
|
|
|
| |
Remember the hub widget number of each node, instead of only the master node.
Use this in xbridge to compute the proper direct DMA map configuration
register value (it needs to embed the hub widget number matching the
physical address range).
This should allow us to pick memory from a different node than the one
we booted from, as the DMA window, if wanted.
|
|
|
|
| |
Discussed and okay drahn@. Okay deraadt@.
|
|
|
|
|
|
| |
for it. This makes the netisr a real C function which will help further
development. No noticable performance change on i386 and amd64.
With input from kettenis@ and miod@ additional OKs mikeb@ and henning@
|
|
|
|
| |
prototypes to allow control of the FPU c/sr FS field.
|
| |
|