diff options
author | Michal Meloun <mmel@FreeBSD.org> | 2020-12-14 11:09:07 +0000 |
---|---|---|
committer | Michal Meloun <mmel@FreeBSD.org> | 2020-12-14 11:09:07 +0000 |
commit | 15a74ac247e7ef3d77088a202ca1c479abd50703 (patch) | |
tree | 2428c6467fc1e533f9dabaf2330599cb17e8f297 | |
parent | 14271268904663f9a0083745032dca88962fe622 (diff) | |
download | src-test2-15a74ac247e7ef3d77088a202ca1c479abd50703.tar.gz src-test2-15a74ac247e7ef3d77088a202ca1c479abd50703.zip |
MFC r368161:
Store MPIDR register in pcpu.
Notes
Notes:
svn path=/stable/12/; revision=368631
-rw-r--r-- | sys/arm/arm/machdep.c | 3 | ||||
-rw-r--r-- | sys/arm/arm/mp_machdep.c | 1 | ||||
-rw-r--r-- | sys/arm/include/pcpu.h | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 086fadfa0f2b..f24df96ca3d6 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -377,6 +377,8 @@ DELAY(int usec) void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { + + pcpu->pc_mpidr = 0xffffffff; } void @@ -761,6 +763,7 @@ pcpu0_init(void) set_curthread(&thread0); #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); + pcpup->pc_mpidr = cp15_mpidr_get() & 0xFFFFFF; PCPU_SET(curthread, &thread0); } diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index 5fc2c7258ef8..040fb8756a4b 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -162,6 +162,7 @@ init_secondary(int cpu) ; pcpu_init(pc, cpu, sizeof(struct pcpu)); + pc->pc_mpidr = cp15_mpidr_get() & 0xFFFFFF; dpcpu_init(dpcpu[cpu - 1], cpu); #if __ARM_ARCH >= 6 && defined(DDB) dbg_monitor_init_secondary(); diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h index bc8abd57b03c..7be8a5d8a092 100644 --- a/sys/arm/include/pcpu.h +++ b/sys/arm/include/pcpu.h @@ -66,7 +66,8 @@ struct vmspace; int pc_bp_harden_kind; \ uint32_t pc_original_actlr; \ uint64_t pc_clock; \ - char __pad[139] + uint32_t pc_mpidr; \ + char __pad[135] #else #define PCPU_MD_FIELDS \ char __pad[93] |