Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148228613
D3134.id7134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
619 B
Referenced Files
None
Subscribers
None
D3134.id7134.diff
View Options
Index: head/sys/arm64/include/cpu.h
===================================================================
--- head/sys/arm64/include/cpu.h
+++ head/sys/arm64/include/cpu.h
@@ -43,6 +43,7 @@
#include <machine/atomic.h>
#include <machine/frame.h>
+#include <machine/armreg.h>
#define TRAPF_PC(tfp) ((tfp)->tf_lr)
#define TRAPF_USERMODE(tfp) (((tfp)->tf_elr & (1ul << 63)) == 0)
@@ -120,9 +121,11 @@
static __inline uint64_t
get_cyclecount(void)
{
+ uint64_t ret;
- /* TODO: This is bogus */
- return (1);
+ ret = READ_SPECIALREG(cntvct_el0);
+
+ return (ret);
}
#define ADDRESS_TRANSLATE_FUNC(stage) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 17, 4:05 PM (7 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29833021
Default Alt Text
D3134.id7134.diff (619 B)
Attached To
Mode
D3134: Implement get_cyclecount on ARM64
Attached
Detach File
Event Timeline
Log In to Comment