[rom/rom_ext] Audit and remove access to AON peripherals in deep sleep resume path
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
In #22204 we would an issue with the ROM trying to reset the watchdog count down on the deep sleep resume path; this is causing an exception because the owner firmware had already locked the watchdog registers by clearing REGWEN for watchdog.
We need to audit and fix the ROM/ROM_EXT code for the deep sleep resume path for all places where it tries to write to registers that may have already been locked. @a-will has already provided a [first pass analysis] for ROM (https://github.com/lowRISC/opentitan/issues/22204#issuecomment-2060028889):
> * [x] adc_ctrl: No accesses
> * [ ] **aon_timer**
> * Writes to various values that could be locked.
> * [ ] ast: Not generally writable by app firmware, but should take care in ROM and/or ROM_EXT
> * [ ] **clkmgr**
>
> * Writes to JITTER_ENABLE, which could be locked by app firmware
> * [ ] **pinmux**
>
> * Writes to mux configs for UART and strapping, but could be locked
> * [x] pwm: No accesses
> * [ ] **pwrmgr**
>
> * RESET_EN written, but could be locked
> * [ ] rstmgr
>
> * ROM has drivers that could write ALERT_INFO_CTRL and CPU_INFO_CTRL
> * However, the functions do not appear to be used...
> * [x] sensor_ctrl
>
> * No apparent writes. Only have reads.
> * [ ] **sram_ctrl_ret**
>
> * Writes to CTRL, which could be locked
> * [x] sysrst_ctrl: No accesses
We still need to audit ROM_EXT and then fix all potential issues.
Contributor guide
Assessment
This issue has not been assessed yet.