summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Remove the KDTRACE option again because of the complaints about havingjb2006-11-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | it as a default. For the record, the KDTRACE option caused _no_ additional source files to be compiled in; certainly no CDDL source files. All it did was to allow existing BSD licensed kernel files to include one or more CDDL header files. By removing this from DEFAULTS, the onus is on a kernel builder to add the option to the kernel config, possibly by including GENERIC and customising from there. It means that DTrace won't be a feature available in FreeBSD by default, which is the way I intended it to be. Without this option, you can't load the dtrace module (which contains the dtrace device and the DTrace framework). This is equivalent to requiring an option in a kernel config before you can load the linux emulation module, for example. I think it is a mistake to have DTrace ported to FreeBSD, but not to have it available to everyone, all the time. The only exception to this is the companies which distribute systems with FreeBSD embedded. Those companies will customise their systems anyway. The KDTRACE option was intended for them, and only them.
* Backout the previous change. It was not intended to be part of thejb2006-11-041-6/+6
| | | | | commit and, while something like that is probably required for sparc64, it hadn't been tested.
* Build in kernel support for loading DTrace modules by default. Thisjb2006-11-042-6/+9
| | | | | | | | | | | | | | adds the hooks that DTrace modules register with, and adds a few functions which have the dtrace_ prefix to allow the DTrace FBT (function boundary trace) provider to avoid tracing because they are called from the DTtrace probe context. Unlike other forms of tracing and debug, DTrace support in the kernel incurs negligible run-time cost. I think the only reason why anyone wouldn't want to have kernel support enabled for DTrace would be due to the license (CDDL) under which DTrace is released.
* make pcb pad area accessible from asmkmacy2006-11-031-0/+2
| | | | Approved by: scottl (standing in for rwatson as mentor)
* - In sunkbd_probe_keyboard() don't bother to determine the keyboard layoutmarius2006-11-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as we have no use for that info. Instead let this function return the keyboard ID and verify at its invocation in sunkbd_configure() that we're talking to a Sun type 4/5/6 keyboard, i.e. a keyboard supported by this driver. - Add an option SUNKBD_EMULATE_ATKBD whose code is based on the respective code in ukbd(4) and like UKBD_EMULATE_ATSCANCODE causes this driver to emit AT keyboard/KB_101 compatible scan codes in K_RAW mode as assumed by kbdmux(4). Unlike UKBD_EMULATE_ATSCANCODE, SUNKBD_EMULATE_ATKBD also triggers the use of AT keyboard maps and thus allows to use the map files in share/syscons/keymaps with this driver at the cost of an additional translation (in ukbd(4) this just is the way of operation). - Implement an option SUNKBD_DFLT_KEYMAP, which like the equivalent options of the other keyboard drivers allows to specify the default in-kernel keyboard map. For obvious reasons this made to only work when also using SUNKBD_EMULATE_ATKBD. - Implement sunkbd_check(), sunkbd_check_char() and sunkbd_clear_state(), which are also required for interoperability with kbdmux(4). - Implement K_CODE mode and FreeBSD keypad compose. - As a minor hack define KBD_DFLT_KEYMAP also in the !SUNKBD_EMULATE_ATKBD case so we can obtain fkey_tab from <dev/kbd/kbdtables.h> rather than having to duplicate it and #ifdef some more code. - Don't use the TX-buffer for writing the two command bytes for setting the keyboard LEDs as this consequently requires a hardware FIFO that is at least two bytes in depth, which the NMOS-variant of the Zilog SCCs doesn't have. Thus use an inlined version of uart_putc() to consecutively write the command bytes (a cleaner approach would be to do this via the soft interrupt handler but that variant wouldn't work while in ddb(4)). [1] - Fix some minor style(9) bugs. PR: 90316 [1] Reviewed by: marcel [1]
* Remove the atkbd(4), atkbdc(4) and psm(4) hints. In theory they can bemarius2006-11-011-6/+0
| | | | used on sparc64 but that would be totally wrong in practice.
* Add a cnputs() function to write a string to the console withjb2006-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | a lock to prevent interspersed strings written from different CPUs at the same time. To avoid putting a buffer on the stack or having to malloc one, space is incorporated in the per-cpu structure. The buffer size if 128 bytes; chosen because it's the next power of 2 size up from 80 characters. String writes to the console are buffered up the end of the line or until the buffer fills. Then the buffer is flushed to all console devices. Existing low level console output via cnputc() is unaffected by this change. ithread calls to log() are also unaffected to avoid blocking those threads. A minor change to the behaviour in a panic situation is that console output will still be buffered, but won't be written to a tty as before. This should prevent interspersed panic output as a number of CPUs panic before we end up single threaded running ddb. Reviewed by: scottl, jhb MFC after: 2 weeks
* In the replacement text of the __bswapN_const() macros encapsulate themarius2006-10-301-8/+12
| | | | | | | | | | | | argument in parentheses so these macros are safe to use and invocations with an expression as the argument like __bswap32_const(42 << 23 | 13) work as expected. Additionally, mask all the individually shifted bytes as appropriate so the bytes which exceed the width of the respective __bswapN_const() macro in invocations like __bswap16_const(0xdead600d) are ignored like it's the case with the corresponding __bswapN_var() function. MFC after: 3 days
* Remove the KSE option now that it's in DEFAULTS on these arches/machines.jb2006-10-261-1/+0
| | | | | | | | | The 'nooption' kernel config entry has to be used to turn KSE off now. This isn't my preferred way of dealing with this, but I'll defer to scottl's experience with the io/mem kernel option change and the grief experienced over that. Submitted by: scottl@
* Add 'options KSE' to the kernel config DEFAULTS on all arches/machinesjb2006-10-261-0/+3
| | | | | | | | | | | except sun4v. This change makes the transition from a default to an option more transparent and is an attempt to head off all the compliants that are likely from people who don't read UPDATING, based on experience with the io/mem change. Submitted by: scottl@
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-263-0/+7
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* Move "device splash" back to MI NOTES and "files", it's MI.ru2006-10-231-2/+0
|
* Revision 1.25 had the ATKBD_DFLT_KEYMAP option turned on and then off:ru2006-10-231-0/+4
| | | | | | | | | | | | | | : # Options for atkbd: : options ATKBD_DFLT_KEYMAP # specify the built-in keymap : makeoptions ATKBD_DFLT_KEYMAP=jp.106 [...] : nooption ATKBD_DFLT_KEYMAP : nomakeoption ATKBD_DFLT_KEYMAP (Previously the option was inherited from MI NOTES.) So my tool in rev. 1.26 reduced this to removing all "ATKBD_DFLT_KEYMAP" lines, leaving the option effectively disabled as it was before, but since it's actually supported on sparc64, turn it on now.
* Mechanically kill redundant nodevice/nooption/nomakeoption, i.e.,ru2006-10-231-7/+0
| | | | | those that do not exist in MI NOTES or switched on/off in the MD NOTES.
* Move more MD devices and options out of MI NOTES.des2006-10-201-7/+33
|
* o Add keyword volatile for user mutex owner field.davidxu2006-10-171-2/+2
| | | | | | o Fix type consistent problem by using type long for old umtx and wait channel. o Rename casuptr to casuword.
* The T2000 has multiple PCI domains requiring bus allocation to be done ↵kmacy2006-10-122-0/+11
| | | | | | | | differently. This pulls in changes by jmg from perforce and makes them sun4v only for now. Approved by: scottl (acting as backup for mentor rwatson)
* The powerpc and sparc64 MD `reboot' commands should never have existedbde2006-10-101-11/+0
| | | | | | | | | | | | | | | | | since they just duplicated the MI `reset' command. Instead of removing them, make `reboot' an MI alias for `reboot' since this gives a better way of killing the `r' alias for `reset'. Remove the `registers' command that was used to kill the alias. Turn the powerpc and sparc64 MD `halt' command into an MI command. A copy of sparc64/db_interface.c grew in sun4v just after I found the extra reboot commands. It has not been changed, and is now not identical. Duplicated commands come out duplicated in ddb's online help, but cause large problems when used (e.g., on i386's with 2 halt's and an hwatch, typing h doesn' give the expected message about an ambiguous command, but hangs like the halt command or a looping parseri would).
* unbreak buildkernel for sparc64 - fallout from sun4vkmacy2006-10-091-6/+5
| | | | | Approved by: rwatson (mentor) Reviewed by: jmg
* unbreak sparc64 loader buildkmacy2006-10-091-1/+1
| | | | | | | | re-add accidentally deleted asi value remove sun4v only header include Approved by: rwatson (mentor) Reviewed by: jmg
* kernel clean up to make the sun4v kernel buildkmacy2006-10-093-13/+89
| | | | | Reviewed by: jmg Approved by: rwatson (mentor)
* - Remove SCHED_ULE from GENERIC to better avoid foot-shooting bysimon2006-10-051-1/+0
| | | | | | | | | | | unsuspecting users. - Add a comment in NOTES about experimental status of SCHED_ULE. - Make warning about experimental status in sched_ule(4) a bit stronger. Suggested and reviewed by: dougb Discussed on: developers MFC after: 3 days
* PR:jb2006-10-041-84/+0
| | | | | | | | | | | | | | Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one. Add the additional ELF types defines in Sun's "Linker and Libraries" manual.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-021-3/+0
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Added COMPAT_FREEBSD6 option.ru2006-09-261-0/+1
|
* The fix in revision 1.152 converted in the wrong direction.alc2006-09-221-2/+2
| | | | | | Fix a typo in a comment. Submitted by: Michael Plass
* The sparc64/sparc64/pmap.c implementations of pmap_remove(),alc2006-09-221-6/+15
| | | | | | | | | | | pmap_protect(), and pmap_copy() have optimizations for regions larger than PMAP_TSB_THRESH (which works out to 16MB). This caused a panic in tsb_foreach for kernel mappings, since pm->pm_tsb is NULL in that case. This fix teaches tsb_foreach to use the kernel's tsb in that case. Submitted by: Michael Plass MFC after: 3 days
* Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoleteskan2006-09-211-1/+1
| | | | | the former and __builtin_va_start was present in all GCC version 3.1 and later.
* Do as the USII CPU manual suggests and leave interrupts enabledmarius2006-09-031-0/+6
| | | | | | | | | | for a bit before retrying to resend an IPI in order to avoid deadlocks if the other CPU is also trying to send one. OpenSolaris uses a delay of 1 microsecond here but waiting 2 microseconds with interrupts enabled like Linux does shouldn't hurt but is a bit safer. MFC after: 1 day
* Implement casuword32, compare and set user integer, thank Marcel Moolenarrdavidxu2006-08-281-1/+1
| | | | who wrote the IA64 version of casuword32.
* Eliminate the unnecessary acquisition and release of the page queues lockalc2006-08-061-4/+0
| | | | from pmap_pinit().
* Complete the transition from pmap_page_protect() to pmap_remove_write().alc2006-08-011-18/+1
| | | | | | | | | | | | | Originally, I had adopted sparc64's name, pmap_clear_write(), for the function that is now pmap_remove_write(). However, this function is more like pmap_remove_all() than like pmap_clear_modify() or pmap_clear_reference(), hence, the name change. The higher-level rationale behind this change is described in src/sys/amd64/amd64/pmap.c revision 1.567. The short version is that I'm trying to clean up and fix our support for execute access. Reviewed by: marcel@ (ia64)
* Remove sio(4) and related options from MI files to amd64, i386marcel2006-07-291-3/+0
| | | | | | | | | and pc98 MD files. Remove nodevice and nooption lines specific to sio(4) from ia64, powerpc and sparc64 NOTES. There were no such lines for arm yet. sio(4) is usable on less than half the platforms, not counting a future mips platform. Its presence in MI files is therefore increasingly becoming a burden.
* Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg isjhb2006-07-281-1/+1
| | | | now back to just being an argument count.
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-281-14/+0
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Unify the checking for lock misbehavior in the various syscall()jhb2006-07-271-5/+13
| | | | | | | | | | | | | | implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added. MFC after: 2 weeks
* Add stge(4) to the list of drivers supported by GENERIC kernel.yongari2006-07-251-0/+1
|
* Add pmap_clear_write() to the interface between the virtual memoryalc2006-07-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | system's machine-dependent and machine-independent layers. Once pmap_clear_write() is implemented on all of our supported architectures, I intend to replace all calls to pmap_page_protect() by calls to pmap_clear_write(). Why? Both the use and implementation of pmap_page_protect() in our virtual memory system has subtle errors, specifically, the management of execute permission is broken on some architectures. The "prot" argument to pmap_page_protect() should behave differently from the "prot" argument to other pmap functions. Instead of meaning, "give the specified access rights to all of the physical page's mappings," it means "don't take away the specified access rights from all of the physical page's mappings, but do take away the ones that aren't specified." However, owing to our i386 legacy, i.e., no support for no-execute rights, all but one invocation of pmap_page_protect() specifies VM_PROT_READ only, when the intent is, in fact, to remove only write permission. Consequently, a faithful implementation of pmap_page_protect(), e.g., ia64, would remove execute permission as well as write permission. On the other hand, some architectures that support execute permission have basically ignored whether or not VM_PROT_EXECUTE is passed to pmap_page_protect(), e.g., amd64 and sparc64. This change represents the first step in replacing pmap_page_protect() by the less subtle pmap_clear_write() that is already implemented on amd64, i386, and sparc64. Discussed with: grehan@ and marcel@
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-9/+6
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* Make the firmware assist driver resident inmjacob2006-07-091-1/+2
| | | | preparation for isp using it.
* Backed out the change by request from rwatson.babkin2006-06-261-1/+0
| | | | PR: kern/14584
* The common UID/GID space implementation. It has been discussed on -archbabkin2006-06-251-0/+1
| | | | | | | | | | in 1999, and there are changes to the sysctl names compared to PR, according to that discussion. The description is in sys/conf/NOTES. Lines in the GENERIC files are added in commented-out form. I'll attach the test script I've used to PR. PR: kern/14584 Submitted by: babkin
* Remove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there'snetchild2006-06-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | an explicit comment that it's needed for the linuxolator. This is not the case anymore. For all other architectures there was only a "KEEP THIS". I'm (and other people too) running a COMPAT_43-less kernel since it's not necessary anymore for the linuxolator. Roman is running such a kernel for a for longer time. No problems so far. And I doubt other (newer than ia32 or alpha) architectures really depend on it. This may result in a small performance increase for some workloads. If the removal of COMPAT_43 results in a not working program, please recompile it and all dependencies and try again before reporting a problem. The only place where COMPAT_43 is needed (as in: does not compile without it) is in the (outdated/not usable since too old) svr4 code. Note: this does not remove the COMPAT_43TTY option. Nagging by: rdivacky
* Remove mpte optimization from pmap_enter_quick().ups2006-06-151-4/+2
| | | | | | | | | There is a race with the current locking scheme and removing it should have no measurable performance impact. This fixes page faults leading to panics in pmap_enter_quick_locked() on amd64/i386. Reviewed by: alc,jhb,peter,ps
* - Complete breaking out the definition of bus_space_{tag,handle}_t bymarius2006-06-132-12/+4
| | | | | | | | | | | moving the typedef of bus_space_tag_t from sys/sparc64/include/bus.h to sys/sparc64/include/_bus.h. This brings sparc64 in sync with the other platforms and fixes the compilation of drivers which include <sys/rman.h> before <machine/bus.h> after sys/sys/rman.h rev. 1.34. - Remove the definition of bus_type_t from sys/sparc64/include/_bus.h as it's unused since sys/sparc64/include/bus.h rev. 1.6 and sys/sparc64/sparc64/bus_machdep.c rev. 1.3. - Remove some pointless comments.
* Correct transposed digits in device names which were added in themarius2006-06-131-2/+2
| | | | previous revision.
* Add the ability to subset the devices that UART pulls in. This allowsimp2006-06-121-0/+5
| | | | | | | | the arm to compile without all the extras that don't appear, at least not in the flavors of ARM I deal with. This helps us save about 100k. If I've botched the available devices on a platform, please let me know and I'll correct ASAP.
* - Merge sys/sparc64/pci/psycho.c rev. 1.8:marius2006-06-081-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Map the device memory belonging to resources of type SYS_RES_MEMORY into KVA upon activation so that rman_get_virtual() works as expected. - In sbus_alloc_resource() checking whether toffs is 0 as an indication that no applicable child range was found isn't appropriate as it's perfectly valid for the requested SYS_RES_MEMORY resource to start at the beginning of a child range. So check for the RMAN still being NULL instead. - As a minor runtime speed optimization break out of the loop where we search for the applicable child range in sbus_alloc_resource() as soon as it's found. - Let sbus_setup_intr() return ENOMEM rather than 0 if it can't allocate memory for the interrupt clearing info. - Actually do what the comment in sbus_setup_intr() says and disable the respective interrupt while fiddling with it. - Remove some superfluous INTVEC() around inr, which already only contains the interrupt vector, in sbus_setup_intr(). - While here, fix a style(9) bug in sbus_setup_intr() (don't use function calls in initializers). The first two changes are required for a CG6 driver. MFC after: 2 weeks
* add ath & co.sam2006-06-071-0/+9
| | | | MFC after: 1 month
* Introduce the function pmap_enter_object(). It maps a sequence of residentalc2006-06-051-11/+64
| | | | | | | pages from the same object. Use it in vm_map_pmap_enter() to reduce the locking overhead of premapping objects. Reviewed by: tegge@
OpenPOWER on IntegriCloud