Commit Graph

285333 Commits

Author SHA1 Message Date
jakllsch 84ed9069d5 Revert bnx(4) to INTx interrupts.
Should fix PR kern/55974.

This driver does not yet do the special MSI and MSI-X setup that the
chip apparently requires.
2021-02-13 01:51:24 +00:00
thorpej 845bb89288 - Don't change to the OFW stack in C code; instead, switch to the OFW
stack in the openfirmware() wrapper itself.  Inspired by a similar
  change in OpenBSD designed to appease clang.
- The OF_*() entry firmware interfaces use several global resources;
  protect those global resources with a __cpu_simple_lock_t.
- Make ofbcopy() static -- it's no longer referenced outside openfirm.c
2021-02-13 01:48:33 +00:00
thorpej 106bb031ae Call cpu_model_init() after clearing the MSR. 2021-02-13 01:11:58 +00:00
thorpej 9c01e8876c Add some comments to help visually track the nested #ifdef blocks in
ofwoea_batinit().
2021-02-12 23:40:02 +00:00
thorpej 5b0f387aaa No need for a prototype of ofbcopy() here. 2021-02-12 23:38:17 +00:00
ryo 743e52a1a7 UART_RFIFO_REG should be masked before passing to cn_check_magic(). there is any data in other than the lower 8 bits. 2021-02-12 21:39:55 +00:00
rillig ef1df6f9cf tests/libcurses: format misleading do-while loop 2021-02-12 21:29:54 +00:00
rillig 18799db59b tests/libcurses: remove wrong comments 2021-02-12 21:29:03 +00:00
rillig ca234efa6a tests/libcurses: remove excess empty lines 2021-02-12 20:45:00 +00:00
rillig 450da2d661 tests/libcurses: query function arguments in consistent order 2021-02-12 20:41:37 +00:00
roy c77555a631 if_gre: Ensure that gre_h is aligned 2021-02-12 19:57:49 +00:00
jmcneill 7271b77973 entropy: Only print consolidation warning of AB_DEBUG.
The previous fix for PR kern/55458 changed printf to log(LOG_DEBUG, ...) with
the intent of hiding the message unless 'boot -x'. But this did not actually
suppress the message to console as log(LOG_DEBUG, ...) will print to console
if syslogd is not running yet.

So instead, just check for AB_DEBUG flag directly in boothowto, and only
printf the message if it is set.
2021-02-12 19:48:26 +00:00
rillig 25ddeb49df tests/libcurses: don't access args directly
By providing declarative syntax for accessing the arguments, the
unnecessarily detailed boilerplate code is hidden.  This allows easy
inspection by tools and humans, to check for typos and other mistakes.
2021-02-12 18:20:05 +00:00
rillig 5326ff7afe tests/libcurses: replace ARG_CHTYPE_STRING with ARG_CHTYPE
All uses of the previous macro did not treat the argument as a string or
array of chtype, but as a single chtype.  It's strange that the previous
code arbitrarily split the access to the argument by first storing it as
a pointer and then dereferencing it.

No functional change.
2021-02-12 16:59:32 +00:00
rillig a346ecb379 tests/libcurses: add shortcut macros for SCREEN and unsigned int 2021-02-12 16:49:18 +00:00
rillig c7ac460c19 tests/libcurses: remove redundant comments
There is nothing surprising about call2, call3 or call4.
2021-02-12 14:05:57 +00:00
rillig 1fe7fa71d8 tests/libcurses: reduce boilerplate in function dispatcher
No functional change.  The generated code for GCC 9.3 on NetBSD 9.99.80
x86_64 is exactly the same as before.
2021-02-12 12:58:52 +00:00
jmcneill 3771b87f20 Reset serial terminal to default state at boot.
UEFI may leave the serial console in an undesireable state (incorrect
foreground and background colour, etc) when exiting. Send ANSI escape
sequences when setting up the early console attachments to turn off
character attributes and erase from the cursor to the end of the screen.
2021-02-12 12:26:09 +00:00
leot 53e7d520bd Add HOTP and TOTP 2021-02-12 08:56:04 +00:00
rillig b1b4392b00 tests/libcurses: reduce boilerplate in function dispatcher
This makes the code more declarative and easier to reason about.

The generated code stays exactly the same.
2021-02-12 08:55:32 +00:00
riastradh 17dd2b3b7e rnd(4): Consistently call it the `global pool'.
The `ready pool' is a term I used in a draft that I never committed.
2021-02-12 01:52:09 +00:00
macallan b07abf8aa9 remove unused/useless #ifdef block 2021-02-11 19:06:24 +00:00
mrg 2e97e19f4b add new files for xterm 366. 2021-02-11 12:30:08 +00:00
mrg b0f74aaafd clean up issues detected by address sanitizer (just some memory
leaks that only apply to the library version.)

XXX: the handling of hr_file and its variants is more crappy
again - the prior clean up is slightly less clean now, but at
least it does not leak memory.

XXX2: cgi-bin test hangs with address sanitizer.  don't know
why yet..
2021-02-11 09:57:52 +00:00
mrg 12d8621dac changes in bozohttpd 20210210:
o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@ingalls.rocks>.
2021-02-11 09:23:55 +00:00
ryo d9af110bc0 include "opt_gprof.h" so that _PROF_PROLOGUE works properly in ENTRY() macro in *.S files 2021-02-11 08:35:11 +00:00
tsutsui 1e06acd5c6 Fix a message for NMI.
Maybe the "keyboard NMI" message was derived from hp300 but
on X68030 NMI is triggered by the NMI button, and there is no
parity check.
2021-02-11 02:37:11 +00:00
ryoon 28390de185 Enable to mount Raspberry Pi Pico's USB mass storage partition
Fix PR kern/55985.
O.k. by thorpej@.

Pull-up to netbsd-8 and netbsd-9.
2021-02-11 00:15:55 +00:00
christos 45516a99e8 PR/55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()
2021-02-10 16:30:01 +00:00
ryo 1b3a3b1b74 Oh...the name of the mcount call was different between gcc and llvm.
gcc calls it as "_mconut", llvm calls as "__mcount".

Change the main name of mcount to "mcount()", and created "_mcount" and "__mcount" entries
to work regardless of which compiler the object was created with.
2021-02-10 12:31:34 +00:00
ryo 05347759f0 add support kernel profiling on aarch64
- add MCOUNT_ENTER, MCOUNT_EXIT macro
- __mcount() function should be aligned
- add "-fno-optimize-sibling-calls" option when PROF. for accurate profiling, it is better to suppress the tail call.
2021-02-10 08:25:01 +00:00
simonb b8da3fc26d On MIPS use a helper function to work out the current PC and then
call stacktrace_subr() directly for displaying a stacktrace with
db_stacktrace() and friends.
2021-02-10 07:19:54 +00:00
simonb 5267a28fdc Allow for MD code to use a different function than db_stack_trace_print()
to be used with db_stacktrace() and friends by pre-defining the
db_stacktrace_print macro.
2021-02-10 07:17:39 +00:00
christos dc6815d699 From Cy Schubert:
ipfilter: Use the softn (NAT softc) host map size in ip_nat6
calculation. The ipfilter NAT table host map size is a tunable
that defaults to a macro value defined at build time. HOSTMAP_SIZE
is saved in softn (the ipnat softc) at initialization. It can be
tuned (changed) at runtime using the ipf -T command. If the
hostmap_size tunable is adjusted the calculation to determine where
to put new entries in the table was incorrect. Use the tunable in
the NAT softc instead of the static build time value.
2021-02-10 00:28:55 +00:00
rillig 518cbcb21b tests/libcurses: add missing space after control flow keywords 2021-02-09 20:42:31 +00:00
rillig 6938509815 tests/libcurses: replace remaining strcasecmp with strcmp
There is no reason to write special functions in a different case than
the canonical one, just like for the regular curses functions.
2021-02-09 20:39:20 +00:00
rillig e91849a6b1 tests/libcurses: fix spelling of the special call to DRAIN 2021-02-09 20:31:02 +00:00
rillig 82a08c1a4a tests/libcurses: compare function names case-sensitive
There is absolutely no reason to write function names in upper case or
mixed case.
2021-02-09 20:24:02 +00:00
rillig 74a9e3d2cc tests/libcurses: fix scanf parameter for unsigned int 2021-02-09 20:22:11 +00:00
ryo b30f8af34d fix build without MULTIPROCESSOR 2021-02-09 17:44:01 +00:00
jakllsch 2e3b0e2d82 Zero interrupt handles upon allocation.
Might prevent detach-time bugs.
2021-02-09 15:05:49 +00:00
jakllsch f7e5a58297 Avoid an extra daif read when dispatching interrupts by using
ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie() / cpsid() macros.
2021-02-09 14:24:14 +00:00
simonb fca6380f2a Remove a macro that has never been used. 2021-02-09 13:28:47 +00:00
simonb 493ef37bf0 Trailing whitespace, remove extra blank line. 2021-02-09 13:26:25 +00:00
isaki 530812a995 Update function name in a comment. 2021-02-09 12:39:28 +00:00
isaki ede4f2b616 Protect also audioopen() and audiobellopen() from audiodetach() with
psref(9), as well as others(audioread, audiowrite, etc..).
- Rename audio_file_enter to audio_sc_acquire_fromfile, audio_file_exit
  to audio_sc_release, for clarify.  These are the reference counter for
  this sc.
- Introduce audio_sc_acquire_foropen for audio{,bell}open.
- audio_open needs to examine sc_dying again before inserting it into
  sc_files, in order to keep sc_files consistency.
The race between audiodetach and audioopen is pointed out by riastradh@.
Thank you for many advices.
2021-02-09 12:36:34 +00:00
yamt 3bc7a17908 Make Raspberry PI 3 Model A+ use bwfm config for Model B+
* It works for me.

* It's what linux-firmware does.
  https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=923bfa68a1c97929652f029da699495f4ce43f14
2021-02-09 11:57:20 +00:00
wiz d2560851e3 Try improving readability in wrt negations.
Use Nx.  Remove trailing whitespace.  Fix some typos.
2021-02-09 09:01:29 +00:00
isaki 9f9bc7f002 Change the lock conditions to call audio_unlink().
This can remove a different copy of audio_exlock_enter() in audio_unlink()
and can use normal one.  Also, in audiodetach(), this can set the exlock
at more natual order (before calling audio_unlink()).
No noticeable functional changes are intended.
Thanks for comments, riastradh@.
2021-02-09 05:53:14 +00:00
dholland d4c3ba45a9 Document in poll(2) that poll first appeared in NetBSD in NetBSD 1.3. 2021-02-09 01:12:01 +00:00