Commit Graph

59 Commits

Author SHA1 Message Date
Marius Strobl
84edfa5dd8 Given that these sparc64 (as in sun4u) specific headers only exist
in the sun4v source in order to be able to compile the source which
is shared between sparc64 and sun4v just #include the sparc64
version here instead of duplicating it.
This is based on the approach taken by pc98 headers in order to
compile the source shared between i386 and pc98.
2007-05-20 13:19:32 +00:00
Marius Strobl
ebf9df0158 Delete the unused/not really used sparc64 (as in sun4u) cache.h,
iommureg.h (which already began to bitrot) and iommuvar.h from the
sun4v source and adjust some of the source which is shared between
sparc64 and sun4v as appropriate.
2007-05-20 13:06:45 +00:00
Marius Strobl
331a66091a Delete a remnant of the old sparc64 nexus(4) which was never used for sun4v. 2007-05-20 09:58:16 +00:00
Marius Strobl
ac474f9545 - Add bits for userland profiling. For sun4u this is compile-tested only.
- Replace magic 14 with PIL_TICK.
2007-05-11 23:43:55 +00:00
Alan Cox
04a18977c8 Define every architecture as either VM_PHYSSEG_DENSE or
VM_PHYSSEG_SPARSE depending on whether the physical address space is
densely or sparsely populated with memory.  The effect of this
definition is to determine which of two implementations of
vm_page_array and PHYS_TO_VM_PAGE() is used.  The legacy
implementation is obtained by defining VM_PHYSSEG_DENSE, and a new
implementation that trades off time for space is obtained by defining
VM_PHYSSEG_SPARSE.  For now, all architectures except for ia64 and
sparc64 define VM_PHYSSEG_DENSE.  Defining VM_PHYSSEG_SPARSE on ia64
allows the entirety of my Itanium 2's memory to be used.  Previously,
only the first 1 GB could be used.  Defining VM_PHYSSEG_SPARSE on
sparc64 allows USIIIi-based systems to boot without crashing.

This change is a combination of Nathan Whitehorn's patch and my own
work in perforce.

Discussed with: kmacy, marius, Nathan Whitehorn
PR:		112194
2007-05-05 19:50:28 +00:00
Stephane E. Potvin
0e5179e441 Add support for specifying a minimal size for vm.kmem_size in the loader via
vm.kmem_size_min. Useful when using ZFS to make sure that vm.kmem size will
be at least 256mb (for example) without forcing a particular value via vm.kmem_size.

Approved by: njl (mentor)
Reviewed by: alc
2007-04-21 01:14:48 +00:00
Alexander Kabaev
b27c252dcf Remove extern struct pcb stoppcbs[] declaration from this file.
It breaks GCC 4.1 compiles and does not appear to be required.
2007-04-05 18:34:11 +00:00
Alan Cox
c640357f04 Push down the implementation of PCPU_LAZY_INC() into the machine-dependent
header file.  Reimplement PCPU_LAZY_INC() on amd64 and i386 making it
atomic with respect to interrupts.

Reviewed by: bde, jhb
2007-03-11 05:54:29 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
Kip Macy
6d449d27d9 Add support for IPI_PREEMPT in order to enable use of the ULE scheduler 2007-02-02 05:00:21 +00:00
Marius Strobl
0ca3609e30 Convert the remainder of the low hanging fruits regarding including
headers in .S directly rather than getting to their macros through
genassym.c/assym.s so there are less headers genassym.c has to be
kept in sync with.
While at it fix some stytle(9) bugs (indentation, prototype format,
sort headers, etc) and remove trailing whitespace.
2007-01-19 11:15:34 +00:00
Marius Strobl
23e81b7e03 - Rename UPA_BUS_SPACE to NEXUS_BUS_SPACE; besides an UPA bus, nexus(4)
may also reflect a Fireplane/Safari or JBus bus (or a virtual bus which
  in turn reflects a JBus bus or something like that...).
- In the both the sparc64 and sun4v bus_machdep.c use __FBSDID.
- Spell SBus the official way in comments.
- Replace hardcoded function names (all of which were actually outdated)
  in panic and status strings with __func__.
- Fix whitespace nits.
2007-01-18 18:32:26 +00:00
Marius Strobl
441b9412d6 Remove the compat shims for the ISA old-stlye in{b,w,l}()/out{b,w,l}()
and friends along with all hacks required to implement them. None of
the drivers currently built (as part of GENERIC, LINT or modules) on
sparc64 or sun4v and none of those we might want to use there in
future uses them, AFAICT there actually never was a driver hooked up
to the sparc64 or sun4v build that correctly used these functions
(and it looks like that due to a bug read{b,w,l}()/write{b,w,l}() and
the other functions working on a memory handle never actually worked on
sun4v). All they ever were good for on sparc64 and sun4v was erroneously
dragging in dependencies on isa(4) in drivers like f.e. dpt(4), si(4)
and syscons(4) in source files that supposedly were bus-neutral and
hiding issues with drivers like f.e. ng_bt3c(4) that used these
functions with busses other than isa(4) and therefore couldn't work on
these platforms.
2007-01-18 13:52:44 +00:00
Warner Losh
fed32d7544 Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
Kip Macy
35d16ac000 - add ranged shootdowns when fewer than 64 mappings are being invalidated 2006-12-25 02:05:52 +00:00
Kip Macy
a7a6fa29bd reduce padding to compensate for recent change to sys/pcpu.h (tinderbox fix) 2006-12-20 20:18:07 +00:00
Kip Macy
0ebc11deba add declaration for new helper function 2006-12-18 07:25:26 +00:00
Kip Macy
7e3cb9f8ce GC unused fields in pcpu 2006-12-17 02:04:19 +00:00
Kip Macy
e7c1a6ce81 change PTL trap type name to assist in tracking down prablems in tl1_trap 2006-12-16 08:01:13 +00:00
Kip Macy
abbeb75f29 make size of pad non-zero so that trap-tracing code doesn't overwrite the
base of our stack
2006-12-11 04:50:25 +00:00
Kip Macy
4598ab64b0 - separate out rounding memory ranges to 4M boundaries from OFW memory allocation bug workaround
- create real_phys_avail which includes all memory ranges to be added to the direct map
- merge in nucleus memory to real_phys_avail
- distinguish between tag VA and index VA in tsb_set_tte_real for cases where page_size != index_page_size
- clean up direct map loop
2006-12-04 19:35:40 +00:00
Kip Macy
8751d0554c - Explicitly name the fields in pcb that we use to store trap state for later
retrieval, rather than using pad
- save the fault address in sfar for use by the alignment fixup handler
- mask off the trap number, so the context id doesn't confuse the UT_MAX
  comparison

This change fixes alignment fixup handling which is needed for traceroute
to work in spite of its copious unaligned accesses
2006-11-29 05:18:19 +00:00
Kip Macy
2aa7f6c1b2 Declare hypervisor system initiated reset function
as needed by the previous commit :-/
2006-11-26 22:47:52 +00:00
Kip Macy
548d785ec5 add interrupt cookie hypervisor functions 2006-11-26 04:37:49 +00:00
Kip Macy
4305064c65 - implement remaining pci functions
- fix build errors
2006-11-24 20:47:29 +00:00
Kip Macy
234e688e0c Implement mmu functions and cpu_mondo_send
fix some more kernel compile fallout
2006-11-24 18:50:56 +00:00
Kip Macy
217112e529 comment all remaining documented hypervisor functions except for msi
implement performance counter functions
2006-11-24 07:49:15 +00:00
Kip Macy
01e461dcc2 document and comment all functions outside of MMU and MSI services
from those, implement all those whose arguments don't require save/restore
2006-11-24 07:11:24 +00:00
Kip Macy
17b84f855f - Comment most of the remaining hypercalls in hcall.S
- implement hypercalls returning a single value
- start fixing the fallout of the recent changes needed to get
  the kernel compiling again
2006-11-24 05:27:49 +00:00
Kip Macy
c4a6aff220 Add in initial clean room implementation of hypervisor interfaces 2006-11-23 23:47:53 +00:00
Kip Macy
ac4bca68bc Remove system critical files with CDDL origin
with the plan being to create clean room versions
2006-11-23 21:22:06 +00:00
Kip Macy
4bd2dcb8aa Add watchdog support 2006-11-23 04:59:29 +00:00
Kip Macy
9f349fb200 Add in missing hypercall numbers 2006-11-23 04:38:14 +00:00
Kip Macy
d4abe2870a re-name misnamed single character console interfaces
add in multi character console interfaces
2006-11-23 04:18:21 +00:00
Kip Macy
bcbf936a19 Add hypervisor interfaces for logical domain channels from the hypervisor API docs
remove bogus CDDL
2006-11-23 03:52:39 +00:00
Kip Macy
185877cc43 In contrast to the non-obvious and flexible nature of the optimized bcopy in t1_copy.S (which
shall retain its CDDL copyright, and thus likely be removed from GENERIC) I have removed the CDDL
from hcall.S because there is zero flexibility in the implementation of hypercalls as they derive
directly from the hypervisor interface which is not copyrighted (ironically the source for the
hypervisor itself is BSD licensed).

It is best to start any bikeshed about this as soon as possible.

Discussed with: bsdimp
2006-11-23 02:25:16 +00:00
Kip Macy
88277acb0b Integrate, but do not enable support for dynamically resizing TSBs 2006-11-22 05:54:24 +00:00
Kip Macy
c469ef9bde pmap_track_modified has been removed from other architectures -
likewise remove from sun4v
2006-11-22 04:50:55 +00:00
Kip Macy
34ec92870b add support for resizing the the tte_hash of multi-threaded processes 2006-11-22 04:33:34 +00:00
Kip Macy
9872e24f3c remove unused field from pcpu structure 2006-11-22 04:27:24 +00:00
Kip Macy
270917fafa remove dead code from tsb.c
switch tsbscratch over to using order of number of pages as opposed to actual number of pages
switch tsb.c over to using wrappers for contig page allocation
2006-11-22 04:13:30 +00:00
Kip Macy
793555da5e move contiguous allocation and free routines from tte_hash.c into pmap.c 2006-11-22 03:35:37 +00:00
Kip Macy
367e547fee Add tte_hash and tsb update handlers for handling tte_hash and tsb
resizing across cpus
2006-11-22 01:47:58 +00:00
Kip Macy
3cf970e7bc Add mechanism to track TSB misses in tsb miss handler
Remove unused debug code
2006-11-22 00:18:22 +00:00
Kip Macy
3ad9c2127b remove unused fields
Approved by: scottl (standing in for mentor rwatson)
2006-11-18 19:23:37 +00:00
Kip Macy
1eea142b6f remove 13 (largely) redundant files and switch to the sparc64/sparc64 version
Reviewed by: jb (mentor rwatson)
2006-11-18 07:10:52 +00:00
Kip Macy
4570c1c11b Resize the hash table upwards if the number of collision entries is greater than 1/4 of the
total
it is possible that the resize threshold should be revised upwards

Approved by: scottl (standing in for mentor rwatson)
2006-11-16 07:50:33 +00:00
Kip Macy
827686013d Heavily re-factor tte_hash to remove redundant code
Add hash resizing support - doesn't quite work yet
2006-11-15 06:29:52 +00:00
Kip Macy
f30d482097 add trap tracing to cpu mondo handler and tsb miss handler 2006-11-15 03:16:30 +00:00
Ruslan Ermilov
26af9ac7d0 Fix a comment. 2006-11-13 06:26:57 +00:00