NevynUK commented on code in PR #20125: URL: https://github.com/apache/nuttx/pull/20125#discussion_r4006720361
########## arch/risc-v/src/common/espressif/esp_start.c: ########## @@ -474,6 +507,89 @@ void sys_startup_fn(void) SYS_STARTUP_FN(); } +#ifdef CONFIG_ESPRESSIF_PMP_EARLY_SNAPSHOT + +/**************************************************************************** + * Name: esp_pmp_early_snapshot + * + * Description: + * Bring-up diagnostic. Dumps the raw PMP configuration at a given point + * in early startup, before the console is available, using the ROM printf. + * + * Its purpose is to establish whether PMP entries are already locked when + * NuttX gains control, or whether the lock bits are set later by + * bootloader_init() -> bootloader_init_mem() -> + * esp_cpu_configure_region_protection(). Lock bits are irreversible + * without Smepmp, so this distinction decides whether a protected build is + * possible on a given part. + * + * Input Parameters: + * tag - Short label identifying the sample point. + * + * Returned Value: + * None. + * + ****************************************************************************/ + +static void esp_pmp_early_snapshot(const char *tag) Review Comment: We could look at adding a `riscv_pmp.c` and add say `riscv_pmp_dump` similar to the ARM pattern. -- 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]
