Commit Graph

721 Commits

Author SHA1 Message Date
uwe 7e62a1bf65 Don't truncate TEA when we call tlb_exception from sh_vector_generic. 2006-09-21 20:40:16 +00:00
uwe 57675076eb Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h
2006-09-20 00:41:11 +00:00
uwe 6cfe10b75a __db_print_symbol: don't try to be too smart with db_print_loc_and_inst.
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.
2006-09-06 00:11:49 +00:00
uwe f6bf0450b3 Cosmetics - space auxiliary defines so that they are not visually
hidden in surrounding code.
2006-09-05 22:48:40 +00:00
uwe 2a48f4de87 Switch dreamcast to MI todr(9).
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.
2006-09-05 11:09:36 +00:00
uwe 6ee025d984 general_exception: g/c infinite loop after the call to panic. 2006-09-04 23:57:52 +00:00
uwe fc43c0c3f5 s/0/NULL/ for pointers. 2006-09-04 22:10:50 +00:00
uwe 8089b6b536 Add comments to RCR1 and RCR2 bits. 2006-09-03 12:38:34 +00:00
uwe ded7a4b611 There's no reason to use -Wno-parentheses. 2006-09-02 22:37:33 +00:00
matt d2fa9e5329 Make cpu_coredump dependent on COREDUMP 2006-08-31 16:49:21 +00:00
yamt e527ebac6f - remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
	ctod
	dtoc
	ctob
	btoc
	dbtob
	btodb
2006-08-28 13:43:35 +00:00
uwe 131b06fbff Make columns align with the header when dumping sh4 tlb.
Ifdef out dump of data array 2, it causes weird effects on landisk.
Minor whitespace cosmetic.
2006-08-23 00:09:01 +00:00
uwe ee4e3d86b3 Follow up to revision 1.16 (that only dealt with sh3).
Pass untruncated va=TEA to tlb_exception() from sh4_vector_tlbmiss too.
2006-08-22 21:47:57 +00:00
tsutsui 5011ef47f2 uvm_pagealloc(9) can fail, so handle that case in pmap_enter(9). 2006-08-07 23:19:36 +00:00
drochner 84f50d1b92 don't install <machine/db_machdep.h>, this is kernel only 2006-07-26 19:54:56 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
uwe 68272cc770 tlb_exception: Move and indent TLB_ASSERT to reduce visual clutter.
Fix function name in the panic message.  Print expevt on panic.
Split panic message so that the dumped numbers are on a separate line.
2006-07-22 22:43:43 +00:00
uwe 3ed02eac7c exp_type[] was constified in exception.c but an extern declaration in
db_interface.c was not updated.  Declare it publicly.  While here,
constify the array itself too.
2006-07-22 21:58:29 +00:00
uwe acfbe0b252 Report traps from user break controller as ksi_code = TRAP_TRACE 2006-07-22 03:22:15 +00:00
uwe 2e7b010133 Minor cosmetics. 2006-07-22 03:06:56 +00:00
ad 2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
uwe 943edbd0d8 Nuke va-sh.h. stdarg.h and varargs.h now use __builtin_va_*. 2006-05-21 23:14:13 +00:00
uwe 9458b164a6 New stdarg.h and varargs.h based on arm and i386 versions.
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.
2006-05-21 22:39:04 +00:00
uwe d5b4b78d10 Change _BSD_VA_LIST_ from "void *" to "__builtin_va_list" for newer
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.
2006-05-15 08:57:59 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
skrll a9f4c28a3d Fix a bunch of cast lvalues. 2006-05-10 06:24:02 +00:00
uwe 03ee8a12f3 Fix typo in comment in previous. 2006-04-11 23:45:13 +00:00
uwe 1860560960 Cosmetic. Same object code generated. 2006-04-11 19:07:54 +00:00
uwe c73fd1d833 Shave off few instructions by replacing mov src, dst; swap.w dst, dst;
with swap.w src, dst in REDUCE.
2006-04-11 18:42:09 +00:00
uwe 412106574d Shave off few instructions by replacing mov #imm, reg; sub reg, dst
with add #-imm, dst
2006-04-11 18:34:39 +00:00
uwe ae727708e1 Decorate pmap_remove_all() with /* ARGSUSED */ 2006-04-10 23:12:11 +00:00
cherry 93447d7ac4 closes: PR kern/32359
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
2006-04-01 15:45:00 +00:00
uebayasi 8572d2c144 Stop using linker scripts on all sh3 ports.
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
2006-03-17 16:06:51 +00:00
he 450ce68a74 Transform to new signature for uvm_fault() by dropping the third arg.
Discussed with drochner.
2006-03-16 15:10:06 +00:00
uebayasi f059840dbd * Don't define SET/CLR/ISSET locally.
* Avoid shadow in a pointer-to-function declaration.
2006-03-07 10:53:29 +00:00
thorpej 61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
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.
2006-03-07 07:21:50 +00:00
thorpej be8b235384 Clean up fallout proc_is_traced_p() change:
- 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.
2006-03-07 03:32:04 +00:00
he fddbc48a67 Remove yet another instance of the SET/CLR/ISSET macro triplet, now
that they are in <sys/types.h>.
2006-03-06 15:01:45 +00:00
christos beea4fc3fa Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
2006-03-05 19:08:38 +00:00
christos a4495f4cec implement PT_SYSCALL 2006-03-05 07:21:37 +00:00
uwe 970e24ee46 s/u_intN_t/uintN_t/ 2006-03-04 01:55:03 +00:00
uwe 3499d9e849 s/u_intN_t/uintN_t/ 2006-03-04 01:13:35 +00:00
uwe 7ebf92ccc4 Use 4- or 2-bytes aligned accesses if possible.
Makes it possible to examine hw registers that require 4- or 2-byte accesses.
2006-02-24 00:57:19 +00:00
thorpej 3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
uwe 01bb68c06b Make _BASE visible regardless of #ifdef SHx.
Add defines for SMR bits in IrDA mode in 7709.
2006-02-18 00:41:32 +00:00
skrll 221fe583b6 Match comment against #endif with #ifdef 2006-02-17 08:23:26 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
uwe c842fab210 Fix file comment to include the expansion for 'F' in "SCIF". 2006-02-14 00:02:03 +00:00
uwe 533115eb12 Define scif register base(s) and offsets.
Express old defines in terms of base + offset.
Use uintN_t.
2006-02-14 00:00:34 +00:00
uwe 7dea0a81b8 Move/merge common defintions out of ifdef. 2006-02-13 23:26:31 +00:00