Commit Graph

303487 Commits

Author SHA1 Message Date
riastradh 83b0c2cdc7 sbmips/systemsw.h: sys/stdbool.h for bool.
XXX sys/types.h should bring this in too, but that doesn't happen in
the crash(8) build, perhaps because sys/types.h only includes
sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe
we should fix that but this is a lower-risk change for now to fix a
build problem.

Found by Jan-Benedict Glaw.
2023-09-25 14:56:56 +00:00
rin 539a69c339 wm(4): Replace /* nothing */ to __nothing for evcnt macros
Prevent empty if bodies for !WM_EVENT_COUNTERS.
2023-09-25 09:15:48 +00:00
macallan a6a947e524 defflag AUDIO_DEBUG 2023-09-25 08:42:05 +00:00
msaitoh 1b8c2d05c3 wm(4): Modify descriptions of flow control related event counters. 2023-09-25 08:18:13 +00:00
msaitoh 1407c72db6 wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer. 2023-09-25 07:12:25 +00:00
msaitoh 4b22dde46e wm(4): Add some info to some event counters.
- The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether
   the CRC is valid or not.
 - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether
   the CRC is valid or not.
 - LENERRS(Length Errors) is for the length/type field <= 1500.
2023-09-25 07:11:08 +00:00
msaitoh 4a21927b9e wm(4): Use SCVPC and HRMPC for 82575 and newer.
The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC
  (Header Redirection Missed Packet Count) register were added in if_wm.c
  rev. 1.776 but the location in the code were incorrect. Fix them.
2023-09-25 06:18:09 +00:00
gutteridge 37fa55489e ext.h: fix spelling and grammar in a comment 2023-09-24 20:41:52 +00:00
andvar 1281dc69e3 Nix trailing whitespace. 2023-09-24 20:17:26 +00:00
andvar 714432082c unify ROMIMAGE specific assembler code between evbsh3 and mmeye.
fixes mmeye ROMIMAGE enabled build and in turn MMTAROMNEW kernel config.
patch checked by martin. PR port-mmeye/57627.
2023-09-24 19:57:10 +00:00
gutteridge 9b222ad129 UPDATING: fix a couple of spelling mistakes 2023-09-24 16:33:41 +00:00
andvar 0e2ce5add6 disable all phy devices in config, since network is disabled in general.
add SH7708R option from MMTA config, one CPU option is required.
enable pseudo-terminal device, also needed for config to build.

changes fix the kernel config itself, but build fails on locore.S asm code,
will file a PR for that.

P.S. would be good to update descriptions of kernel configs, since all copied
from GENERIC and it is difficult to decipher their purpose and relevance.
2023-09-24 13:59:38 +00:00
martin 151b6575c8 Fix debug code 2023-09-24 11:08:32 +00:00
andvar e1b966bd13 pass NULL to the second dbdma_alloc() expected argement.
it was not adjusted after it acquired one 7 years ago.

fixes ZS_TXDMA enabled build for macppc.
2023-09-24 10:59:24 +00:00
andvar a227f7c36a define i variable in for loop.
valkyriefb_attach() doesn't have one defined in the function scope.

fixes VALKYRIEFB_DEBUG enabled build for macppc.
2023-09-24 10:51:28 +00:00
skrll 8b45e15326 Add a bunch of system registers and their bit / bit field definitions.
Taken from ryo's nvmm branch with updates from me.
2023-09-24 10:13:44 +00:00
martin 3fd84419c8 PR kern/57626: instead of an (arbitrary) FAKE_PAGE_SHIFT (and always
using 4k pages), query the hypervisor for the real page size of the host
kernel and use that for architectures that do not have compile time
constant page sizes.
2023-09-24 09:33:26 +00:00
andvar dc05387222 define i variable in for loop.
mesh_msgin() doesn't have one defined in the function scope.

fixes MESH_DEBUG enabled build for macppc.
2023-09-24 08:20:06 +00:00
andvar 6d5a047a6e add ifdef NWSDISPLAY > 0 around rascons_* functions usage,
otherwise implementation is not available, which breaks macppc MAMBO config.

potentially better solution to provide empty implementation, comments welcome.
2023-09-23 21:26:16 +00:00
ad cbc1d2c479 Sigh.. Adjust previous to work as intended. The boosted LWP priority
didn't persist as far as the run queue because l_syncobj gets reset
earlier than I recalled.
2023-09-23 20:23:07 +00:00
ad 996c09cd17 kmem_free() -> kmem_intr_free(). Spotted by rin@. 2023-09-23 19:17:38 +00:00
ad 24c09de8ae NetBSD 10.99.9 - struct lwp changed 2023-09-23 18:49:16 +00:00
ad 6ed72b5fad - Simplify how priority boost for blocking in kernel is handled. Rather
than setting it up at each site where we block, make it a property of
  syncobj_t.  Then, do not hang onto the priority boost until userret(),
  drop it as soon as the LWP is out of the run queue and onto a CPU.
  Holding onto it longer is of questionable benefit.

- This allows two members of lwp_t to be deleted, and mi_userret() to be
  simplified a lot (next step: trim it down to a single conditional).

- While here, constify syncobj_t and de-inline a bunch of small functions
  like lwp_lock() which turn out not to be small after all (I don't know
  why, but atomic_*_relaxed() seem to provoke a compiler shitfit above and
  beyond what volatile does).
2023-09-23 18:48:04 +00:00
ad a332a8c53a Regen. 2023-09-23 18:21:43 +00:00
ad 59e0001f2c Repply this change with a couple of bugs fixed:
- Do away with separate pool_cache for some kernel objects that have no special
  requirements and use the general purpose allocator instead. On one of my
  test systems this makes for a small (~1%) but repeatable reduction in system
  time during builds presumably because it decreases the kernel's cache /
  memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.
2023-09-23 18:21:11 +00:00
ad 128aefc03e uvm_phys_to_vm_page() turns out to be a fairly central routine due to the
way that some of the pmaps work, so try to optimise it a little.
2023-09-23 18:20:20 +00:00
ad 06d6b10d9d Remove unused L_KPRIORITY. 2023-09-23 14:41:15 +00:00
ad 6c27fcfbed kernel_lock isn't needed to synchronise kthread_exit() and kthread_join(). 2023-09-23 14:40:42 +00:00
ad 58d7a70807 Remove last remnant of the long-dead PGINPROF option. 2023-09-23 14:19:12 +00:00
andvar f55632659e pass just l param to exec_aout_prep_oldzmagic instead of l->l_proc.
In a huge "merge ktrace-lwp." commit struct proc was changed by struct lwp.
seemingly all 68k ports just replaced p with l, however mac68k changed to
refer to l->l_proc. I assume it was accidental leftover during refactoring.

fixes COMPAT_NOMID enabled build for mac68k.
2023-09-23 13:45:50 +00:00
christos fd8846ed71 When attaching and detaching disks, use the proper index, skipping the
first 4, which are used for the controller itself (Edgar Fuss)
2023-09-23 13:01:16 +00:00
andvar 03654d7dd6 some whitespace cleanup for debug printf calls. 2023-09-23 12:48:23 +00:00
andvar 7f8be6ec15 change zsprintf to printf. It was defined as printf in include/z8530var.h
up to rev 1.4, then removed with conversion to MI 8530 SCC driver back in 1997.

Fixes build with ZSMACDEBUG option enabled for mac68k and macppc.
2023-09-23 12:29:24 +00:00
lukem 2667c642b0 ftpusers(5) example: use IP & DNS examples
Use .example TLD, per IETF RFC 2606.
Use 192.0.2.0/24, per IETF RFC 5737.
Use 127.0.0.1/24 for localguest, not network that ftp.NetBSD.org used to be in.
2023-09-22 22:15:47 +00:00
lukem b92ca11e10 version NetBSD-ftpd 20230922 for MLSD/MLST fix 2023-09-22 21:57:55 +00:00
shm 5c6084d50b Fix off by one in telrcv()
In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)

Thanks christos@ for the review
2023-09-22 15:28:36 +00:00
christos e9558f2f53 update present variable when disks are added or removed (Edgar Fuss) 2023-09-22 14:14:00 +00:00
shm c6bc4b17bd Add missing check_login checks for MLST and MLSD 2023-09-22 11:23:28 +00:00
rillig 9f055456d5 make: remove obsolete comments, clean up comments and identifiers
No binary change, except for the line numbers in assertions.
2023-09-21 20:30:59 +00:00
shm e53c0379fb Fix memory leak - free resources allocated by getaddrinfo 2023-09-21 14:00:34 +00:00
shm 6f4b1613b1 Fix memory leak in getent()
Memory was not freed if record was not found
2023-09-21 13:46:12 +00:00
jschauma 2f6717845f +CVSS Common Vulnerability Scoring System 2023-09-21 13:38:03 +00:00
msaitoh 821e159c0a s/ for for / for / in comment. 2023-09-21 09:31:49 +00:00
msaitoh e2868e2025 Fix typo in comment. 2023-09-21 09:24:09 +00:00
oster 11e80203a4 Remove a couple of unneeded comments. 2023-09-21 01:48:41 +00:00
oster 74ff9ea83b Implement command-line configuration of simple RAID sets with raidctl
based on the usage pattern:

    raidctl <device> create <level> <component1> <component2> ...

For example,

    raidctl raid0 create mirror absent /dev/wd1e

will create a RAID level 1 (mirror) set with an absent first component
and /dev/wd1e as the second component.  The resulting RAID device will
be marked as auto-configurable, will have a serial number set (based
on the current time), and parity will be initialized.  Reasonable
performance values are automatically used by default for other parameters
normally specified in the configuration file.

Also: Only print out Autoconfig status if being verbose.
2023-09-21 01:40:44 +00:00
jschauma bb2c98cdcf +EPP extensible provisioning protocol (RFC5730) 2023-09-20 15:22:41 +00:00
shm eb49cefa7b Removed unnecessary comment
Thanks leot@ for pointing this out
2023-09-20 08:41:35 +00:00
shm 9c7b529a34 Fix off-by-one in bozo_decode_url_percent
In case of strings that end with '%', debug function was reading past buffer.
2023-09-20 07:13:35 +00:00
shm 086f2d107a Remove unused variable (bp) 2023-09-20 07:09:14 +00:00