Unclear why we have a separate xyz.ioconf for module and XYZ.ioconf
for rump component, but at least xyz_modcmd obviates the need for
xyz_component.c (though evidently the latter could have been replaced
anyway by RUMP_COMPONENT=ioconf in the rump component Makefile).
Disabled by default in x86/GENERIC and usbdevices.config pending
review and testing without rump ugenhc in the way, but enabled in
x86/ALL for compile-testing.
(Hi gson! Finally found a round tuit in my pocket, next to a certain
rectangular one.)
It's a document from June 2015.
DESCRIPTION
The NetBSD kernel provides several synchronization and interrupt control
primitives. This manpage aims at giving an overview of these interfaces
and their proper application. This document includes also basic kernel
thread control primitives and rough overview of the NetBSD kernel design.
Part of interfaces are missing, like new mechanisms for networking SMP,
as this documentation page predates them.
Initial review back in 2015 by Thomas Klausner <wiz>
- Check if setkey correctly handles algorithms for AH/ESP
- Check IPsec of transport mode with AH/ESP over IPv4/IPv6
- Check IPsec of tunnel mode with AH/ESP over IPv4/IPv6
Note that we should modularize netipsec and reduce reverse symbol references
(referencing symbols of netipsec from net, netinet and netinet6) though,
the task needs lots of code changes. Prior to doing so, rumpifying it and
having ATF tests should be useful.
table, install the disklabel after setting up MBR partitions. This moves
the disklabel to the BSD partition from the start of the disk, avoiding
a conflict with the ODROID-C1 bootloader.
- Add a "NETBSD" volume label to the MSDOS file-system.
- Explicitly initialize boot sector.
- Correct an issue where the MSDOS file-system was larger than the
partition table entry.
- Add NetBSD partition to the MBR partition table.
- internal video on 362 and 382 works (no palette support)
- framebuffer 425e works (console text only)
- serial console for 425e on bootloader works
- Tigershark PersonalVRX was ported from OpenBSD (untested)
- Apollo Domain keyboard and mouse work
- ARCOFI audio on 425e works
- internal SCSI floppy is recognized as usual removable disk by MI SCSI
Reviewed by enami@. Tested by Naruaki Etomi and me.
A 68k LUNA with this driver will be demonstrated at AsiaBSDCon NetBSD booth
by Etomi-san, with LUNA-88K2 running OpenBSD/luna88k by Kenji Aoyama.
This interface is modeled after FreeBSD API with the usage.
This replaced previous watchpoint API. The previous one was introduced
recently in NetBSD-current and remove its spurs without any
backward-compatibility.
Design choices for Debug Register accessors:
- exec() (TRAP_EXEC event) must remove debug registers from LWP
- debug registers are only per-LWP, not per-process globally
- debug registers must not be inherited after (v)forking a process
- debug registers must not be inherited after forking a thread
- a debugger is responsible to set global watchpoints/breakpoints with the
debug registers, to achieve this PTRACE_LWP_CREATE/PTRACE_LWP_EXIT event
monitoring function is designed to be used
- debug register traps must generate SIGTRAP with si_code TRAP_DBREG
- debugger is responsible to retrieve debug register state to distinguish
the exact debug register trap (DR6 is Status Register on x86)
- kernel must not remove debug register traps after triggering a trap event
a debugger is responsible to detach this trap with appropriate PT_SETDBREGS
call (DR7 is Control Register on x86)
- debug registers must not be exposed in mcontext
- userland must not be allowed to set a trap on the kernel
Implementation notes on i386 and amd64:
- the initial state of debug register is retrieved on boot and this value is
stored in a local copy (initdbregs), this value is used to initialize dbreg
context after PT_GETDBREGS
- struct dbregs is stored in pcb as a pointer and by default not initialized
- reserved registers (DR4-DR5, DR9-DR15) are ignored
Further ideas:
- restrict this interface with securelevel
Tested on real hardware i386 (Intel Pentium IV) and amd64 (Intel i7).
This commit enables 390 debug register ATF tests in kernel/arch/x86.
All tests are passing.
This commit does not cover netbsd32 compat code. Currently other interface
PT_GET_SIGINFO/PT_SET_SIGINFO is required in netbsd32 compat code in order to
validate reliably PT_GETDBREGS/PT_SETDBREGS.
This implementation does not cover FreeBSD specific defines in their
<x86/reg.h>: DBREG_DR7_LOCAL_ENABLE, DBREG_DR7_GLOBAL_ENABLE, DBREG_DR7_LEN_1
etc. These values tend to be reinvented by each tracer on its own. GNU
Debugger (GDB) works with NetBSD debug registers after adding this patch:
--- gdb/amd64bsd-nat.c.orig 2016-02-10 03:19:39.000000000 +0000
+++ gdb/amd64bsd-nat.c
@@ -167,6 +167,10 @@ amd64bsd_target (void)
#ifdef HAVE_PT_GETDBREGS
+#ifndef DBREG_DRX
+#define DBREG_DRX(d,x) ((d)->dr[(x)])
+#endif
+
static unsigned long
amd64bsd_dr_get (ptid_t ptid, int regnum)
{
Another reason to stop introducing unpopular defines covering machine
specific register macros is that these value varies across generations of
the same CPU family.
GDB demo:
(gdb) c
Continuing.
Watchpoint 2: traceme
Old value = 0
New value = 16
main (argc=1, argv=0x7f7fff79fe30) at test.c:8
8 printf("traceme=%d\n", traceme);
(Currently the GDB interface is not reliable due to NetBSD support bugs)
Sponsored by <The NetBSD Foundation>
Add a test program for the bug described in this PR.
This is the first pkill/pgrep/prenice test (more would be good!)
This test has been confirmed to work once the bug described in the PR
has been fixed, so the test is not marked "expected to fail" even
though initially that is what should happen.
Note: the test cana also fail if the system running the tests happens
to be running processes with names that match the patterns searched for
by the test, other than the test program itself. This is expected to be
unlikely.
- libgcc_g.a, libgcov_g.a, libobjc_g.a, libstdc++_g.a, and libsupc++_g.a are
marked "gcc" instead of "gcccmds".
- libbfd_g.a and libh_helper_*_g.a are moved from debug/mi to debug/shl.mi.
This seems strange at first sight, but they are built only when shared
libraries are enabled.
support for Endian-Independent FFS and Apple UFS is disabled unless FFS_EI=1
and APPLE_UFS=1 are added to CRUNCHENV, respectively.
This reduces the size of ramdisk image for atari by over 15KB.
Thanks tsutsui and christos for their useful comments.
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.
Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).
Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.
Sponsored by <The NetBSD Foundation>
bta2dpd allows you to stream audio to and from bluetooth devices.
It features high quality stereo audio and is intended for use with pad(4)
device.
As discussed on current-users@ and tech-userlevel@
This used to refer to x87 support for x86 machines.
npx isn't really a driver any more. we don't support x86 hardware
without an FPU, and we don't call it by that name in the code or
attach it as npx at something.
brought up on tech-kern. unfortunately the copy to port-i386 disappeared
in a spam filter.
The former allows the ncurses (and pdcurses) macros getsyx and setsyx
to be implemented, which is needed by a surprising number of applications.
The latter is needed for Python curses support so it doesn't have to dive
into ncurses window structure.
7265 works fine.
7260 and 3160 maybe work.
7265D, 3165 and 8260 not work yet.
if_iwm.c: r1.147.
if_iwmreg.h: r1.19 without r1.16.
if_iwmvar.h: r1.24.
firmware is taken from https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
- iwlwifi-7260-ucode-16.242414.0.tgz
- iwlwifi-3160-ucode-16.242414.0.tgz
- iwlwifi-7265-ucode-16.242414.0.tgz
- iwlwifi-8000-ucode-16.242414.0.tgz