Skip to content
Commit 4a733694 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Fabio Baltieri
Browse files

riscv: pmp: fix stackguard when used on SMP



The IRQ stack in particular is different on each CPU, and so is its
stack guard PMP entry value. This creates 2 issues:

- The assertion ensuring the last global PMP address is the same
  for each CPU does fail;

- That last global PMP address can't be relied upon to create a
  single-slot per-thread TOR mapping.

Fix both issues by not remembering the actual address for the last
global entry but a dummy address instead that is guaranteed not to
match any opportunistic single-slot TOR mapping.

While at it, lock that IRQ stack guard PMP entry.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 8ef27d69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment