sync with OpenBSD -current

This commit is contained in:
purplerain 2024-05-13 01:12:16 +00:00
parent e9498e0c86
commit d4708f35f9
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
30 changed files with 429 additions and 283 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: install.md,v 1.49 2024/04/17 04:36:39 kn Exp $
# $OpenBSD: install.md,v 1.50 2024/05/12 19:47:14 kn Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -39,10 +39,11 @@ MOUNT_ARGS_msdos="-o-l"
KEEP_EFI_SYS=false
md_installboot() {
local _disk=$1 _chunks _bootdisk _mdec _plat
local _disk=$1 _reason=$2 _rerun=false _chunks _bootdisk _mdec _plat
case ${COMPATIBLE} in
apple,*) _plat=apple;;
apple,*) _plat=apple
[[ $_reason == apple-boot ]] && _rerun=true;;
raspberrypi,*) _plat=rpi;;
esac
@ -52,6 +53,8 @@ md_installboot() {
exit
fi
$_rerun && return
# Apply some final tweaks on selected platforms
_mdec=/usr/mdec/$_plat
@ -83,6 +86,10 @@ md_installboot() {
esac
}
md_fw() {
md_installboot "$@"
}
md_prep_fdisk() {
local _disk=$1 _d _type=MBR

View File

@ -1,5 +1,5 @@
#!/bin/ksh
# $OpenBSD: install.sub,v 1.1263 2024/03/15 17:31:21 kn Exp $
# $OpenBSD: install.sub,v 1.1264 2024/05/12 19:47:14 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@ -3014,7 +3014,11 @@ if ((${#_KERNV[*]} == 1)); then
fi
__EOT
[ -x /mnt/usr/sbin/fw_update ] && DESTDIR=/mnt /mnt/usr/sbin/fw_update
if [[ -x /mnt/usr/sbin/fw_update ]]; then
DESTDIR=/mnt /mnt/usr/sbin/fw_update
# Rerun installboot(8) to pick up just fetched boot firmware.
typeset -f md_fw >/dev/null && md_fw $ROOTDISK apple-boot
fi
if [[ -f $_kernel_dir.tgz ]]; then
echo -n "Relinking to create unique kernel..."
@ -3587,6 +3591,7 @@ umount -af >/dev/null 2>&1
# md_consoleinfo() - set CDEV, CTTY, CSPEED, CPROM
#
# The following functions can be provided if required:
# md_fw() - device specific firmware quirks
# md_prep_fdisk() - put a partition table on the disk
#
# The following variables can be provided if required:

View File

@ -2183,6 +2183,7 @@
./usr/share/man/man3/UI_get_string_type.3
./usr/share/man/man3/UI_new.3
./usr/share/man/man3/X25519.3
./usr/share/man/man3/X509V3_EXT_get_nid.3
./usr/share/man/man3/X509V3_EXT_print.3
./usr/share/man/man3/X509V3_extensions_print.3
./usr/share/man/man3/X509V3_get_d2i.3

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.286 2024/03/06 02:34:14 tb Exp $
# $OpenBSD: Makefile,v 1.287 2024/05/12 11:50:36 tb Exp $
.include <bsd.own.mk>
@ -304,6 +304,7 @@ MAN= \
UI_get_string_type.3 \
UI_new.3 \
X25519.3 \
X509V3_EXT_get_nid.3 \
X509V3_EXT_print.3 \
X509V3_extensions_print.3 \
X509V3_get_d2i.3 \

View File

@ -0,0 +1,92 @@
.\" $OpenBSD: X509V3_EXT_get_nid.3,v 1.3 2024/05/12 15:26:46 tb Exp $
.\"
.\" Copyright (c) 2024 Theo Buehler <tb@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 12 2024 $
.Dt X509V3_EXT_GET_NID 3
.Os
.Sh NAME
.Nm X509V3_EXT_get_nid ,
.Nm X509V3_EXT_get
.Nd retrieve X.509v3 certificate extension methods
.Sh SYNOPSIS
.In openssl/x509v3.h
.Ft const X509V3_EXT_METHOD *
.Fo X509V3_EXT_get_nid
.Fa "int nid"
.Fc
.Ft const X509V3_EXT_METHOD *
.Fo X509V3_EXT_get
.Fa "X509_EXTENSION *ext"
.Fc
.Sh DESCRIPTION
An X.509v3 certificate extension contains an Object Identifier (OID),
a boolean criticality indicator, and an opaque extension value
.Po
an
.Vt ASN1_OCTET_STRING
.Pc
whose meaning is determined by the OID.
The library's
.Vt X509V3_EXT_METHOD
type,
which is not yet documented in detail,
contains a numeric identifier to represent the OID and various
handlers for encoding, decoding, printing, and configuring the
extension's value.
Criticality is handled separately, for example as an argument to
.Xr X509V3_add1_i2d 3 .
.Sh RETURN VALUES
.Fn X509V3_EXT_get_nid
returns the
.Vt X509V3_EXT_METHOD
corresponding to the numeric identifier
.Fa nid ,
or
.Dv NULL
if there is none.
.Pp
.Fn X509V3_EXT_get
returns the
.Vt X509V3_EXT_METHOD
associated with the extension type of
.Fa ext ,
or
.Dv NULL
if there is none.
.Sh SEE ALSO
.Xr i2s_ASN1_ENUMERATED_TABLE 3 ,
.Xr OBJ_create 3 ,
.Xr X509_EXTENSION_get_object 3 ,
.Xr X509V3_get_d2i 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile
.Bl -dash -compact
.It
section 4.2: Certificate Extensions
.El
.Sh HISTORY
These functions first appeared in OpenSSL 0.9.2b and
have been available since
.Ox 2.6 .
.Sh CAVEATS
LibreSSL only supports built-in extension methods.
Other implementations have incomplete support for custom extension methods,
whose API is not threadsafe, does not affect the behavior of
.Xr X509_verify_cert 3 ,
and has various other surprising quirks.
If custom extensions were added, both functions will prefer them
over built-in methods.

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: X509V3_get_d2i.3,v 1.21 2023/09/25 07:47:52 tb Exp $
.\" $OpenBSD: X509V3_get_d2i.3,v 1.22 2024/05/12 17:44:11 tb Exp $
.\" full merge up to: OpenSSL ff7fbfd5 Nov 2 11:52:01 2015 +0000
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 25 2023 $
.Dd $Mdocdate: May 12 2024 $
.Dt X509V3_GET_D2I 3
.Os
.Sh NAME
@ -275,6 +275,8 @@ An error is returned if the extension does already exist.
.Pp
.Dv X509V3_ADD_APPEND
appends a new extension, ignoring whether the extension already exists.
This is a misfeature and should not be used because certificates must
not include the same extension more than once.
.Pp
.Dv X509V3_ADD_REPLACE
replaces an extension if it exists otherwise appends a new extension.
@ -290,7 +292,8 @@ returned if the extension does already exist.
.Pp
.Dv X509V3_ADD_DELETE
deletes extension
.Fa nid .
.Fa nid
if it exists and errors otherwise.
No new extension is added.
.Pp
If

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: X509_EXTENSION_set_object.3,v 1.17 2023/04/30 19:40:23 tb Exp $
.\" $OpenBSD: X509_EXTENSION_set_object.3,v 1.18 2024/05/12 11:49:47 tb Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
.\" This file is a derived work.
@ -65,7 +65,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 30 2023 $
.Dd $Mdocdate: May 12 2024 $
.Dt X509_EXTENSION_SET_OBJECT 3
.Os
.Sh NAME
@ -297,6 +297,7 @@ pointer.
.Xr X509_check_issued 3 ,
.Xr X509_get_extension_flags 3 ,
.Xr X509_REQ_add_extensions 3 ,
.Xr X509V3_EXT_get_nid 3 ,
.Xr X509V3_EXT_print 3 ,
.Xr X509V3_extensions_print 3 ,
.Xr X509V3_get_d2i 3 ,

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: X509_STORE_get_by_subject.3,v 1.5 2023/11/16 20:27:43 schwarze Exp $
.\" $OpenBSD: X509_STORE_get_by_subject.3,v 1.6 2024/05/12 05:08:59 tb Exp $
.\"
.\" Copyright (c) 2021, 2023 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 16 2023 $
.Dd $Mdocdate: May 12 2024 $
.Dt X509_STORE_GET_BY_SUBJECT 3
.Os
.Sh NAME
@ -95,8 +95,7 @@ to retrieve a revocation list.
.Pp
If the store does not yet contain a matching object or if the type is
.Dv X509_LU_CRL ,
.Xr X509_LOOKUP_by_subject 3
is called on
a lookup by subject is performed on
.Vt X509_LOOKUP
objects associated with the store until a match is found,
which may add zero or more objects to the store.
@ -172,8 +171,7 @@ and
.Fn X509_STORE_get_by_subject
return 1 if a match is found or 0 on failure.
In addition to simply not finding a match,
they may also fail due to memory allocation failure in
.Xr X509_LOOKUP_by_subject 3 .
they may also fail due to memory allocation failure.
With library implementations other than LibreSSL,
they might also return negative values for internal errors.
.Pp
@ -215,7 +213,6 @@ it might also return negative values for internal errors.
.Xr X509_check_issued 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_get_issuer_name 3 ,
.Xr X509_LOOKUP_by_subject 3 ,
.Xr X509_NAME_new 3 ,
.Xr X509_new 3 ,
.Xr X509_OBJECT_retrieve_by_subject 3 ,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.c,v 1.186 2024/04/14 09:59:04 kettenis Exp $ */
/* $OpenBSD: cpu.c,v 1.187 2024/05/12 16:49:38 guenther Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@ -156,10 +156,6 @@ int cpu_id = 0; /* cpuid(1).eax */
int cpu_ebxfeature = 0; /* cpuid(1).ebx */
int cpu_ecxfeature = 0; /* cpuid(1).ecx */
int cpu_feature = 0; /* cpuid(1).edx */
int cpu_perf_eax = 0; /* cpuid(0xa).eax */
int cpu_perf_ebx = 0; /* cpuid(0xa).ebx */
int cpu_perf_edx = 0; /* cpuid(0xa).edx */
int cpu_apmi_edx = 0; /* cpuid(0x80000007).edx */
int ecpu_ecxfeature = 0; /* cpuid(0x80000001).ecx */
int cpu_meltdown = 0;
int cpu_use_xsaves = 0;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: identcpu.c,v 1.141 2024/05/11 19:21:47 guenther Exp $ */
/* $OpenBSD: identcpu.c,v 1.142 2024/05/12 16:49:38 guenther Exp $ */
/* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*
@ -288,7 +288,8 @@ via_update_sensor(void *args)
#endif
uint64_t
cpu_freq_ctr(struct cpu_info *ci)
cpu_freq_ctr(struct cpu_info *ci, uint32_t cpu_perf_eax,
uint32_t cpu_perf_edx)
{
uint64_t count, last_count, msr;
@ -329,10 +330,6 @@ cpu_freq(struct cpu_info *ci)
{
uint64_t last_count, count;
count = cpu_freq_ctr(ci);
if (count != 0)
return (count);
last_count = rdtsc();
delay(100000);
count = rdtsc();
@ -456,38 +453,36 @@ static uint32_t prevcpu_perf_edx;
#endif
static inline void
print_perf_cpuid(struct cpu_info *ci)
print_perf_cpuid(struct cpu_info *ci, uint32_t cpu_perf_eax,
uint32_t cpu_perf_edx)
{
uint32_t eax, edx, version;
uint32_t version;
if (CPU_IS_PRIMARY(ci)) {
eax = cpu_perf_eax;
edx = cpu_perf_edx;
version = eax & CPUIDEAX_VERID;
version = cpu_perf_eax & CPUIDEAX_VERID;
if (version == 0)
return;
}
#ifdef MULTIPROCESSOR
else {
uint32_t dummy;
CPUID(0xa, eax, dummy, dummy, edx);
/* if no difference on the bits we care about, say nothing */
if (((eax ^ prevcpu_perf_eax) & 0x00ffffff) == 0 &&
((edx ^ prevcpu_perf_edx) & 0x00001fff) == 0)
if (((cpu_perf_eax ^ prevcpu_perf_eax) & 0x00ffffff) == 0 &&
((cpu_perf_edx ^ prevcpu_perf_edx) & 0x00001fff) == 0)
return;
version = eax & CPUIDEAX_VERID;
version = cpu_perf_eax & CPUIDEAX_VERID;
}
prevcpu_perf_eax = eax;
prevcpu_perf_edx = edx;
prevcpu_perf_eax = cpu_perf_eax;
prevcpu_perf_edx = cpu_perf_edx;
#endif
printf("\n%s: cpuid a vers=%d", ci->ci_dev->dv_xname, version);
if (version) {
printf(", gp=%d, gpwidth=%d", CPUIDEAX_NUM_GC(eax),
CPUIDEAX_BIT_GC(eax));
printf(", gp=%d, gpwidth=%d", CPUIDEAX_NUM_GC(cpu_perf_eax),
CPUIDEAX_BIT_GC(cpu_perf_eax));
if (version > 1) {
printf(", ff=%d, ffwidth=%d", CPUIDEDX_NUM_FC(edx),
CPUIDEDX_BIT_FC(edx));
printf(", ff=%d, ffwidth=%d",
CPUIDEDX_NUM_FC(cpu_perf_edx),
CPUIDEDX_BIT_FC(cpu_perf_edx));
}
}
}
@ -500,6 +495,7 @@ identifycpu(struct cpu_info *ci)
static struct cpu_info *prevci = &cpu_info_primary;
#define CPUID_MEMBER(member) ci->member, prevci->member
uint32_t cflushsz, curcpu_1_ecx, curcpu_apmi_edx = 0;
uint32_t curcpu_perf_eax = 0, curcpu_perf_edx = 0;
uint32_t curcpu_tpm_ecxflags = 0, curcpu_d_1_eax = 0;
uint64_t freq = 0;
u_int32_t dummy;
@ -517,17 +513,12 @@ identifycpu(struct cpu_info *ci)
cflushsz = cpu_ebxfeature;
curcpu_1_ecx = cpu_ecxfeature;
ecpu_ecxfeature = ci->ci_efeature_ecx;
curcpu_apmi_edx = cpu_apmi_edx;
} else {
CPUID(1, ci->ci_signature, cflushsz, curcpu_1_ecx,
ci->ci_feature_flags);
/* Let cpu_feature be the common bits */
cpu_feature &= ci->ci_feature_flags |
(ci->ci_feature_eflags & CPUID_NXE);
if (ci->ci_pnfeatset >= 0x80000007) {
CPUID(0x80000007, dummy, dummy, dummy,
curcpu_apmi_edx);
}
}
/* cflush cacheline size is equal to bits 15-8 of ebx * 8 */
ci->ci_cflushsz = ((cflushsz >> 8) & 0xff) * 8;
@ -577,6 +568,9 @@ identifycpu(struct cpu_info *ci)
pvbus_identify();
#endif
if (ci->ci_pnfeatset >= 0x80000007)
CPUID(0x80000007, dummy, dummy, dummy, curcpu_apmi_edx);
if (ci->ci_feature_flags && ci->ci_feature_flags & CPUID_TSC) {
/* Has TSC, check if it's constant */
if (ci->ci_vendor == CPUV_INTEL) {
@ -590,20 +584,26 @@ identifycpu(struct cpu_info *ci)
atomic_setbits_int(&ci->ci_flags, CPUF_CONST_TSC);
}
} else if (ci->ci_vendor == CPUV_AMD) {
if (cpu_apmi_edx & CPUIDEDX_ITSC) {
if (curcpu_apmi_edx & CPUIDEDX_ITSC) {
/* Invariant TSC indicates constant TSC on AMD */
atomic_setbits_int(&ci->ci_flags, CPUF_CONST_TSC);
}
}
/* Check if it's an invariant TSC */
if (cpu_apmi_edx & CPUIDEDX_ITSC)
if (curcpu_apmi_edx & CPUIDEDX_ITSC)
atomic_setbits_int(&ci->ci_flags, CPUF_INVAR_TSC);
tsc_identify(ci);
}
freq = cpu_freq(ci);
if (ci->ci_cpuid_level >= 0xa) {
CPUID(0xa, curcpu_perf_eax, dummy, dummy, curcpu_perf_edx);
freq = cpu_freq_ctr(ci, curcpu_perf_eax, curcpu_perf_edx);
}
if (freq == 0)
freq = cpu_freq(ci);
if (ci->ci_cpuid_level >= 0x07) {
/* "Structured Extended Feature Flags" */
@ -660,7 +660,7 @@ identifycpu(struct cpu_info *ci)
'b', CPUID_MEMBER(ci_feature_sefflags_ebx), SEFF0_EBX_BITS,
'c', CPUID_MEMBER(ci_feature_sefflags_ecx), SEFF0_ECX_BITS,
'd', CPUID_MEMBER(ci_feature_sefflags_edx), SEFF0_EDX_BITS);
print_perf_cpuid(ci);
print_perf_cpuid(ci, curcpu_perf_eax, curcpu_perf_edx);
pcpuid(ci, "d.1", 'a', curcpu_d_1_eax, prevcpu_d_1_eax, XSAVE_BITS);
pcpuid2(ci, "80000001",
'd', CPUID_MEMBER(ci_feature_eflags), CPUIDE_EDX_BITS,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: locore0.S,v 1.22 2023/07/21 04:04:51 guenther Exp $ */
/* $OpenBSD: locore0.S,v 1.23 2024/05/12 16:49:38 guenther Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
@ -250,12 +250,6 @@ bi_size_ok:
movl %ecx,RELOC(cpu_ecxfeature)
movl %edx,RELOC(cpu_feature)
movl $0x0a,%eax
cpuid
movl %eax,RELOC(cpu_perf_eax)
movl %ebx,RELOC(cpu_perf_ebx)
movl %edx,RELOC(cpu_perf_edx)
movl $0x80000001, %eax
cpuid
andl $CPUID_NXE, %edx /* other bits may clash */
@ -274,10 +268,6 @@ bi_size_ok:
cont:
orl %edx, RELOC(cpu_feature)
movl $0x80000007,%eax
cpuid
movl %edx,RELOC(cpu_apmi_edx)
/*
* Finished with old stack; load new %esp now instead of later so we
* can trace this code without having to worry about the trace trap

View File

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.h,v 1.168 2024/05/01 12:54:27 mpi Exp $ */
/* $OpenBSD: cpu.h,v 1.169 2024/05/12 16:49:38 guenther Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@ -393,10 +393,6 @@ struct timeval;
extern int cpu_feature;
extern int cpu_ebxfeature;
extern int cpu_ecxfeature;
extern int cpu_perf_eax;
extern int cpu_perf_ebx;
extern int cpu_perf_edx;
extern int cpu_apmi_edx;
extern int ecpu_ecxfeature;
extern int cpu_id;
extern char cpu_vendor[];

View File

@ -1,4 +1,4 @@
/* $OpenBSD: isa_machdep.h,v 1.9 2008/12/11 17:07:14 oga Exp $ */
/* $OpenBSD: isa_machdep.h,v 1.10 2024/05/13 00:16:09 jsg Exp $ */
/* $NetBSD: isa_machdep.h,v 1.2 2003/05/09 23:51:28 fvdl Exp $ */
/*-
@ -149,36 +149,6 @@ struct isa_dma_cookie {
#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
/*
* XXX Various seemingly PC-specific constants, some of which may be
* unnecessary anyway.
*/
/*
* RAM Physical Address Space (ignoring the above mentioned "hole")
*/
#define RAM_BEGIN 0x0000000 /* Start of RAM Memory */
#define RAM_END 0x1000000 /* End of RAM Memory */
#define RAM_SIZE (RAM_END - RAM_BEGIN)
/*
* Oddball Physical Memory Addresses
*/
#define COMPAQ_RAMRELOC 0x80c00000 /* Compaq RAM relocation/diag */
#define COMPAQ_RAMSETUP 0x80c00002 /* Compaq RAM setup */
#define WEITEK_FPU 0xC0000000 /* WTL 2167 */
#define CYRIX_EMC 0xC0000000 /* Cyrix EMC */
/*
* stuff that used to be in pccons.c
*/
#define MONO_BASE 0x3B4
#define MONO_BUF 0xB0000
#define CGA_BASE 0x3D4
#define CGA_BUF 0xB8000
/*
* Variables and macros to deal with the ISA I/O hole.
* XXX These should be converted to machine- and bus-mapping-independent

View File

@ -1,4 +1,4 @@
/* $OpenBSD: isa_machdep.h,v 1.25 2009/08/22 02:54:50 mk Exp $ */
/* $OpenBSD: isa_machdep.h,v 1.26 2024/05/13 00:16:09 jsg Exp $ */
/* $NetBSD: isa_machdep.h,v 1.7 1997/06/06 23:28:42 thorpej Exp $ */
/*-
@ -138,58 +138,6 @@ struct isa_dma_cookie {
#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
/*
* XXX Various seemingly PC-specific constants, some of which may be
* unnecessary anyway.
*/
/*
* RAM Physical Address Space (ignoring the above mentioned "hole")
*/
#define RAM_BEGIN 0x0000000 /* Start of RAM Memory */
#define RAM_END 0x1000000 /* End of RAM Memory */
#define RAM_SIZE (RAM_END - RAM_BEGIN)
/*
* Oddball Physical Memory Addresses
*/
#define COMPAQ_RAMRELOC 0x80c00000 /* Compaq RAM relocation/diag */
#define COMPAQ_RAMSETUP 0x80c00002 /* Compaq RAM setup */
#define WEITEK_FPU 0xC0000000 /* WTL 2167 */
#define CYRIX_EMC 0xC0000000 /* Cyrix EMC */
/*
* stuff that used to be in pccons.c
*/
#define MONO_BUF 0xB0000
#define CGA_BUF 0xB8000
#define IOPHYSMEM 0xA0000
/*
* ISA DMA bounce buffers.
* XXX should be made partially machine- and bus-mapping-independent.
*
* DMA_BOUNCE is the number of pages of low-addressed physical memory
* to acquire for ISA bounce buffers. If physical memory below 16 MB
* then DMA_BOUNCE_LOW will be used.
*
* isaphysmem is the address of this physical contiguous low memory.
* isaphysmempgs is the number of pages allocated.
*/
#ifndef DMA_BOUNCE
#define DMA_BOUNCE 48 /* number of pages if memory > 16M */
#endif
#ifndef DMA_BOUNCE_LOW
#define DMA_BOUNCE_LOW 16 /* number of pages if memory <= 16M */
#endif
extern vaddr_t isaphysmem;
extern int isaphysmempgs;
/*
* Variables and macros to deal with the ISA I/O hole.
* XXX These should be converted to machine- and bus-mapping-independent

View File

@ -1,4 +1,4 @@
/* $OpenBSD: rkpmic.c,v 1.14 2024/03/02 19:52:41 kettenis Exp $ */
/* $OpenBSD: rkpmic.c,v 1.15 2024/05/12 20:02:13 kettenis Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org>
*
@ -19,6 +19,10 @@
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/signalvar.h>
#include <machine/fdt.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_regulator.h>
@ -48,6 +52,20 @@
#define RK809_RTC_STATUS 0x0e
#define RK80X_RTC_STATUS_POWER_UP 0x80
#define RK809_PMIC_SYS_CFG3 0xf4
#define RK809_PMIC_SYS_CFG3_SLP_FUN_MASK 0x18
#define RK809_PMIC_SYS_CFG3_SLP_FUN_NONE 0x00
#define RK809_PMIC_SYS_CFG3_SLP_FUN_SLEEP 0x08
#define RK809_PMIC_INT_STS0 0xf8
#define RK809_PMIC_INT_MSK0 0xf9
#define RK809_PMIC_INT_MSK0_PWRON_FALL_INT_IM 0x01
#define RK809_PMIC_INT_STS1 0xfa
#define RK809_PMIC_INT_MSK1 0xfb
#define RK809_PMIC_INT_STS2 0xfc
#define RK809_PMIC_INT_MSK2 0xfd
#define RK809_PMIC_GPIO_INT_CONFIG 0xfe
#define RK809_PMIC_GPIO_INT_CONFIG_INT_POL 0x02
#define RKSPI_CMD_READ (0 << 7)
#define RKSPI_CMD_WRITE (1 << 7)
@ -322,6 +340,8 @@ struct rkpmic_softc {
int (*sc_read)(struct rkpmic_softc *, uint8_t, void *, size_t);
int (*sc_write)(struct rkpmic_softc *, uint8_t, void *, size_t);
void *sc_ih;
};
int rkpmic_i2c_match(struct device *, void *, void *);
@ -335,9 +355,11 @@ int rkpmic_spi_read(struct rkpmic_softc *, uint8_t, void *, size_t);
int rkpmic_spi_write(struct rkpmic_softc *, uint8_t, void *, size_t);
void rkpmic_attach(struct device *, struct device *, void *);
int rkpmic_activate(struct device *, int);
const struct cfattach rkpmic_i2c_ca = {
sizeof(struct rkpmic_softc), rkpmic_i2c_match, rkpmic_i2c_attach
sizeof(struct rkpmic_softc), rkpmic_i2c_match, rkpmic_i2c_attach,
NULL, rkpmic_activate
};
const struct cfattach rkpmic_spi_ca = {
@ -348,6 +370,7 @@ struct cfdriver rkpmic_cd = {
NULL, "rkpmic", DV_DULL
};
int rkpmic_intr(void *);
void rkpmic_attach_regulator(struct rkpmic_softc *, int);
uint8_t rkpmic_reg_read(struct rkpmic_softc *, int);
void rkpmic_reg_write(struct rkpmic_softc *, int, uint8_t);
@ -414,6 +437,7 @@ rkpmic_attach(struct device *parent, struct device *self, void *aux)
{
struct rkpmic_softc *sc = (struct rkpmic_softc *)self;
const char *chip;
uint8_t val;
int node;
if (OF_is_compatible(sc->sc_node, "rockchip,rk805")) {
@ -455,6 +479,78 @@ rkpmic_attach(struct device *parent, struct device *self, void *aux)
return;
for (node = OF_child(node); node; node = OF_peer(node))
rkpmic_attach_regulator(sc, node);
if (OF_is_compatible(sc->sc_node, "rockchip,rk809")) {
/* Mask all interrupts. */
rkpmic_reg_write(sc, RK809_PMIC_INT_MSK0, 0xff);
rkpmic_reg_write(sc, RK809_PMIC_INT_MSK1, 0xff);
rkpmic_reg_write(sc, RK809_PMIC_INT_MSK2, 0xff);
/* Ack all interrupts. */
rkpmic_reg_write(sc, RK809_PMIC_INT_STS0, 0xff);
rkpmic_reg_write(sc, RK809_PMIC_INT_STS1, 0xff);
rkpmic_reg_write(sc, RK809_PMIC_INT_STS2, 0xff);
/* Set interrupt pin to active-low. */
val = rkpmic_reg_read(sc, RK809_PMIC_GPIO_INT_CONFIG);
rkpmic_reg_write(sc, RK809_PMIC_GPIO_INT_CONFIG,
val & ~RK809_PMIC_GPIO_INT_CONFIG_INT_POL);
sc->sc_ih = fdt_intr_establish(sc->sc_node, IPL_TTY,
rkpmic_intr, sc, sc->sc_dev.dv_xname);
/* Unmask power button interrupt. */
rkpmic_reg_write(sc, RK809_PMIC_INT_MSK0,
~RK809_PMIC_INT_MSK0_PWRON_FALL_INT_IM);
#ifdef SUSPEND
if (OF_getpropbool(sc->sc_node, "wakeup-source"))
device_register_wakeup(&sc->sc_dev);
#endif
}
}
int
rkpmic_activate(struct device *self, int act)
{
struct rkpmic_softc *sc = (struct rkpmic_softc *)self;
uint8_t val;
switch (act) {
case DVACT_SUSPEND:
if (OF_is_compatible(sc->sc_node, "rockchip,rk809")) {
val = rkpmic_reg_read(sc, RK809_PMIC_SYS_CFG3);
val &= ~RK809_PMIC_SYS_CFG3_SLP_FUN_MASK;
val |= RK809_PMIC_SYS_CFG3_SLP_FUN_SLEEP;
rkpmic_reg_write(sc, RK809_PMIC_SYS_CFG3, val);
}
break;
case DVACT_RESUME:
if (OF_is_compatible(sc->sc_node, "rockchip,rk809")) {
val = rkpmic_reg_read(sc, RK809_PMIC_SYS_CFG3);
val &= ~RK809_PMIC_SYS_CFG3_SLP_FUN_MASK;
val |= RK809_PMIC_SYS_CFG3_SLP_FUN_NONE;
rkpmic_reg_write(sc, RK809_PMIC_SYS_CFG3, val);
}
break;
}
return 0;
}
int
rkpmic_intr(void *arg)
{
extern int allowpowerdown;
struct rkpmic_softc *sc = arg;
if (allowpowerdown) {
allowpowerdown = 0;
prsignal(initprocess, SIGUSR2);
}
rkpmic_reg_write(sc, RK809_PMIC_INT_STS0, 0xff);
return 1;
}
struct rkpmic_regulator {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: comvar.h,v 1.59 2022/01/11 11:51:14 uaa Exp $ */
/* $OpenBSD: comvar.h,v 1.60 2024/05/12 08:42:13 jsg Exp $ */
/* $NetBSD: comvar.h,v 1.5 1996/05/05 19:50:47 christos Exp $ */
/*
@ -170,7 +170,6 @@ extern int comdefaultrate;
extern int comconsrate;
extern int comconsfreq;
extern bus_addr_t comconsaddr;
extern bus_addr_t comsiraddr;
extern int comconsattached;
extern bus_space_tag_t comconsiot;
extern bus_space_handle_t comconsioh;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: rtwvar.h,v 1.31 2015/11/04 12:11:59 dlg Exp $ */
/* $OpenBSD: rtwvar.h,v 1.32 2024/05/12 08:44:09 jsg Exp $ */
/* $NetBSD: rtwvar.h,v 1.10 2004/12/26 22:37:57 mycroft Exp $ */
/*-
@ -432,8 +432,6 @@ struct rtw_softc {
#define sc_rxtap sc_rxtapu.tap
#define sc_txtap sc_txtapu.tap
extern int rtw_host_rfio;
void rtw_txdac_enable(struct rtw_softc *, int);
void rtw_anaparm_enable(struct rtw_regs *, int);
void rtw_config0123_enable(struct rtw_regs *, int);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ufshci.c,v 1.20 2024/05/10 06:14:10 mglocker Exp $ */
/* $OpenBSD: ufshci.c,v 1.21 2024/05/12 12:20:36 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@ -42,12 +42,12 @@
#include <dev/ic/ufshcivar.h>
#include <dev/ic/ufshcireg.h>
//#define UFSHCI_DEBUG
#ifdef UFSHCI_DEBUG
int ufshci_dbglvl = 1;
#define DPRINTF(x...) do { printf(x); } while (0)
#define DPRINTF(l, x...) do { if ((l) <= ufshci_dbglvl) printf(x); } \
while (0)
#else
#define DPRINTF(x...)
#define DPRINTF(l, x...)
#endif
struct cfdriver ufshci_cd = {
@ -113,17 +113,17 @@ ufshci_intr(void *arg)
int handled = 0;
status = UFSHCI_READ_4(sc, UFSHCI_REG_IS);
DPRINTF("%s: status=0x%08x\n", __func__, status);
DPRINTF(3, "%s: status=0x%08x\n", __func__, status);
if (status == 0)
return 0;
if (status & UFSHCI_REG_IS_UCCS) {
DPRINTF("%s: UCCS interrupt\n", __func__);
DPRINTF(3, "%s: UCCS interrupt\n", __func__);
handled = 1;
}
if (status & UFSHCI_REG_IS_UTRCS) {
DPRINTF("%s: UTRCS interrupt\n", __func__);
DPRINTF(3, "%s: UTRCS interrupt\n", __func__);
/* Reset Interrupt Aggregation Counter and Timer. */
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRIACR,
@ -169,27 +169,26 @@ ufshci_attach(struct ufshci_softc *sc)
sc->sc_hcmid = UFSHCI_READ_4(sc, UFSHCI_REG_HCMID);
sc->sc_nutmrs = UFSHCI_REG_CAP_NUTMRS(sc->sc_cap) + 1;
sc->sc_rtt = UFSHCI_REG_CAP_RTT(sc->sc_cap) + 1;
//sc->sc_nutrs = UFSHCI_REG_CAP_NUTRS(sc->sc_cap) + 1;
sc->sc_nutrs = UFSHCI_REG_CAP_NUTRS(sc->sc_cap) + 1;
DPRINTF(1, "Capabilities (0x%08x):\n", sc->sc_cap);
DPRINTF(1, "CS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_CS ? 1 : 0);
DPRINTF(1, "UICDMETMS=%d\n",
sc->sc_cap & UFSHCI_REG_CAP_UICDMETMS ? 1 : 0);
DPRINTF(1, "OODDS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_OODDS ? 1 : 0);
DPRINTF(1, "64AS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_64AS ? 1 : 0);
DPRINTF(1, "AUTOH8=%d\n", sc->sc_cap & UFSHCI_REG_AUTOH8 ? 1 : 0);
DPRINTF(1, "NUTMRS=%d\n", sc->sc_nutmrs);
DPRINTF(1, "RTT=%d\n", sc->sc_rtt);
DPRINTF(1, "NUTRS=%d\n", sc->sc_nutrs);
DPRINTF(1, "HCPID=0x%08x\n", sc->sc_hcpid);
DPRINTF(1, "HCMID (0x%08x):\n", sc->sc_hcmid);
DPRINTF(1, " BI=0x%04x\n", UFSHCI_REG_HCMID_BI(sc->sc_hcmid));
DPRINTF(1, " MIC=0x%04x\n", UFSHCI_REG_HCMID_MIC(sc->sc_hcmid));
/* XXX: Using more than one slot currently causes OCS errors */
sc->sc_nutrs = 1;
#ifdef UFSHCI_DEBUG
printf("Capabilities (0x%08x):\n", sc->sc_cap);
printf(" CS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_CS ? 1 : 0);
printf(" UICDMETMS=%d\n",
sc->sc_cap & UFSHCI_REG_CAP_UICDMETMS ? 1 : 0);
printf(" OODDS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_OODDS ? 1 : 0);
printf(" 64AS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_64AS ? 1 : 0);
printf(" AUTOH8=%d\n", sc->sc_cap & UFSHCI_REG_AUTOH8 ? 1 : 0);
printf(" NUTMRS=%d\n", sc->sc_nutmrs);
printf(" RTT=%d\n", sc->sc_rtt);
printf(" NUTRS=%d\n", sc->sc_nutrs);
printf("HCPID=0x%08x:\n", sc->sc_hcpid);
printf("HCMID (0x%08x):\n", sc->sc_hcmid);
printf(" BI=0x%04x\n", UFSHCI_REG_HCMID_BI(sc->sc_hcmid));
printf(" MIC=0x%04x\n", UFSHCI_REG_HCMID_MIC(sc->sc_hcmid));
#endif
if (sc->sc_nutrs > 32) {
printf("%s: NUTRS can't be >32 (is %d)!\n",
sc->sc_dev.dv_xname, sc->sc_nutrs);
@ -199,7 +198,7 @@ ufshci_attach(struct ufshci_softc *sc)
} else if (sc->sc_nutrs > 1) {
sc->sc_iacth = sc->sc_nutrs - 1;
}
DPRINTF("IACTH=%d\n", sc->sc_iacth);
DPRINTF(1, "Intr. aggr. counter threshold:\nIACTH=%d\n", sc->sc_iacth);
ufshci_init(sc);
@ -250,7 +249,7 @@ ufshci_reset(struct ufshci_softc *sc)
return -1;
}
DPRINTF("\n%s: Host Controller enabled (i=%d)\n", __func__, i);
DPRINTF(2, "\n%s: Host Controller enabled (i=%d)\n", __func__, i);
return 0;
}
@ -261,7 +260,7 @@ ufshci_uccs_poll(struct ufshci_softc *sc)
uint32_t status;
int i, retry = 25;
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
for (i = 0; i < retry; i++) {
status = UFSHCI_READ_4(sc, UFSHCI_REG_IS);
@ -273,7 +272,7 @@ ufshci_uccs_poll(struct ufshci_softc *sc)
printf("%s: %s: timeout\n", sc->sc_dev.dv_xname, __func__);
return -1;
}
DPRINTF("%s: completed after %d retries\n", __func__, i);
DPRINTF(3, "%s: completed after %d retries\n", __func__, i);
/* ACK interrupt */
UFSHCI_WRITE_4(sc, UFSHCI_REG_IS, status);
@ -310,7 +309,7 @@ ufshci_dmamem_alloc(struct ufshci_softc *sc, size_t size)
NULL, BUS_DMA_WAITOK) != 0)
goto unmap;
DPRINTF("%s: size=%lu, page_size=%d, nsegs=%d\n",
DPRINTF(2, "%s: size=%lu, page_size=%d, nsegs=%d\n",
__func__, size, PAGE_SIZE, nsegs);
return udm;
@ -365,9 +364,9 @@ ufshci_init(struct ufshci_softc *sc)
*/
reg = UFSHCI_READ_4(sc, UFSHCI_REG_HCS);
if (reg & UFSHCI_REG_HCS_DP)
DPRINTF("%s: Device Presence SET\n", __func__);
DPRINTF(2, "%s: Device Presence SET\n", __func__);
else
DPRINTF("%s: Device Presence NOT SET\n", __func__);
DPRINTF(2, "%s: Device Presence NOT SET\n", __func__);
/*
* 7.1.1 Host Controller Initialization: 10)
@ -376,7 +375,7 @@ ufshci_init(struct ufshci_softc *sc)
/* 7.1.1 Host Controller Initialization: 11) */
reg = UFSHCI_READ_4(sc, UFSHCI_REG_UTRIACR);
DPRINTF("%s: UTRIACR=0x%08x\n", __func__, reg);
DPRINTF(2, "%s: UTRIACR=0x%08x\n", __func__, reg);
/*
* 7.1.1 Host Controller Initialization: 12)
@ -393,7 +392,7 @@ ufshci_init(struct ufshci_softc *sc)
}
/* 7.1.1 Host Controller Initialization: 14) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_utmrd);
DPRINTF("%s: utmrd dva=%llu\n", __func__, dva);
DPRINTF(2, "%s: utmrd dva=%llu\n", __func__, dva);
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTMRLBA, (uint32_t)dva);
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTMRLBAU, (uint32_t)(dva >> 32));
@ -407,7 +406,7 @@ ufshci_init(struct ufshci_softc *sc)
}
/* 7.1.1 Host Controller Initialization: 16) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_utrd);
DPRINTF("%s: utrd dva=%llu\n", __func__, dva);
DPRINTF(2, "%s: utrd dva=%llu\n", __func__, dva);
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRLBA, (uint32_t)dva);
UFSHCI_WRITE_4(sc, UFSHCI_REG_UTRLBAU, (uint32_t)(dva >> 32));
@ -461,7 +460,7 @@ ufshci_doorbell_poll(struct ufshci_softc *sc, int slot)
uint32_t reg;
int i, retry = 25;
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
for (i = 0; i < retry; i++) {
reg = UFSHCI_READ_4(sc, UFSHCI_REG_UTRLDBR);
@ -491,7 +490,7 @@ ufshci_utr_cmd_nop(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -528,7 +527,7 @@ ufshci_utr_cmd_nop(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -581,7 +580,7 @@ ufshci_utr_cmd_lun(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -626,7 +625,7 @@ ufshci_utr_cmd_lun(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -688,7 +687,7 @@ ufshci_utr_cmd_inquiry(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -731,7 +730,7 @@ ufshci_utr_cmd_inquiry(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd) + (sizeof(*ucd) * slot);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -793,7 +792,7 @@ ufshci_utr_cmd_capacity16(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -840,7 +839,7 @@ ufshci_utr_cmd_capacity16(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd) + (sizeof(*ucd) * slot);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -902,7 +901,7 @@ ufshci_utr_cmd_capacity(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -948,7 +947,7 @@ ufshci_utr_cmd_capacity(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd) + (sizeof(*ucd) * slot);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -1010,7 +1009,7 @@ ufshci_utr_cmd_io(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -1057,7 +1056,7 @@ ufshci_utr_cmd_io(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd) + (sizeof(*ucd) * slot);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -1118,7 +1117,7 @@ ufshci_utr_cmd_sync(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
utrd = UFSHCI_DMA_KVA(sc->sc_dmamem_utrd);
utrd += slot;
memset(utrd, 0, sizeof(*utrd));
DPRINTF("%s: slot=%d\n", __func__, slot);
DPRINTF(3, "%s: slot=%d\n", __func__, slot);
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 2a) */
utrd->dw0 = UFSHCI_UTRD_DW0_CT_UFS;
@ -1165,7 +1164,7 @@ ufshci_utr_cmd_sync(struct ufshci_softc *sc, struct ufshci_ccb *ccb,
/* 7.2.1 Basic Steps when Building a UTP Transfer Request: 3) */
dva = UFSHCI_DMA_DVA(sc->sc_dmamem_ucd) + (sizeof(*ucd) * slot);
DPRINTF("%s: ucd dva=%llu\n", __func__, dva);
DPRINTF(3, "%s: ucd dva=%llu\n", __func__, dva);
utrd->dw4 = (uint32_t)dva;
utrd->dw5 = (uint32_t)(dva >> 32);
@ -1214,7 +1213,7 @@ ufshci_xfer_complete(struct ufshci_softc *sc)
/* Wait for all commands to complete. */
while ((reg = ufshci_doorbell_read(sc))) {
DPRINTF("%s: doorbell reg=0x%x\n", __func__, reg);
DPRINTF(3, "%s: doorbell reg=0x%x\n", __func__, reg);
if (reg == 0)
break;
}
@ -1235,7 +1234,7 @@ ufshci_xfer_complete(struct ufshci_softc *sc)
/* 7.2.3: Mark software slot for re-use 3c) */
ccb->ccb_status = CCB_STATUS_READY2FREE;
DPRINTF("slot %d completed\n", i);
DPRINTF(3, "slot %d completed\n", i);
}
mtx_leave(&sc->sc_cmd_mtx);
@ -1262,7 +1261,7 @@ ufshci_ccb_alloc(struct ufshci_softc *sc, int nccbs)
struct ufshci_ccb *ccb;
int i;
DPRINTF("%s: nccbs=%d, dma_size=%d, dma_nsegs=%d, "
DPRINTF(2, "%s: nccbs=%d, dma_size=%d, dma_nsegs=%d, "
"dma_segmaxsize=%d\n",
__func__, nccbs, UFSHCI_UCD_PRDT_MAX_XFER, UFSHCI_UCD_PRDT_MAX_SEGS,
UFSHCI_UCD_PRDT_MAX_XFER);
@ -1300,7 +1299,7 @@ ufshci_ccb_get(void *cookie)
struct ufshci_softc *sc = cookie;
struct ufshci_ccb *ccb;
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
mtx_enter(&sc->sc_ccb_mtx);
ccb = SIMPLEQ_FIRST(&sc->sc_ccb_list);
@ -1317,7 +1316,7 @@ ufshci_ccb_put(void *cookie, void *io)
struct ufshci_softc *sc = cookie;
struct ufshci_ccb *ccb = io;
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
mtx_enter(&sc->sc_ccb_mtx);
SIMPLEQ_INSERT_HEAD(&sc->sc_ccb_list, ccb, ccb_entry);
@ -1329,7 +1328,7 @@ ufshci_ccb_free(struct ufshci_softc *sc, int nccbs)
{
struct ufshci_ccb *ccb;
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
while ((ccb = SIMPLEQ_FIRST(&sc->sc_ccb_list)) != NULL) {
SIMPLEQ_REMOVE_HEAD(&sc->sc_ccb_list, ccb_entry);
@ -1348,7 +1347,7 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
mtx_enter(&sc->sc_cmd_mtx);
DPRINTF("%s: cmd=0x%x\n", __func__, xs->cmd.opcode);
DPRINTF(3, "%s: cmd=0x%x\n", __func__, xs->cmd.opcode);
/* Schedule interrupt aggregation. */
if (ISSET(xs->flags, SCSI_POLL) == 0 && sc->sc_intraggr_enabled == 0) {
@ -1367,7 +1366,7 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
case READ_10:
case READ_12:
case READ_16:
DPRINTF("io read\n");
DPRINTF(3, "io read\n");
ufshci_scsi_io(xs, SCSI_DATA_IN);
break;
@ -1375,26 +1374,26 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
case WRITE_10:
case WRITE_12:
case WRITE_16:
DPRINTF("io write\n");
DPRINTF(3, "io write\n");
ufshci_scsi_io(xs, SCSI_DATA_OUT);
break;
case SYNCHRONIZE_CACHE:
DPRINTF("sync\n");
DPRINTF(3, "sync\n");
ufshci_scsi_sync(xs);
break;
case INQUIRY:
DPRINTF("inquiry\n");
DPRINTF(3, "inquiry\n");
ufshci_scsi_inquiry(xs);
break;
case READ_CAPACITY_16:
DPRINTF("capacity16\n");
DPRINTF(3, "capacity16\n");
ufshci_scsi_capacity16(xs);
break;
case READ_CAPACITY:
DPRINTF("capacity\n");
DPRINTF(3, "capacity\n");
ufshci_scsi_capacity(xs);
break;
@ -1405,7 +1404,7 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
scsi_done(xs);
break;
default:
DPRINTF("%s: unhandled scsi command 0x%02x\n",
DPRINTF(3, "%s: unhandled scsi command 0x%02x\n",
__func__, xs->cmd.opcode);
xs->error = XS_DRIVER_STUFFUP;
scsi_done(xs);
@ -1418,13 +1417,13 @@ ufshci_scsi_cmd(struct scsi_xfer *xs)
void
ufshci_minphys(struct buf *bp, struct scsi_link *link)
{
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
}
int
ufshci_scsi_probe(struct scsi_link *link)
{
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
return 0;
}
@ -1432,7 +1431,7 @@ ufshci_scsi_probe(struct scsi_link *link)
void
ufshci_scsi_free(struct scsi_link *link)
{
DPRINTF("%s\n", __func__);
DPRINTF(3, "%s\n", __func__);
}
void
@ -1444,11 +1443,11 @@ ufshci_scsi_inquiry(struct scsi_xfer *xs)
bus_dmamap_t dmap = ccb->ccb_dmamap;
int error;
DPRINTF("%s: INQUIRY (%s)\n",
DPRINTF(3, "%s: INQUIRY (%s)\n",
__func__, ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");
if (xs->datalen > UPIU_SCSI_RSP_INQUIRY_SIZE) {
DPRINTF("%s: request len too large\n", __func__);
DPRINTF(2, "%s: request len too large\n", __func__);
goto error1;
}
@ -1498,11 +1497,11 @@ ufshci_scsi_capacity16(struct scsi_xfer *xs)
bus_dmamap_t dmap = ccb->ccb_dmamap;
int error;
DPRINTF("%s: CAPACITY16 (%s)\n",
DPRINTF(3, "%s: CAPACITY16 (%s)\n",
__func__, ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");
if (xs->datalen > UPIU_SCSI_RSP_CAPACITY16_SIZE) {
DPRINTF("%s: request len too large\n", __func__);
DPRINTF(2, "%s: request len too large\n", __func__);
goto error1;
}
@ -1552,11 +1551,11 @@ ufshci_scsi_capacity(struct scsi_xfer *xs)
bus_dmamap_t dmap = ccb->ccb_dmamap;
int error;
DPRINTF("%s: CAPACITY (%s)\n",
DPRINTF(3, "%s: CAPACITY (%s)\n",
__func__, ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");
if (xs->datalen > UPIU_SCSI_RSP_CAPACITY_SIZE) {
DPRINTF("%s: request len too large\n", __func__);
DPRINTF(2, "%s: request len too large\n", __func__);
goto error1;
}
@ -1610,7 +1609,7 @@ ufshci_scsi_sync(struct scsi_xfer *xs)
/* lba = 0, blocks = 0: Synchronize all logical blocks. */
lba = 0; blocks = 0;
DPRINTF("%s: SYNC, lba=%llu, blocks=%u (%s)\n",
DPRINTF(3, "%s: SYNC, lba=%llu, blocks=%u (%s)\n",
__func__, lba, blocks,
ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");
@ -1652,7 +1651,7 @@ ufshci_scsi_io(struct scsi_xfer *xs, int dir)
if ((xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) != dir)
goto error1;
DPRINTF("%s: %s, datalen=%d (%s)\n", __func__,
DPRINTF(3, "%s: %s, datalen=%d (%s)\n", __func__,
ISSET(xs->flags, SCSI_DATA_IN) ? "READ" : "WRITE", xs->datalen,
ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: i82365_isavar.h,v 1.7 2005/01/27 17:03:23 millert Exp $ */
/* $OpenBSD: i82365_isavar.h,v 1.8 2024/05/12 08:49:26 jsg Exp $ */
/* $NetBSD: i82365_isavar.h,v 1.1 1998/06/07 18:28:31 sommerfe Exp $ */
/*
@ -31,9 +31,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
extern char pcic_isa_intr_list[];
extern int npcic_isa_intr_list;
/*
* Establish/disestablish interrupts for PCMCIA functions.
*/

View File

@ -1,4 +1,4 @@
/* $OpenBSD: udf_vnops.c,v 1.70 2023/04/13 02:19:05 jsg Exp $ */
/* $OpenBSD: udf_vnops.c,v 1.71 2024/05/12 16:51:05 semarie Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@ -75,7 +75,24 @@ const struct vops udf_vops = {
.vop_unlock = udf_unlock,
.vop_pathconf = udf_pathconf,
.vop_islocked = udf_islocked,
.vop_print = udf_print
.vop_print = udf_print,
.vop_abortop = NULL,
.vop_advlock = NULL,
.vop_bwrite = NULL,
.vop_create = NULL,
.vop_fsync = NULL,
.vop_link = NULL,
.vop_mknod = NULL,
.vop_remove = NULL,
.vop_rename = NULL,
.vop_revoke = NULL,
.vop_mkdir = NULL,
.vop_rmdir = NULL,
.vop_setattr = NULL,
.vop_symlink = NULL,
.vop_write = NULL,
.vop_kqfilter = NULL
};
#define UDF_INVALID_BMAP -1

View File

@ -1,4 +1,4 @@
/* $OpenBSD: vfs_sync.c,v 1.70 2024/02/03 18:51:58 beck Exp $ */
/* $OpenBSD: vfs_sync.c,v 1.71 2024/05/12 16:51:05 semarie Exp $ */
/*
* Portions of this code are:
@ -220,7 +220,34 @@ const struct vops sync_vops = {
.vop_lock = nullop,
.vop_unlock = nullop,
.vop_islocked = nullop,
.vop_print = sync_print
.vop_print = sync_print,
.vop_abortop = NULL,
.vop_access = NULL,
.vop_advlock = NULL,
.vop_bmap = NULL,
.vop_bwrite = NULL,
.vop_create = NULL,
.vop_getattr = NULL,
.vop_ioctl = NULL,
.vop_link = NULL,
.vop_lookup = NULL,
.vop_mknod = NULL,
.vop_open = NULL,
.vop_pathconf = NULL,
.vop_read = NULL,
.vop_readdir = NULL,
.vop_readlink = NULL,
.vop_remove = NULL,
.vop_rename = NULL,
.vop_revoke = NULL,
.vop_mkdir = NULL,
.vop_rmdir = NULL,
.vop_setattr = NULL,
.vop_strategy = NULL,
.vop_symlink = NULL,
.vop_write = NULL,
.vop_kqfilter = NULL
};
/*

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pfvar.h,v 1.536 2024/04/22 13:30:22 bluhm Exp $ */
/* $OpenBSD: pfvar.h,v 1.537 2024/05/12 08:31:05 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@ -1590,13 +1590,11 @@ TAILQ_HEAD(pf_queuehead, pf_queuespec);
extern struct pf_queuehead pf_queues[2];
extern struct pf_queuehead *pf_queues_active, *pf_queues_inactive;
extern u_int32_t ticket_pabuf;
extern struct pool pf_src_tree_pl, pf_sn_item_pl, pf_rule_pl;
extern struct pool pf_state_pl, pf_state_key_pl, pf_state_item_pl,
pf_rule_item_pl, pf_queue_pl,
pf_pktdelay_pl, pf_anchor_pl;
extern struct pool pf_state_scrub_pl;
extern struct ifnet *sync_ifp;
extern struct pf_rule pf_default_rule;
extern int pf_tbladdr_setup(struct pf_ruleset *,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: nfs_vfsops.c,v 1.130 2024/05/01 13:15:59 jsg Exp $ */
/* $OpenBSD: nfs_vfsops.c,v 1.131 2024/05/12 09:09:39 jsg Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@ -64,7 +64,6 @@
extern struct nfsstats nfsstats;
extern int nfs_ticks;
extern u_int32_t nfs_procids[NFS_NPROCS];
int nfs_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntfs_vnops.c,v 1.47 2021/10/15 06:30:06 semarie Exp $ */
/* $OpenBSD: ntfs_vnops.c,v 1.48 2024/05/12 16:51:05 semarie Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@ -681,4 +681,21 @@ const struct vops ntfs_vops = {
.vop_strategy = ntfs_strategy,
.vop_bwrite = vop_generic_bwrite,
.vop_read = ntfs_read,
.vop_abortop = NULL,
.vop_advlock = NULL,
.vop_create = NULL,
.vop_ioctl = NULL,
.vop_link = NULL,
.vop_mknod = NULL,
.vop_readlink = NULL,
.vop_remove = NULL,
.vop_rename = NULL,
.vop_revoke = NULL,
.vop_mkdir = NULL,
.vop_rmdir = NULL,
.vop_setattr = NULL,
.vop_symlink = NULL,
.vop_write = NULL,
.vop_kqfilter = NULL
};

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tty.h,v 1.42 2023/07/04 11:14:00 jsg Exp $ */
/* $OpenBSD: tty.h,v 1.43 2024/05/12 08:21:56 jsg Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@ -244,10 +244,9 @@ TAILQ_HEAD(ttylist_head, tty); /* the ttylist is a TAILQ */
#ifdef _KERNEL
extern int tty_count; /* number of ttys in global ttylist */
extern struct ttychars ttydefaults;
/* Symbolic sleep message strings. */
extern char ttyin[], ttyout[], ttopen[], ttclos[], ttybg[], ttybuf[];
extern char ttyin[], ttyout[], ttopen[], ttclos[], ttybg[];
extern int64_t tk_cancc, tk_nin, tk_nout, tk_rawcc;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tmpfs_fifoops.c,v 1.7 2022/06/26 05:20:42 visa Exp $ */
/* $OpenBSD: tmpfs_fifoops.c,v 1.8 2024/05/12 16:54:56 semarie Exp $ */
/* $NetBSD: tmpfs_fifoops.c,v 1.9 2011/05/24 20:17:49 rmind Exp $ */
/*
@ -53,20 +53,29 @@ int tmpfs_fifo_fsync (void *);
*/
const struct vops tmpfs_fifovops = {
.vop_lookup = vop_generic_lookup,
.vop_create = vop_generic_badop,
.vop_mknod = vop_generic_badop,
.vop_open = fifo_open,
.vop_close = fifo_close,
.vop_access = tmpfs_access,
.vop_getattr = tmpfs_getattr,
.vop_setattr = tmpfs_setattr,
.vop_read = tmpfs_fifo_read,
.vop_write = tmpfs_fifo_write,
.vop_fsync = tmpfs_fifo_fsync,
.vop_inactive = tmpfs_inactive,
.vop_reclaim = tmpfs_reclaim,
.vop_lock = tmpfs_lock,
.vop_unlock = tmpfs_unlock,
.vop_print = tmpfs_print,
.vop_islocked = tmpfs_islocked,
.vop_bwrite = tmpfs_bwrite,
/* XXX: Keep in sync with fifo_vops. */
.vop_lookup = vop_generic_lookup,
.vop_create = vop_generic_badop,
.vop_mknod = vop_generic_badop,
.vop_open = fifo_open,
.vop_close = fifo_close,
.vop_ioctl = fifo_ioctl,
.vop_kqfilter = fifo_kqfilter,
.vop_revoke = vop_generic_revoke,
.vop_fsync = tmpfs_fifo_fsync,
.vop_remove = vop_generic_badop,
.vop_link = vop_generic_badop,
.vop_rename = vop_generic_badop,
@ -76,17 +85,10 @@ const struct vops tmpfs_fifovops = {
.vop_readdir = vop_generic_badop,
.vop_readlink = vop_generic_badop,
.vop_abortop = vop_generic_badop,
.vop_inactive = tmpfs_inactive,
.vop_reclaim = tmpfs_reclaim,
.vop_lock = tmpfs_lock,
.vop_unlock = tmpfs_unlock,
.vop_bmap = vop_generic_bmap,
.vop_strategy = vop_generic_badop,
.vop_print = tmpfs_print,
.vop_islocked = tmpfs_islocked,
.vop_pathconf = fifo_pathconf,
.vop_advlock = fifo_advlock,
.vop_bwrite = tmpfs_bwrite,
.vop_advlock = fifo_advlock
};
int

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ext2fs_vfsops.c,v 1.118 2023/03/08 04:43:09 guenther Exp $ */
/* $OpenBSD: ext2fs_vfsops.c,v 1.119 2024/05/12 09:19:54 jsg Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */
/*
@ -64,8 +64,6 @@
#include <ufs/ext2fs/ext2fs.h>
#include <ufs/ext2fs/ext2fs_extern.h>
extern struct lock ufs_hashlock;
int ext2fs_sbupdate(struct ufsmount *, int);
static int e2fs_sbcheck(struct ext2fs *, int);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: uvm_page.h,v 1.69 2022/08/01 14:15:46 mpi Exp $ */
/* $OpenBSD: uvm_page.h,v 1.70 2024/05/12 09:41:09 jsg Exp $ */
/* $NetBSD: uvm_page.h,v 1.19 2000/12/28 08:24:55 chs Exp $ */
/*
@ -198,12 +198,6 @@ struct vm_physseg {
#ifdef _KERNEL
/*
* globals
*/
extern boolean_t vm_page_zero_enable;
/*
* physical memory config is stored in vm_physmem.
*/

View File

@ -1,4 +1,4 @@
/* $OpenBSD: uvm_swap_encrypt.h,v 1.10 2015/05/06 04:00:10 dlg Exp $ */
/* $OpenBSD: uvm_swap_encrypt.h,v 1.11 2024/05/12 09:27:13 jsg Exp $ */
/*
* Copyright 1999 Niels Provos <provos@citi.umich.edu>
@ -79,7 +79,6 @@ void swap_key_create(struct swap_key *);
void swap_key_delete(struct swap_key *);
extern int uvm_doswapencrypt; /* swapencrypt enabled/disabled */
extern int uvm_swprekeyprint;
extern u_int uvm_swpkeyexpire; /* expiry time for keys (tR) */
extern int swap_encrypt_initialized;

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: aucat.1,v 1.121 2024/05/03 16:48:41 ratchov Exp $
.\" $OpenBSD: aucat.1,v 1.122 2024/05/12 06:24:44 jsg Exp $
.\"
.\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 3 2024 $
.Dd $Mdocdate: May 12 2024 $
.Dt AUCAT 1
.Os
.Sh NAME
@ -226,7 +226,7 @@ For instance, the following command will create two devices:
the default
.Va snd/default
and a MMC-controlled one
.Va snd/defaul.mmc :
.Va snd/default.mmc :
.Bd -literal -offset indent
$ sndiod -r 48000 -z 480 -s default -t slave -s mmc
.Ed