Skip to content

Commit 1c07f7c

Browse files
committed
Auto merge of #2568 - devnexen:dfbsd_ioctl_new_queries, r=Amanieu
dragonflybsd adding few new ioctl queries
2 parents 92b4680 + bbcd8c8 commit 1c07f7c

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,7 @@ fn test_dragonflybsd(target: &str) {
12141214
"sys/event.h",
12151215
"sys/file.h",
12161216
"sys/ioctl.h",
1217+
"sys/cpuctl.h",
12171218
"sys/ipc.h",
12181219
"sys/kinfo.h",
12191220
"sys/ktrace.h",

libc-test/semver/dragonfly.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ CPU_CLR
143143
CPU_ISSET
144144
CPU_SET
145145
CPU_ZERO
146+
CPUCTL_RSMSR
147+
CPUCTL_WRMSR
148+
CPUCTL_CPUID
149+
CPUCTL_UPDATE
150+
CPUCTL_MSRSBIT
151+
CPUCTL_MSRCBIT
152+
CPUCTL_CPUID_COUNT
146153
CRNCYSTR
147154
CRTSCTS
148155
CRTS_IFLOW
@@ -1214,6 +1221,10 @@ clock_getres
12141221
clock_settime
12151222
cmsgcred
12161223
cmsghdr
1224+
cpuctl_cpuid_args_t
1225+
cpuctl_cpuid_count_args_t
1226+
cpuctl_msr_args_t
1227+
cpuctl_update_args_t
12171228
daemon
12181229
devname_r
12191230
difftime

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,27 @@ s! {
242242
pub cp_sample_sp: u64,
243243
pub cp_msg: [::c_char; 32],
244244
}
245+
246+
pub struct cpuctl_msr_args_t {
247+
pub msr: ::c_int,
248+
pub data: u64,
249+
}
250+
251+
pub struct cpuctl_cpuid_args_t {
252+
pub level: ::c_int,
253+
pub data: [u32; 4],
254+
}
255+
256+
pub struct cpuctl_cpuid_count_args_t {
257+
pub level: ::c_int,
258+
pub level_type: ::c_int,
259+
pub data: [u32; 4],
260+
}
261+
262+
pub struct cpuctl_update_args_t {
263+
pub data: *mut ::c_void,
264+
pub size: ::size_t,
265+
}
245266
}
246267

247268
s_no_extra_traits! {
@@ -889,6 +910,14 @@ pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
889910
pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
890911
pub const CTL_P1003_1B_MAXID: ::c_int = 26;
891912

913+
pub const CPUCTL_RSMSR: ::c_int = 0xc0106301;
914+
pub const CPUCTL_WRMSR: ::c_int = 0xc0106302;
915+
pub const CPUCTL_CPUID: ::c_int = 0xc0106303;
916+
pub const CPUCTL_UPDATE: ::c_int = 0xc0106304;
917+
pub const CPUCTL_MSRSBIT: ::c_int = 0xc0106305;
918+
pub const CPUCTL_MSRCBIT: ::c_int = 0xc0106306;
919+
pub const CPUCTL_CPUID_COUNT: ::c_int = 0xc0106307;
920+
892921
pub const EVFILT_READ: i16 = -1;
893922
pub const EVFILT_WRITE: i16 = -2;
894923
pub const EVFILT_AIO: i16 = -3;

0 commit comments

Comments
 (0)