cpp macros and long src operands anyway that destroy any intended
"neatly lined up" effect that TAB was supposed to achieve.
White space change only, same object code is generated, but it is much
easier on the eyes now.
Rename assembly cpu_exit to cpu_do_exit and make a C version of
cpu_exit() to do proper locking. While here, g/c switch_exit entry
point and don't call lwp_exit2 from cpu_exit.
From ad@
Completes PR port-sh3/35971 - my Jornada now boots to multiuser with a
LOCKDEBUG kernel.
by Slava Semushin <slava.semushin@gmail.com>.
To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".
Thanks to martin@ for the input on testing.
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
version.
Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
which have virtual address indexed cache and whose pmaps don't always
allow normal shared mappings even for read only pages.
In future, these pmaps should be rewritten to handle such read only
shared mappings properly like ARM pmap, but currently we just disable
sosend_loan() to avoid unnecessary uncached mappings and cache flushes
on MIPS3 CPUs, or map/unmap thrashing on SH4.
Discussed with thorpej a while ago.
module (in the same file even), so we know the offset at link time and
don't need a reloc. This kills the last text relocation in the sh3
libc.so.
While here, tweak the code slightly to put delay slots into use.
better use it for something else later. I'm also thinking of g/c'ing
the temp buffer and emit disassembly with db_printf direcly, and
get_ascii gets in the way.
the multiplications first. Round to nearest, instead of down.
When estimating pclock don't compute sh_clock.cpucycle_1us * 1000000
sh_clock.cpuclock is exactly that (but without rounding errors).
This improves timekeeping on my Jornada.
(effectively we were running syscalls with interrupts disabled).
splx back to previous interrupt level from tf->tf_ssr.
XXX: tlb_exception() still has that problem.
have the same virtual cache indexes (i.e. they won't cause virtual cache
aliases). Also prepare PMAP_PREFER(9) for SH4 to avoid some possible virtual
cache aliases.
More stuff should be added in pmap_enter(9), but at least this changes
should fix some existing problems. See discussion on port-sh3 ML for details.
OK'ed by uwe and chs, and closes PR port-sh3/34243.
with several minor fixes by me.
Previously sh3 ports use two timers (TMU1 and TMU2) as oneshot timer
to cause real hardware interrupts by softintr(9), but now softintr(9)
uses only TMU1 and TMU2 is configured as freerunning counter for
timecounter(9).
Tested on my dreamcast.
We can have in a register an address that points to/into some variable
in the data segment, but db_print_loc_and_inst only looks for
functions, so it will misprint it as something unrelated from libkern
+ huge offset. E.g. instead of netbsd:cpu_info_store it would print
netbsd:prop_string_create_cstring+0xdeadbeef
Worse, if the address happens to be odd (char field in a struct, an
element of char array), attempt at printing the "instruction" at that
address will cause a fault and will abort "mach frame".
Disassemly is not really that useful in "mach frame" listing anyway
and more often just clutters things by overflowing 80 columns.
Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.
Tested by Nick Hudson.
Use __builtin_va_* instead of hand written code in va-sh.h that uses
LHS casts. Slightly worse code is generated by gcc 3.3.3, but LHS
casts are outlawed in gcc 3.3.6 and gcc 4.
Build-tested on hpcsh (le) and mmeye (be), run-tested on hpcsh.
gcc versions and "char *" otherwise. This is what most other arches
use, modulo different __GNUC_PREREQ__.
This is in preparation for replacing stdarg.h and varargs.h with
versions based on __builtin_* instead of handwritten code that gcc
3.3.6 and up refuse to compile b/c of lhs casts.
Identical binary code produced.
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
The only information to be compensated is text section start address.
The default value is set arch-wise as DEFTEXTADDR. Each kernel config
can override the default value by setting TEXTADDR.
Tested on COMPUTEXEVB (evbsh3).
Reviewed By: uwe
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.
doing a single word store). I've been running my Jornada without them
for a very long time, but got no word from dreamcast folks. Thanks to
Nick Hudson for testing it on dreamcast finally.
Since the registers we use are at the very end of address space, we
can load their addresses as small immediate negative constants instead
of loading them from memory.
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
While here move separator space to the beginning of optional messages.
Tweak write-through/back message so that is parses as expected.
PR: port-sh3/31315
- EMODE support doesn't work fine yet.
- This code is broken for dreamcast.
dramcast call sh4_icache_sync_all() before sh4_cache_config().
(at locore.S)
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
i/o is done. Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o. This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.
IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
This is just a quick fix to make KSTACK_DEBUG kernels compilable.
Formatting needs improvment (group lwps from one process together, etc).
PR port-sh3/29621
_cpu_exception_suspend()/_cpu_exception_resume() pair.
Should fix spontaneous reboot problem on heavy load reported by
Christian Groessler on port-dreamcast.
(c) TNF
line from 4-clause UCB to 3-clause UCB license; in other words,
remove UCB's ad clause from the license TNF grants.
There is no point in TNF demanding that UCB's ad clause be followed
when even UCB doesn't demand it any longer.
Ok'd by board@ and agc@.
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
instructions so that prologue code and function code get mixed, and
you get a lot of noice from this printf, making traceback very hard to
read if not useless.
reduced to just a call to switch_exit, g/c the C version and add a one
instruction assembler version that just falls through to switch_exit.
Addresses PR#24007 by Jaromir Dolecek <jdolecek@netbsd> and makes sh3
kernels work again after his elimination of the reaper. Tested on hpcsh.