summaryrefslogtreecommitdiff
path: root/rtl/core/core_cp15.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-02-13 12:15:24 -0600
committerAlejandro Soto <alejandro@34project.org>2024-02-20 11:12:22 -0600
commit641f52789a392f6370195003a04d6e674878628d (patch)
treef3961dcb6cbdf116d330b97fa8a89575b15549c0 /rtl/core/core_cp15.sv
parent827c40829903d5b870f47ab2f389792ed10211bd (diff)
rtl/core/cp15: implement thread-local CP15 registers (from v7 spec), required for Linux SMP
Diffstat (limited to 'rtl/core/core_cp15.sv')
-rw-r--r--rtl/core/core_cp15.sv13
1 files changed, 12 insertions, 1 deletions
diff --git a/rtl/core/core_cp15.sv b/rtl/core/core_cp15.sv
index 09b899a..c009dce 100644
--- a/rtl/core/core_cp15.sv
+++ b/rtl/core/core_cp15.sv
@@ -33,7 +33,8 @@ module core_cp15
assign load = dec.load;
word read_cpuid, read_syscfg, read_ttbr, read_domain, read_far,
- read_fsr, read_cache_lockdown, read_tlb_lockdown, read_cyclecnt;
+ read_fsr, read_cache_lockdown, read_tlb_lockdown, read_pid,
+ read_cyclecnt;
core_cp15_cpuid cpuid
(
@@ -102,6 +103,13 @@ module core_cp15
.*
);
+ core_cp15_pid pid
+ (
+ .read(read_pid),
+ .transfer(transfer && crn == `CP15_CRN_PID),
+ .*
+ );
+
core_cp15_cyclecnt cyclecnt
(
.read(read_cyclecnt),
@@ -134,6 +142,9 @@ module core_cp15
`CP15_CRN_TLB_LCK:
read = read_tlb_lockdown;
+ `CP15_CRN_PID:
+ read = read_pid;
+
`CP15_CRN_CYCLECNT:
read = read_cyclecnt;