(instead of `tf_npc') contains the user-space return address. This ensures
entering the signal trampoline code correctly in case we take handled
signal during child_return().
In a lot of places (like pmap &c) we want it to be treated as SUN4M.
But since various low-level things are done very differently from
normal sparcs (and since for now it requires a relocated kernel
anyway), the MSIIEP kernels are not supposed to support any other
system. So when MSIIEP is defined - insist on SUN4M defined and SUN4
and SUN4C not defined.
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
build features (such as ross's DEBUGLIST) can easily be applied to all
ports. This should reduce the complexity of each port's kernel
Makefile considerably. Line counts:
227 arch/i386/conf/Makefile.i386.orig
98 arch/i386/conf/Makefile.i386
227 arch/alpha/conf/Makefile.alpha.orig
99 arch/alpha/conf/Makefile.alpha
219 arch/sparc/conf/Makefile.sparc.orig
102 arch/sparc/conf/Makefile.sparc
215 arch/vax/conf/Makefile.vax.orig
102 arch/vax/conf/Makefile.vax
253 conf/Makefile.kern.inc
Roll i386, alpha, sparc, and vax over to the new build machinery.
- Make the 32-bit SPARC profile support work with the GCC 2.95.3
SPARC ELF compiler, which uses a different name for mcount.
- Make the 64-bit SPARC profile support header look more like the 32-bit
SPARC header (no functional change -- 64-bit SPARC already used the
correct mcount name).
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.
Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.
Currently this is a no-op on most platforms, so they should see no difference.
Reviewed by Jason.
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
XPMSG_DEMAP_TLB_REGION, XPMSG_DEMAP_TLB_CONTEXT and XPMSG_DEMAP_TLB_ALL
- new setpgt4m_va(), call it when you need to ensure all cpus see the same value
- new smp_tlb_flush_context(), smp_tlb_flush_region(), smp_tlb_flush_segment(),
smp_tlb_flush_page() and smp_tlb_flush_all() functions, if MULTIPROCESSOR
- define the tlb_flush*() routines to the smp_*() versions, if MULTIPROCESSOR
- sun4m safe PTE update updatepte4m() routine, vaguely derived from code posted
by torek@bsdi.com on port-sparc a couple of years ago.
- new nmihard_lock to synchronize other cpus during hard NMI. (XXX: should be
a bit smarter about which CPU's do/don't check in.)
occured. cpus now spin waiting for new `go_smp_cpus' variable to go non-zero.
- new xpmsg_lock that must held around all cross call activity. new macros:
LOCK_XPMSG() and UNLOCK_XPMSG().
- delete delay(1)/cache_flush gone from raise_ipi_wait_and_unlock(), it incurred
a stupid performance penalty.
option for System V semaphores. It appears that there are no overrides
in the code and each file has the following added.
options SYSVSEM # System V semaphores
+#options SEMMNI=10 # number of semaphore identifiers
+#options SEMMNS=60 # number of semaphores in system
+#options SEMUME=10 # max number of undo entries per process
+#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V shared memory
If anyone thinks that this is incorrect for any of these files, please
correct it.
Note - the i386 port was not forgotten. It was done separately.
of the code expects zero. Add some wrappers so that opf promops are
consistent with obp promops. Now microSPARC-IIep correctly panics ;)
While here, propagate 'static' to opf_* definitions.
and prom version. Little tweaks to prom during secondary boot are
much easier then fragile work-arounds in the kernel. Currently this
is used for JavaStation 1 with OBP3.
idle() u area issues:
in nmi_sun4m(), if this is a soft NMI and DDB is configured, setup a trapframe
and pass it to nmi_soft(). in cpu_hatch(), spin until our cpu's flags no longer
have CPUFLG_STARTUP set. then, setup registers and jump to
idle_enter_no_schedlock. in idle(), if MULTIPROCESSOR, always switch to this
cpus idle u. a minor optimisation to cpu_switch().
make IPI's work. modify boot_secondary_processors() to clear the startup flag
in each cpu. new raise_ipi_wait_and_unlock() that calls raise_ipi(), waits
for the cpu to acknowledge it got the message, and then unlocks the msglock.
use the new framework in mp_{pause,resume}_cpus(). nmi_soft() takes a
`struct trapframe *', to be used by ddb.
under root. If /sbus is encountered on sun4m - attach implied iommu
first and attach /sbus under it. Adjust bootpath accordingly to match
the attachment.
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.
This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.
Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
intmax_t, pointer-type and size_t arguments.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.
Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).
These calls are relatively conservative. It may be possible to
optimize these a little more.
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
* turn ad-hoc `pmap resources allocated during sleep' into a panic condition
(this should all be prevented by higher level VM locking).
* arrange for ENOMEM to be returned if PMAP_CANFAIL is on, and malloc()
and/or pool_get() fail.
processing takes place. This prevents stat clock skew by a factor
approximately proportional to stathz (not a serious problem if stathz==100;
but considerable already if stathz==1000).
a ready-to-use level 1 page table (on sun4m) and MMU context.
A simple `fork()' test shows an improvement in spent system time of
around 4 percent (which is just a bit disappointing, IMO, but it's
an improvement nonetheless).
and use appropriately
- create more helper macros:
. cdev__xyz_init(c,n), such as cdev__ocri_init() for
/* open, close, read, ioctl */, etc.
. cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
method `R' and the comments now read /* xxx (read) yyy */ instead
. cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
as well
- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
always DTRT WRT returning a valid result. (a few devices previously
incorrectly returned ENODEV)
- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
== 0, because it doesn't matter if dev_type_stop isn't implemented in that
case, and it allows the use of the cdev__xyz_init macros. certain ports
(sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
drivers, whereas everything else uses enodev
- ensure that the comments are accurate WRT the behaviour of a given entry
return value of uvm_fault() to the onfault routine via %o0. users of
pcb_onfault now return this value to their callers rather than always
returning EFAULT. this allows i/o errors in VOP_GETPAGES() to be returned
back to read(), etc.
* Print notice if not all CPUs were attached
* Switch to SMP version of cache flush routines in just one place: in
cpu_attach() after all known CPUs have been configured.
- there's no need to have different PV_NC flags for sun4[c] & sun4m
- deal with kvm_uncache() being called on a managed page in a
separate helper function that deals with the caching state
within the pv list for that page, avoiding interference with
the `bad alias' removals in pv_unlink().
Note that currently never called for managed pages, but for now I'm
keeping the support in.
currently necessary to acquire the `running in kernel mode' lock;
pointed out by Bill Sommerfeld/Simon Gerraty.
* remove reference to `cpu_set_kpc()' from comments, as we don't have it.
* message buffer initialisation:
- change the buffer size to 8192 on all platforms
- don't assume the buffer is always located at physical address 0
- drop the SUN4 hack that left first half of the page unused;
I believe this is no longer necessary, since the msgbuf
data structure is duely sanity-checked before use in initmsgbuf().