diff options
author | Christian Cunningham <cc@localhost> | 2022-03-24 18:59:26 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-24 18:59:45 -0700 |
commit | 180dfed61505cfe944755f7078d7b29063ea7734 (patch) | |
tree | c676af11f12f94121c763e55e2b10fc8017ec669 /usr | |
parent | 7753da66d7d72f441dadd76f357fd5ceb50e7c8f (diff) |
Allow access to CNTPCT from user mode
Diffstat (limited to 'usr')
-rw-r--r-- | usr/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -41,4 +41,8 @@ void main(void) subscribe_irq(SYS_TIMER_2_IRQ, loopt, &stime_2); subscribe_irq(SYS_TIMER_3_IRQ, loopt, &stime_3); add_thread(loop, 0, 0); + unsigned long long counter; + asm volatile ("mrrc p15, 0, %0, c14" : "=r"(counter)); + draw_hex32(0, 20, counter>>32); + draw_hex32(9, 20, counter); } |