for LOCKDEBUG, mutex_destroy() the cpu0 spc_lwplock with the global
cpuinfo VA, and re-mutex_init() it with the per-cpu address that is only
now available. for non-boot cpus, be sure to also initialise curlwp to
the idle lwp.
xcall(), pmap_quiet_check(), pmap_pmap_pool_ctor(), pmap_pmap_pool_dtor(),
and pmap_enu4m(): don't care about cpus that have not been attached yet.
- in lwp_trampoline, oldlwp is already in %o0. don't save or the wrongly
saved copy from cpu_lwp_fork(). as repeatedly pointed out my uwe.
- in cpu_idle use retl not ret. as pointed out by martin.
thanks to uwe/martin/tnn for all the real debugging work.
from doc/BRANCHES:
idle lwp, and some changes depending on it.
1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
of a data transfer operation immediately after the data transfer
was finished, instead of waiting for the chip to interrupt us and
tell us that it was finished and had the result for us. This worked
okay for read and write since the operation would be finished very
shortly after the data transfer completed. However, with formatting,
the chip still had most of the rest of the track to do, so we ended
up timing out before the operation was finished. This fix is from
sparc64/dev/fdc.c and was tested on sparc by tnn@.
of a data transfer operation immediately after the data transfer
was finished, instead of waiting for the chip to interrupt us and
tell us that it was finished and had the result for us. This worked
okay for read and write since the operation would be finished very
shortly after the data transfer completed. However, with formatting,
the chip still had most of the rest of the track to do, so we ended
up timing out before the operation was finished. This fix is from
sparc64/dev/fdc.c and was tested on sparc by tnn@.
the kernel enables interrupts and then sets up clocks. If we catch a timer
interrupt in between and call hardclock() we'll explode so for now just
bail when we get one while cold
- load uvm.page_idle_zero with "ldub" instead of "ld", avoiding an
unaligned access panic introduced since the int->bool changes.
now a -current kernel (both UP and MP) boot on my SS20 as long as
i have "options LOCKDEBUG" as well.
the kernel enables interrupts and then sets up clocks. If we catch a timer
interrupt in between and call hardclock() we'll explode so for now just
bail when we get one while cold
with newlock2 merge:
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)
that allow a (normally broken/limited) device to restrict the bus address
range it can talk to. this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.
all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.
XXX: bus_dma(9) needs an update still.
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.
Restores source compatibility with pre-newlock2 tools like ps or top.
Reviewed by Andrew Doran.
already released the lock when we reach the waiters check.
- mutex_enter(): denote the start and end of the critical and export
labels. If an LWP is preempted after grabbing the interlock, the dummy
owner value (0xff000000) will persist, but the real owner value must be
set soon to prevent deadlock. On entry to interrupt we'll need to check
for this and set in the correct value if the LWP was interrupted in the
critical section.
debugging and its main use is in device drivers. Its used there to signal
that the flagged buffer has a special meaning or should be handled
differently.
OK'd by Bill Sudenmund on tech-kern.
console keyboard and mouse on them.
We are not there yet because currently both wsdisplay and zstty assume
that they are the console. On sun-4, zstty wins because it attaches
last and overwrites the console device that wscons had set previously.
SUN4 as well.
The data and stack limits are definitely needed, otherwise MI code will try
and map shared libraries in the 4/4c MMU hole. The UBC limits may not be
necessary, but SUN4 machines are unlikely to have much larger amounts of
memory than this caters for (64Mb).
SUN4 machines will now boot userland with this change.
Thanks to martin@, mrg@ and uwe@ for hints while debugging this.
- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
- make intersil7170_softc more generic and allocate it during autoconf(9)
rather than MALLOC(9) in attachment
- put todr_chip_handle_t, year0 value, and the century adjustment flag
into the intersil7170_softc
- change the attachment function to just take the softc like mk48txx(4)
- split sys/dev/ic/intersil7170.h into intersil7170reg.h and intersil7170var.h
- cleanup some macro
Untested on real sun4 machines, but no objection on port-sparc
(and port-sun3) in three days.
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.
This address kern/18407
On amd64, sparc64, i386, and alpha, they will be compiled in and disabled
by default. That means that to use them you either enable the "global"
knob with sysctl, or use paxctl(1) to enable it on a per-program basis.
On sparc and macppc just include a commentd out line in the GENERIC kernel.
History: This cleans up another long standing inconsistency where timerblurb for delay() was
calibrated against the stat timer instead the clock timer. Before timecounters
this didn't matter at al as both timer run with the same frequency and the
calibration was a frequency based calibration.
Misbehaving clock found by Fanch (at) kekpar dot net on current-users@ - Thanks.
Fix verified to work by Fanch.
for quite some time. Add it to all systems that have pcmcia SCSI.
Pointed out by Björn Johannesson <rherdware@yahoo.com> in private mail,
OK'd by matt@
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.
Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.
This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.
Approved by core@. Fixes PR port-evbmips/32362.
Same object code is generated (except in prf.c, where putchar argument
type was changed to int to match the prototype and one instrcution
changes accordingly).
strategy() in ofdev.c was not ANSIified in this sweep, b/c that
changes code generated at call sites!
for sparc64 systems. This should fix PR#33987.
Also adapt to the way sparc64 32-bit kernels now report its CPU
architecture -- these still need the sparc64 boot loader, but now
report hw.machine = sparc. Adapt by testing machdep.cpu_arch
instead.
Hints from martin and mrg.
syscalls (like mmap), and the same is true for return values (lseek).
Make both structs a union to force alignment. Thanks to uwe for helping
analyze this!
While there move the non syscall-related functions out of this file
(back to trap.c).
This makes kernels compiled with gcc4 and -Os work.
partitions. We do this by checking the NetBSD label to see if the
boot partition is of type RAID. If so, we offset reads from the
disk so that the kernel image can be read.
Note that with this code, sun4 machines (with PROM monitor) will only
boot from RAID if the RAID partition is the first one on the disk.
Tested on a SPARCstation 20, a SPARCstation 2 and a 4/330.
modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.
Patch from cherry@mahiti.org
ones and those for specific machines of developers. PR 32304.
OK'ed by rpaulo.
N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
- add a callback to signal monitor detection on the external VGA port
- don't call tadpole-request() in interrupt context
- use a kernel thread for various not time-critical work like device
monitoring, LCD status updates, external event handling and so on
(the monitoring stuff is preliminary and to be replaced by a more generic API)