Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F138974252
D50902.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1005 B
Referenced Files
None
Subscribers
None
D50902.diff
View Options
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -2555,6 +2555,24 @@
return (false);
}
+bool
+get_user_reg(u_int reg, uint64_t *val, bool fbsd)
+{
+ int i;
+
+ for (i = 0; i < nitems(user_regs); i++) {
+ if (user_regs[i].reg == reg) {
+ if (fbsd)
+ *val = CPU_DESC_FIELD(user_cpu_desc, i);
+ else
+ *val = CPU_DESC_FIELD(l_user_cpu_desc, i);
+ return (true);
+ }
+ }
+
+ return (false);
+}
+
static uint64_t
update_special_reg_field(uint64_t user_reg, u_int type, uint64_t value,
u_int width, u_int shift, bool sign)
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -236,6 +236,7 @@
bool extract_user_id_field(u_int, u_int, uint8_t *);
bool get_kernel_reg(u_int, uint64_t *);
bool get_kernel_reg_masked(u_int, uint64_t *, uint64_t);
+bool get_user_reg(u_int, uint64_t *, bool);
void cpu_desc_init(void);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 3:02 AM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26785293
Default Alt Text
D50902.diff (1005 B)
Attached To
Mode
D50902: arm64: Add get_user_reg
Attached
Detach File
Event Timeline
Log In to Comment