inochisa commented on code in PR #12178:
URL: https://github.com/apache/nuttx/pull/12178#discussion_r1581994125
##########
arch/risc-v/src/common/riscv_internal.h:
##########
@@ -294,6 +294,18 @@ int riscv_check_pmp_access(uintptr_t attr, uintptr_t base,
uintptr_t size);
int riscv_configured_pmp_regions(void);
int riscv_next_free_pmp_region(void);
+/* RISC-V Memorymap Config **************************************************/
+
+static inline void riscv_set_basestack(uintptr_t base, uintptr_t size)
+{
+ unsigned int i;
+
+ for (i = 0; i < CONFIG_SMP_NCPUS; i++)
+ {
+ g_cpux_idlestack[i] = (const uint8_t *)(base + size * i);
Review Comment:
Initializing this array at the definition sounds like good, but it needs
lots of ugly macro test like `CONFIG_SMP_NCPUS < x`. I don't think it is good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]