Commit Graph

806 Commits

Author SHA1 Message Date
andvar 81ea19bc4d s/interrut/interrupt/ and s/accelelerator/accelerator/ in comments. 2022-10-31 20:30:22 +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
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 71981bce9a s/identifing/identifying/ and s/multipler/multiplier/ in comments. 2022-05-30 09:56:02 +00:00
tsutsui 5cf9c74cef Call cnpollc(9) before cngetc(9) as the cons(9) man page says.
Currently most ports do nothing in cnpollc(9), but this is required to
handle wskbd(9) .set_leds op in cngetc(9) properly, at least on luna68k.
2021-10-09 20:00:41 +00:00
tsutsui e96a59e0fb Call cnpollc(9) before cngetc(9) as the cons(9) man page says.
Affects only inside #ifdef DEBUG part on "trap during panic" in trap.c
derived from hp300.
2021-09-25 19:16:31 +00:00
andvar 207defd036 Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11 20:28:03 +00:00
thorpej c7fb772b85 Merge thorpej-cfargs2. 2021-08-07 16:18:40 +00:00
tsutsui f1a61a6198 Fix mm_md_physacc() to allow only accesses to a region of RAMs.
Note on NetBSD/news68k RAMs reserved by the PROM (at the end of the RAM)
are not managed.
2021-08-06 05:53:50 +00:00
thorpej 2685996b0e Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
2021-04-24 23:36:23 +00:00
simonb fa2e10609e Define __HAVE_LEGACY_INTRCNT to indicate this port uses legacy intrcnt
interrupt accounting.
2021-04-01 04:42:59 +00:00
christos 97492ef8ca Remove cargo-culted '#if 0' code that was designed to produce a
compile-time error if any of the bus_space_*_8 functions was used,
but was documented that it produces a link-time error.
2021-01-23 19:38:07 +00:00
tsutsui f11ac05823 Remove leftover of #undef statements.
These should have been removed in rev 1.55 back in 2010:
 https://mail-index.netbsd.org/source-changes/2010/12/20/msg016105.html
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/news68k/news68k/locore.s.diff?r1=1.54&r2=1.55
2021-01-23 15:00:33 +00:00
nia f3ec8521a0 add a commented out compat_ossaudio wherever there's compat_linux
requested by mrg
2021-01-21 06:51:54 +00:00
thorpej 192b994748 malloc(9) -> kmem(9) 2020-11-21 17:48:26 +00:00
roy 98f3a8d458 vether: Add to kernel configurations
It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
2020-09-27 13:48:49 +00:00
rin 6d74044e30 Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
2020-08-10 06:32:57 +00:00
maxv b84521f2f3 Remove references to BRIDGE_IPF, it is now compiled in by default. 2020-08-01 08:20:47 +00:00
ad 4b8a875ae2 uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched.  It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
2020-06-11 19:20:42 +00:00
jdolecek 68e97caa11 mark nsmb major obsolete 2020-04-04 16:06:10 +00:00
msaitoh fa85244576 s/impliment/implement/ in comment. 2020-04-02 15:30:25 +00:00
skrll a0a61c51a5 G/C 2020-02-20 08:27:38 +00:00
skrll 94257d06d8 G/C LS{SLEEP,RUN,ONPROC}
LWP status manipulation was moved out of assembly long ago.
2020-02-17 09:09:48 +00:00
tsutsui 64ae603ea5 Add a missing semicolon missed in rev 1.27.
Noticed by recent pmap_update() macro change.
I wonder how I've missed this for 18 years..
2020-02-03 23:09:03 +00:00
tsutsui fc9073f9fe Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).
Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
  but each port uses different PAGE_SIZE value (4096 or 8192)
  due to historical reasons.
- Currently module(7) binaries are built per each port so
  all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
  PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
  are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
  src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
  for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
  among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
  support m68k ports where PAGE_SIZE==8192.
  (though this would affect only if static binaries built on
   4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
 https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
 https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
2020-02-01 19:41:48 +00:00
tsutsui c8cea24eea Add and enable dhcpcd for news68k installation.
news68k has already required two floppies since 9.0
so there is no popular demand to shrink ramdisk.
2020-02-01 06:02:00 +00:00
thorpej c1d9ec8d89 Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
2020-01-19 01:25:03 +00:00
ad 5c06357c90 Rename uvm_free() -> uvm_availmem(). 2019-12-31 13:07:09 +00:00
ad ddd3a0be1e uvmexp.free -> uvm_free() 2019-12-21 13:00:20 +00:00
ad 115c1bc097 cpu_need_resched():
- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
2019-11-23 19:40:34 +00:00
ad 8d31b01840 mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
2019-11-21 19:23:58 +00:00
chs d47bcd296c in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
2019-11-10 21:16:21 +00:00
skrll bf158e33f8 Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
2019-09-23 16:17:54 +00:00
tsutsui c1ee8c0e37 Fix lingering page size comments.
Pointed out by christos@ on port-m68k@:
http://mail-index.netbsd.org/port-m68k/2019/06/06/msg000726.html

XXX: we also need MAX_PAGE_SIZE in somewhere for newer jemalloc?
2019-06-28 15:17:43 +00:00
kamil bca8c3ffc4 Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h
Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
2019-05-07 03:49:25 +00:00
sevan 75d6e670be Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
2019-04-26 21:40:28 +00:00
thorpej 91bfaeb675 Overhaul the API used to fetch and store individual memory cells in
userspace.  The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms.  The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
2019-04-06 03:06:23 +00:00
christos 021d832a13 centralize setdisklabel(9) 2019-04-03 22:10:49 +00:00
thorpej 9565cd57f0 G/C "MAPPECOPY". It is the deadest of wood, and never actually worked in
NetBSD.
2019-03-14 16:59:09 +00:00
thorpej daca0f564b Refactor the 68040 writeback() from each m68k port's trap handler into a
shared copy: m68040_writeback().  It is essentially a copy of the Atari
version, with some minor cosmetic tweaks and one small performance optimization
from the mvme68k port.

Tested by rjs@ on a Quadra 950.  (Thanks!)
2019-02-18 01:12:22 +00:00
dholland 810a783361 Systematize handling of removed drivers.
- Every driver that was removed and whose number hasn't already been
   reused is now listed with a commented-out "obsolete" line.
 - The format of these has been systematized. Future format changes can
   probably be safely done with a script.
 - This does not include a few cases of assignments that only lasted a
   couple days, or stuff from before major reorgs. Some of these may
   be included nonetheless, because there was a lot of ground to cover
   and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
2019-01-28 02:28:56 +00:00
maxv 43c9320743 Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
2018-12-19 13:57:44 +00:00
martin a1b609db0f Bump space for ramdisk image 2018-11-16 17:07:10 +00:00
rin e9ac1fc994 - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
2018-09-22 12:24:01 +00:00
msaitoh 61e1eb0d0b - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
  - Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
  use them on all m68k machines.
2018-08-22 01:05:21 +00:00
maxv f71d13bdf7 Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
2018-08-01 20:04:09 +00:00
maxv 62c8988166 Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.
2018-07-12 10:46:40 +00:00
christos 87fd18f8e5 s/static inline/static __inline/g for consistency. 2018-04-19 21:50:06 +00:00
sevan b376ef7f24 Alternate buffer queue strategies no longer considered experimental, update
description.

Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
2018-01-23 14:47:53 +00:00
christos ed7d865c43 pass the right argument 2017-09-15 03:11:15 +00:00