Commit Graph

489 Commits

Author SHA1 Message Date
uwe
a1cbc85a2f Bring _PROF_PROLOGUE back. The breakage was caused by calls to
__udivsi3 being treated specially by gcc.
2003-08-27 19:59:57 +00:00
christos
2b16e874b8 I don't understand why there this is here, since we have exec_ecoff.c in kern,
but remove the stack setup function anyway.
2003-08-11 12:58:43 +00:00
chs
78a835abdc fix typos in comments. 2003-08-10 02:03:31 +00:00
uwe
e4bd28ac72 Undo previous. It breaks profiling, but I managed to test against the
wrong tree and so missed it.
2003-08-10 01:22:03 +00:00
uwe
147642d466 Real _PROF_PROLOGUE so that assembly language functions can be profiled. 2003-08-10 00:00:26 +00:00
uwe
9cd06ccd7e For ELF put RCSID strings into .ident section. 2003-08-09 23:04:43 +00:00
uwe
8c46e68137 Add more sh7709 interrupt sources. Split sh3 and sh4 specific
switches because of conflicts in exception codes.
2003-08-08 00:52:42 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
uwe
85fb38b211 When passing &buffers to uvm_map, add a cast to (void *). Without it,
gcc3 with -O2 produces "dereferencing type-punned pointer will break
strict-aliasing rules" warning.
2003-08-03 00:01:44 +00:00
thorpej
063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem
ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
uwe
66a03d56d3 Correct the macro name for SCP0DT bit.
Addresses port-sh3/22025 by FURUKAWA Masashi.
2003-07-01 11:49:37 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
tsutsui
17418f8476 Allow user pmap to pmap_enter device (bus-space) memory. 2003-06-14 16:27:36 +00:00
tsutsui
fee6ce1d9f Fix lack of parentheses bug which causes wrong pte settings. 2003-06-14 16:21:31 +00:00
tsutsui
cead6ab903 mmap(2) function on sh3 should return page number, not physical address. 2003-06-14 16:08:09 +00:00
kleink
776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
thorpej
f4ca0d67fe Include <sys/disk.h>. 2003-05-12 14:48:12 +00:00
thorpej
e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej
36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej
b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
christos
6ec2f52f71 rename Locore.c -> locore_c.c so that we can compile on case insensitive
filesystems. (from John Gordon)
2003-05-08 12:37:36 +00:00
dsl
d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
scw
8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
bjh21
4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
christos
a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
bouyer
aec10dd80c Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
2003-04-16 15:00:59 +00:00
tsutsui
dcc0f5a63d Fix typo in printf message. 2003-04-13 04:07:34 +00:00
nathanw
ff28c51cc0 Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
2003-04-11 22:02:28 +00:00
thorpej
cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej
d470cda51b Use PAGE_SIZE rather than NBPG. 2003-04-02 02:56:40 +00:00
thorpej
f6aabf7609 We use 4K pages on the sh3/sh4; make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK
compile-time constants.
2003-04-02 02:39:47 +00:00
tsutsui
8d3aeb9abc Rewrite user space access functions which use gcc's "labels as values"
extension in asm to avoid unexpected code omission during optimization
which causes wrong return value on faults.
2003-03-20 17:45:14 +00:00
tsutsui
f86b0e1741 In tlb_exception(), don't panic immediately on access at va == 0
from kernel mode if fault hander is set.
2003-03-09 16:14:29 +00:00
tshiozak
31e2cbf0b5 add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
2003-03-02 22:18:11 +00:00
itohy
850cd09532 - Change __cpu_simple_lock_t from int to unsigned char.
This makes simple lock work on big-endian platforms.
- Assembly-level optimization of __cpu_simple_lock_try().

OK'd by Gregory McGarry.  Closes PR port-sh3/20311.
2003-02-14 03:02:41 +00:00
tsutsui
cce861a437 Make sure cache_sh[34]_op_*() functions actually inlined. 2003-01-25 04:21:01 +00:00
thorpej
49784e4bd0 Merge the nathanw_sa branch. 2003-01-18 06:33:41 +00:00
uwe
a391e8bea6 Add sh7709 INTEVT2 codes for IRQs, PINTs, IRDA and ADC. 2002-12-29 02:47:07 +00:00
manu
4a06119a9d Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
2002-12-21 16:23:56 +00:00
thorpej
6ff0a8ba21 Initialize pools in pmap_init(); the low-water mark must be set when
it is safe to allocate pages via the normal mechanism.
2002-12-16 07:18:30 +00:00
thorpej
7affeb0071 Add support for RAS (initially added by me on nathanw_sa branch). 2002-12-16 02:15:58 +00:00
thorpej
9ad045c958 Use MI setrunqueue()/remrunqueue(). 2002-12-16 01:56:47 +00:00
thorpej
e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
thorpej
78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
lukem
0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
manu
d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
msaitoh
76c101443c add some definitions for P[VR]R register 2002-11-13 14:00:27 +00:00
tsutsui
fe505e00b7 Make sure to stop timer count before writing timer counter registers
in tmu[12]_oneshot(). Otherwise sometimes interrupts would be lost.
2002-11-10 04:30:10 +00:00