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 @@
/* $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_ */