pussuw commented on code in PR #15081: URL: https://github.com/apache/nuttx/pull/15081#discussion_r1888085498
########## arch/risc-v/include/arch.h: ########## @@ -56,6 +56,21 @@ # define ARCH_SPGTS (ARCH_PGT_MAX_LEVELS - 1) #endif +/* Can be used by assembly code to access the structure, example: + * + * Get percpu structure: + * 1: csrr a0, CSR_SCRATCH + * + * Get hartid: + * 2: REGLOAD a0, RISCV_PERCPU_HARTID(a0) Review Comment: Yes, you are right. We need to use TP for this, but I don't think it is possible for FLAT mode. -- 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]
