Commit Graph

104 Commits

Author SHA1 Message Date
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
Kip Macy
7c0435b933 MUTEX_PROFILING has been generalized to LOCK_PROFILING. We now profile
wait (time waited to acquire) and hold times for *all* kernel locks. If
the architecture has a system synchronized TSC, the profiling code will
use that - thereby minimizing profiling overhead. Large chunks of profiling
code have been moved out of line, the overhead measured on the T1 for when
it is compiled in but not enabled is < 1%.

Approved by: scottl (standing in for mentor rwatson)
Reviewed by: des and jhb
2006-11-11 03:18:07 +00:00
Kip Macy
45897edf72 - map hardware trap numbers to those used by by sparc64 for inter-compatibility
and to make user-level trap handlers work
- add new trap entry to trap table to enable fast fetching of floating point trap
  context
- remove unused debug code
- map unimplemented floating point trap to SIGFPE

Approved by: scottl (standing in for mentor rwatson)
2006-11-03 23:41:53 +00:00
John Birrell
34408d484b The relocation definitions are now defined in the machine independent
elf_common.h so that one arch can identify relocations on another
arch.
2006-11-03 23:03:46 +00:00
John Birrell
fd77f832c7 Add a low level function to write a string to the hypervisor
console directly.

Discussed with: kmacy
2006-11-03 06:31:56 +00:00
John Birrell
a836d5f134 Spaces to tabs. (I shouldn't copy and paste from diff output to a terminal)
Noticed by: pjd
2006-11-01 21:33:17 +00:00
John Birrell
0415f45d48 Add the trap-trace function for the hypervisor. 2006-11-01 08:14:14 +00:00
Marius Strobl
a1610d83b8 In the replacement text of the __bswapN_const() macros encapsulate the
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
2006-10-30 21:50:11 +00:00
Kip Macy
25e328499c kernel clean up to make the sun4v kernel build
Reviewed by: jmg
Approved by: rwatson (mentor)
2006-10-09 04:45:19 +00:00
Kip Macy
2405f16615 placate Grim Reaper with sun4v support 2006-10-05 06:14:28 +00:00