Commit Graph

897 Commits

Author SHA1 Message Date
thorpej 4ea367cb79 Use vmem(9) rather than extent(9) to manage IOMMU mappings. 2023-12-03 02:17:06 +00:00
thorpej 318c13d4b1 Use vmem(9) rather than extent(9) to manage IOMMU mappings. 2023-12-03 02:03:18 +00:00
ad 68fa584377 Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
2023-10-05 19:41:03 +00:00
andvar e2869ef114 remove duplicate "(unsigned *) &atmp" argument passed to dbl_to_sgl_fcnvfxt().
fixes build with TIMEX option enabled for hppa.
2023-09-03 21:43:48 +00:00
andvar 40b3af9740 remove (db_addr_t) cast in hppa PC_REGS(regs) definition.
rename tf_hptm to tf_cr24 in kgdb_hppa.c.
This name was lost from trapframe (frame.h) in v1.8 and restored as tf_cr24 in v1.12.

Fixes KGDB enabled build for hppa.
2023-09-03 20:52:13 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
mrg 357b7a3e80 ignore "-Warray-bounds" for various low level platform code that knows
how something is setup but technically is undefined behaviour.  the
most common here is "extern int end;" and then using offsets of "&end"
that are outside the bounds of this 4-byte integer.

these uses are almost certainly all OK in reality.

found by GCC 12.
2023-08-03 08:16:30 +00:00
macallan 8e0d3cbdbc check for empty ranges in pmap_page_physload() itself 2023-08-02 09:18:14 +00:00
macallan 5d041606df avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again
2023-08-02 08:54:42 +00:00
andvar b179d0ed44 fix typos in comments, mainly s/denomalized/denormalized/. 2023-07-31 20:48:04 +00:00
skrll dd6e3d87fe PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN
Provide syscall_intern and use the md_syscall in syscall trap handling.
2023-07-23 10:09:36 +00:00
skrll c2019c0774 Use __BIT 2023-07-23 08:04:29 +00:00
mrg c9577f4881 re-fix hppa builds.
this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.
2023-07-13 07:46:43 +00:00
riastradh a884545629 machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.
Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.
2023-07-12 12:50:12 +00:00
mrg d86bea6109 fix hppa and vax builds.
machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
2023-07-12 06:45:24 +00:00
riastradh 5ef555d76e hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:05:09 +00:00
riastradh 782726166d machine/mutex.h: Sprinkle includes so this can be used by crash(8).
XXX pullup-10
2023-07-09 17:03:09 +00:00
andvar 4afbf57932 few more typos in the word "register", mainly s/resister/register/.
In one comment I assume that it was meant to be pull-up resistor.
2023-05-06 22:17:28 +00:00
skrll e341d80516 Pass local symbols relocations in both passes and provide the kobj_reloc
implementation visibility of these relocations.

Currently all implementations resolve local symbol relocations in the first
pass and simply skip them in the second. The RISC-V implementation will
make use of this visiblity.
2023-04-28 07:33:55 +00:00
andvar 95f94af301 fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
2023-03-26 19:10:32 +00:00
skrll 3b390fc259 Convert some assignments into KASSERTs.
l_md is zeroised by lwp_create with

         memset(&l2->l_startzero, 0, sizeof(*l2) -
                    offsetof(lwp_t, l_startzero));
2023-02-25 08:30:31 +00:00
riastradh 7dfcf7edb8 hppa: Add missing barriers in cpu_switchto.
PR kern/57240

Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?
2023-02-23 14:55:36 +00:00
abs 17aad41300 Add optoion GENERIC.local include to the end of ~all GENERIC configs
This excludes atari, sgimips, evbmips, evbppc, evbsh3, and hpcarm
all of which have somewhat specific kernel config file layouts
2023-02-12 14:50:37 +00:00
martin 38fa000d3b Avoid 64bit math in the hppa first stage bootloader. Ok chs@ 2023-01-13 18:43:42 +00:00
chs 87ba0e2a31 Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new	fsck_ffs operations "-c	ea" and	"-c no-ea" to convert file systems
from UFS2 to UFS2ea and	vice-versa (both of which delete all existing extended
attributes in the process).
2022-11-17 06:40:38 +00:00
riastradh dbfa10e52a ddb/db_active.h: New home for extern db_active.
This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero.  Reduces need for #include opt_ddb.h, #ifdef DDB.
2022-10-26 23:38:05 +00:00
andvar b9e4a3e6aa fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and
s/bus_dmamem_load/bus_dmamap_load/.
Inspired by recent similar fixes in OpenBSD.
2022-10-11 22:03:37 +00:00
riastradh 6a4b8d6081 swwdog(4): Add to GENERIC kernels.
Plus a handful of others that I'm familiar with.  Lots of special-
purpose kernels should probably have this too but I'm not going
through all the arm, mips, and ppc evaluation board kernels to see
which ones are relevant.

Omitted from systems I know to be very small:
- sun2/GENERIC
- dreamcast/GENERIC
Feel free to remove it from others that need to be kept smaller.

Compile-tested a few of these just in case:
- alpha/GENERIC
- amd64/GENERIC
- evbmips/OCTEON
- i386/GENERIC
- riscv/GENERIC

PR kern/29702
2022-09-29 10:10:05 +00:00
skrll 1be97a7280 malloc -> kmem 2022-09-29 06:42:14 +00:00
skrll ec6aa33e7a Remove unnecessary include of <sys/malloc.h>. 2022-09-29 06:39:58 +00:00
thorpej eca1c11589 Remove unnecessary inclusion of <net/netisr.h>. 2022-09-02 23:48:10 +00:00
skrll 774be5af86 Provide pci_intr_setattr (which does nothing atm) 2022-08-16 08:42:25 +00:00
skrll 55f4a5514e Use designated initializers for hppa_pci_chipset_tag structs. 2022-08-16 08:40:33 +00:00
skrll 1603cc37a1 Trailing whitespace 2022-08-16 08:35:38 +00:00
simonb c7ae7f02a8 UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
  file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
  and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
2022-08-07 02:52:23 +00:00
andvar ae3a1b96f2 s/functin/function/ in copy pasted comment. 2022-07-26 20:08:54 +00:00
skrll 1120ea0d7a Decorate the HPPA signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
2022-06-26 14:37:12 +00:00
skrll 5483601a33 Re-reading the PA2.0 Cache Move-In rules tells me we do indeed need to
purge the translations from the TLBs in pmap_procwr.

PR/56867: hppa: intermittent SIGSEGV reports in t_ptrace_wait's stepN and setstepN test cases
2022-06-16 06:25:42 +00:00
andvar 549aa5640f s/caled/called/ in comments and man page, also few more fixes. 2022-06-13 17:26:34 +00:00
skrll aeec87ef6f Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step breakpoints
2022-06-09 16:45:38 +00:00
skrll 3be2b9841d Oops... revert commit mistake 2022-06-09 16:41:25 +00:00
skrll ed84eca3cf Handle 'NA' (non-access) traps for the lpa and probe instructions. The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current
2022-06-09 16:38:23 +00:00
skrll e12dad7beb Whitespace 2022-06-07 06:06:46 +00:00
skrll e918cd4134 Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.
2022-06-06 07:22:31 +00:00
skrll 842a178846 Define a PTRACE_ILLEGAL_ASM 2022-06-06 06:41:43 +00:00
skrll a87e9e305a delay slot indentation 2022-06-01 06:18:04 +00:00
andvar 22d402f681 s/grabing/grabbing/ in comments. 2022-05-28 22:08:46 +00:00
andvar 09fb17927e fix various typos in comments, mainly origional->original,
extened->extended, incomming->incoming.
2022-05-28 21:14:56 +00:00
skrll 66b3503e03 port-hppa/56849: Wacko kernel memory accounting in current/hppa
Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove
2022-05-26 05:34:04 +00:00
andvar 63264fc80c s/controll/control/ in comments. 2022-05-23 21:46:11 +00:00