summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
Commit message (Collapse)AuthorAgeFilesLines
* Adjust the padding of struct pcpu to r193219.marius2009-06-031-2/+2
| | | | Submitted by: Eygene Ryabinkin
* Remove MAC kernel config files and add "options MAC" to GENERIC, with therwatson2009-06-022-28/+1
| | | | | | | | | | | | | | | goal of shipping 8.0 with MAC support in the default kernel. No policies will be compiled in or enabled by default, but it will now be possible to load them at boot or runtime without a kernel recompile. While the framework is not believed to impose measurable overhead when no policies are loaded (a result of optimization over the past few months in HEAD), we'll continue to benchmark and optimize as the release approaches. Please keep an eye out for performance or functionality regressions that could be a result of this change. Approved by: re (kensmith) Obtained from: TrustedBSD Project
* Place hostnames and similar information fully under the prison system.jamie2009-05-291-1/+0
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* Last minute TTY API change: remove mutex argument from tty_alloc().ed2009-05-291-1/+1
| | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
* Add cpu_flush_dcache() for use after non-DMA based I/O so that amarcel2009-05-181-0/+10
| | | | | | | | | | | | | | | | | | | | | possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet. Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
* Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizingrwatson2009-04-201-3/+1
| | | | | | | | | | | | a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1] Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2] Suggested by: bde [1], jhb [2] MFC after: 2 weeks
* Add description and cautionary note regarding CACHE_LINE_SIZE.rwatson2009-04-191-0/+4
| | | | | MFC after: 2 weeks Suggested by: alc
* For each architecture, define CACHE_LINE_SHIFT and a derivedrwatson2009-04-191-0/+5
| | | | | | | | | | | | | CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available. Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems). MFC after: 2 weeks Discussed on: arch@
* - There's no need to wrap kdb_active and kdb_trap() in #ifdef KDB asmarius2009-03-192-14/+4
| | | | | | | | | they're always available. - Remove unused variable. [1] - Add a missing const. - Sort includes. Submitted by: Christoph Mallon [1]
* Remove the uscanner(4) driver, this follows the removal of the kernel scannerthompsa2009-03-191-1/+0
| | | | | | | driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and contained no logic, the default interface is now libusb (supported by sane). Reviewed by: HPS
* Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointerkib2009-03-171-4/+2
| | | | | | | | | | to the full path of the image that is being executed. Increase AT_COUNT. Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries. Reviewed by: kan
* Change over the usb kernel options to the new stack (retaining existingthompsa2009-02-231-58/+5
| | | | naming). The old usb stack can be compiled in my prefixing the name with 'o'.
* Add uslcom to the build too.thompsa2009-02-151-0/+1
| | | | Reminded by: Michael Butler
* Switch over GENERIC kernels to USB2 by default.thompsa2009-02-151-6/+57
| | | | Tested by: make universe
* - Use the generally more appropriate PROM base rather than themarius2009-02-111-1/+1
| | | | | | | | | | | kernel one as the non-faulting flush address in the loader so we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we ever want to without needing to worry about using a compatible loader. - Correctly check for LOADER_DEBUG. - Add a missing const for page_sizes[]. This file was missed in r188455.
* Adjust the padding of struct pcpu to r187357.marius2009-01-181-1/+7
|
* Missed the sun4v update to ofw_machdep.h in the OFW modularization commit.nwhitehorn2008-12-201-1/+6
|
* Modularize the Open Firmware client interface to allow run-time switchingnwhitehorn2008-12-204-20/+19
| | | | | | | | | | | | of OFW access semantics, in order to allow future support for real-mode OF access and flattened device frees. OF client interface modules are implemented using KOBJ, in a similar way to the PPC PMAP modules. Because we need Open Firmware to be available before mutexes can be used on sparc64, changes are also included to allow KOBJ to be used very early in the boot process by only using the mutex once we know it has been initialized. Reviewed by: marius, grehan
* Make gpart the default partitioning class on all platforms.marcel2008-12-171-2/+2
| | | | | | | Both ia64 and powerpc were using gpart exclusively already so there's no change for those two. Discussed on: arch@
* AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.imp2008-12-171-12/+0
| | | | Reviewed by: peter
* Adapt parts of the sparc64 Open Firmware bus enumeration code (in particular,nwhitehorn2008-12-151-53/+0
| | | | | | | | | | | | | | | the code for parsing interrupt maps) to PowerPC and reflect their new MI status by moving them to the shared dev/ofw directory. This commit also modifies the OFW PCI enumeration procedure on PowerPC to allow the bus to find non-firmware-enumerated devices that Apple likes to add, and adds some useful Open Firmware properties (compat and name) to the pnpinfo string of children on OFW SBus, EBus, PCI, and MacIO links. Because of the change to PCI enumeration on PowerPC, X has started working again on PPC machines with Grackle hostbridges. Reviewed by: marius Obtained from: sparc64
* Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important.ed2008-12-021-2/+2
| | | | | | | Sgtty is a programming interface that has been replaced by termios over the years. In June we already removed <sgtty.h>, which exposes the ioctl()'s that are implemented by this interface. The importance of this flag is overrated right now.
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,kmacy2008-11-221-0/+4
| | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
* - In GCC 4.2 __builtin_frame_address() was fixed to include themarius2008-10-272-25/+13
| | | | | | | | | | V9 stack bias so we no longer need to add it in db_backtrace() and stack_capture() respectively. This also reverts r182018, which kludged around the resulting unaligned access. - Sync the sun4v versions of db_trace.c and stack_machdep.c with the sparc64 ones and fix some style bugs. MFC after: 3 days
* Collect N identical (or near identical) mkdumpheader() implementations intopeter2008-10-011-22/+1
| | | | one, as threatened in the comment. Textdump magic can be passed in.
* Remove ipi_all() and ipi_self() as the former hasn't been used atmarius2008-09-281-1/+0
| | | | | | | | | | | all to date and the latter also is only used in ia64 and powerpc code which no longer serves a real purpose after bring-up and just can be removed as well. Note that architectures like sun4u also provide no means of implementing IPI'ing a CPU itself natively in the first place. Suggested by: jhb Reviewed by: arch, grehan, jhb
* Work around Cheetah+ erratum 34 (USIII+ erratum #10) by relocatingmarius2008-09-101-0/+1
| | | | | | | | the locked entry in it16 slot 0, which typically is occupied by the PROM, and manually entering locked entries in slots != 0. Thanks to Hubert Feyrer for donating the Blade 2000 this change was developed on.
* MFsparc64: r177642marius2008-09-021-9/+0
| | | | Remove sysbeep() from the non-beeping archs.
* Resurrect clock.c from r164371.marius2008-09-021-0/+67
|
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-202-114/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* Export 'struct pcpu' to userland w/o requiring _KERNEL. A few portsjhb2008-08-191-2/+3
| | | | | | | already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data. MFC after: 1 week
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* - Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There'smarius2008-08-071-0/+4
| | | | | | | | | | | | | | | no particular reason for them to be implemented in assembler and having them in C allows easier extension as well as using more C macros and {d,i}tlb_slot_max rather than hard-coding magic (and actually spitfire-only) values. - Fix the compilation of pmap_print_tte(). - Change pmap_print_tlb() to use ldxa() rather than re-rolling it inline as well as TLB_DAR_SLOT and {d,i}tlb_slot_max rather than hardcoding magic (and actually spitfire-only) values. - While at it, suffix the above mentioned functions with "_sun4u" to underline they're architecture-specific. - Use __FBSDID and macros instead of magic values in locore.S. - Remove unused includes and smp_stack in locore.S.
* Disconnect drivers that haven't been ported to MPSAFE TTY yet.ed2008-08-031-2/+0
| | | | | | | | | | | | | As clearly mentioned on the mailing lists, there is a list of drivers that have not been ported to the MPSAFE TTY layer yet. Remove them from the kernel configuration files. This means people can now still use these drivers if they explicitly put them in their kernel configuration file, which is good. People should keep in mind that after August 10, these drivers will not work anymore. Even though owners of the hardware are capable of getting these drivers working again, I will see if I can at least get them to a compilable state (if time permits).
* Add HWPMC_HOOKS to GENERIC kernels, this makes hwpmc.ko work outdelphij2008-07-071-0/+1
| | | | of the box.
* Given that sun4u uses sparc64/sparc64/in_cksum.c, use the sparc64marius2008-06-251-164/+2
| | | | | | <machine/in_cksum.h> here also. MFC after: 3 days
* Remove the unused major/minor numbers from iodev and memdev.ed2008-06-251-1/+0
| | | | | | | | | Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem. Approved by: philip (mentor)
* Use the "options " spelling (vs. "options<TAB>") so that commented linesobrien2008-05-211-12/+12
| | | | line up nicely.
* Retire pmap_addr_hint(). It is no longer used.alc2008-05-181-6/+0
|
* Add a stub for pmap_align_superpage() on machines that don't (yet)alc2008-05-091-0/+10
| | | | implement pmap-level support for superpages.
* Expand kdb_alt_break a little, most commonly used with the optionpeter2008-05-041-2/+16
| | | | | | | | | | | | | | | | | | | ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons). We've used variations of this at work. The force panic sequence is best used with KDB_UNATTENDED for when you just want it to dump and get on with it. The reboot request is a safer way of getting into single user than a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc). It gives init the reboot signal, which causes an orderly reboot. I've taken my best guess at what the !x86 and non-sio code changes should be. This also makes sio release its spinlock before calling KDB/DDB.
* Remove an header which is unused for sun4v.marius2008-05-023-67/+0
| | | | MFC after: 3 days
* Remove the MD isa_irq_pending() and the underlying PCI-specificmarius2008-04-261-11/+0
| | | | | | | | | infrastructure. Its only consumer ever was sio(4) and thus was unused on sparc64 since removing the last traces of sio(4) in sparc64 configuration files in favor for uart(4) over three years ago. If similar functionality is required again it should be brought back as an MD intr_pending() which works for all busses by using for example interrupt controller hooks.
* - Add an integer argument to idle to indicate how likely we are to wakejeff2008-04-251-1/+8
| | | | | | | | | | | | | | | from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted. Sponsored by: Nokia
* Make genclock standard on all platforms.phk2008-04-212-2/+0
| | | | Thanks to: grehan & marcel for platform support on ia64 and ppc.
* - Add the interrupt vector number to intr_event_create so MI code canjeff2008-04-111-2/+2
| | | | | | | | | | | | lookup hard interrupt events by number. Ignore the irq# for soft intrs. - Add support to cpuset for binding hardware interrupts. This has the side effect of binding any ithread associated with the hard interrupt. As per restrictions imposed by MD code we can only bind interrupts to a single cpu presently. Interrupts can be 'unbound' by binding them to all cpus. Reviewed by: jhb Sponsored by: Nokia
* Add a MI intr_event_handle() routine for the non-INTR_FILTER case. Thisjhb2008-04-051-79/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | allows all the INTR_FILTER #ifdef's to be removed from the MD interrupt code. - Rename the intr_event 'eoi', 'disable', and 'enable' hooks to 'post_filter', 'pre_ithread', and 'post_ithread' to be less x86-centric. Also, add a comment describe what the MI code expects them to do. - On amd64, i386, and powerpc this is effectively a NOP. - On arm, don't bother masking the interrupt unless the ithread is scheduled in the non-INTR_FILTER case to match what INTR_FILTER did. Also, don't bother unmasking the interrupt in the post_filter case if we never masked it. The INTR_FILTER case had been doing this by having arm_unmask_irq for the post_filter (formerly 'eoi') hook. - On ia64, stray interrupts are now masked for the non-INTR_FILTER case. They were already masked in the INTR_FILTER case. - On sparc64, use the a NULL pre_ithread hook and use intr_enable_eoi() for both the 'post_filter' and 'post_ithread' hooks to match what the non-INTR_FILTER code did. - On sun4v, retire the ithread wrapper hack by using an appropriate 'post_ithread' hook instead (it's what 'post_ithread'/'enable' was designed to do even in 5.x). Glanced at by: piso Reviewed by: marius Requested by: marius [1], [5] Tested on: amd64, i386, arm, sparc64
* Add kernel module support for nfslockd and krpc. Use the module systemdfr2008-03-271-0/+1
| | | | | | | to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k' option to rpc.lockd and make kernel NLM the default. A user can still force the use of the old user NLM by building a kernel without NFSLOCKD and/or removing the nfslockd.ko module.
* When building a kernel module, define MAXCPU the same as SMP sojb2008-03-271-2/+2
| | | | that modules work with and without SMP.
* Remove two variables which are handled MI now.phk2008-03-261-3/+0
|
OpenPOWER on IntegriCloud