sync with OpenBSD -current

This commit is contained in:
purplerain 2024-09-29 20:39:38 +00:00
parent f5f5616f9d
commit 665ee5434a
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
12 changed files with 62 additions and 78 deletions

View file

@ -1,4 +1,4 @@
dnl $OpenBSD: prep,v 1.21 2024/08/14 15:34:39 jsg Exp $
dnl $OpenBSD: prep,v 1.22 2024/09/28 17:09:52 sthen Exp $
To perform an installation you must be able to interact with the
console of the machine. In some cases this can be done by an attached
monitor and keyboard. In others a serial console is required.
@ -115,26 +115,21 @@ Install on systems without a supported miniroot:
If a miniroot is not available for your system you will have to modify
an existing image before booting it.
To do so first install the u-boot-aarch64 and dtb packages. Write the
provided miniroot image to an SD card:
Write the provided miniroot image to an SD card:
dd if=miniroot{:--:}OSrev.img of=/dev/rsdXc bs=1m
Add a board specific DTB file (Allwinner and Rockchip U-Boot images
come with a default DTB):
mount /dev/sdXi /mnt
mkdir /mnt/vendor
cp /usr/local/share/dtb/arm64/vendor/board.dtb /mnt/vendor/
umount /mnt
For systems based on Allwinner Axx SoCs:
pkg_add u-boot-sun50i
ls /usr/local/share/u-boot/*/u-boot-sunxi-with-spl.bin
dd if=/usr/local/share/u-boot/board/u-boot-sunxi-with-spl.bin \
of=/dev/sdXc bs=1024 seek=8
For systems based on Rockchip RK33xx SoCs:
pkg_add u-boot-aarch64
ls /usr/local/share/u-boot/*/u-boot.itb
dd if=/usr/local/share/u-boot/board/idbloader.img \
of=/dev/sdXc seek=64
dd if=/usr/local/share/u-boot/board/u-boot.itb \
@ -142,5 +137,14 @@ Install on systems without a supported miniroot:
For systems based on Rockchip RK356x SoCs:
pkg_add u-boot-rk356x
ls /usr/local/share/u-boot/*/u-boot-rockchip.bin
dd if=/usr/local/share/u-boot/board/u-boot-rockchip.bin \
of=/dev/sdXc seek=64
For systems based on Rockchip RK3588 SoCs:
pkg_add u-boot-rk3588
ls /usr/local/share/u-boot/*/u-boot-rockchip.bin
dd if=/usr/local/share/u-boot/board/u-boot-rockchip.bin \
of=/dev/sdXc seek=64

View file

@ -1,4 +1,4 @@
# $OpenBSD: rc.subr,v 1.162 2024/01/17 08:26:06 ajacoutot Exp $
# $OpenBSD: rc.subr,v 1.163 2024/09/29 14:36:13 kn Exp $
#
# Copyright (c) 2010, 2011, 2014-2022 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@ -16,7 +16,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
_rc_actions="start stop restart reload check configtest"
_rc_actions="check configtest reload restart start stop"
readonly _rc_actions
_rc_check_name() {

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: fdisk.8,v 1.119 2023/11/10 15:41:11 krw Exp $
.\" $OpenBSD: fdisk.8,v 1.120 2024/09/29 18:00:38 jmc Exp $
.\"
.\"
.\" Copyright (c) 1997 Tobias Weingartner
@ -15,7 +15,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 10 2023 $
.Dd $Mdocdate: September 29 2024 $
.Dt FDISK 8
.Os
.Sh NAME
@ -166,7 +166,7 @@ or just the disk name, e.g.
.Pa sd0 .
.El
.Sh TYPICAL LAYOUT
When called without options
When called without options,
.Nm
prints the partition table of
.Ar disk .
@ -253,7 +253,7 @@ Offset: 0 Signature: 0xAA55
.Sh COMMAND MODE
When
.Nm
enters interactive command mode
enters interactive command mode,
it copies the partition table from
.Ar disk
into memory and performs all edits on
@ -327,7 +327,7 @@ An MBR partition will accept values from 0 to 0xff.
A GPT partition will accept values from 0 to 0xfffffffffffffff.
If
.Ar value
is not provided the partition's bootable flag is set
is not provided, the partition's bootable flag is set
and all other partitions have their bootable flags reset.
MBR partitions with the bootable flag set are printed with a
.Sq *

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.c,v 1.132 2024/09/23 13:50:33 jsg Exp $ */
/* $OpenBSD: cpu.c,v 1.133 2024/09/29 11:22:39 jsg Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@ -1179,8 +1179,8 @@ cpu_identify_cleanup(void)
if (ID_AA64PFR0_FP(cpu_id_aa64pfr0) != ID_AA64PFR0_FP_NONE &&
ID_AA64PFR0_FP(cpu_id_aa64pfr0) >= ID_AA64PFR0_FP_HP)
hwcap |= HWCAP_FPHP;
if (ID_AA64PFR0_FP(cpu_id_aa64pfr0) != ID_AA64PFR0_ADV_SIMD_NONE &&
ID_AA64PFR0_FP(cpu_id_aa64pfr0) >= ID_AA64PFR0_ADV_SIMD_HP)
if (ID_AA64PFR0_ADV_SIMD(cpu_id_aa64pfr0) != ID_AA64PFR0_ADV_SIMD_NONE &&
ID_AA64PFR0_ADV_SIMD(cpu_id_aa64pfr0) >= ID_AA64PFR0_ADV_SIMD_HP)
hwcap |= HWCAP_ASIMDHP;
id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1);
if (ID_AA64MMFR2_IDS(id_aa64mmfr2) >= ID_AA64MMFR2_IDS_IMPL)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: aplcpu.c,v 1.8 2023/07/13 08:33:36 kettenis Exp $ */
/* $OpenBSD: aplcpu.c,v 1.9 2024/09/29 09:25:37 jsg Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
@ -99,7 +99,7 @@ uint32_t aplcpu_opp_level(struct aplcpu_softc *, int);
int aplcpu_clockspeed(int *);
void aplcpu_setperf(int level);
void aplcpu_refresh_sensors(void *);
void aplcpu_idle_cycle();
void aplcpu_idle_cycle(void);
void aplcpu_deep_wfi(void);
int

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pte.h,v 1.8 2023/03/27 19:02:48 kettenis Exp $ */
/* $OpenBSD: pte.h,v 1.9 2024/09/29 12:22:57 jsg Exp $ */
/*
* Copyright (c) 2014 Dale Rahn <drahn@dalerahn.com>
*
@ -103,32 +103,4 @@
/* physical page mask */
#define PTE_RPGN (((1ULL << 48) - 1) & ~PAGE_MASK)
/* XXX */
#ifndef _LOCORE
struct pte {
uint64_t pte;
};
typedef uint64_t pd_entry_t; /* L1 table entry */
typedef uint64_t pt_entry_t; /* L2 table entry */
struct pv_node {
};
#endif /* _LOCORE */
/// REWRITE
#define L2_L_SIZE 0x00010000 /* 64K */
#define L2_L_OFFSET (L2_L_SIZE - 1)
#define L2_L_FRAME (~L2_L_OFFSET)
#define L2_L_SHIFT 16
#define L2_S_SIZE 0x00001000 /* 4K */
#define L2_S_OFFSET (L2_S_SIZE - 1)
#define L2_S_FRAME (~L2_S_OFFSET)
#define L2_S_SHIFT 12
///
#endif /* _ARM_PTE_H_ */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: blocks.c,v 1.24 2024/09/18 10:22:36 job Exp $ */
/* $OpenBSD: blocks.c,v 1.27 2024/09/27 13:13:14 tb Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@ -88,9 +88,10 @@ blkhash_alloc(void)
int
blkhash_set(struct blktab *p, const struct blkset *bset)
{
struct blkhash *blks;
size_t i, idx;
if (bset == NULL)
if (bset == NULL || bset->blksz == 0)
return 1;
/* Wipe clean the table. */
@ -100,11 +101,14 @@ blkhash_set(struct blktab *p, const struct blkset *bset)
/* Fill in the hashtable. */
p->blks = reallocarray(p->blks, bset->blksz, sizeof(struct blkhash));
if (p->blks == NULL) {
blks = reallocarray(p->blks, bset->blksz, sizeof(struct blkhash));
if (blks == NULL) {
ERR("reallocarray");
free(p->blks);
p->blks = NULL;
return 0;
}
p->blks = blks;
for (i = 0; i < bset->blksz; i++) {
p->blks[i].blk = &bset->blks[i];
idx = bset->blks[i].chksum_short % p->qsz;
@ -121,6 +125,8 @@ blkhash_set(struct blktab *p, const struct blkset *bset)
void
blkhash_free(struct blktab *p)
{
if (p == NULL)
return;
free(p->q);
free(p->blks);
free(p);

View file

@ -351,7 +351,7 @@ getversion(void)
if (version == NULL) {
if (uname(&u) < 0)
fatalx("uname failed");
xasprintf(&version, "openbsd-%s", u.release);
xasprintf(&version, "secbsd-%s", u.release);
}
return (version);
}

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: rcctl.8,v 1.45 2024/05/05 08:16:45 ajacoutot Exp $
.\" $OpenBSD: rcctl.8,v 1.46 2024/09/29 14:36:13 kn Exp $
.\"
.\" Copyright (c) 2014 Antoine Jacoutot <ajacoutot@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: May 5 2024 $
.Dd $Mdocdate: September 29 2024 $
.Dt RCCTL 8
.Os
.Sh NAME
@ -23,7 +23,7 @@
.Sh SYNOPSIS
.Nm rcctl
.Cm get Ns | Ns Cm getdef Ns | Ns Cm set
.Ar service | daemon Op Ar variable Op Ar argument ...
.Ar daemon Ns | Ns Ar service Op Ar variable Op Ar argument ...
.Nm rcctl
.Op Fl df
.Sm off

View file

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: rcctl.sh,v 1.119 2024/07/08 14:47:42 ajacoutot Exp $
# $OpenBSD: rcctl.sh,v 1.120 2024/09/29 14:36:13 kn Exp $
#
# Copyright (c) 2014, 2015-2022 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@ -29,10 +29,10 @@ _rc_parse_conf
usage()
{
local _a _i
for _i in ${_rc_actions}; do _a="$(echo -n ${_i}${_a:+|${_a}})"; done
for _i in ${_rc_actions}; do _a=${_a:+${_a}|}$_i; done
_rc_err \
"usage: rcctl get|getdef|set service | daemon [variable [argument ...]]
"usage: rcctl get|getdef|set daemon|service [variable [argument ...]]
rcctl [-df] ${_a} daemon ...
rcctl disable|enable|order [daemon ...]
rcctl ls all|failed|off|on|rogue|started|stopped"

View file

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.266 2024/09/04 15:46:43 job Exp $ */
/* $OpenBSD: main.c,v 1.267 2024/09/27 12:52:58 tb Exp $ */
/*
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@ -878,6 +878,8 @@ load_skiplist(const char *slf)
LIST_INSERT_HEAD(&skiplist, le, entry);
stats.skiplistentries++;
}
if (ferror(fp))
err(1, "error reading %s", slf);
fclose(fp);
free(line);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: repo.c,v 1.67 2024/09/19 20:48:36 tb Exp $ */
/* $OpenBSD: repo.c,v 1.68 2024/09/27 12:55:03 tb Exp $ */
/*
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@ -656,10 +656,10 @@ rrdp_session_parse(struct rrdprepo *rr)
{
FILE *f;
struct rrdp_session *state;
int fd, i, ln = 0, deltacnt = 0;
int fd, ln = 0, deltacnt = 0;
const char *errstr;
char *line = NULL, *file;
size_t len = 0;
size_t i, len = 0;
ssize_t n;
time_t now, weeks;
@ -749,7 +749,7 @@ rrdp_session_parse(struct rrdprepo *rr)
free(line);
free(state->session_id);
free(state->last_mod);
for (i = 0; i < MAX_RRDP_DELTAS; i++)
for (i = 0; i < sizeof(state->deltas) / sizeof(state->deltas[0]); i++)
free(state->deltas[i]);
memset(state, 0, sizeof(*state));
rr->last_reset = now;