Commit Graph

93 Commits

Author SHA1 Message Date
matt 70060b7c61 Add multiple inclusion protection. 2003-09-20 22:26:16 +00:00
matt e104d5f8a7 Install <hppa/mcontext.h> 2003-09-20 22:25:40 +00:00
chs e46cb5bfce add some placeholders so we can at least build. 2003-08-31 01:28:58 +00:00
chs cc0b88792e update for LWPs, and some lite cleanup. 2003-08-31 01:26:31 +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
lukem 0c82163c78 __KERNEL_RCSID() 2003-07-15 02:29:24 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +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
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
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej b4fe782331 Use PAGE_SIZE rather than NBPG. 2003-04-01 20:48:27 +00:00
thorpej 14491f27dd * Define PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK in <hppa/vmparam.h>,
not in <hppa/param.h>.
* Define NBPG in terms of PGSHIFT.
2003-04-01 20:47:25 +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
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 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
simonb 63096043b3 Use "#define\t" instead of "#define ". 2002-09-22 08:30:56 +00:00
chs c081614ea2 it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not.  doh.
2002-09-22 07:53:39 +00:00
chs 55e1f79335 add pmap_remove_all() hook (empty on most platforms so far). 2002-09-22 07:17:08 +00:00
gmcgarry dca80f08fd Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives. 2002-09-22 04:11:32 +00:00
fredette 94791afd65 No longer use BTLB entries to map the entire address spaces of I/O subsystems,
since BTLB entries can be scarce and very little of an I/O subsystem normally
needs to be mapped.

Instead, the pmap now allows mappings of I/O space to be entered with
pmap_kenter_pa.  bus_space mappings for small amounts of I/O space (as for
virtually all devices) are made this way, with BTLB entries still used for
large mappings for things like framebuffers.

This has led to more and cleaned-up uses of bus_space(9) and has caused
some autoconf cleanup.  Also, kgdb is now attached and connected before
autoconfiguration, which is much earlier than before.
2002-08-25 20:19:59 +00:00
fredette fa8a85a54d Cleaned up BTLB support. There are no longer BTLB function pointers
in struct hppa_cpu_info or anywhere else, now there are just hppa_btlb_*
functions.  Added support for machines with split I/D and variable-range
BTLBs.  Added support for purging BTLB entries.
2002-08-19 18:58:26 +00:00
fredette 0ebb2cb8a8 Since trap_kdebug() may be a macro, be sure to cast to void when not
using its result.
2002-08-19 15:07:33 +00:00
fredette 0e92be5ea7 Converted the fault handlers for the PA7100LC and up to handle
mappings not marked TLB_NO_RW_ALIAS.
2002-08-13 20:29:52 +00:00
fredette 02f0a2cf44 Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache.  If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
2002-08-11 22:29:07 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
fredette 16cf89e5a5 Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.
2002-08-05 20:58:35 +00:00
fredette 6e248e0a29 Define __HAVE_FUNCTION_DESCRIPTORS, which is used by ld.elf_so. 2002-07-10 15:18:06 +00:00
fredette f79af764d7 Now include the HPPA trap number in a user backtrace, and display
backtraces for more traps.
2002-07-07 22:52:54 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
thorpej fe53f433d8 The signal trampoline runs in userspace; do not profile it. 2002-07-04 16:44:10 +00:00
thorpej 9759b269b6 Add ENTRY_NOPROFILE(). 2002-07-04 16:43:21 +00:00
fredette cfd4248d21 Made the signal trampoline PLABEL-aware.
Added a missing comma to the pmap_redzone() call.
2002-07-01 16:10:02 +00:00
perry 90062e3f5d Remove (completely unused) definition of CLK_TCK. Nothing in the
kernel uses it, it is protected by _KERNEL, and it conflicts with the
definition in userland.
2002-06-23 17:07:58 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
fredette 49b0456a72 Added some missing files. 2002-06-06 19:50:20 +00:00
fredette b57559001e Fixed some mixup between processor number and type name,
i.e., PCXT is PA7100, not PA7200.
2002-06-06 19:49:58 +00:00
fredette f4f0d8a310 Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
2002-06-05 01:04:18 +00:00