diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-11-15 19:10:34 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-11-16 16:43:59 -0600 |
| commit | 87a42e555bf952047e287f4c7810cd538595d5af (patch) | |
| tree | d08db58fc3484bae6d63e5b2d69e66bf8c11cf95 /demo/smp.c | |
| parent | ba803067cb54edece9ffa8b92f9bb97317d082e5 (diff) | |
rtl/smp: implement SMP dead/alive handling
Diffstat (limited to 'demo/smp.c')
| -rw-r--r-- | demo/smp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,11 @@ #define SMP_CTRL_BASE 0x30140000 #define SMP_CTRL (*(volatile unsigned *)SMP_CTRL_BASE) +int cpu_is_alive(unsigned num) +{ + return !!(SMP_CTRL & (0b100 << (num * 8))); +} + void run_cpu(unsigned num) { run_cpus(1 << num); |
