Commit Graph

13176 Commits

Author SHA1 Message Date
ryo 14ff263e51 split ksyms stuff into ksyms.[ch] 2022-12-01 00:41:10 +00:00
ryo 07a5918990 Improve tprof(8)
- Added "tprof count" subcommand to perform counts only.
- Event options (u,k) are now optional. The default value is both userland and kernel. (:uk)
- Event counters can be displayed with SIGINFO during `tprof monitor' or `tprof count'.
2022-12-01 00:40:05 +00:00
ryo caba1a6f47 Improve tprof(4)
- Multiple events can now be handled simultaneously.
- Counters should be configured with TPROF_IOC_CONFIGURE_EVENT in advance,
  instead of being configured at TPROF_IOC_START.
- The configured counters can be started and stopped repeatedly by
  PROF_IOC_START/TPROF_IOC_STOP.
- The value of the performance counter can be obtained at any timing as a 64bit
  value with TPROF_IOC_GETCOUNTS.
- Backend common parts are handled in tprof.c as much as possible, and functions
  on the tprof_backend side have been reimplemented to be more primitive.
- The reset value of counter overflows for profiling can now be adjusted.
  It is calculated by default from the CPU clock (speed of cycle counter) and
  TPROF_HZ, but for some events the value may be too large to be sufficient for
  profiling. The event counter can be specified as a ratio to the default or as
  an absolute value when configuring the event counter.
- Due to overall changes, API and ABI have been changed. TPROF_VERSION and
  TPROF_BACKEND_VERSION were updated.
2022-12-01 00:32:52 +00:00
martin cda02d64c0 Fix primary boot selection for FFSv2ea filesystems 2022-11-30 19:44:06 +00:00
martin 1903fd9f69 Switch the default FFS type from FFSv2 to FFSv2ea - we want extended
attribute support to be exercised and tested.

If you want to share a new installed disk with older NetBSD
installations or (read only) with other OSes you need to explicitly set
the FS type to FFSv2 now.
2022-11-30 15:57:54 +00:00
martin c6fbd2016e Add support for FFSv2ea in the partition type menus (internally setting
fs version to 3 for this, where 2 is FFSv2 and 1 is FFSv1)
2022-11-30 15:53:35 +00:00
brad 068b504f95 A driver for the Bosch BMP280 / BME280 temperature, humidity and
atmospheric pressure sensor.  This is an inexpensive to moderately
expensive chip available from a large number of places.  The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter.  This driver also only supports the
I2C interface and not the SPI interface.

The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
2022-11-21 21:24:00 +00:00
msaitoh ce50970520 s/features 2/features2/ 2022-11-17 15:21:31 +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
msaitoh 733f1aef14 s/Instruction-Based Sampling/IBS/ 2022-11-16 15:02:00 +00:00
msaitoh 0eb57810eb Add CPUID Fn8000_0022 AMD Extended Performance Monitoring and Debug. 2022-11-16 14:55:50 +00:00
msaitoh 8c5c0f4087 Add CPUID Fn8000_0021 AMD Extended Features Identification 2. 2022-11-16 14:01:41 +00:00
msaitoh f4bc0dd676 Print AMD RAS features and Instruction-Based Sampling features. 2022-11-16 13:15:26 +00:00
uwe b983a092c6 syslogd: make -d accept an optional argument
Make it possible to specify the debug message categories with an
optional numeric argument.  You'll have to read the fine source to
find out what they are.  The number can be specified as the usual
decimal, hex (0x), or octal (0) literal with an optional ~negation.

Since syslogd uses getopt(3), not getopt_long(3), do a bit of
gymnastics so that both -d42 and -d 42 are accepted (I'm not inventing
long names for all the existing options just to support an optional
argument to -d).

-d without an argument still uses the old D_DEFAULT selection just in
case someone really relies on that.  You can disable all debug
messages with -d0 but still get syslogd not daemonized.
2022-11-08 01:43:09 +00:00
uwe b1c7adf12f tls.c: wrap debug-only data in #ifndef NDEBUG 2022-11-08 01:05:10 +00:00
uwe 4497207b84 sign.c: mark a variable used only in asserts as __diagused 2022-11-08 01:03:27 +00:00
andvar a4d52a8baf s/instalboot/installboot/ 2022-11-01 19:51:46 +00:00
gutteridge 954d646f97 makemandb.c: fix grammar in a comment 2022-10-30 01:49:30 +00:00
christos 53ca192d6b need gettext now 2022-10-29 13:53:19 +00:00
andvar 49811c99f0 fix various typos in comments and makefs README file. 2022-10-26 21:56:19 +00:00
rillig 77ed1cfd24 timed: fix typos in comments 2022-10-16 16:58:54 +00:00
rillig ec912a23a0 timed: fix typos in comments, remove trailing whitespace 2022-10-16 16:44:15 +00:00
rillig 3fa7630905 timed: remove unhandled getopt option -P
No functional change, due to 'opterr = 0'.
2022-10-16 16:37:16 +00:00
martin eece741b72 PR install/57025: revert bogus rev 1.9 which was only papering over
a bug in the adoption of the MBR handling code and fix the original
conversion bug instead:
 - run fdisk to install the MBR bootcode on the raw disk partition
 - run installboot against the NetBSD root partition (not the raw partition).
2022-10-02 10:21:36 +00:00
riastradh 1509380101 usbdevs(8): Misc KNF.
- Fix whitespace and braces.
- malloc(n * sizeof(...)) -> calloc(n, sizeof(...))
2022-09-13 08:34:37 +00:00
gutteridge 6f0eae4436 makemandb/*: fix spelling of database and consistency of SQLite 2022-09-11 20:32:37 +00:00
rillig 6c259f3957 fix misspellings of 'available' and nearby typos 2022-09-10 12:14:17 +00:00
tsutsui e371117863 Make build with WARNS=5. 2022-09-03 07:45:08 +00:00
martin 3a0698b068 Simplify name trimming following a suggestion from rillig. 2022-08-30 15:27:37 +00:00
martin 692793ef41 Fix typo (pointed out by rillig) 2022-08-30 11:45:28 +00:00
martin 61e8f3dfee Invoke magic C promotion rules as originally intended - oops!
Pointed out by rillig@
2022-08-30 11:44:15 +00:00
martin 78432c804c Trim trailing whitespace from disk names we got via drvctl. 2022-08-29 17:35:15 +00:00
tsutsui f7ce29ba48 Choose a proper kernel set per a running kernel during installation.
Mostly taken from sgimips.
This avoids users from overwriting by the default ATARITT kernel on
non TT machines like Falcon, Hades, and Milan etc.
2022-08-28 13:56:56 +00:00
riastradh eec34178cd installboot(8): Note relation to UEFI boot and hybrid images. 2022-08-19 00:50:08 +00:00
riastradh a2c7f8e936 installboot(8): Fix capitalization of U-Boot. 2022-08-19 00:45:54 +00:00
christos 6e30ba64e5 Remove RPC define 2022-08-10 08:38:43 +00:00
christos 71fa92b75e PR/56963: Mark Davies: inetd not configured for rpc
Move RPC includes to inetd.h
2022-08-10 08:37:53 +00:00
dholland 9178dcce36 PR bin/56963 Mark Davies: inetd not configured for rpc
Instead of using negative flags to turn on positive flags, set -DRPC
in the makefile. Corrects a problem where the SunRPC code in parse.c
was accidentally left disabled.

This is a prime example of why we don't like negative flags...
2022-08-10 03:35:38 +00:00
andvar 6478b40555 s/blity/bility/ in various words, mainly in comments. 2022-08-06 18:26:41 +00:00
christos a63bd7e822 Add a menu option to set the file extension of the downloaded sets.
amd64 sets are .tar.xz and sysinst fails by default.
2022-07-22 16:51:14 +00:00
martin 54eba5c35d Avoid C++-isms (stupid muscle memory) to fix the build. 2022-07-11 15:12:24 +00:00
brook 317b3a6922 usr.sbin/installboot: Add a command line option (-u) to set U-Boot search paths
Installboot can install U-Boot boot blocks directly into a system
image.  Normally, the U-Boot files are searched for in
/usr/pkg/share/u-boot, under the expectation that most people will
build them with pkgsrc.  However, it is also possible to set an
environment variable (INSTALLBOOT_UBOOT_PATHS) to a colon-separated
search path to accommodate other situations.  This commit adds a
command line option (-u) to set the search path; if present, it
overrides the environment and default.
2022-07-10 19:28:00 +00:00
martin d771a36cae We may try to extract the "last mounted on" field from EFI partitions
too.
2022-07-10 12:49:05 +00:00
martin c38850fb43 Preparations to make the extended partitioning during normal installation
more usefull - pass an optional install_description to partman().
2022-07-10 10:52:40 +00:00
riastradh 7feed94cb3 ldpd(8): Fix address of misaligned packed members.
PR kern/56895
2022-06-26 17:55:38 +00:00
martin 6a2f9c7852 Fix typo 2022-06-26 09:14:14 +00:00
tsutsui 24b1487d1f Check on-disk disklabel properly even on ports without raw BSD disklabel.
Fixes PR install/56890.
2022-06-24 22:28:11 +00:00
tsutsui 70b74d3017 Use proper ANSI function declarations. 2022-06-24 22:05:24 +00:00
martin f11db73bb6 Fix inverted condition in previous and only apply special handling for
the "all of NetBSD" partition when we have an outer MBR label.
Pointed out by Izumi Tsutsui. Hopefully the last fix needed for PR 56886.
2022-06-21 16:08:25 +00:00
martin 55bddebd42 Fix free space accounting when partitions change size or are deleted.
Part of PR 56886.
2022-06-21 15:46:10 +00:00
martin 879a69316d renumber_partitions() needs to deal with removed/added partitions. 2022-06-21 15:45:03 +00:00
martin b49d75f0a1 Fix free space accounting for partition size changes and deletions.
Part of PR 56886.
2022-06-21 15:42:43 +00:00
martin 7644abe049 disklabel_can_add_partition() did not consider additional partitions
(while there still is space in the disklabel). Part of PR 56886.
2022-06-21 15:41:29 +00:00
martin 7e86db2e48 When the user aborts the target disk selection menu, return to the
main loop immediately.
2022-06-20 18:06:28 +00:00
martin e58e24d52b PR 56893: fix input validation when the user moves a new partition to
a totaly different part of the disk. Fix size handling for freshly
added partitions (which would previously use random stack data due to
bogus error checking).
2022-06-20 16:06:38 +00:00
martin 0998f09feb Centralize the "we can newfs this type of filesystem" predicate
and fix the list.
2022-06-19 12:08:31 +00:00
martin 51b677cd6e An unused partition may not be the install target 2022-06-18 13:56:41 +00:00
martin dc4cc574c6 Typo in comment 2022-06-18 13:52:42 +00:00
kre 643b5abf47 Significant changes to output layout methods - except for -x and -y
which have not (yet) been touched (-xD needs *serious* improvements).

While this still has no run-time configurability, it is now easy to
adjust the column widths in the source and recompile.  Dynamic (auto)
column width sizing is probably out of the question (requires predicting
the future) but options to allow the widths to be set isn't out of the
question.

The columns are now (mostly) considerably wider than they were before,
hence wider windows are needed to view the same info.  In an 80
column window the default display (with tty & cpu included) displays
just 2 drives.   160 columns will fit 7 (but with -I, just 4).

One new option added (-z) suppresses output which is true 0 (but still
prints 0 for values rounded down to 0) for everything except tty stats.
For drive output, the drive must have done nothing during the interval
to get its output data blanked.

Also options -H h -W w to set the output size (page height & width), the
former used to decide when to print headers, and the latter to calculate
the number of drives to print when no drive names were given.  Env vars
LINES and COLUMNS are used if the options are not given, with fallback
to the terminal size (if output is to a terminal, and its sizes are
known), and if all else fails, 20 lines, 80 columns.  Specifying 0
means unlimited (infinite).   So "iostat -W 0" will show all of the
drives, across one (often very) long line.  Wedges count as drives.

When drives are specified, the output will now appear in the order they were
given on the command line, rather than the order the system discovered them
during auto-configuration.  If specified as an fnmatch(3) pattern, drives that
match will appear in auto-conf order, but that's generally what is wanted.
When none are specified, you still get the first N (however many fits based
upon the options selected) in auto-conf order (usually useless, more so now
given that less will fit).

Lastly, for those who looked at the patch I sent to current-users@
and were horrified at how kludgey it was, rest assured, that was just
a quick hack to demonstrate what the output format changes would look
like.   This version (I hope) is not nearly so disgusting.
2022-06-18 11:33:13 +00:00
tsutsui 4a5cc17411 Use #define<space> consistently. 2022-06-17 16:09:47 +00:00
tsutsui d0bf84d7e1 Use consistent default partition sizes for similar ports. 2022-06-17 16:06:19 +00:00
tsutsui 5a2fc3a542 Restore DEFSWAPSIZE value to (-1) to determine it by get_ramsize().
Thanks hannken@ for informing this botch.
2022-06-17 14:08:54 +00:00
hannken 9c0e0956d5 Remove now obsolete "#define DEFSWAPSIZE (-1)" to fix the build. 2022-06-17 09:00:08 +00:00
kre 02531ad2c6 Fix processing of the archaic arg format (BACKWARD_COMPATIBILITY) so it
doesn't repeat the processing every iteration.  Repeatedly seeing the wait
interval does no harm, but setting the iteration count (reps) over and
over again rather defeats its purpose.
2022-06-17 01:47:45 +00:00
tsutsui e758d86974 Fix pasto. 2022-06-16 16:27:30 +00:00
tsutsui 8e73b23597 Define DEFSWAPSIZE properly. DEFSWAPRAM seems obsolete. 2022-06-16 14:03:37 +00:00
msaitoh 9a8e306805 Modify output of CPUID Fn0000000a.
old:
cpu0: Perfmon-eax 0x8300805<VERSION=0x5,GPCounter=0x8,GPBitwidth=0x30>
cpu0: Perfmon-eax 0x8300805<Vectorlen=0x8>
cpu0: Perfmon-edx 0x8604<FixedFunc=0x4,FFBitwidth=0x30,ANYTHREADDEPR>

new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff<CORECYCL,INST,REFCYCL,LLCREF,LLCMISS,BRINST>
cpu0: Perfmon: General: avail 0xff<BRMISPR,TOPDOWNSLOT>
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf<INST,CLK_CORETHREAD,CLK_REF_TSC,TOPDOWNSLOT>
2022-06-15 16:28:01 +00:00
msaitoh 052df59bc6 Disable the unsupported events from the bit vector length in EAX. 2022-06-13 09:28:58 +00:00
msaitoh c07439c64e Add topdown-slots to Intel architectural performance monitoring version 1. 2022-06-13 07:40:58 +00:00
martin 74e9a67aa7 Slightly improved error handling when converion from one partition table
format to another is not lossless.
2022-06-11 18:30:02 +00:00
martin d5590295ea Avoid integer arithmetic overflow when checking a partition table without
any partitions.
Fix some comments.
2022-06-11 18:27:22 +00:00
tsutsui be57fcbdf6 Pull SMALLPROG stuff to disable unnecessary partitioning methods etc. 2022-06-11 16:41:55 +00:00
tsutsui aaa792c210 Add explicit PART_BOOT_MOUNT for ews4800mips.
XXX: FS_SYSVBFS stuff for the MD boot partition is untested.
2022-06-11 16:38:51 +00:00
tsutsui aaa3eed2cc Use proper part_type for the boot partition (while it looks unused). 2022-06-11 16:25:23 +00:00
martin 78fe337e2f Enhance support for the pseudo file system type "EFI System Partition". 2022-06-11 15:41:19 +00:00
martin dedf178a07 Remove unused field. 2022-06-11 15:30:48 +00:00
martin 9ba59248ef Add support for explicitly selecting "EFI system partition" as a partition
type.
2022-06-09 18:26:06 +00:00
uwe 789d65f63b wsfontload(8): Mention .wsf font files. Fix formatting. 2022-06-08 22:38:29 +00:00
ryo fad1a5aff3 On aarch64, ddb backtrace can be performed without framepointer by specifying
the /s modifier to the ddb trace command (trace/s, bt/s).
The default is trace with framepointer (same as before).

This allows backtracing even on kernels compiled with -fomit-frame-pointer.
2022-06-07 08:08:31 +00:00
nia b7957d1677 build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
2022-06-06 10:56:27 +00:00
skrll 09be482eb3 Don't index outside the mdocs array of function pointers. Analysis and
suggested fixes from Tom Lane.  I played it safe and went with (my
variation of) the minimal fix.

port-hppa/56118: sporadic app crashes in HPPA -current
2022-06-06 07:41:23 +00:00
martin 6ce5826744 If we get the disk description via device properties, the strings may
have arbitrary length - make sure the "available disks" menu fits
on the current screen.
2022-06-02 15:36:08 +00:00
ryo e9be3ab9f3 tidy up backtrace from crash(9) on aarch64
- fix to dump trapframe when backtracing from crash(8).
- use db_read_bytes() when reading kernel memory.
2022-06-02 05:09:01 +00:00
nia da7913c09e mk: Add MKTIMED and MKMOUSED flags for compiling NetBSD without timed
and moused
2022-05-29 15:23:20 +00:00
andvar 5fb5f516a8 fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
andvar 67cf5ffde0 s/hierach/hierarch/ 2022-05-28 21:57:39 +00:00
andvar 09fb17927e fix various typos in comments, mainly origional->original,
extened->extended, incomming->incoming.
2022-05-28 21:14:56 +00:00
andvar 86c307248f fix various typos, mainly in comments. 2022-05-28 10:36:21 +00:00
nia cbb875961a mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
2022-05-27 07:28:20 +00:00
nia 6678627ac7 mk: Rename the MKMBONE option to MKMROUTING for greater accuracy and
to match the related kernel config option.
2022-05-25 21:25:46 +00:00
nia 30fbdc74a3 mk: Allow building base without the MBONE applications by setting
MKMBONE=no in mk.conf
2022-05-25 10:18:28 +00:00
msaitoh 61a8c80144 Add note about tprof(4) for people like me who forget to load tprof_x86. 2022-05-25 06:17:19 +00:00
andvar cdc507f0d2 fix various typos in comment, documentation and log messages. 2022-05-24 20:50:17 +00:00
andvar 9f4a9600be fix various typos in comments, docs and log messages. 2022-05-24 06:27:59 +00:00
andvar 15fb77a86d s/changable/changeable/ in comments. 2022-05-24 06:18:34 +00:00
andvar 63264fc80c s/controll/control/ in comments. 2022-05-23 21:46:11 +00:00
andvar f42f89fd6f fix various small typos, mainly in comments. 2022-05-22 11:27:33 +00:00
andvar 9f981eec2a s/appropiate/appropriate/ in comments and readme file. 2022-05-20 21:31:24 +00:00
andvar 7ba300a976 s/auxillary/auxiliary/ in comments. 2022-05-20 19:34:22 +00:00
gutteridge 521bd3ea5d apropos(1): improve error handling in edge cases
Patch from RVP on NetBSD-Users, with an additional comment tweak by me.
Summary from RVP:

1. Ignore SIGPIPE so that we're not killed in the middle of some
   DB operation by a botched $PAGER:

$ env PAGER=/non-existent apropos -p ...

2. Return proper exit status in case of write errors:

$ apropos ... >/dev/full || echo fail
2022-05-19 04:08:03 +00:00