sync with OpenBSD -current
This commit is contained in:
parent
10cf24ada0
commit
dde71458ae
@ -1 +1 @@
|
||||
# SecBSD 1.4-f3e820c: Wed Nov 22 20:09:10 UTC 2023 (Mictlantecuhtli)
|
||||
# SecBSD 1.4-8cd59e6: Fri Nov 24 03:25:50 UTC 2023 (Mictlantecuhtli)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: brconfig.c,v 1.31 2022/07/08 07:04:54 jsg Exp $ */
|
||||
/* $OpenBSD: brconfig.c,v 1.32 2023/11/23 03:38:34 dlg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
|
||||
@ -656,6 +656,42 @@ bridge_addaddr(const char *ifsname, const char *addr)
|
||||
err(1, "%s: %s", ifname, addr);
|
||||
}
|
||||
|
||||
void
|
||||
bridge_addendpoint(const char *endpoint, const char *addr)
|
||||
{
|
||||
struct ifbareq ifba;
|
||||
struct ether_addr *ea;
|
||||
struct addrinfo *res;
|
||||
int ecode;
|
||||
|
||||
/* should we handle ports? */
|
||||
ecode = getaddrinfo(endpoint, NULL, NULL, &res);
|
||||
if (ecode != 0) {
|
||||
errx(1, "%s endpoint %s: %s", ifname, endpoint,
|
||||
gai_strerror(ecode));
|
||||
}
|
||||
if (res->ai_addrlen > sizeof(ifba.ifba_dstsa))
|
||||
errx(1, "%s: addrlen > dstsa", __func__);
|
||||
|
||||
ea = ether_aton(addr);
|
||||
if (ea == NULL) {
|
||||
errx(1, "%s endpoint %s %s: invalid Ethernet address",
|
||||
ifname, endpoint, addr);
|
||||
}
|
||||
|
||||
memset(&ifba, 0, sizeof(ifba));
|
||||
strlcpy(ifba.ifba_name, ifname, sizeof(ifba.ifba_name));
|
||||
strlcpy(ifba.ifba_ifsname, ifname, sizeof(ifba.ifba_ifsname));
|
||||
memcpy(&ifba.ifba_dst, ea, sizeof(struct ether_addr));
|
||||
memcpy(&ifba.ifba_dstsa, res->ai_addr, res->ai_addrlen);
|
||||
ifba.ifba_flags = IFBAF_STATIC;
|
||||
|
||||
freeaddrinfo(res);
|
||||
|
||||
if (ioctl(sock, SIOCBRDGSADDR, &ifba) == -1)
|
||||
err(1, "%s endpoint %s %s", ifname, endpoint, addr);
|
||||
}
|
||||
|
||||
void
|
||||
bridge_addrs(const char *delim, int d)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ifconfig.c,v 1.468 2023/10/29 14:23:04 millert Exp $ */
|
||||
/* $OpenBSD: ifconfig.c,v 1.470 2023/11/23 03:38:34 dlg Exp $ */
|
||||
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
|
||||
|
||||
/*
|
||||
@ -577,6 +577,7 @@ const struct cmd {
|
||||
{ "flush", 0, 0, bridge_flush },
|
||||
{ "flushall", 0, 0, bridge_flushall },
|
||||
{ "static", NEXTARG2, 0, NULL, bridge_addaddr },
|
||||
{ "endpoint", NEXTARG2, 0, NULL, bridge_addendpoint },
|
||||
{ "deladdr", NEXTARG, 0, bridge_deladdr },
|
||||
{ "maxaddr", NEXTARG, 0, bridge_maxaddr },
|
||||
{ "addr", 0, 0, bridge_addrs },
|
||||
@ -3185,9 +3186,11 @@ static void
|
||||
print_tunnel(const struct if_laddrreq *req)
|
||||
{
|
||||
char psrcaddr[NI_MAXHOST];
|
||||
char psrcport[NI_MAXSERV];
|
||||
char pdstaddr[NI_MAXHOST];
|
||||
char pdstport[NI_MAXSERV];
|
||||
const char *ver = "";
|
||||
const int niflag = NI_NUMERICHOST;
|
||||
const int niflag = NI_NUMERICHOST | NI_NUMERICSERV | NI_DGRAM;
|
||||
|
||||
if (req == NULL) {
|
||||
printf("(unset)");
|
||||
@ -3197,12 +3200,15 @@ print_tunnel(const struct if_laddrreq *req)
|
||||
psrcaddr[0] = pdstaddr[0] = '\0';
|
||||
|
||||
if (getnameinfo((struct sockaddr *)&req->addr, req->addr.ss_len,
|
||||
psrcaddr, sizeof(psrcaddr), 0, 0, niflag) != 0)
|
||||
psrcaddr, sizeof(psrcaddr), psrcport, sizeof(psrcport),
|
||||
niflag) != 0)
|
||||
strlcpy(psrcaddr, "<error>", sizeof(psrcaddr));
|
||||
if (req->addr.ss_family == AF_INET6)
|
||||
ver = "6";
|
||||
|
||||
printf("inet%s %s", ver, psrcaddr);
|
||||
if (strcmp(psrcport, "0") != 0)
|
||||
printf(":%s", psrcport);
|
||||
|
||||
if (req->dstaddr.ss_family != AF_UNSPEC) {
|
||||
in_port_t dstport = 0;
|
||||
@ -3211,24 +3217,12 @@ print_tunnel(const struct if_laddrreq *req)
|
||||
|
||||
if (getnameinfo((struct sockaddr *)&req->dstaddr,
|
||||
req->dstaddr.ss_len, pdstaddr, sizeof(pdstaddr),
|
||||
0, 0, niflag) != 0)
|
||||
pdstport, sizeof(pdstport), niflag) != 0)
|
||||
strlcpy(pdstaddr, "<error>", sizeof(pdstaddr));
|
||||
|
||||
printf(" --> %s", pdstaddr);
|
||||
|
||||
switch (req->dstaddr.ss_family) {
|
||||
case AF_INET:
|
||||
sin = (const struct sockaddr_in *)&req->dstaddr;
|
||||
dstport = sin->sin_port;
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (const struct sockaddr_in6 *)&req->dstaddr;
|
||||
dstport = sin6->sin6_port;
|
||||
break;
|
||||
}
|
||||
|
||||
if (dstport)
|
||||
printf(":%u", ntohs(dstport));
|
||||
if (strcmp(pdstport, "0") != 0)
|
||||
printf(":%s", pdstport);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3715,29 +3709,58 @@ in6_status(int force)
|
||||
void
|
||||
settunnel(const char *src, const char *dst)
|
||||
{
|
||||
char buf[HOST_NAME_MAX+1 + sizeof (":65535")], *dstport;
|
||||
const char *dstip;
|
||||
char srcbuf[HOST_NAME_MAX], dstbuf[HOST_NAME_MAX];
|
||||
const char *srcport, *dstport;
|
||||
const char *srcaddr, *dstaddr;
|
||||
struct addrinfo *srcres, *dstres;
|
||||
struct addrinfo hints = {
|
||||
.ai_family = AF_UNSPEC,
|
||||
.ai_socktype = SOCK_DGRAM,
|
||||
.ai_protocol = IPPROTO_UDP,
|
||||
.ai_flags = AI_PASSIVE,
|
||||
};
|
||||
int ecode;
|
||||
size_t len;
|
||||
struct if_laddrreq req;
|
||||
|
||||
if (strchr(dst, ':') == NULL || strchr(dst, ':') != strrchr(dst, ':')) {
|
||||
srcport = strchr(src, ':');
|
||||
if (srcport == NULL || srcport != strrchr(src, ':')) {
|
||||
/* no port or IPv6 */
|
||||
dstip = dst;
|
||||
dstport = NULL;
|
||||
srcaddr = src;
|
||||
srcport = NULL;
|
||||
} else {
|
||||
if (strlcpy(buf, dst, sizeof(buf)) >= sizeof(buf))
|
||||
errx(1, "%s bad value", dst);
|
||||
dstport = strchr(buf, ':');
|
||||
*dstport++ = '\0';
|
||||
dstip = buf;
|
||||
len = srcport - src;
|
||||
if (len >= sizeof(srcbuf))
|
||||
errx(1, "src %s bad value", src);
|
||||
memcpy(srcbuf, src, len);
|
||||
srcbuf[len] = '\0';
|
||||
|
||||
srcaddr = srcbuf;
|
||||
srcport++;
|
||||
}
|
||||
|
||||
if ((ecode = getaddrinfo(src, NULL, NULL, &srcres)) != 0)
|
||||
dstport = strchr(dst, ':');
|
||||
if (dstport == NULL || dstport != strrchr(dst, ':')) {
|
||||
/* no port or IPv6 */
|
||||
dstaddr = dst;
|
||||
dstport = NULL;
|
||||
} else {
|
||||
len = dstport - dst;
|
||||
if (len >= sizeof(dstbuf))
|
||||
errx(1, "dst %s bad value", dst);
|
||||
memcpy(dstbuf, dst, len);
|
||||
dstbuf[len] = '\0';
|
||||
|
||||
dstaddr = dstbuf;
|
||||
dstport++;
|
||||
}
|
||||
|
||||
if ((ecode = getaddrinfo(srcaddr, srcport, &hints, &srcres)) != 0)
|
||||
errx(1, "error in parsing address string: %s",
|
||||
gai_strerror(ecode));
|
||||
|
||||
if ((ecode = getaddrinfo(dstip, dstport, NULL, &dstres)) != 0)
|
||||
hints.ai_flags = 0;
|
||||
if ((ecode = getaddrinfo(dstaddr, dstport, &hints, &dstres)) != 0)
|
||||
errx(1, "error in parsing address string: %s",
|
||||
gai_strerror(ecode));
|
||||
|
||||
@ -3757,37 +3780,56 @@ settunnel(const char *src, const char *dst)
|
||||
}
|
||||
|
||||
void
|
||||
settunneladdr(const char *addr, int ignored)
|
||||
settunneladdr(const char *src, int ignored)
|
||||
{
|
||||
struct addrinfo hints, *res;
|
||||
char srcbuf[HOST_NAME_MAX];
|
||||
const char *srcport;
|
||||
const char *srcaddr;
|
||||
struct addrinfo *srcres;
|
||||
struct addrinfo hints = {
|
||||
.ai_family = AF_UNSPEC,
|
||||
.ai_socktype = SOCK_DGRAM,
|
||||
.ai_protocol = IPPROTO_UDP,
|
||||
.ai_flags = AI_PASSIVE,
|
||||
};
|
||||
struct if_laddrreq req;
|
||||
ssize_t len;
|
||||
int rv;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
hints.ai_protocol = 0;
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
srcport = strchr(src, ':');
|
||||
if (srcport == NULL || srcport != strrchr(src, ':')) {
|
||||
/* no port or IPv6 */
|
||||
srcaddr = src;
|
||||
srcport = NULL;
|
||||
} else {
|
||||
len = srcport - src;
|
||||
if (len >= sizeof(srcbuf))
|
||||
errx(1, "src %s bad value", src);
|
||||
memcpy(srcbuf, src, len);
|
||||
srcbuf[len] = '\0';
|
||||
|
||||
rv = getaddrinfo(addr, NULL, &hints, &res);
|
||||
srcaddr = srcbuf;
|
||||
srcport++;
|
||||
}
|
||||
|
||||
rv = getaddrinfo(srcaddr, srcport, &hints, &srcres);
|
||||
if (rv != 0)
|
||||
errx(1, "tunneladdr %s: %s", addr, gai_strerror(rv));
|
||||
errx(1, "tunneladdr %s: %s", src, gai_strerror(rv));
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
len = strlcpy(req.iflr_name, ifname, sizeof(req.iflr_name));
|
||||
if (len >= sizeof(req.iflr_name))
|
||||
errx(1, "%s: Interface name too long", ifname);
|
||||
|
||||
memcpy(&req.addr, res->ai_addr, res->ai_addrlen);
|
||||
memcpy(&req.addr, srcres->ai_addr, srcres->ai_addrlen);
|
||||
|
||||
req.dstaddr.ss_len = 2;
|
||||
req.dstaddr.ss_family = AF_UNSPEC;
|
||||
|
||||
if (ioctl(sock, SIOCSLIFPHYADDR, &req) == -1)
|
||||
warn("tunneladdr %s", addr);
|
||||
warn("tunneladdr %s", src);
|
||||
|
||||
freeaddrinfo(res);
|
||||
freeaddrinfo(srcres);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ifconfig.h,v 1.4 2021/11/11 09:39:16 claudio Exp $ */
|
||||
/* $OpenBSD: ifconfig.h,v 1.5 2023/11/23 03:38:34 dlg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -48,6 +48,7 @@ void bridge_delspan(const char *, int);
|
||||
void bridge_flush(const char *, int);
|
||||
void bridge_flushall(const char *, int);
|
||||
void bridge_addaddr(const char *, const char *);
|
||||
void bridge_addendpoint(const char *, const char *);
|
||||
void bridge_deladdr(const char *, int);
|
||||
void bridge_maxaddr(const char *, int);
|
||||
void bridge_addrs(const char *, int);
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: vxlan.4,v 1.19 2022/09/13 01:38:31 jsg Exp $
|
||||
.\" $OpenBSD: vxlan.4,v 1.20 2023/11/23 03:36:42 dlg Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2013 Reyk Floeter <reyk@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: September 13 2022 $
|
||||
.Dd $Mdocdate: November 23 2023 $
|
||||
.Dt VXLAN 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -173,10 +173,10 @@ The following examples creates a learning overlay network:
|
||||
.Pp
|
||||
Prior to the assignment of UDP port 4789 by IANA, some early VXLAN
|
||||
implementations used port 8472.
|
||||
A non-standard port can be specified with the tunnel destination
|
||||
A non-standard port can be specified with the tunnel source
|
||||
address:
|
||||
.Bd -literal -offset indent
|
||||
# ifconfig vxlan0 tunnel 192.168.1.100 239.1.1.100:8472
|
||||
# ifconfig vxlan0 tunnel 192.168.1.100:8472 239.1.1.100
|
||||
.Ed
|
||||
.Sh SECURITY
|
||||
.Nm
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cpu.c,v 1.99 2023/10/24 13:20:09 claudio Exp $ */
|
||||
/* $OpenBSD: cpu.c,v 1.101 2023/11/23 19:54:30 patrick Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
|
||||
@ -17,6 +17,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "kstat.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
@ -25,6 +27,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/task.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/kstat.h>
|
||||
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
@ -250,6 +253,11 @@ void cpu_psci_init(struct cpu_info *);
|
||||
void cpu_flush_bp_noop(void);
|
||||
void cpu_flush_bp_psci(void);
|
||||
|
||||
#if NKSTAT > 0
|
||||
void cpu_kstat_attach(struct cpu_info *ci);
|
||||
void cpu_opp_kstat_attach(struct cpu_info *ci);
|
||||
#endif
|
||||
|
||||
void
|
||||
cpu_identify(struct cpu_info *ci)
|
||||
{
|
||||
@ -937,6 +945,10 @@ cpu_attach(struct device *parent, struct device *dev, void *aux)
|
||||
}
|
||||
|
||||
cpu_init();
|
||||
|
||||
#if NKSTAT > 0
|
||||
cpu_kstat_attach(ci);
|
||||
#endif
|
||||
#ifdef MULTIPROCESSOR
|
||||
}
|
||||
#endif
|
||||
@ -1181,6 +1193,10 @@ cpu_init_secondary(struct cpu_info *ci)
|
||||
|
||||
spllower(IPL_NONE);
|
||||
|
||||
#if NKSTAT > 0
|
||||
cpu_kstat_attach(ci);
|
||||
#endif
|
||||
|
||||
sched_toidle();
|
||||
}
|
||||
|
||||
@ -1534,6 +1550,10 @@ cpu_opp_mountroot(struct device *self)
|
||||
if (ot == NULL)
|
||||
continue;
|
||||
|
||||
#if NKSTAT > 0
|
||||
cpu_opp_kstat_attach(ci);
|
||||
#endif
|
||||
|
||||
/* Skip if this table is shared and we're not the master. */
|
||||
if (ot->ot_master && ot->ot_master != ci)
|
||||
continue;
|
||||
@ -1817,3 +1837,157 @@ cpu_psci_init(struct cpu_info *ci)
|
||||
ci->ci_psci_suspend_param =
|
||||
OF_getpropint(node, "arm,psci-suspend-param", 0);
|
||||
}
|
||||
|
||||
#if NKSTAT > 0
|
||||
|
||||
struct cpu_kstats {
|
||||
struct kstat_kv ck_impl;
|
||||
struct kstat_kv ck_part;
|
||||
struct kstat_kv ck_rev;
|
||||
};
|
||||
|
||||
void
|
||||
cpu_kstat_attach(struct cpu_info *ci)
|
||||
{
|
||||
struct kstat *ks;
|
||||
struct cpu_kstats *ck;
|
||||
|
||||
uint64_t midr, impl, part;
|
||||
const char *impl_name = NULL, *part_name = NULL;
|
||||
const struct cpu_cores *coreselecter = cpu_cores_none;
|
||||
size_t i;
|
||||
|
||||
ks = kstat_create(ci->ci_dev->dv_xname, 0, "mach", 0, KSTAT_T_KV, 0);
|
||||
if (ks == NULL) {
|
||||
printf("%s: unable to create cpu kstats\n",
|
||||
ci->ci_dev->dv_xname);
|
||||
/* printf? */
|
||||
return;
|
||||
}
|
||||
|
||||
ck = malloc(sizeof(*ck), M_DEVBUF, M_WAITOK);
|
||||
|
||||
midr = READ_SPECIALREG(midr_el1);
|
||||
impl = CPU_IMPL(midr);
|
||||
part = CPU_PART(midr);
|
||||
|
||||
for (i = 0; cpu_implementers[i].name; i++) {
|
||||
if (impl == cpu_implementers[i].id) {
|
||||
impl_name = cpu_implementers[i].name;
|
||||
coreselecter = cpu_implementers[i].corelist;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (impl_name) {
|
||||
kstat_kv_init(&ck->ck_impl, "impl", KSTAT_KV_T_ISTR);
|
||||
strlcpy(kstat_kv_istr(&ck->ck_impl), impl_name,
|
||||
sizeof(kstat_kv_istr(&ck->ck_impl)));
|
||||
} else
|
||||
kstat_kv_init(&ck->ck_impl, "impl", KSTAT_KV_T_NULL);
|
||||
|
||||
for (i = 0; coreselecter[i].name; i++) {
|
||||
if (part == coreselecter[i].id) {
|
||||
part_name = coreselecter[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (part_name) {
|
||||
kstat_kv_init(&ck->ck_part, "part", KSTAT_KV_T_ISTR);
|
||||
strlcpy(kstat_kv_istr(&ck->ck_part), part_name,
|
||||
sizeof(kstat_kv_istr(&ck->ck_part)));
|
||||
} else
|
||||
kstat_kv_init(&ck->ck_part, "part", KSTAT_KV_T_NULL);
|
||||
|
||||
kstat_kv_init(&ck->ck_rev, "rev", KSTAT_KV_T_ISTR);
|
||||
snprintf(kstat_kv_istr(&ck->ck_rev), sizeof(kstat_kv_istr(&ck->ck_rev)),
|
||||
"r%llup%llu", CPU_VAR(midr), CPU_REV(midr));
|
||||
|
||||
ks->ks_softc = ci;
|
||||
ks->ks_data = ck;
|
||||
ks->ks_datalen = sizeof(*ck);
|
||||
ks->ks_read = kstat_read_nop;
|
||||
|
||||
kstat_install(ks);
|
||||
|
||||
/* XXX should we have a ci->ci_kstat = ks? */
|
||||
}
|
||||
|
||||
struct cpu_opp_kstats {
|
||||
struct kstat_kv coppk_freq;
|
||||
struct kstat_kv coppk_supply_v;
|
||||
};
|
||||
|
||||
int
|
||||
cpu_opp_kstat_read(struct kstat *ks)
|
||||
{
|
||||
struct cpu_info *ci = ks->ks_softc;
|
||||
struct cpu_opp_kstats *coppk = ks->ks_data;
|
||||
|
||||
struct opp_table *ot = ci->ci_opp_table;
|
||||
struct cpu_info *oci;
|
||||
struct timespec now, diff;
|
||||
|
||||
/* rate limit */
|
||||
getnanouptime(&now);
|
||||
timespecsub(&now, &ks->ks_updated, &diff);
|
||||
if (diff.tv_sec < 1)
|
||||
return (0);
|
||||
|
||||
if (ot == NULL)
|
||||
return (0);
|
||||
|
||||
oci = ot->ot_master;
|
||||
if (oci == NULL)
|
||||
oci = ci;
|
||||
|
||||
kstat_kv_freq(&coppk->coppk_freq) =
|
||||
clock_get_frequency(oci->ci_node, NULL);
|
||||
|
||||
if (oci->ci_cpu_supply) {
|
||||
kstat_kv_volts(&coppk->coppk_supply_v) =
|
||||
regulator_get_voltage(oci->ci_cpu_supply);
|
||||
}
|
||||
|
||||
ks->ks_updated = now;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
cpu_opp_kstat_attach(struct cpu_info *ci)
|
||||
{
|
||||
struct kstat *ks;
|
||||
struct cpu_opp_kstats *coppk;
|
||||
struct opp_table *ot = ci->ci_opp_table;
|
||||
struct cpu_info *oci = ot->ot_master;
|
||||
|
||||
if (oci == NULL)
|
||||
oci = ci;
|
||||
|
||||
ks = kstat_create(ci->ci_dev->dv_xname, 0, "dt-opp", 0,
|
||||
KSTAT_T_KV, 0);
|
||||
if (ks == NULL) {
|
||||
printf("%s: unable to create cpu dt-opp kstats\n",
|
||||
ci->ci_dev->dv_xname);
|
||||
return;
|
||||
}
|
||||
|
||||
coppk = malloc(sizeof(*coppk), M_DEVBUF, M_WAITOK);
|
||||
|
||||
kstat_kv_init(&coppk->coppk_freq, "freq", KSTAT_KV_T_FREQ);
|
||||
kstat_kv_init(&coppk->coppk_supply_v, "supply",
|
||||
oci->ci_cpu_supply ? KSTAT_KV_T_VOLTS_DC : KSTAT_KV_T_NULL);
|
||||
|
||||
ks->ks_softc = oci;
|
||||
ks->ks_data = coppk;
|
||||
ks->ks_datalen = sizeof(*coppk);
|
||||
ks->ks_read = cpu_opp_kstat_read;
|
||||
|
||||
kstat_install(ks);
|
||||
|
||||
/* XXX should we have a ci->ci_opp_kstat = ks? */
|
||||
}
|
||||
|
||||
#endif /* NKSTAT > 0 */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ofw_thermal.c,v 1.7 2020/12/31 11:11:22 kettenis Exp $ */
|
||||
/* $OpenBSD: ofw_thermal.c,v 1.8 2023/11/23 00:47:13 dlg Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Mark Kettenis
|
||||
*
|
||||
@ -15,12 +15,16 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "kstat.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/stdint.h>
|
||||
#include <sys/task.h>
|
||||
#include <sys/timeout.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/kstat.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
|
||||
@ -36,6 +40,7 @@ LIST_HEAD(, cooling_device) cooling_devices =
|
||||
struct taskq *tztq;
|
||||
|
||||
struct trippoint {
|
||||
int tp_node;
|
||||
int32_t tp_temperature;
|
||||
uint32_t tp_hysteresis;
|
||||
int tp_type;
|
||||
@ -48,6 +53,14 @@ struct trippoint {
|
||||
#define THERMAL_HOT 3
|
||||
#define THERMAL_CRITICAL 4
|
||||
|
||||
static const char *trip_types[] = {
|
||||
[THERMAL_NONE] = "none",
|
||||
[THERMAL_ACTIVE] = "active",
|
||||
[THERMAL_PASSIVE] = "passive",
|
||||
[THERMAL_HOT] = "hot",
|
||||
[THERMAL_CRITICAL] = "critical",
|
||||
};
|
||||
|
||||
struct cmap {
|
||||
uint32_t *cm_cdev;
|
||||
uint32_t *cm_cdevend;
|
||||
@ -82,8 +95,16 @@ struct thermal_zone {
|
||||
LIST_HEAD(, cdev) tz_cdevs;
|
||||
|
||||
int32_t tz_temperature;
|
||||
|
||||
struct rwlock tz_lock;
|
||||
struct kstat *tz_kstat;
|
||||
};
|
||||
|
||||
#if NKSTAT > 0
|
||||
static void thermal_zone_kstat_attach(struct thermal_zone *);
|
||||
static void thermal_zone_kstat_update(struct thermal_zone *);
|
||||
#endif /* NKSTAT > 0 */
|
||||
|
||||
LIST_HEAD(, thermal_zone) thermal_zones =
|
||||
LIST_HEAD_INITIALIZER(thermal_zones);
|
||||
|
||||
@ -324,6 +345,9 @@ thermal_zone_poll(void *arg)
|
||||
|
||||
out:
|
||||
tz->tz_temperature = temp;
|
||||
#if NKSTAT > 0
|
||||
thermal_zone_kstat_update(tz);
|
||||
#endif
|
||||
if (tz->tz_tp && tz->tz_tp->tp_type == THERMAL_PASSIVE)
|
||||
polling_delay = tz->tz_polling_delay_passive;
|
||||
else
|
||||
@ -331,6 +355,23 @@ out:
|
||||
timeout_add_msec(&tz->tz_poll_to, polling_delay);
|
||||
}
|
||||
|
||||
static int
|
||||
thermal_zone_triptype(const char *prop)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < nitems(trip_types); i++) {
|
||||
const char *name = trip_types[i];
|
||||
if (name == NULL)
|
||||
continue;
|
||||
|
||||
if (strcmp(name, prop) == 0)
|
||||
return (i);
|
||||
}
|
||||
|
||||
return (THERMAL_NONE);
|
||||
}
|
||||
|
||||
void
|
||||
thermal_zone_init(int node)
|
||||
{
|
||||
@ -351,6 +392,7 @@ thermal_zone_init(int node)
|
||||
|
||||
tz = malloc(sizeof(struct thermal_zone), M_DEVBUF, M_ZERO | M_WAITOK);
|
||||
tz->tz_node = node;
|
||||
rw_init(&tz->tz_lock, "tzlk");
|
||||
|
||||
OF_getprop(node, "name", &tz->tz_name, sizeof(tz->tz_name));
|
||||
tz->tz_name[sizeof(tz->tz_name) - 1] = 0;
|
||||
@ -394,17 +436,11 @@ thermal_zone_init(int node)
|
||||
break;
|
||||
}
|
||||
tp = &tz->tz_trips[i];
|
||||
tp->tp_node = node;
|
||||
tp->tp_temperature = temp;
|
||||
tp->tp_hysteresis = OF_getpropint(node, "hysteresis", 0);
|
||||
OF_getprop(node, "type", type, sizeof(type));
|
||||
if (strcmp(type, "active") == 0)
|
||||
tp->tp_type = THERMAL_ACTIVE;
|
||||
else if (strcmp(type, "passive") == 0)
|
||||
tp->tp_type = THERMAL_PASSIVE;
|
||||
else if (strcmp(type, "hot") == 0)
|
||||
tp->tp_type = THERMAL_HOT;
|
||||
else if (strcmp(type, "critical") == 0)
|
||||
tp->tp_type = THERMAL_CRITICAL;
|
||||
tp->tp_type = thermal_zone_triptype(type);
|
||||
tp->tp_phandle = OF_getpropint(node, "phandle", 0);
|
||||
tp++;
|
||||
}
|
||||
@ -465,6 +501,10 @@ thermal_zone_init(int node)
|
||||
if (tz->tz_polling_delay > 0)
|
||||
timeout_add_msec(&tz->tz_poll_to, tz->tz_polling_delay);
|
||||
LIST_INSERT_HEAD(&thermal_zones, tz, tz_list);
|
||||
|
||||
#if NKSTAT > 0
|
||||
thermal_zone_kstat_attach(tz);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -480,3 +520,109 @@ thermal_init(void)
|
||||
for (node = OF_child(node); node != 0; node = OF_peer(node))
|
||||
thermal_zone_init(node);
|
||||
}
|
||||
|
||||
#if NKSTAT > 0
|
||||
|
||||
static const char *
|
||||
thermal_zone_tripname(int type)
|
||||
{
|
||||
if (type >= nitems(trip_types))
|
||||
return (NULL);
|
||||
|
||||
return (trip_types[type]);
|
||||
}
|
||||
|
||||
struct thermal_zone_kstats {
|
||||
struct kstat_kv tzk_name; /* istr could be short */
|
||||
struct kstat_kv tzk_temp;
|
||||
struct kstat_kv tzk_tp;
|
||||
struct kstat_kv tzk_tp_type;
|
||||
struct kstat_kv tzk_cooling;
|
||||
};
|
||||
|
||||
static void
|
||||
thermal_zone_kstat_update(struct thermal_zone *tz)
|
||||
{
|
||||
struct kstat *ks = tz->tz_kstat;
|
||||
struct thermal_zone_kstats *tzk;
|
||||
|
||||
if (ks == NULL)
|
||||
return;
|
||||
|
||||
tzk = ks->ks_data;
|
||||
|
||||
rw_enter_write(&tz->tz_lock);
|
||||
if (tz->tz_temperature == THERMAL_SENSOR_MAX)
|
||||
tzk->tzk_temp.kv_type = KSTAT_KV_T_NULL;
|
||||
else {
|
||||
tzk->tzk_temp.kv_type = KSTAT_KV_T_TEMP;
|
||||
kstat_kv_temp(&tzk->tzk_temp) = 273150000 +
|
||||
1000 * tz->tz_temperature;
|
||||
}
|
||||
|
||||
if (tz->tz_tp == NULL) {
|
||||
kstat_kv_u32(&tzk->tzk_tp) = 0;
|
||||
strlcpy(kstat_kv_istr(&tzk->tzk_tp_type), "none",
|
||||
sizeof(kstat_kv_istr(&tzk->tzk_tp_type)));
|
||||
} else {
|
||||
int triptype = tz->tz_tp->tp_type;
|
||||
const char *tripname = thermal_zone_tripname(triptype);
|
||||
|
||||
kstat_kv_u32(&tzk->tzk_tp) = tz->tz_tp->tp_node;
|
||||
|
||||
if (tripname == NULL) {
|
||||
snprintf(kstat_kv_istr(&tzk->tzk_tp_type),
|
||||
sizeof(kstat_kv_istr(&tzk->tzk_tp_type)),
|
||||
"%u", triptype);
|
||||
} else {
|
||||
strlcpy(kstat_kv_istr(&tzk->tzk_tp_type), tripname,
|
||||
sizeof(kstat_kv_istr(&tzk->tzk_tp_type)));
|
||||
}
|
||||
}
|
||||
|
||||
kstat_kv_bool(&tzk->tzk_cooling) = (tz->tz_cm != NULL);
|
||||
|
||||
getnanouptime(&ks->ks_updated);
|
||||
rw_exit_write(&tz->tz_lock);
|
||||
}
|
||||
|
||||
static void
|
||||
thermal_zone_kstat_attach(struct thermal_zone *tz)
|
||||
{
|
||||
struct kstat *ks;
|
||||
struct thermal_zone_kstats *tzk;
|
||||
static unsigned int unit = 0;
|
||||
|
||||
ks = kstat_create("dt", 0, "thermal-zone", unit++, KSTAT_T_KV, 0);
|
||||
if (ks == NULL) {
|
||||
printf("unable to create thermal-zone kstats for %s",
|
||||
tz->tz_name);
|
||||
return;
|
||||
}
|
||||
|
||||
tzk = malloc(sizeof(*tzk), M_DEVBUF, M_WAITOK|M_ZERO);
|
||||
|
||||
kstat_kv_init(&tzk->tzk_name, "name", KSTAT_KV_T_ISTR);
|
||||
strlcpy(kstat_kv_istr(&tzk->tzk_name), tz->tz_name,
|
||||
sizeof(kstat_kv_istr(&tzk->tzk_name)));
|
||||
kstat_kv_init(&tzk->tzk_temp, "temperature", KSTAT_KV_T_NULL);
|
||||
|
||||
/* XXX dt node is not be the most useful info here. */
|
||||
kstat_kv_init(&tzk->tzk_tp, "trip-point-node", KSTAT_KV_T_UINT32);
|
||||
kstat_kv_init(&tzk->tzk_tp_type, "trip-type", KSTAT_KV_T_ISTR);
|
||||
strlcpy(kstat_kv_istr(&tzk->tzk_tp_type), "unknown",
|
||||
sizeof(kstat_kv_istr(&tzk->tzk_tp_type)));
|
||||
|
||||
kstat_kv_init(&tzk->tzk_cooling, "active-cooling", KSTAT_KV_T_BOOL);
|
||||
kstat_kv_bool(&tzk->tzk_cooling) = 0;
|
||||
|
||||
ks->ks_softc = tz;
|
||||
ks->ks_data = tzk;
|
||||
ks->ks_datalen = sizeof(*tzk);
|
||||
ks->ks_read = kstat_read_nop;
|
||||
kstat_set_rlock(ks, &tz->tz_lock);
|
||||
|
||||
tz->tz_kstat = ks;
|
||||
kstat_install(ks);
|
||||
}
|
||||
#endif /* NKSTAT > 0 */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: azalia.c,v 1.284 2023/07/30 08:46:03 yasuoka Exp $ */
|
||||
/* $OpenBSD: azalia.c,v 1.285 2023/11/23 14:24:06 jsg Exp $ */
|
||||
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
|
||||
|
||||
/*-
|
||||
@ -475,6 +475,7 @@ azalia_configure_pci(azalia_t *az)
|
||||
case PCI_PRODUCT_INTEL_GLK_HDA:
|
||||
case PCI_PRODUCT_INTEL_JSL_HDA:
|
||||
case PCI_PRODUCT_INTEL_EHL_HDA:
|
||||
case PCI_PRODUCT_INTEL_ADL_N_HDA:
|
||||
reg = azalia_pci_read(az->pc, az->tag,
|
||||
INTEL_PCIE_NOSNOOP_REG);
|
||||
reg &= INTEL_PCIE_NOSNOOP_MASK;
|
||||
@ -498,6 +499,7 @@ const struct pci_matchid azalia_pci_devices[] = {
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_GLK_HDA },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_JSL_HDA },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EHL_HDA },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HDA },
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -142,7 +142,8 @@ static const struct pci_matchid amdgpu_devices[] = {
|
||||
{0x1002, 0x73BF },
|
||||
|
||||
/* Van Gogh */
|
||||
{0x1002, 0x163F },
|
||||
{0x1002, 0x1435 }, /* Custom GPU 0932 */
|
||||
{0x1002, 0x163F }, /* Custom GPU 0405 */
|
||||
|
||||
/* Yellow Carp */
|
||||
{0x1002, 0x164D },
|
||||
|
@ -1963,6 +1963,7 @@ static const struct pci_device_id pciidlist[] = {
|
||||
{0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
|
||||
|
||||
/* Van Gogh */
|
||||
{0x1002, 0x1435, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VANGOGH|AMD_IS_APU},
|
||||
{0x1002, 0x163F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VANGOGH|AMD_IS_APU},
|
||||
|
||||
/* Yellow Carp */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dwiic_pci.c,v 1.23 2023/02/05 02:26:02 jsg Exp $ */
|
||||
/* $OpenBSD: dwiic_pci.c,v 1.24 2023/11/23 14:24:06 jsg Exp $ */
|
||||
/*
|
||||
* Synopsys DesignWare I2C controller
|
||||
* PCI attachment
|
||||
@ -166,6 +166,12 @@ const struct pci_matchid dwiic_pci_ids[] = {
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EHL_SIO_I2C_5 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EHL_SIO_I2C_6 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EHL_SIO_I2C_7 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_0 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_1 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_2 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_3 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_4 },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_5 },
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ichiic.c,v 1.51 2023/02/05 02:26:02 jsg Exp $ */
|
||||
/* $OpenBSD: ichiic.c,v 1.52 2023/11/23 14:24:06 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org>
|
||||
@ -139,6 +139,7 @@ const struct pci_matchid ichiic_ids[] = {
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_700SERIES_SMB },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_JSL_SMB },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EHL_SMB },
|
||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_SMB },
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: pcidevs,v 1.2053 2023/11/14 02:25:48 jsg Exp $
|
||||
$OpenBSD: pcidevs,v 1.2055 2023/11/23 14:21:47 jsg Exp $
|
||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
@ -1277,6 +1277,7 @@ product ATI KAVERI_20 0x131b Kaveri Radeon R4
|
||||
product ATI KAVERI_21 0x131c Kaveri Radeon R7
|
||||
product ATI KAVERI_22 0x131d Kaveri Radeon R6
|
||||
product ATI CYAN_SKILLFISH_1 0x13fe Cyan Skillfish
|
||||
product ATI VANGOGH_0932 0x1435 Van Gogh
|
||||
product ATI CYAN_SKILLFISH_2 0x143f Cyan Skillfish
|
||||
product ATI PPB_1 0x1478 PCIE
|
||||
product ATI PPB_2 0x1479 PCIE
|
||||
@ -1290,7 +1291,7 @@ product ATI BARCELO 0x15e7 Barcelo
|
||||
product ATI RENOIR 0x1636 Renoir
|
||||
product ATI RENOIR_HDA 0x1637 Renoir HD Audio
|
||||
product ATI CEZANNE 0x1638 Cezanne
|
||||
product ATI VANGOGH 0x163f Van Gogh
|
||||
product ATI VANGOGH_0405 0x163f Van Gogh
|
||||
product ATI VANGOGH_HDA 0x1640 Van Gogh HD Audio
|
||||
product ATI LUCIENNE 0x164c Lucienne
|
||||
product ATI YELLOW_CARP_1 0x164d Rembrandt
|
||||
@ -5601,8 +5602,11 @@ product INTEL ADL_U9_HB_2 0x460a Core 12G Host
|
||||
product INTEL ADL_S_PCIE_1 0x460d Core 12G PCIE
|
||||
product INTEL ADL_XDCI 0x460e Core 12G xDCI
|
||||
product INTEL ADL_S_HB_6 0x4610 Core 12G Host
|
||||
product INTEL ADL_N_HB_1 0x4617 ADL-N Host
|
||||
product INTEL ADL_U15_HB_2 0x4619 Core 12G Host
|
||||
product INTEL ADL_U9_HB_3 0x461a Core 12G Host
|
||||
product INTEL ADL_N_HB_2 0x461b N200 Host
|
||||
product INTEL ADL_N_HB_3 0x461c N100 Host
|
||||
product INTEL ADL_S_DTT 0x461d Core 12G DTT
|
||||
product INTEL ADL_XHCI 0x461e Core 12G xHCI
|
||||
product INTEL ADL_TBT_PCIE3 0x461f Core 12G PCIE
|
||||
@ -5895,7 +5899,49 @@ product INTEL 600SERIES_LP_ISH 0x51fc 600 Series ISH
|
||||
product INTEL 600SERIES_LP_UFS 0x51ff 600 Series UFS
|
||||
product INTEL 80960RD 0x5200 i960 RD
|
||||
product INTEL PRO_100_SERVER 0x5201 PRO 100 Server
|
||||
product INTEL ADL_N_ESPI 0x5481 ADL-N eSPI
|
||||
product INTEL ADL_N_P2SB 0x54a0 ADL-N P2SB
|
||||
product INTEL ADL_N_PMC 0x54a1 ADL-N PMC
|
||||
product INTEL ADL_N_SMB 0x54a3 ADL-N SMBus
|
||||
product INTEL ADL_N_SPI 0x54a4 ADL-N SPI
|
||||
product INTEL ADL_N_TH 0x54a6 ADL-N TH
|
||||
product INTEL ADL_N_UART_0 0x54a8 ADL-N UART
|
||||
product INTEL ADL_N_UART_1 0x54a9 ADL-N UART
|
||||
product INTEL ADL_N_GSPI_0 0x54aa ADL-N GSPI
|
||||
product INTEL ADL_N_GSPI_1 0x54ab ADL-N GSPI
|
||||
product INTEL ADL_N_PCIE_9 0x54b0 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_10 0x54b1 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_11 0x54b2 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_12 0x54b3 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_1 0x54b8 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_2 0x54b9 ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_3 0x54ba ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_4 0x54bb ADL-N PCIE
|
||||
product INTEL ADL_N_PCIE_7 0x54be ADL-N PCIE
|
||||
product INTEL ADL_N_EMMC 0x54c4 ADL-N eMMC
|
||||
product INTEL ADL_N_I2C_4 0x54c5 ADL-N I2C
|
||||
product INTEL ADL_N_I2C_5 0x54c6 ADL-N I2C
|
||||
product INTEL ADL_N_UART_2 0x54c7 ADL-N UART
|
||||
product INTEL ADL_N_HDA 0x54c8 ADL-N HD Audio
|
||||
product INTEL ADL_N_THC_0 0x54d0 ADL-N THC
|
||||
product INTEL ADL_N_THC_1 0x54d1 ADL-N THC
|
||||
product INTEL ADL_N_AHCI 0x54d3 ADL-N AHCI
|
||||
product INTEL ADL_N_UART_3 0x54da ADL-N UART
|
||||
product INTEL ADL_N_HECI_1 0x54e0 ADL-N HECI
|
||||
product INTEL ADL_N_HECI_2 0x54e1 ADL-N HECI
|
||||
product INTEL ADL_N_HECI_3 0x54e4 ADL-N HECI
|
||||
product INTEL ADL_N_HECI_4 0x54e5 ADL-N HECI
|
||||
product INTEL ADL_N_I2C_0 0x54e8 ADL-N I2C
|
||||
product INTEL ADL_N_I2C_1 0x54e9 ADL-N I2C
|
||||
product INTEL ADL_N_I2C_2 0x54ea ADL-N I2C
|
||||
product INTEL ADL_N_I2C_3 0x54eb ADL-N I2C
|
||||
product INTEL ADL_N_XHCI 0x54ed ADL-N xHCI
|
||||
product INTEL ADL_N_XDCI 0x54ee ADL-N xDCI
|
||||
product INTEL ADL_N_SRAM 0x54ef ADL-N SRAM
|
||||
product INTEL WL_22500_16 0x54f0 Wi-Fi 6 AX211
|
||||
product INTEL ADL_N_GSPI_2 0x54fb ADL-N GSPI
|
||||
product INTEL ADL_N_ISH 0x54fc ADL-N ISH
|
||||
product INTEL ADL_N_UFS 0x54ff ADL-N UFS
|
||||
product INTEL I225_LMVP 0x5502 I225-LMvP
|
||||
product INTEL I226_K 0x5504 I226-K
|
||||
product INTEL I219_LM18 0x550a I219-LM
|
||||
|
@ -2,7 +2,7 @@
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* OpenBSD: pcidevs,v 1.2053 2023/11/14 02:25:48 jsg Exp
|
||||
* OpenBSD: pcidevs,v 1.2055 2023/11/23 14:21:47 jsg Exp
|
||||
*/
|
||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||
|
||||
@ -1282,6 +1282,7 @@
|
||||
#define PCI_PRODUCT_ATI_KAVERI_21 0x131c /* Kaveri Radeon R7 */
|
||||
#define PCI_PRODUCT_ATI_KAVERI_22 0x131d /* Kaveri Radeon R6 */
|
||||
#define PCI_PRODUCT_ATI_CYAN_SKILLFISH_1 0x13fe /* Cyan Skillfish */
|
||||
#define PCI_PRODUCT_ATI_VANGOGH_0932 0x1435 /* Van Gogh */
|
||||
#define PCI_PRODUCT_ATI_CYAN_SKILLFISH_2 0x143f /* Cyan Skillfish */
|
||||
#define PCI_PRODUCT_ATI_PPB_1 0x1478 /* PCIE */
|
||||
#define PCI_PRODUCT_ATI_PPB_2 0x1479 /* PCIE */
|
||||
@ -1295,7 +1296,7 @@
|
||||
#define PCI_PRODUCT_ATI_RENOIR 0x1636 /* Renoir */
|
||||
#define PCI_PRODUCT_ATI_RENOIR_HDA 0x1637 /* Renoir HD Audio */
|
||||
#define PCI_PRODUCT_ATI_CEZANNE 0x1638 /* Cezanne */
|
||||
#define PCI_PRODUCT_ATI_VANGOGH 0x163f /* Van Gogh */
|
||||
#define PCI_PRODUCT_ATI_VANGOGH_0405 0x163f /* Van Gogh */
|
||||
#define PCI_PRODUCT_ATI_VANGOGH_HDA 0x1640 /* Van Gogh HD Audio */
|
||||
#define PCI_PRODUCT_ATI_LUCIENNE 0x164c /* Lucienne */
|
||||
#define PCI_PRODUCT_ATI_YELLOW_CARP_1 0x164d /* Rembrandt */
|
||||
@ -5606,8 +5607,11 @@
|
||||
#define PCI_PRODUCT_INTEL_ADL_S_PCIE_1 0x460d /* Core 12G PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_XDCI 0x460e /* Core 12G xDCI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_S_HB_6 0x4610 /* Core 12G Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HB_1 0x4617 /* ADL-N Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_U15_HB_2 0x4619 /* Core 12G Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_U9_HB_3 0x461a /* Core 12G Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HB_2 0x461b /* N200 Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HB_3 0x461c /* N100 Host */
|
||||
#define PCI_PRODUCT_INTEL_ADL_S_DTT 0x461d /* Core 12G DTT */
|
||||
#define PCI_PRODUCT_INTEL_ADL_XHCI 0x461e /* Core 12G xHCI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_TBT_PCIE3 0x461f /* Core 12G PCIE */
|
||||
@ -5900,7 +5904,49 @@
|
||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_UFS 0x51ff /* 600 Series UFS */
|
||||
#define PCI_PRODUCT_INTEL_80960RD 0x5200 /* i960 RD */
|
||||
#define PCI_PRODUCT_INTEL_PRO_100_SERVER 0x5201 /* PRO 100 Server */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_ESPI 0x5481 /* ADL-N eSPI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_P2SB 0x54a0 /* ADL-N P2SB */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PMC 0x54a1 /* ADL-N PMC */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_SMB 0x54a3 /* ADL-N SMBus */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_SPI 0x54a4 /* ADL-N SPI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_TH 0x54a6 /* ADL-N TH */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_UART_0 0x54a8 /* ADL-N UART */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_UART_1 0x54a9 /* ADL-N UART */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_GSPI_0 0x54aa /* ADL-N GSPI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_GSPI_1 0x54ab /* ADL-N GSPI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_9 0x54b0 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_10 0x54b1 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_11 0x54b2 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_12 0x54b3 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_1 0x54b8 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_2 0x54b9 /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_3 0x54ba /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_4 0x54bb /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_PCIE_7 0x54be /* ADL-N PCIE */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_EMMC 0x54c4 /* ADL-N eMMC */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_4 0x54c5 /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_5 0x54c6 /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_UART_2 0x54c7 /* ADL-N UART */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HDA 0x54c8 /* ADL-N HD Audio */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_THC_0 0x54d0 /* ADL-N THC */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_THC_1 0x54d1 /* ADL-N THC */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_AHCI 0x54d3 /* ADL-N AHCI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_UART_3 0x54da /* ADL-N UART */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HECI_1 0x54e0 /* ADL-N HECI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HECI_2 0x54e1 /* ADL-N HECI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HECI_3 0x54e4 /* ADL-N HECI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_HECI_4 0x54e5 /* ADL-N HECI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_0 0x54e8 /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_1 0x54e9 /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_2 0x54ea /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_I2C_3 0x54eb /* ADL-N I2C */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_XHCI 0x54ed /* ADL-N xHCI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_XDCI 0x54ee /* ADL-N xDCI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_SRAM 0x54ef /* ADL-N SRAM */
|
||||
#define PCI_PRODUCT_INTEL_WL_22500_16 0x54f0 /* Wi-Fi 6 AX211 */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_GSPI_2 0x54fb /* ADL-N GSPI */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_ISH 0x54fc /* ADL-N ISH */
|
||||
#define PCI_PRODUCT_INTEL_ADL_N_UFS 0x54ff /* ADL-N UFS */
|
||||
#define PCI_PRODUCT_INTEL_I225_LMVP 0x5502 /* I225-LMvP */
|
||||
#define PCI_PRODUCT_INTEL_I226_K 0x5504 /* I226-K */
|
||||
#define PCI_PRODUCT_INTEL_I219_LM18 0x550a /* I219-LM */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* OpenBSD: pcidevs,v 1.2053 2023/11/14 02:25:48 jsg Exp
|
||||
* OpenBSD: pcidevs,v 1.2055 2023/11/23 14:21:47 jsg Exp
|
||||
*/
|
||||
|
||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||
@ -3247,6 +3247,10 @@ static const struct pci_known_product pci_known_products[] = {
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_CYAN_SKILLFISH_1,
|
||||
"Cyan Skillfish",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_VANGOGH_0932,
|
||||
"Van Gogh",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_CYAN_SKILLFISH_2,
|
||||
"Cyan Skillfish",
|
||||
@ -3300,7 +3304,7 @@ static const struct pci_known_product pci_known_products[] = {
|
||||
"Cezanne",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_VANGOGH,
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_VANGOGH_0405,
|
||||
"Van Gogh",
|
||||
},
|
||||
{
|
||||
@ -19763,6 +19767,10 @@ static const struct pci_known_product pci_known_products[] = {
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_S_HB_6,
|
||||
"Core 12G Host",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HB_1,
|
||||
"ADL-N Host",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_U15_HB_2,
|
||||
"Core 12G Host",
|
||||
@ -19771,6 +19779,14 @@ static const struct pci_known_product pci_known_products[] = {
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_U9_HB_3,
|
||||
"Core 12G Host",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HB_2,
|
||||
"N200 Host",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HB_3,
|
||||
"N100 Host",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_S_DTT,
|
||||
"Core 12G DTT",
|
||||
@ -20939,10 +20955,178 @@ static const struct pci_known_product pci_known_products[] = {
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_PRO_100_SERVER,
|
||||
"PRO 100 Server",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_ESPI,
|
||||
"ADL-N eSPI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_P2SB,
|
||||
"ADL-N P2SB",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PMC,
|
||||
"ADL-N PMC",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_SMB,
|
||||
"ADL-N SMBus",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_SPI,
|
||||
"ADL-N SPI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_TH,
|
||||
"ADL-N TH",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_UART_0,
|
||||
"ADL-N UART",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_UART_1,
|
||||
"ADL-N UART",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_GSPI_0,
|
||||
"ADL-N GSPI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_GSPI_1,
|
||||
"ADL-N GSPI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_9,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_10,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_11,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_12,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_1,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_2,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_3,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_4,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_PCIE_7,
|
||||
"ADL-N PCIE",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_EMMC,
|
||||
"ADL-N eMMC",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_4,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_5,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_UART_2,
|
||||
"ADL-N UART",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HDA,
|
||||
"ADL-N HD Audio",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_THC_0,
|
||||
"ADL-N THC",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_THC_1,
|
||||
"ADL-N THC",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_AHCI,
|
||||
"ADL-N AHCI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_UART_3,
|
||||
"ADL-N UART",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HECI_1,
|
||||
"ADL-N HECI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HECI_2,
|
||||
"ADL-N HECI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HECI_3,
|
||||
"ADL-N HECI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_HECI_4,
|
||||
"ADL-N HECI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_0,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_1,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_2,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_I2C_3,
|
||||
"ADL-N I2C",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_XHCI,
|
||||
"ADL-N xHCI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_XDCI,
|
||||
"ADL-N xDCI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_SRAM,
|
||||
"ADL-N SRAM",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_16,
|
||||
"Wi-Fi 6 AX211",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_GSPI_2,
|
||||
"ADL-N GSPI",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_ISH,
|
||||
"ADL-N ISH",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ADL_N_UFS,
|
||||
"ADL-N UFS",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I225_LMVP,
|
||||
"I225-LMvP",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: wskbd.c,v 1.116 2023/11/22 18:19:25 tobhe Exp $ */
|
||||
/* $OpenBSD: wskbd.c,v 1.117 2023/11/23 15:02:57 deraadt Exp $ */
|
||||
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
|
||||
|
||||
/*
|
||||
@ -94,6 +94,7 @@
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/task.h>
|
||||
|
||||
#include <ddb/db_var.h>
|
||||
|
||||
@ -113,7 +114,6 @@
|
||||
|
||||
#if NWSDISPLAY > 0
|
||||
#include <sys/atomic.h>
|
||||
#include <sys/task.h>
|
||||
#endif
|
||||
|
||||
#ifdef WSKBD_DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kern_physio.c,v 1.47 2020/02/20 16:26:01 krw Exp $ */
|
||||
/* $OpenBSD: kern_physio.c,v 1.48 2023/11/24 00:15:42 asou Exp $ */
|
||||
/* $NetBSD: kern_physio.c,v 1.28 1997/05/19 10:43:28 pk Exp $ */
|
||||
|
||||
/*-
|
||||
@ -113,8 +113,8 @@ physio(void (*strategy)(struct buf *), dev_t dev, int flags,
|
||||
/*
|
||||
* Because iov_len is size_t (unsigned) but b_bcount is
|
||||
* long (signed), an overflow is possible. Therefore
|
||||
* limit b_bcount to LONG_MAX before calling the provided
|
||||
* minphys.
|
||||
* limit b_bcount to LONG_MAX before calling the
|
||||
* provided minphys.
|
||||
*/
|
||||
if (iovp->iov_len > LONG_MAX)
|
||||
bp->b_bcount = LONG_MAX;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: if_veb.c,v 1.31 2023/05/16 14:32:54 jan Exp $ */
|
||||
/* $OpenBSD: if_veb.c,v 1.32 2023/11/23 23:45:10 dlg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2021 David Gwynne <dlg@openbsd.org>
|
||||
@ -612,6 +612,7 @@ veb_pf(struct ifnet *ifp0, int dir, struct mbuf *m)
|
||||
{
|
||||
struct ether_header *eh, copy;
|
||||
const struct veb_pf_ip_family *fam;
|
||||
int hlen;
|
||||
|
||||
/*
|
||||
* pf runs on vport interfaces when they enter or leave the
|
||||
@ -640,11 +641,9 @@ veb_pf(struct ifnet *ifp0, int dir, struct mbuf *m)
|
||||
copy = *eh;
|
||||
m_adj(m, sizeof(*eh));
|
||||
|
||||
if (dir == PF_IN) {
|
||||
m = (*fam->ip_check)(ifp0, m);
|
||||
if (m == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
m = (*fam->ip_check)(ifp0, m);
|
||||
if (m == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (pf_test(fam->af, dir, ifp0, &m) != PF_PASS) {
|
||||
m_freem(m);
|
||||
@ -660,12 +659,14 @@ veb_pf(struct ifnet *ifp0, int dir, struct mbuf *m)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
m = m_prepend(m, sizeof(*eh), M_DONTWAIT);
|
||||
hlen = roundup(sizeof(*eh), sizeof(long));
|
||||
m = m_prepend(m, hlen, M_DONTWAIT);
|
||||
if (m == NULL)
|
||||
return (NULL);
|
||||
|
||||
/* checksum? */
|
||||
|
||||
m_adj(m, hlen - sizeof(*eh));
|
||||
eh = mtod(m, struct ether_header *);
|
||||
*eh = copy;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: extern.h,v 1.45 2023/04/28 10:24:38 claudio Exp $ */
|
||||
/* $OpenBSD: extern.h,v 1.46 2023/11/23 11:59:53 job Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
*
|
||||
@ -146,6 +146,7 @@ struct opts {
|
||||
int numeric_ids; /* --numeric-ids */
|
||||
int one_file_system; /* -x */
|
||||
int ignore_times; /* -I */
|
||||
int ignore_dir_times; /* -O */
|
||||
int size_only; /* --size-only */
|
||||
int alt_base_mode;
|
||||
off_t max_size; /* --max-size */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fargs.c,v 1.24 2023/04/28 10:24:38 claudio Exp $ */
|
||||
/* $OpenBSD: fargs.c,v 1.25 2023/11/23 11:59:53 job Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
*
|
||||
@ -140,6 +140,8 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
|
||||
|
||||
/* extra options for the receiver (local is sender) */
|
||||
if (f->mode == FARGS_SENDER) {
|
||||
if (sess->opts->ignore_dir_times)
|
||||
addargs(&args, "-O");
|
||||
if (sess->opts->size_only)
|
||||
addargs(&args, "--size-only");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: main.c,v 1.68 2023/04/28 10:24:38 claudio Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.69 2023/11/23 11:59:53 job Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
*
|
||||
@ -321,6 +321,7 @@ const struct option lopts[] = {
|
||||
{ "no-links", no_argument, &opts.preserve_links, 0 },
|
||||
{ "no-motd", no_argument, &opts.no_motd, 1 },
|
||||
{ "numeric-ids", no_argument, &opts.numeric_ids, 1 },
|
||||
{ "omit-dir-times", no_argument, &opts.ignore_dir_times, 1 },
|
||||
{ "owner", no_argument, &opts.preserve_uids, 1 },
|
||||
{ "no-owner", no_argument, &opts.preserve_uids, 0 },
|
||||
{ "perms", no_argument, &opts.preserve_perms, 1 },
|
||||
@ -363,7 +364,7 @@ main(int argc, char *argv[])
|
||||
|
||||
opts.max_size = opts.min_size = -1;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "aDe:ghIlnoprtVvxz", lopts, &lidx))
|
||||
while ((c = getopt_long(argc, argv, "aDe:ghIlnOoprtVvxz", lopts, &lidx))
|
||||
!= -1) {
|
||||
switch (c) {
|
||||
case 'D':
|
||||
@ -395,6 +396,9 @@ main(int argc, char *argv[])
|
||||
case 'n':
|
||||
opts.dry_run = 1;
|
||||
break;
|
||||
case 'O':
|
||||
opts.ignore_dir_times = 1;
|
||||
break;
|
||||
case 'o':
|
||||
opts.preserve_uids = 1;
|
||||
break;
|
||||
@ -637,7 +641,7 @@ basedir:
|
||||
exit(rc);
|
||||
usage:
|
||||
fprintf(stderr, "usage: %s"
|
||||
" [-aDgIlnoprtVvx] [-e program] [--address=sourceaddr]\n"
|
||||
" [-aDgIlnOoprtVvx] [-e program] [--address=sourceaddr]\n"
|
||||
"\t[--contimeout=seconds] [--compare-dest=dir] [--del] [--exclude]\n"
|
||||
"\t[--exclude-from=file] [--include] [--include-from=file]\n"
|
||||
"\t[--no-motd] [--numeric-ids] [--port=portnumber]\n"
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: rsync.1,v 1.33 2023/04/28 10:24:38 claudio Exp $
|
||||
.\" $OpenBSD: rsync.1,v 1.34 2023/11/23 11:59:53 job Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
.\"
|
||||
@ -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: April 28 2023 $
|
||||
.Dd $Mdocdate: November 23 2023 $
|
||||
.Dt OPENRSYNC 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -22,7 +22,7 @@
|
||||
.Nd synchronise local and remote files
|
||||
.Sh SYNOPSIS
|
||||
.Nm openrsync
|
||||
.Op Fl aDgIlnoprtVvx
|
||||
.Op Fl aDgIlnOoprtVvx
|
||||
.Op Fl e Ar program
|
||||
.Op Fl -address Ns = Ns Ar sourceaddr
|
||||
.Op Fl -compare-dest Ns = Ns Ar directory
|
||||
@ -165,6 +165,10 @@ Has no effect unless
|
||||
or
|
||||
.Fl o
|
||||
is also given.
|
||||
.It Fl O , -omit-dir-times
|
||||
Don't set directory modification times to match the source.
|
||||
Takes precedence over
|
||||
.Fl t .
|
||||
.It Fl o , -owner
|
||||
Set the user name to match the source, with similar matching logic as for
|
||||
.Fl g .
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: uploader.c,v 1.34 2023/04/28 10:24:39 claudio Exp $ */
|
||||
/* $OpenBSD: uploader.c,v 1.35 2023/11/23 11:59:53 job Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
* Copyright (c) 2019 Florian Obser <florian@openbsd.org>
|
||||
@ -608,19 +608,21 @@ post_dir(struct sess *sess, const struct upload *u, size_t idx)
|
||||
* FIXME: run rsync_set_metadata()?
|
||||
*/
|
||||
|
||||
if (u->newdir[idx] ||
|
||||
(sess->opts->preserve_times &&
|
||||
st.st_mtime != f->st.mtime)) {
|
||||
tv[0].tv_sec = time(NULL);
|
||||
tv[0].tv_nsec = 0;
|
||||
tv[1].tv_sec = f->st.mtime;
|
||||
tv[1].tv_nsec = 0;
|
||||
rc = utimensat(u->rootfd, f->path, tv, 0);
|
||||
if (rc == -1) {
|
||||
ERR("%s: utimensat", f->path);
|
||||
return 0;
|
||||
if (!sess->opts->ignore_dir_times) {
|
||||
if (u->newdir[idx] ||
|
||||
(sess->opts->preserve_times &&
|
||||
st.st_mtime != f->st.mtime)) {
|
||||
tv[0].tv_sec = time(NULL);
|
||||
tv[0].tv_nsec = 0;
|
||||
tv[1].tv_sec = f->st.mtime;
|
||||
tv[1].tv_nsec = 0;
|
||||
rc = utimensat(u->rootfd, f->path, tv, 0);
|
||||
if (rc == -1) {
|
||||
ERR("%s: utimensat", f->path);
|
||||
return 0;
|
||||
}
|
||||
LOG4("%s: updated date", f->path);
|
||||
}
|
||||
LOG4("%s: updated date", f->path);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: clientloop.c,v 1.401 2023/11/15 22:51:49 djm Exp $ */
|
||||
/* $OpenBSD: clientloop.c,v 1.402 2023/11/24 00:31:30 dtucker Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -202,6 +202,7 @@ quit_message(const char *fmt, ...)
|
||||
|
||||
if ((r = sshbuf_putf(stderr_buffer, "%s\r\n", msg)) != 0)
|
||||
fatal_fr(r, "sshbuf_putf");
|
||||
free(msg);
|
||||
quit_pending = 1;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mux.c,v 1.100 2023/08/18 01:37:41 djm Exp $ */
|
||||
/* $OpenBSD: mux.c,v 1.101 2023/11/23 03:37:05 dtucker Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@ -2257,7 +2257,7 @@ muxclient(const char *path)
|
||||
switch (options.control_master) {
|
||||
case SSHCTL_MASTER_AUTO:
|
||||
case SSHCTL_MASTER_AUTO_ASK:
|
||||
debug("auto-mux: Trying existing master");
|
||||
debug("auto-mux: Trying existing master at '%s'", path);
|
||||
/* FALLTHROUGH */
|
||||
case SSHCTL_MASTER_NO:
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: dhcp-options.5,v 1.33 2023/11/22 18:06:44 florian Exp $
|
||||
.\" $OpenBSD: dhcp-options.5,v 1.34 2023/11/23 16:30:12 florian Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
|
||||
.\" All rights reserved.
|
||||
@ -36,7 +36,7 @@
|
||||
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
|
||||
.\" Enterprises, see ``http://www.vix.com''.
|
||||
.\"
|
||||
.Dd $Mdocdate: November 22 2023 $
|
||||
.Dd $Mdocdate: November 23 2023 $
|
||||
.Dt DHCP-OPTIONS 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -347,7 +347,7 @@ for packet forwarding.
|
||||
A value of 0 means disable IP forwarding, and a value of 1 means enable
|
||||
IP forwarding.
|
||||
.It Ic option ipv6-only-preferred Ar uint32 ;
|
||||
This option specifies that a NAT64 is available and the pool is IPv6-mostly
|
||||
This option specifies that NAT64 is available and the pool is IPv6-mostly
|
||||
capable.
|
||||
This option is specified in RFC 8925.
|
||||
.It Ic option irc-server Ar ip-address Oo , Ar ip-address ... Oc ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: PackingList.pm,v 1.152 2023/06/13 09:07:17 espie Exp $
|
||||
# $OpenBSD: PackingList.pm,v 1.153 2023/11/23 09:44:08 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -409,7 +409,7 @@ sub match_pkgpath($self, $plist2)
|
||||
}
|
||||
|
||||
our @unique_categories =
|
||||
(qw(name url version signer digital-signature no-default-conflict manual-installation firmware always-update is-branch extrainfo localbase arch));
|
||||
(qw(name url version signer digital-signature no-default-conflict manual-installation firmware always-update updatedb is-branch extrainfo localbase arch));
|
||||
|
||||
our @list_categories =
|
||||
(qw(conflict pkgpath ask-update libset depend
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rsync.c,v 1.46 2022/12/28 21:30:18 jmc Exp $ */
|
||||
/* $OpenBSD: rsync.c,v 1.47 2023/11/23 13:01:15 job Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||
*
|
||||
@ -145,7 +145,7 @@ exec_rsync(const char *prog, const char *bind_addr, char *uri, char *dst,
|
||||
err(1, "pledge");
|
||||
i = 0;
|
||||
args[i++] = (char *)prog;
|
||||
args[i++] = "-rt";
|
||||
args[i++] = "-rtO";
|
||||
args[i++] = "--no-motd";
|
||||
args[i++] = "--max-size=" STRINGIFY(MAX_FILE_SIZE);
|
||||
args[i++] = "--contimeout=" STRINGIFY(MAX_CONN_TIMEOUT);
|
||||
|
Loading…
Reference in New Issue
Block a user