@zigc/lib 0.17.0-dev.332 → 0.17.0-dev.340

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/libc/include/aarch64-openbsd-none/arm64/cpu.h +7 -1
  2. package/libc/include/aarch64-openbsd-none/arm64/intr.h +9 -1
  3. package/libc/include/aarch64-openbsd-none/machine/cpu.h +7 -1
  4. package/libc/include/aarch64-openbsd-none/machine/intr.h +9 -1
  5. package/libc/include/generic-openbsd/db.h +1 -7
  6. package/libc/include/generic-openbsd/ddb/db_interface.h +2 -1
  7. package/libc/include/generic-openbsd/fnmatch.h +6 -2
  8. package/libc/include/generic-openbsd/login_cap.h +3 -1
  9. package/libc/include/generic-openbsd/miscfs/fuse/fusefs_node.h +2 -1
  10. package/libc/include/generic-openbsd/net/bpf.h +3 -1
  11. package/libc/include/generic-openbsd/net/hfsc.h +4 -4
  12. package/libc/include/generic-openbsd/net/if.h +5 -1
  13. package/libc/include/generic-openbsd/net/if_bridge.h +48 -1
  14. package/libc/include/generic-openbsd/net/if_etherbridge.h +20 -7
  15. package/libc/include/generic-openbsd/net/if_media.h +26 -1
  16. package/libc/include/generic-openbsd/net/if_pflow.h +71 -20
  17. package/libc/include/generic-openbsd/net/if_pfsync.h +2 -2
  18. package/libc/include/generic-openbsd/net/if_sppp.h +2 -1
  19. package/libc/include/generic-openbsd/net/if_trunk.h +3 -2
  20. package/libc/include/generic-openbsd/net/if_types.h +2 -2
  21. package/libc/include/generic-openbsd/net/if_var.h +34 -12
  22. package/libc/include/generic-openbsd/net/netisr.h +1 -3
  23. package/libc/include/generic-openbsd/net/pfvar.h +154 -1
  24. package/libc/include/generic-openbsd/net/pfvar_priv.h +256 -1
  25. package/libc/include/generic-openbsd/net80211/ieee80211.h +76 -4
  26. package/libc/include/generic-openbsd/net80211/ieee80211_ioctl.h +3 -2
  27. package/libc/include/generic-openbsd/net80211/ieee80211_node.h +48 -2
  28. package/libc/include/generic-openbsd/net80211/ieee80211_proto.h +4 -1
  29. package/libc/include/generic-openbsd/net80211/ieee80211_var.h +18 -2
  30. package/libc/include/generic-openbsd/netinet/if_ether.h +12 -11
  31. package/libc/include/generic-openbsd/netinet/igmp_var.h +17 -3
  32. package/libc/include/generic-openbsd/netinet/in_pcb.h +2 -1
  33. package/libc/include/generic-openbsd/netinet/in_var.h +17 -59
  34. package/libc/include/generic-openbsd/netinet/ip.h +3 -2
  35. package/libc/include/generic-openbsd/netinet/tcp_timer.h +1 -2
  36. package/libc/include/generic-openbsd/netinet6/in6_var.h +15 -29
  37. package/libc/include/generic-openbsd/netinet6/ip6_var.h +1 -2
  38. package/libc/include/generic-openbsd/netinet6/mld6_var.h +17 -4
  39. package/libc/include/generic-openbsd/netinet6/nd6.h +2 -2
  40. package/libc/include/generic-openbsd/pthread.h +2 -2
  41. package/libc/include/generic-openbsd/signal.h +2 -2
  42. package/libc/include/generic-openbsd/sndio.h +6 -12
  43. package/libc/include/generic-openbsd/strings.h +5 -1
  44. package/libc/include/generic-openbsd/sys/device.h +4 -3
  45. package/libc/include/generic-openbsd/sys/disklabel.h +17 -5
  46. package/libc/include/generic-openbsd/sys/dkio.h +3 -5
  47. package/libc/include/generic-openbsd/sys/filedesc.h +3 -2
  48. package/libc/include/generic-openbsd/sys/mbuf.h +1 -1
  49. package/libc/include/generic-openbsd/sys/mman.h +7 -2
  50. package/libc/include/generic-openbsd/sys/mutex.h +10 -7
  51. package/libc/include/generic-openbsd/sys/namei.h +8 -7
  52. package/libc/include/generic-openbsd/sys/param.h +1 -1
  53. package/libc/include/generic-openbsd/sys/pledge.h +1 -3
  54. package/libc/include/generic-openbsd/sys/protosw.h +8 -1
  55. package/libc/include/generic-openbsd/sys/ptrace.h +4 -1
  56. package/libc/include/generic-openbsd/sys/sched.h +8 -1
  57. package/libc/include/generic-openbsd/sys/signal.h +4 -2
  58. package/libc/include/generic-openbsd/sys/socketvar.h +2 -1
  59. package/libc/include/generic-openbsd/sys/sockio.h +11 -1
  60. package/libc/include/generic-openbsd/sys/syscall.h +5 -3
  61. package/libc/include/generic-openbsd/sys/syscallargs.h +9 -2
  62. package/libc/include/generic-openbsd/sys/sysctl.h +7 -4
  63. package/libc/include/generic-openbsd/sys/types.h +6 -2
  64. package/libc/include/generic-openbsd/sys/videoio.h +143 -68
  65. package/libc/include/generic-openbsd/sys/xcall.h +2 -2
  66. package/libc/include/generic-openbsd/time.h +2 -2
  67. package/libc/include/generic-openbsd/unistd.h +2 -2
  68. package/libc/include/generic-openbsd/uvm/uvm_anon.h +2 -3
  69. package/libc/include/generic-openbsd/uvm/uvm_extern.h +1 -19
  70. package/libc/include/generic-openbsd/uvm/uvm_pager.h +3 -4
  71. package/libc/include/generic-openbsd/uvm/uvm_pmemrange.h +1 -2
  72. package/libc/include/generic-openbsd/uvm/uvm_swap.h +4 -1
  73. package/libc/include/generic-openbsd/uvm/uvm_vnode.h +3 -4
  74. package/libc/include/generic-openbsd/uvm/uvmexp.h +41 -35
  75. package/libc/include/mips64-openbsd-none/machine/octeonvar.h +1 -27
  76. package/libc/include/mips64-openbsd-none/octeon/octeonvar.h +1 -27
  77. package/libc/include/mips64el-openbsd-none/loongson/apmvar.h +1 -1
  78. package/libc/include/mips64el-openbsd-none/loongson/param.h +1 -5
  79. package/libc/include/mips64el-openbsd-none/machine/apmvar.h +1 -1
  80. package/libc/include/mips64el-openbsd-none/machine/param.h +1 -5
  81. package/libc/include/powerpc-openbsd-eabihf/powerpc/intr.h +1 -4
  82. package/libc/include/powerpc64-openbsd-none/machine/atomic.h +3 -3
  83. package/libc/include/powerpc64-openbsd-none/powerpc64/atomic.h +3 -3
  84. package/libc/include/riscv64-openbsd-none/machine/cpu.h +4 -8
  85. package/libc/include/riscv64-openbsd-none/machine/cpufunc.h +4 -4
  86. package/libc/include/riscv64-openbsd-none/machine/pmap.h +5 -1
  87. package/libc/include/riscv64-openbsd-none/machine/pte.h +9 -1
  88. package/libc/include/riscv64-openbsd-none/riscv64/cpu.h +4 -8
  89. package/libc/include/riscv64-openbsd-none/riscv64/cpufunc.h +4 -4
  90. package/libc/include/riscv64-openbsd-none/riscv64/pmap.h +5 -1
  91. package/libc/include/riscv64-openbsd-none/riscv64/pte.h +9 -1
  92. package/libc/include/x86-openbsd-none/i386/specialreg.h +3 -1
  93. package/libc/include/x86-openbsd-none/machine/specialreg.h +3 -1
  94. package/libc/include/x86_64-openbsd-none/amd64/conf.h +11 -2
  95. package/libc/include/x86_64-openbsd-none/amd64/cpu.h +14 -4
  96. package/libc/include/x86_64-openbsd-none/amd64/cpufunc.h +2 -3
  97. package/libc/include/x86_64-openbsd-none/amd64/ghcb.h +2 -1
  98. package/libc/include/x86_64-openbsd-none/amd64/i82489var.h +2 -4
  99. package/libc/include/x86_64-openbsd-none/amd64/i8259.h +1 -53
  100. package/libc/include/x86_64-openbsd-none/amd64/intr.h +5 -2
  101. package/libc/include/x86_64-openbsd-none/amd64/intrdefs.h +9 -7
  102. package/libc/include/x86_64-openbsd-none/amd64/kexec.h +48 -0
  103. package/libc/include/x86_64-openbsd-none/amd64/specialreg.h +4 -1
  104. package/libc/include/x86_64-openbsd-none/machine/conf.h +11 -2
  105. package/libc/include/x86_64-openbsd-none/machine/cpu.h +14 -4
  106. package/libc/include/x86_64-openbsd-none/machine/cpufunc.h +2 -3
  107. package/libc/include/x86_64-openbsd-none/machine/ghcb.h +2 -1
  108. package/libc/include/x86_64-openbsd-none/machine/i82489var.h +2 -4
  109. package/libc/include/x86_64-openbsd-none/machine/i8259.h +1 -53
  110. package/libc/include/x86_64-openbsd-none/machine/intr.h +5 -2
  111. package/libc/include/x86_64-openbsd-none/machine/intrdefs.h +9 -7
  112. package/libc/include/x86_64-openbsd-none/machine/kexec.h +48 -0
  113. package/libc/include/x86_64-openbsd-none/machine/specialreg.h +4 -1
  114. package/libc/openbsd/abilists +0 -0
  115. package/package.json +1 -1
  116. package/std/Io/File.zig +6 -0
  117. package/std/Target.zig +2 -7
  118. package/std/bit_set.zig +0 -1
  119. package/std/crypto/ascon.zig +0 -2
  120. package/std/crypto/salsa20.zig +0 -6
  121. package/std/crypto/sha3.zig +0 -2
  122. package/std/debug/cpu_context.zig +0 -21
  123. package/libc/include/mips64el-openbsd-none/loongson/hibernate.h +0 -33
  124. package/libc/include/mips64el-openbsd-none/loongson/hibernate_var.h +0 -39
  125. package/libc/include/mips64el-openbsd-none/machine/hibernate.h +0 -33
  126. package/libc/include/mips64el-openbsd-none/machine/hibernate_var.h +0 -39
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: cpufunc.h,v 1.45 2025/06/27 17:23:49 bluhm Exp $ */
1
+ /* $OpenBSD: cpufunc.h,v 1.47 2025/12/30 03:19:15 jsg Exp $ */
2
2
  /* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -249,7 +249,7 @@ rdmsr(u_int msr)
249
249
  return (((uint64_t)hi << 32) | (uint64_t) lo);
250
250
  }
251
251
 
252
- static __inline int
252
+ static __inline uint32_t
253
253
  rdpkru(u_int ecx)
254
254
  {
255
255
  uint32_t edx, pkru;
@@ -304,7 +304,6 @@ wbinvd(void)
304
304
 
305
305
  #ifdef MULTIPROCESSOR
306
306
  int wbinvd_on_all_cpus(void);
307
- void wbinvd_on_all_cpus_acked(void);
308
307
  #else
309
308
  static inline int
310
309
  wbinvd_on_all_cpus(void)
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: ghcb.h,v 1.6 2025/09/17 18:37:44 sf Exp $ */
1
+ /* $OpenBSD: ghcb.h,v 1.7 2026/02/16 15:06:03 hshoexer Exp $ */
2
2
 
3
3
  /*
4
4
  * Copyright (c) 2024, 2025 Hans-Joerg Hoexer <hshoexer@genua.de>
@@ -128,6 +128,7 @@ int ghcb_valbm_set(uint8_t *, int);
128
128
  int ghcb_valbm_isset(uint8_t *, int);
129
129
  int ghcb_verify_bm(uint8_t *, uint8_t *);
130
130
  int ghcb_valid(struct ghcb_sa *);
131
+ int ghcb_empty(struct ghcb_sa *);
131
132
 
132
133
  void ghcb_sync_val(int, int, struct ghcb_sync *);
133
134
  void ghcb_sync_out(struct trapframe *, const struct ghcb_extra_regs *,
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: i82489var.h,v 1.21 2024/11/07 17:24:42 bluhm Exp $ */
1
+ /* $OpenBSD: i82489var.h,v 1.22 2025/11/12 09:48:52 hshoexer Exp $ */
2
2
  /* $NetBSD: i82489var.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -72,8 +72,7 @@ extern void Xresume_lapic_ipi(void);
72
72
  #define LAPIC_IPI_INVLTLB (LAPIC_IPI_OFFSET + 0)
73
73
  #define LAPIC_IPI_INVLPG (LAPIC_IPI_OFFSET + 1)
74
74
  #define LAPIC_IPI_INVLRANGE (LAPIC_IPI_OFFSET + 2)
75
- #define LAPIC_IPI_WBINVD (LAPIC_IPI_OFFSET + 3)
76
- #define LAPIC_IPI_INVEPT (LAPIC_IPI_OFFSET + 4)
75
+ #define LAPIC_IPI_INVEPT (LAPIC_IPI_OFFSET + 3)
77
76
 
78
77
  extern void Xipi_invltlb(void);
79
78
  extern void Xipi_invltlb_pcid(void);
@@ -81,7 +80,6 @@ extern void Xipi_invlpg(void);
81
80
  extern void Xipi_invlpg_pcid(void);
82
81
  extern void Xipi_invlrange(void);
83
82
  extern void Xipi_invlrange_pcid(void);
84
- extern void Xipi_wbinvd(void);
85
83
  #if NVMM > 0
86
84
  extern void Xipi_invept(void);
87
85
  #endif /* NVMM > 0 */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: i8259.h,v 1.4 2015/09/02 13:39:23 mikeb Exp $ */
1
+ /* $OpenBSD: i8259.h,v 1.5 2026/01/15 15:43:45 sf Exp $ */
2
2
  /* $NetBSD: i8259.h,v 1.3 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -63,82 +63,30 @@ extern void i8259_default_setup(void);
63
63
  #define ICU_LEN 16 /* 32-47 are ISA interrupts */
64
64
 
65
65
 
66
- #define ICU_HARDWARE_MASK
67
-
68
- /*
69
- * These macros are fairly self explanatory. If ICU_SPECIAL_MASK_MODE is
70
- * defined, we try to take advantage of the ICU's `special mask mode' by only
71
- * EOIing the interrupts on return. This avoids the requirement of masking and
72
- * unmasking. We can't do this without special mask mode, because the ICU
73
- * would also hold interrupts that it thinks are of lower priority.
74
- *
75
- * Many machines do not support special mask mode, so by default we don't try
76
- * to use it.
77
- */
78
-
79
66
  #define IRQ_BIT(num) (1 << ((num) % 8))
80
67
  #define IRQ_BYTE(num) ((num) >> 3)
81
68
 
82
69
  #define i8259_late_ack(num)
83
70
 
84
- #ifdef ICU_SPECIAL_MASK_MODE
85
-
86
- #define i8259_asm_ack1(num)
87
- #define i8259_asm_ack2(num) \
88
- movb $(0x60|IRQ_SLAVE),%al /* specific EOI for IRQ2 */ ;\
89
- outb %al,$IO_ICU1
90
- #define i8259_asm_mask(num)
91
- #define i8259_asm_unmask(num) \
92
- movb $(0x60|(num%8)),%al /* specific EOI */ ;\
93
- outb %al,$ICUADDR
94
-
95
- #else /* ICU_SPECIAL_MASK_MODE */
96
-
97
- #ifndef AUTO_EOI_1
98
71
  #define i8259_asm_ack1(num) \
99
72
  movb $(0x60|(num%8)),%al /* specific EOI */ ;\
100
73
  outb %al,$IO_ICU1
101
- #else
102
- #define i8259_asm_ack1(num)
103
- #endif
104
74
 
105
- #ifndef AUTO_EOI_2
106
75
  #define i8259_asm_ack2(num) \
107
76
  movb $(0x60|(num%8)),%al /* specific EOI */ ;\
108
77
  outb %al,$IO_ICU2 /* do the second ICU first */ ;\
109
78
  movb $(0x60|IRQ_SLAVE),%al /* specific EOI for IRQ2 */ ;\
110
79
  outb %al,$IO_ICU1
111
- #else
112
- #define i8259_asm_ack2(num)
113
- #endif
114
-
115
- #ifdef PIC_MASKDELAY
116
- #define MASKDELAY pushl %eax ; inb $0x84,%al ; popl %eax
117
- #else
118
- #define MASKDELAY
119
- #endif
120
-
121
- #ifdef ICU_HARDWARE_MASK
122
80
 
123
81
  #define i8259_asm_mask(num) \
124
82
  movb CVAROFF(i8259_imen, IRQ_BYTE(num)),%al ;\
125
83
  orb $IRQ_BIT(num),%al ;\
126
84
  movb %al,CVAROFF(i8259_imen, IRQ_BYTE(num)) ;\
127
- MASKDELAY ;\
128
85
  outb %al,$(ICUADDR+1)
129
86
  #define i8259_asm_unmask(num) \
130
87
  movb CVAROFF(i8259_imen, IRQ_BYTE(num)),%al ;\
131
88
  andb $~IRQ_BIT(num),%al ;\
132
89
  movb %al,CVAROFF(i8259_imen, IRQ_BYTE(num)) ;\
133
- MASKDELAY ;\
134
90
  outb %al,$(ICUADDR+1)
135
91
 
136
- #else /* ICU_HARDWARE_MASK */
137
-
138
- #define i8259_asm_mask(num)
139
- #define i8259_asm_unmask(num)
140
-
141
- #endif /* ICU_HARDWARE_MASK */
142
- #endif /* ICU_SPECIAL_MASK_MODE */
143
-
144
92
  #endif /* !_MACHINE_I8259_H_ */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: intr.h,v 1.36 2025/06/11 09:57:01 kettenis Exp $ */
1
+ /* $OpenBSD: intr.h,v 1.37 2025/11/10 12:34:52 dlg Exp $ */
2
2
  /* $NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -222,7 +222,10 @@ void x86_ipi_handler(void);
222
222
  void x86_setperf_ipi(struct cpu_info *);
223
223
 
224
224
  extern void (*ipifunc[X86_NIPI])(struct cpu_info *);
225
- #endif
225
+
226
+ #define cpu_xcall_ipi(_ci) x86_send_ipi((_ci), X86_IPI_XCALL)
227
+ void Xxcallintr(void);
228
+ #endif /* MULTIPROCESSOR */
226
229
 
227
230
  #endif /* !_LOCORE */
228
231
 
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: intrdefs.h,v 1.24 2024/05/26 13:37:31 kettenis Exp $ */
1
+ /* $OpenBSD: intrdefs.h,v 1.25 2025/11/10 12:34:52 dlg Exp $ */
2
2
  /* $NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  #ifndef _AMD64_INTRDEFS_H
@@ -52,12 +52,13 @@
52
52
  #define LIR_TIMER 62
53
53
 
54
54
  /* Soft interrupt masks. */
55
- #define SIR_CLOCK 61
56
- #define SIR_NET 60
57
- #define SIR_TTY 59
55
+ #define SIR_XCALL 61
56
+ #define SIR_CLOCK 60
57
+ #define SIR_NET 59
58
+ #define SIR_TTY 58
58
59
 
59
- #define LIR_XEN 58
60
- #define LIR_HYPERV 57
60
+ #define LIR_XEN 57
61
+ #define LIR_HYPERV 56
61
62
 
62
63
  /*
63
64
  * Maximum # of interrupt sources per CPU. 64 to fit in one word.
@@ -85,8 +86,9 @@
85
86
  #define X86_IPI_START_VMM 0x00000100
86
87
  #define X86_IPI_STOP_VMM 0x00000200
87
88
  #define X86_IPI_WBINVD 0x00000400
89
+ #define X86_IPI_XCALL 0x00000800
88
90
 
89
- #define X86_NIPI 12
91
+ #define X86_NIPI 13
90
92
 
91
93
  #define IREENT_MAGIC 0x18041969
92
94
 
@@ -0,0 +1,48 @@
1
+ /* $OpenBSD: kexec.h,v 1.1 2025/11/12 11:34:36 hshoexer Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 2019-2020 Visa Hankala
5
+ * Copyright (c) 2025 Hans-Joerg Hoexer <hshoexer@yerbouti.franken.de>
6
+ *
7
+ * Permission to use, copy, modify, and/or distribute this software for any
8
+ * purpose with or without fee is hereby granted, provided that the above
9
+ * copyright notice and this permission notice appear in all copies.
10
+ *
11
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
+ */
19
+
20
+ #ifndef _MACHINE_KEXEC_H_
21
+ #define _MACHINE_KEXEC_H_
22
+
23
+ #include <sys/ioccom.h>
24
+
25
+ #define KEXEC_TRAMPOLINE (35 * NBPG) /* @ 140 Kb */
26
+ #define KEXEC_TRAMP_DATA (36 * NBPG)
27
+ #define PA_KERN (16*1024*1024) /* @ 16 Mb */
28
+
29
+ #ifndef _LOCORE
30
+
31
+ #define KEXEC_MAX_ARGS 8 /* maximum number of boot arguments */
32
+
33
+ struct kexec_args {
34
+ char *kimg; /* kernel image buffer */
35
+ size_t klen; /* size of kernel image */
36
+ int boothowto;
37
+ u_char bootduid[8];
38
+ };
39
+
40
+ #define KIOC_KEXEC _IOW('K', 1, struct kexec_args)
41
+ #define KIOC_GETBOOTDUID _IOR('K', 2, u_char[8])
42
+
43
+ extern unsigned int kexec_size;
44
+ extern void kexec_tramp(vaddr_t, vaddr_t, paddr_t, size_t, vaddr_t);
45
+
46
+ #endif /* !_LOCORE */
47
+
48
+ #endif /* _MACHINE_KEXEC_H_ */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: specialreg.h,v 1.120 2025/07/16 07:15:41 jsg Exp $ */
1
+ /* $OpenBSD: specialreg.h,v 1.122 2026/04/19 01:10:28 jsg Exp $ */
2
2
  /* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
3
3
  /* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */
4
4
 
@@ -699,9 +699,12 @@
699
699
  #define MSR_FSBASE 0xc0000100 /* 64bit offset for fs: */
700
700
  #define MSR_GSBASE 0xc0000101 /* 64bit offset for gs: */
701
701
  #define MSR_KERNELGSBASE 0xc0000102 /* storage for swapgs ins */
702
+ #define MSR_SYS_CFG 0xc0010010 /* System Configuration */
702
703
  #define MSR_PATCH_LOADER 0xc0010020
703
704
  #define MSR_INT_PEN_MSG 0xc0010055 /* Interrupt pending message */
704
705
 
706
+ #define MSR_FP_CFG 0xc0011028 /* Floating Point Configuration */
707
+ #define FP_CFG_9 (1 << 9) /* FP-DSS chickenbit */
705
708
  #define MSR_DE_CFG 0xc0011029 /* Decode Configuration */
706
709
  #define DE_CFG_721 0x00000001 /* errata 721 */
707
710
  #define DE_CFG_SERIALIZE_LFENCE (1 << 1) /* Enable serializing lfence */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: conf.h,v 1.11 2024/09/04 07:45:08 jsg Exp $ */
1
+ /* $OpenBSD: conf.h,v 1.12 2025/11/12 11:34:36 hshoexer Exp $ */
2
2
  /* $NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $ */
3
3
 
4
4
  /*
@@ -56,4 +56,13 @@ cdev_decl(pctr);
56
56
  cdev_decl(vmm);
57
57
 
58
58
  #include "psp.h"
59
- cdev_decl(psp);
59
+ cdev_decl(psp);
60
+
61
+ #include "kexec.h"
62
+ #define cdev_kexec_init(c,n) { \
63
+ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
64
+ (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
65
+ (dev_type_stop((*))) nullop, 0, \
66
+ (dev_type_mmap((*))) enodev }
67
+
68
+ cdev_decl(kexec);
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: cpu.h,v 1.180 2025/04/28 16:18:25 bluhm Exp $ */
1
+ /* $OpenBSD: cpu.h,v 1.185 2026/03/31 16:46:22 deraadt Exp $ */
2
2
  /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -53,6 +53,7 @@
53
53
  #include <sys/sched.h>
54
54
  #include <sys/sensors.h>
55
55
  #include <sys/srp.h>
56
+ #include <sys/xcall.h>
56
57
  #include <uvm/uvm_percpu.h>
57
58
 
58
59
  #ifdef _KERNEL
@@ -187,6 +188,7 @@ struct cpu_info {
187
188
  int ci_inatomic; /* [o] */
188
189
 
189
190
  #define __HAVE_CPU_TOPOLOGY
191
+ u_int32_t ci_cputype; /* [I] */
190
192
  u_int32_t ci_smt_id; /* [I] */
191
193
  u_int32_t ci_core_id; /* [I] */
192
194
  u_int32_t ci_pkg_id; /* [I] */
@@ -215,6 +217,7 @@ struct cpu_info {
215
217
 
216
218
  #ifdef MULTIPROCESSOR
217
219
  struct srp_hazard ci_srp_hazards[SRP_HAZARD_NUM];
220
+ struct xcall_cpu ci_xcall;
218
221
  #define __HAVE_UVM_PERCPU
219
222
  struct uvm_pmr_cache ci_uvm; /* [o] page cache */
220
223
  #endif
@@ -289,7 +292,7 @@ extern void need_resched(struct cpu_info *);
289
292
 
290
293
  #if defined(MULTIPROCESSOR)
291
294
 
292
- #define MAXCPUS 64 /* bitmask */
295
+ #define MAXCPUS 255
293
296
 
294
297
  #define CPU_STARTUP(_ci) ((_ci)->ci_func->start(_ci))
295
298
  #define CPU_STOP(_ci) ((_ci)->ci_func->stop(_ci))
@@ -431,6 +434,7 @@ extern void (*cpu_suspend_cycle_fcn)(void);
431
434
  #define cpu_idle_leave() do { /* nothing */ } while (0)
432
435
  extern void (*initclock_func)(void);
433
436
  extern void (*startclock_func)(void);
437
+ extern int hibernate_delay;
434
438
 
435
439
  struct region_descriptor;
436
440
  void lgdt(struct region_descriptor *);
@@ -444,6 +448,9 @@ void startclocks(void);
444
448
  void rtcinit(void);
445
449
  void rtcstart(void);
446
450
  void rtcstop(void);
451
+ int rtcalarm_suspend(struct timeval *tv);
452
+ void rtcalarm_resume(void);
453
+ int rtcalarm_fired(void);
447
454
  void i8254_delay(int);
448
455
  void i8254_initclocks(void);
449
456
  void i8254_startclock(void);
@@ -496,13 +503,15 @@ void mp_setperf_init(void);
496
503
  #define CPU_CPUFEATURE 8 /* cpuid features */
497
504
  #define CPU_KBDRESET 10 /* keyboard reset under pcvt */
498
505
  #define CPU_XCRYPT 12 /* supports VIA xcrypt in userland */
506
+ #define CPU_HIBERNATEDELAY 13 /* hibernate delay after suspend */
499
507
  #define CPU_LIDACTION 14 /* action caused by lid close */
500
508
  #define CPU_FORCEUKBD 15 /* Force ukbd(4) as console keyboard */
501
509
  #define CPU_TSCFREQ 16 /* TSC frequency */
502
510
  #define CPU_INVARIANTTSC 17 /* has invariant TSC */
503
511
  #define CPU_PWRACTION 18 /* action caused by power button */
504
512
  #define CPU_RETPOLINE 19 /* cpu requires retpoline pattern */
505
- #define CPU_MAXID 20 /* number of valid machdep ids */
513
+ #define CPU_VMMODE 20 /* virtualization mode */
514
+ #define CPU_MAXID 21 /* number of valid machdep ids */
506
515
 
507
516
  #define CTL_MACHDEP_NAMES { \
508
517
  { 0, 0 }, \
@@ -518,13 +527,14 @@ void mp_setperf_init(void);
518
527
  { "kbdreset", CTLTYPE_INT }, \
519
528
  { 0, 0 }, \
520
529
  { "xcrypt", CTLTYPE_INT }, \
521
- { 0, 0 }, \
530
+ { "hibernatedelay", CTLTYPE_INT }, \
522
531
  { "lidaction", CTLTYPE_INT }, \
523
532
  { "forceukbd", CTLTYPE_INT }, \
524
533
  { "tscfreq", CTLTYPE_QUAD }, \
525
534
  { "invarianttsc", CTLTYPE_INT }, \
526
535
  { "pwraction", CTLTYPE_INT }, \
527
536
  { "retpoline", CTLTYPE_INT }, \
537
+ { "vmmode", CTLTYPE_STRING }, \
528
538
  }
529
539
 
530
540
  #endif /* !_MACHINE_CPU_H_ */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: cpufunc.h,v 1.45 2025/06/27 17:23:49 bluhm Exp $ */
1
+ /* $OpenBSD: cpufunc.h,v 1.47 2025/12/30 03:19:15 jsg Exp $ */
2
2
  /* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -249,7 +249,7 @@ rdmsr(u_int msr)
249
249
  return (((uint64_t)hi << 32) | (uint64_t) lo);
250
250
  }
251
251
 
252
- static __inline int
252
+ static __inline uint32_t
253
253
  rdpkru(u_int ecx)
254
254
  {
255
255
  uint32_t edx, pkru;
@@ -304,7 +304,6 @@ wbinvd(void)
304
304
 
305
305
  #ifdef MULTIPROCESSOR
306
306
  int wbinvd_on_all_cpus(void);
307
- void wbinvd_on_all_cpus_acked(void);
308
307
  #else
309
308
  static inline int
310
309
  wbinvd_on_all_cpus(void)
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: ghcb.h,v 1.6 2025/09/17 18:37:44 sf Exp $ */
1
+ /* $OpenBSD: ghcb.h,v 1.7 2026/02/16 15:06:03 hshoexer Exp $ */
2
2
 
3
3
  /*
4
4
  * Copyright (c) 2024, 2025 Hans-Joerg Hoexer <hshoexer@genua.de>
@@ -128,6 +128,7 @@ int ghcb_valbm_set(uint8_t *, int);
128
128
  int ghcb_valbm_isset(uint8_t *, int);
129
129
  int ghcb_verify_bm(uint8_t *, uint8_t *);
130
130
  int ghcb_valid(struct ghcb_sa *);
131
+ int ghcb_empty(struct ghcb_sa *);
131
132
 
132
133
  void ghcb_sync_val(int, int, struct ghcb_sync *);
133
134
  void ghcb_sync_out(struct trapframe *, const struct ghcb_extra_regs *,
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: i82489var.h,v 1.21 2024/11/07 17:24:42 bluhm Exp $ */
1
+ /* $OpenBSD: i82489var.h,v 1.22 2025/11/12 09:48:52 hshoexer Exp $ */
2
2
  /* $NetBSD: i82489var.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -72,8 +72,7 @@ extern void Xresume_lapic_ipi(void);
72
72
  #define LAPIC_IPI_INVLTLB (LAPIC_IPI_OFFSET + 0)
73
73
  #define LAPIC_IPI_INVLPG (LAPIC_IPI_OFFSET + 1)
74
74
  #define LAPIC_IPI_INVLRANGE (LAPIC_IPI_OFFSET + 2)
75
- #define LAPIC_IPI_WBINVD (LAPIC_IPI_OFFSET + 3)
76
- #define LAPIC_IPI_INVEPT (LAPIC_IPI_OFFSET + 4)
75
+ #define LAPIC_IPI_INVEPT (LAPIC_IPI_OFFSET + 3)
77
76
 
78
77
  extern void Xipi_invltlb(void);
79
78
  extern void Xipi_invltlb_pcid(void);
@@ -81,7 +80,6 @@ extern void Xipi_invlpg(void);
81
80
  extern void Xipi_invlpg_pcid(void);
82
81
  extern void Xipi_invlrange(void);
83
82
  extern void Xipi_invlrange_pcid(void);
84
- extern void Xipi_wbinvd(void);
85
83
  #if NVMM > 0
86
84
  extern void Xipi_invept(void);
87
85
  #endif /* NVMM > 0 */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: i8259.h,v 1.4 2015/09/02 13:39:23 mikeb Exp $ */
1
+ /* $OpenBSD: i8259.h,v 1.5 2026/01/15 15:43:45 sf Exp $ */
2
2
  /* $NetBSD: i8259.h,v 1.3 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -63,82 +63,30 @@ extern void i8259_default_setup(void);
63
63
  #define ICU_LEN 16 /* 32-47 are ISA interrupts */
64
64
 
65
65
 
66
- #define ICU_HARDWARE_MASK
67
-
68
- /*
69
- * These macros are fairly self explanatory. If ICU_SPECIAL_MASK_MODE is
70
- * defined, we try to take advantage of the ICU's `special mask mode' by only
71
- * EOIing the interrupts on return. This avoids the requirement of masking and
72
- * unmasking. We can't do this without special mask mode, because the ICU
73
- * would also hold interrupts that it thinks are of lower priority.
74
- *
75
- * Many machines do not support special mask mode, so by default we don't try
76
- * to use it.
77
- */
78
-
79
66
  #define IRQ_BIT(num) (1 << ((num) % 8))
80
67
  #define IRQ_BYTE(num) ((num) >> 3)
81
68
 
82
69
  #define i8259_late_ack(num)
83
70
 
84
- #ifdef ICU_SPECIAL_MASK_MODE
85
-
86
- #define i8259_asm_ack1(num)
87
- #define i8259_asm_ack2(num) \
88
- movb $(0x60|IRQ_SLAVE),%al /* specific EOI for IRQ2 */ ;\
89
- outb %al,$IO_ICU1
90
- #define i8259_asm_mask(num)
91
- #define i8259_asm_unmask(num) \
92
- movb $(0x60|(num%8)),%al /* specific EOI */ ;\
93
- outb %al,$ICUADDR
94
-
95
- #else /* ICU_SPECIAL_MASK_MODE */
96
-
97
- #ifndef AUTO_EOI_1
98
71
  #define i8259_asm_ack1(num) \
99
72
  movb $(0x60|(num%8)),%al /* specific EOI */ ;\
100
73
  outb %al,$IO_ICU1
101
- #else
102
- #define i8259_asm_ack1(num)
103
- #endif
104
74
 
105
- #ifndef AUTO_EOI_2
106
75
  #define i8259_asm_ack2(num) \
107
76
  movb $(0x60|(num%8)),%al /* specific EOI */ ;\
108
77
  outb %al,$IO_ICU2 /* do the second ICU first */ ;\
109
78
  movb $(0x60|IRQ_SLAVE),%al /* specific EOI for IRQ2 */ ;\
110
79
  outb %al,$IO_ICU1
111
- #else
112
- #define i8259_asm_ack2(num)
113
- #endif
114
-
115
- #ifdef PIC_MASKDELAY
116
- #define MASKDELAY pushl %eax ; inb $0x84,%al ; popl %eax
117
- #else
118
- #define MASKDELAY
119
- #endif
120
-
121
- #ifdef ICU_HARDWARE_MASK
122
80
 
123
81
  #define i8259_asm_mask(num) \
124
82
  movb CVAROFF(i8259_imen, IRQ_BYTE(num)),%al ;\
125
83
  orb $IRQ_BIT(num),%al ;\
126
84
  movb %al,CVAROFF(i8259_imen, IRQ_BYTE(num)) ;\
127
- MASKDELAY ;\
128
85
  outb %al,$(ICUADDR+1)
129
86
  #define i8259_asm_unmask(num) \
130
87
  movb CVAROFF(i8259_imen, IRQ_BYTE(num)),%al ;\
131
88
  andb $~IRQ_BIT(num),%al ;\
132
89
  movb %al,CVAROFF(i8259_imen, IRQ_BYTE(num)) ;\
133
- MASKDELAY ;\
134
90
  outb %al,$(ICUADDR+1)
135
91
 
136
- #else /* ICU_HARDWARE_MASK */
137
-
138
- #define i8259_asm_mask(num)
139
- #define i8259_asm_unmask(num)
140
-
141
- #endif /* ICU_HARDWARE_MASK */
142
- #endif /* ICU_SPECIAL_MASK_MODE */
143
-
144
92
  #endif /* !_MACHINE_I8259_H_ */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: intr.h,v 1.36 2025/06/11 09:57:01 kettenis Exp $ */
1
+ /* $OpenBSD: intr.h,v 1.37 2025/11/10 12:34:52 dlg Exp $ */
2
2
  /* $NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  /*-
@@ -222,7 +222,10 @@ void x86_ipi_handler(void);
222
222
  void x86_setperf_ipi(struct cpu_info *);
223
223
 
224
224
  extern void (*ipifunc[X86_NIPI])(struct cpu_info *);
225
- #endif
225
+
226
+ #define cpu_xcall_ipi(_ci) x86_send_ipi((_ci), X86_IPI_XCALL)
227
+ void Xxcallintr(void);
228
+ #endif /* MULTIPROCESSOR */
226
229
 
227
230
  #endif /* !_LOCORE */
228
231
 
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: intrdefs.h,v 1.24 2024/05/26 13:37:31 kettenis Exp $ */
1
+ /* $OpenBSD: intrdefs.h,v 1.25 2025/11/10 12:34:52 dlg Exp $ */
2
2
  /* $NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
3
3
 
4
4
  #ifndef _AMD64_INTRDEFS_H
@@ -52,12 +52,13 @@
52
52
  #define LIR_TIMER 62
53
53
 
54
54
  /* Soft interrupt masks. */
55
- #define SIR_CLOCK 61
56
- #define SIR_NET 60
57
- #define SIR_TTY 59
55
+ #define SIR_XCALL 61
56
+ #define SIR_CLOCK 60
57
+ #define SIR_NET 59
58
+ #define SIR_TTY 58
58
59
 
59
- #define LIR_XEN 58
60
- #define LIR_HYPERV 57
60
+ #define LIR_XEN 57
61
+ #define LIR_HYPERV 56
61
62
 
62
63
  /*
63
64
  * Maximum # of interrupt sources per CPU. 64 to fit in one word.
@@ -85,8 +86,9 @@
85
86
  #define X86_IPI_START_VMM 0x00000100
86
87
  #define X86_IPI_STOP_VMM 0x00000200
87
88
  #define X86_IPI_WBINVD 0x00000400
89
+ #define X86_IPI_XCALL 0x00000800
88
90
 
89
- #define X86_NIPI 12
91
+ #define X86_NIPI 13
90
92
 
91
93
  #define IREENT_MAGIC 0x18041969
92
94
 
@@ -0,0 +1,48 @@
1
+ /* $OpenBSD: kexec.h,v 1.1 2025/11/12 11:34:36 hshoexer Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 2019-2020 Visa Hankala
5
+ * Copyright (c) 2025 Hans-Joerg Hoexer <hshoexer@yerbouti.franken.de>
6
+ *
7
+ * Permission to use, copy, modify, and/or distribute this software for any
8
+ * purpose with or without fee is hereby granted, provided that the above
9
+ * copyright notice and this permission notice appear in all copies.
10
+ *
11
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
+ */
19
+
20
+ #ifndef _MACHINE_KEXEC_H_
21
+ #define _MACHINE_KEXEC_H_
22
+
23
+ #include <sys/ioccom.h>
24
+
25
+ #define KEXEC_TRAMPOLINE (35 * NBPG) /* @ 140 Kb */
26
+ #define KEXEC_TRAMP_DATA (36 * NBPG)
27
+ #define PA_KERN (16*1024*1024) /* @ 16 Mb */
28
+
29
+ #ifndef _LOCORE
30
+
31
+ #define KEXEC_MAX_ARGS 8 /* maximum number of boot arguments */
32
+
33
+ struct kexec_args {
34
+ char *kimg; /* kernel image buffer */
35
+ size_t klen; /* size of kernel image */
36
+ int boothowto;
37
+ u_char bootduid[8];
38
+ };
39
+
40
+ #define KIOC_KEXEC _IOW('K', 1, struct kexec_args)
41
+ #define KIOC_GETBOOTDUID _IOR('K', 2, u_char[8])
42
+
43
+ extern unsigned int kexec_size;
44
+ extern void kexec_tramp(vaddr_t, vaddr_t, paddr_t, size_t, vaddr_t);
45
+
46
+ #endif /* !_LOCORE */
47
+
48
+ #endif /* _MACHINE_KEXEC_H_ */
@@ -1,4 +1,4 @@
1
- /* $OpenBSD: specialreg.h,v 1.120 2025/07/16 07:15:41 jsg Exp $ */
1
+ /* $OpenBSD: specialreg.h,v 1.122 2026/04/19 01:10:28 jsg Exp $ */
2
2
  /* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
3
3
  /* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */
4
4
 
@@ -699,9 +699,12 @@
699
699
  #define MSR_FSBASE 0xc0000100 /* 64bit offset for fs: */
700
700
  #define MSR_GSBASE 0xc0000101 /* 64bit offset for gs: */
701
701
  #define MSR_KERNELGSBASE 0xc0000102 /* storage for swapgs ins */
702
+ #define MSR_SYS_CFG 0xc0010010 /* System Configuration */
702
703
  #define MSR_PATCH_LOADER 0xc0010020
703
704
  #define MSR_INT_PEN_MSG 0xc0010055 /* Interrupt pending message */
704
705
 
706
+ #define MSR_FP_CFG 0xc0011028 /* Floating Point Configuration */
707
+ #define FP_CFG_9 (1 << 9) /* FP-DSS chickenbit */
705
708
  #define MSR_DE_CFG 0xc0011029 /* Decode Configuration */
706
709
  #define DE_CFG_721 0x00000001 /* errata 721 */
707
710
  #define DE_CFG_SERIALIZE_LFENCE (1 << 1) /* Enable serializing lfence */
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zigc/lib",
3
- "version": "0.17.0-dev.332",
3
+ "version": "0.17.0-dev.340",
4
4
  "description": "Zig standard library and libc headers (shared across all platforms)",
5
5
  "repository": {
6
6
  "type": "git",