Commit Graph

972 Commits

Author SHA1 Message Date
uwe
490f3711c0 Interrupt handling changes (revision 1.23) bumped down _IPL_N to 8 for
some reason.  Restore it to correct 16.

HTF did hpcsh work all this time with hd6446x_imask[_IPL_N] indexed
with IPLs 0..15 is a mistery...  Discovered by accidentally triggering
hd64461 timer interrupt that is not enabled and should have been
masked.

_IPL_N used to be *also incorrect* 15 before Andy's change, which
makes one wonder if dumb luck is severly underappreciated.
2009-03-21 06:11:08 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
joerg
f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
uwe
f7b9361ff7 Revert two previous revisions and just use __pmap_kernel directly again.
There's no reason to pretend we don't know what kernel_pmap_ptr is.
2009-01-23 16:54:14 +00:00
uwe
c02a1adf3c Unhide __pmap_kernel for the benefit of fast tlb miss handlers. 2009-01-23 16:46:51 +00:00
uch
a44b846fe4 __pmap_kernel is pointer not symbol from pmap.c 1.68. set correct address. 2009-01-23 04:36:13 +00:00
cegger
b4fe900840 adaption for making kgdb_dev a dev_t 2009-01-11 23:20:37 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
njoly
992269c5c4 Fix remaining archs (arm, luna68k, powerpc and sh3) that were still
using a proc argument instead of an expected lwp for ADDUPROF macro.

ok by christos.
2008-12-19 15:20:10 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
uwe
67e730e6a0 Sort 2008-11-22 02:12:45 +00:00
uwe
1b438796de Move COMPAT_16 signal stuff to the new compat_16_machdep.c file, so
that it can be built as part of a module.
2008-11-22 01:53:41 +00:00
uwe
c2b0ccbf39 Provide COMPAT_16 sigcode for MODULAR kernels too (to avoid the
trouble of adding compat_16_locore.S just for these 20 bytes - at
least for now).
2008-11-22 01:51:22 +00:00
uwe
da6162349a G/c all reloc types except R_SH_DIR32 - which is the only one we
expect from a kmod that only have unresolved external symbols.
2008-11-21 23:18:11 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
uwe
5e0b9095dd Implement PT___GETREGS40 and PT___SETREGS40 under COMPAT_40 so that
old gdb works on newer kernels.
2008-10-27 23:50:12 +00:00
uwe
428393080e Compile conditionally depending on options PTRACE and COREDUMP. 2008-10-27 22:10:36 +00:00
uwe
6dd6ba05bf Fix typo in comment inherited from i386 (spotted by mjf@). 2008-10-26 19:53:03 +00:00
uwe
ccef70cded process_read_regs, process_write_regs - handle reg::r_gbr 2008-10-26 19:43:20 +00:00
uwe
2d5078daa2 Add r_gbr to struct reg. Provide old definition as struct __reg40.
Rename old PT_GETREG to PT___GETREG40, PT_SETREG to PT___SETREG40.
2008-10-26 19:37:59 +00:00
uwe
70b97564f4 Oops, make #endif comment properly reflect the test. 2008-10-26 19:16:51 +00:00
uwe
ebee56aef0 Multiple inclusion protection. 2008-10-26 19:10:10 +00:00
ad
d1b01a3709 Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
2008-10-21 12:16:58 +00:00
wrstuden
15e53296cb upcallret() will work much better if it's not in the middle of another
routine!
2008-10-21 04:16:59 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
uwe
83b202b6e6 Use pushsection/popsection for RCSID. 2008-09-19 03:02:35 +00:00
matt
91d4704c12 Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones.  Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
2008-08-05 16:47:41 +00:00
ad
b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
cegger
2dea63fe78 use device_lookup_private to get softc 2008-06-13 13:08:57 +00:00
uwe
b3f49ac041 sh_vector_generic - reorder literals to improve locality of reference. 2008-06-08 23:45:33 +00:00
uwe
1a80db70f1 Match PC address for single-stepping, program BARA = tf->tf_spc before
returning from exception.

Makes single-stepping work on sh3 - without matching the address sh3
gets stuck at the instruction we are at, getting EXPEVT_BREAK before
executing the instruction.
2008-06-08 22:13:09 +00:00
uwe
ce2ea531e9 Use "pc" and "sr" instead of "spc" and "ssr" to refer to those
registers in DDB.  Names with initial "s" (for "saved") are somewhat
confusing to use.  The fact that we use SPC/SSR registers to retrieve
values of PC/SR at the moment of trap is an immaterial implementation
detail.
2008-06-08 22:02:08 +00:00
uwe
bb8100256b Cosmetics: add blank lines to make db_trap() call more prominent.
s/kdb/ddb/ is a comment (does anyone really still calls it kdb?)
2008-06-07 22:37:11 +00:00
uwe
dcbf54d0f9 We never pass type = -1 to kdb_trap() so g/c that cargo-culted case. 2008-06-07 22:32:18 +00:00
uwe
720af5afe1 Fix IS_BREAKPOINT_TRAP: EXP_BREAK is not a breakpoint trap, it's UBC
(user break controller) trap, and we use UBC for single-stepping, not
for ddb breakpoints.  ddb breakpoints are "trapa 0xc3".
2008-06-07 22:22:10 +00:00
uwe
5fc69ea9ab Pass trap code to kgdb_trap(). 2008-06-07 22:04:40 +00:00
uwe
3a3f6e0005 Use _SH_TRA_BREAK instead of hardcoded constant under ifdef KGDB too. 2008-06-07 04:01:41 +00:00
uwe
5a5542fb41 Sync icache before returning from db_write_bytes so that we don't get
stuck at a ddb breakpoint.
2008-06-07 03:25:13 +00:00
uwe
d5b6c91596 print trapa operand in hex. 2008-06-07 02:43:10 +00:00
uwe
e888b109ca Move EXPEVT_BREAK case next to EXPEVT_TRAPA case, they both generate
SIGTRAP and it's easier to read when they are together.
2008-06-07 00:51:55 +00:00
uwe
421349f332 Bah, got tf_ubc = 0 logic wrong in previous. Revert that part, it's bogus. 2008-06-06 04:24:19 +00:00
uwe
2cef892cf9 Support single-stepping in DDB for sh3 too, it has different format of
UBC registers.
2008-06-06 04:16:22 +00:00
uwe
db245f3eb5 Provide defines for bits we use. 2008-06-06 03:17:28 +00:00
uwe
c39ae7f5d7 Recycle unused _REG_EXPEVT slot in mcontext for _REG_GBR.
As the size of mcontext is not changed, we avoid the hassle of
versioning all the calls that use it.

_REG_EXPEVT was never used by any code in the tree.  Reporting EXPEVT
makes sense only for signals and in that case we pass it to userland
in ksi_trap already which is official MI way to get this (MD) information.

Old binaries running on new kernels will now have their GBR set from
new mcontext, but that's ok too, as GBR was not properly supported by
old kernels (not saved in trapframe), so old binaries couldn't have
possibly used it anyway.
2008-06-01 23:07:20 +00:00
uwe
70f9d18086 Add GBR register to switchframe.
While here, reorder switchframe so that we can shave off a few
instructions when restoring it (group stack registers at the end, make
sure that last and first registers are safe to load/store in delay
slots).
2008-06-01 01:43:20 +00:00