summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
...
* De-__P(), de-K&R, remove superfluous comments and prototypes, sometmm2002-03-231-565/+122
| | | | style fixes. No functional changes.
* De-K&R.tmm2002-03-231-3/+1
|
* Fix syscall ktraceing.tmm2002-03-231-1/+2
|
* Make this compile without options DDB; use intr_disable() instead oftmm2002-03-231-2/+11
| | | | fiddling with PSTATE_IE manually.
* Decruft some #if 0'ed code.tmm2002-03-231-2/+0
|
* Add PCIfunctions 2 and 3 of the PCIO2 chip to the intpin quirk table.tmm2002-03-231-2/+4
|
* Machine must be non-static for COMPAT_43 to compile. This is used in bsd/osjake2002-03-231-1/+1
| | | | 1.x compatibility code, which I'm sure we all use every day.
* Cleanup the trace back routine slightly. Print the leaf return value sojake2002-03-231-10/+55
| | | | | that traps inside of leaf functions are less confusing. Add a function to print a non-symbolic trace of the user stack.
* Sync with other arches; add bloat.jake2002-03-231-25/+35
|
* Fix a deadlock condition with tlb shootdown ipi delivery. Since ipis arejake2002-03-231-0/+17
| | | | | | | | | | not blocked by raising the pil, a reciever may be interrupted while holding a spinlock. If the sender does not defer interrupts throughout the entire operation it may be interrupted and try to acquire a spinlock held by a reciever, leading to a deadlock due to the synchronization used by the ipi handlers themselves. Submitted by: tmm
* Backout intrusive ktr traces in tlb fault handlers which have served theirjake2002-03-232-566/+2
| | | | purpose.
* ASM versions of __FBSDID.obrien2002-03-231-0/+10
|
* intr_disable returns register_timp2002-03-211-1/+1
|
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-216-26/+8
| | | | Reviewed by: jake
* Remove __P.alfred2002-03-215-38/+38
| | | | | | profile.h and bus.h were excluded because there is currently WIP. Reviewed by: tmm
* Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.jhb2002-03-201-25/+6
| | | | | | | | | | | | Instead of caching the ucred reference, just go ahead and eat the decerement and increment of the refcount. Now that Giant is pushed down into crfree(), we no longer have to get Giant in the common case. In the case when we are actually free'ing the ucred, we would normally free it on the next kernel entry, so the cost there is not new, just in a different place. This also removse td_cache_ucred from struct thread. This is still only done #ifdef DIAGNOSTIC. Tested on: i386, alpha
* This is the first part of the new kernel memory allocator. This replacesjeff2002-03-193-0/+21
| | | | | | malloc(9) and vm_zone with a slab like allocator. Reviewed by: arch@
* Don't demap the requested page from the tlb in pmap_kenter or pmap_kremove,jake2002-03-171-5/+0
| | | | | even on the local cpu. These are no longer used unsafely in MI code, and the MD code has been adjusted to compensate.
* Fix a problem where kernel text could become unmapped when clearing out alljake2002-03-171-8/+9
| | | | | | | | | | | the user mappings from the tlb due to the context numbers rolling over. The store to the internal mmu register must be followed by a membar #Sync before much else happens to "avoid data corruption", so we use special inlines which both disable interrupts and ensure that the compiler will not insert extra instructions between the two. Also, load the tte tag and check if the context is nucleus context, rather than relying on the priviledged bit which doesn't actually serve any purpose in our design, and check the lock bit too for sanity.
* Use the tlb data access register to map the kernel tsb, rather than the datajake2002-03-171-1/+1
| | | | | in register. The latter uses the random replacment algorithm to pick the slot, we want a specific slot.
* Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to thedes2002-03-161-9/+1
| | | | | MI ptrace.h, since all platforms define them. Keep the MD ptrace.h around for FIX_SSTEP (which is currently only needed on Alpha).
* Fix ifdef LOCORE protection.jake2002-03-131-4/+4
|
* Add a DEBUGGER_ON_POWERFAIL option. This makes the power button on ultra 10sjake2002-03-131-0/+7
| | | | work like an NMI button.
* Fix braino.jake2002-03-132-6/+0
|
* Add support for starting and stopping cpus with ipis.jake2002-03-134-8/+93
| | | | | | Stop the other cpus when shutting down or entering the debugger. Submitted by: tmm
* Use intr_disable/intr_restore instead of doing it manually.jake2002-03-131-4/+2
| | | | Submitted by: tmm
* Add support for driving the clocks on secondary cpus.jake2002-03-132-6/+52
| | | | Submitted by: tmm
* Fix a bug where the wrong number of windows were copied for a failed filljake2002-03-132-2/+2
| | | | | on return to user mode. We may not have frame pointers setup for more than 1 on return from exec.
* White space.jake2002-03-132-2/+2
|
* Make IPI_WAIT use a bit mask of the cpus that a pmap is active on and onlyjake2002-03-134-43/+50
| | | | | | | | | | | | wait for those cpus, instead of all of them by using a count. Oops. Make the pointer to the mask that the primary cpu spins on volatile, so gcc doesn't optimize out an important load. Oops again. Activate tlb shootdown ipi synchronization now that it works. We have all involved cpus wait until all the others are done. This may not be necessary, it is mostly for sanity. Make the trigger level interrupt ipi handler work. Submitted by: tmm
* Add an ATOMIC_CLEAR_INT macro.jake2002-03-131-2/+13
| | | | Submitted by: tmm
* Fix the type of some constants, and make some macros safer by castingtmm2002-03-111-18/+18
| | | | the argument.
* Add convenience macros to extract the cc0 and cc1 from format 2 and 3tmm2002-03-111-0/+6
| | | | instructions.
* Increase VM_KMEM_SIZE to 16 megs from 12. Define VM_KMEM_SIZE_SCALE so thatjake2002-03-091-1/+10
| | | | | | | | the number of physical pages per KVA page allocated scales properly with memory size. This fixes problems with kmem_map being too small. Noticed by: mike, wollman Submitted by: tmm
* Add a driver for the mem and kmem devices, based off the i386 version.tmm2002-03-091-0/+244
|
* Set the interrupt map type accordingly if we need to fall back to usingtmm2002-03-091-0/+1
| | | | the PCI bus interrupt map.
* Fix a warning by adding a missing include.tmm2002-03-091-0/+1
|
* o Don't require long long support in bswap64() functions.mike2002-03-091-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness. Submitted by: bde o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code. Reviewed by: bde
* Implement delivery of tlb shootdown ipis. This is currently more fine grainedjake2002-03-0714-324/+335
| | | | | | | | | | | | | | than the other implementations; we have complete control over the tlb, so we only demap specific pages. We take advantage of the ranged tlb flush api to send one ipi for a range of pages, and due to the pm_active optimization we rarely send ipis for demaps from user pmaps. Remove now unused routines to load the tlb; this is only done once outside of the tlb fault handlers. Minor cleanups to the smp startup code. This boots multi user with both cpus active on a dual ultra 60 and on a dual ultra 2.
* Modify the tlb demap API to take a pmap instead of a tlb context number.jake2002-03-075-36/+40
| | | | | | | | Due to allocating tlb contexts on the fly, we only ever need to demap the primary context, non-primary contexts have already been implicitly flushed by context switching. All we really need to tell is if its a kernel demap or not, and its easier just to compare against the kernel_pmap which is a constant.
* Implement kthread context stealing. This is a bit of a misnomer becausejake2002-03-073-54/+53
| | | | | | | | | | | | the context is not actually stolen, as it would be for i386. Instead of deactivating a user vmspace immediately when switching out, and recycling its tlb context, wait until the next context switch to a different user vmspace. In this way we can switch from a user process to any number of kernel threads and back to the same user process again, without losing any of its mappings in the tlb that would not already be knocked by the automatic replacement algorithm. This is not expected to have a measurable performance improvement on the machines we currently run on, but it sounds cool and makes the sparc64 port SMPng buzz word compliant.
* Add support for starting secondary cpus in kernel, as opposed to relyingjake2002-03-049-188/+342
| | | | | | | | | | | | | | | on the loader to do it. Improve smp startup code to be less racy and to defer certain things until the right time. This almost boots single user on my dual ultra 60, it is still very fragile: SMP: AP CPU #1 Launched! Enter full pathname of shell or RETURN for /bin/sh: # ls Debugger("trapsig") Stopped at Debugger+0x1c: ta %xcc, 1 db> heh No such command db>
* Dig the information about which tlb slots were used to map the kernel outjake2002-03-042-10/+21
| | | | of the metadata passed by the loader.
* Allocate tlb contexts on the fly in cpu_switch, instead of statically 1 to 1jake2002-03-048-136/+297
| | | | | | | | | | | | | with pmaps. When the context numbers wrap around we flush all user mappings from the tlb. This makes use of the array indexed by cpuid to allow a pmap to have a different context number on a different cpu. If the context numbers are then divided evenly among cpus such that none are shared, we can avoid sending tlb shootdown ipis in an smp system for non-shared pmaps. This also removes a limit of 8192 processes (pmaps) that could be active at any given time due to running out of tlb contexts. Inspired by: the brown book Crucial bugfix from: tmm
* Fix obscure problems with vfork where part of the parent's stack could bejake2002-03-041-8/+40
| | | | | | | | | | | | | clobbered by the child. This is more complicated than usual because the window that could get clobbered is pushed in kernel mode, so a lot of registers would have to be saved in other registers in userland and we don't have enough. What we do have is space in the pcb to temporarily store user windows that were spilled in kernel mode, but could not be immediately stored to the user stack. So we copy in the parent's topmost window and save it in the pcb, and arrange for it to be copied back out when the child is done frobbing the stack. Reviewed by: tmm
* We don't need KTR_COMPILE in assym.s, its already in opt_global.h. Addjake2002-03-011-1/+4
| | | | assyms for more ktr trace classes.
* Use a better trace class for ktr traces in the tlb fault handlers, which arejake2002-03-012-104/+108
| | | | rather loud.
* - Move a comment from being on the same line as a #ifdef to the linearr2002-02-281-1/+2
| | | | | | | following it. This should have gone in the previous commit, but misviewed Bruce's patch. Requested by: bde
* - Fix panic() message and a couple style nits that snuck in from thearr2002-02-281-3/+3
| | | | recent diagnostics commit (rev. 1.84).
* Fix a minor swap leak.silby2002-02-281-0/+20
| | | | | | | | | | | Previously, the UPAGES/KSTACK area of processes/threads would leak memory at the time that a previously swapped process was terminated. Lukcily, the leak was only 12K/proc, so it was unlikely to be a major problem unless you had an undersized swap partition. Submitted by: dillon Reviewed by: silby MFC after: 1 week
OpenPOWER on IntegriCloud