On 7/10/25 15:48, Philippe Mathieu-Daudé wrote:
On 7/10/25 10:27, Peter Maydell wrote:
On Tue, 7 Oct 2025 at 03:40, Philippe Mathieu-Daudé
<[email protected]> wrote:
Convert max78000_gcr_ops[] to take MemTxAttrs and return MemTxResult,
allowing the write() path to return error on failure.
*Should* it return a MEMTX error on this failure, though?
This is a question of what the hardware behaviour is,
and there's no reference to the datasheet in this
commit message...
Right. Thanks!
Looking at "MAX78000 User Guide (UG7456; Rev 1; 3/2024)",
chapter "4.7.2 RAM Zeroization" and table "4-67: Memory
Zeroize Control Register", IIUC failure can not happen.
Would that change be OK?
- address_space_write(&s->sram_as, SYSRAM0_START,
- MEMTXATTRS_UNSPECIFIED, zero, 0x8000);
+ /* RAM Zeroization can not fail */
+ (void)address_space_write(&s->sram_as, SYSRAM0_START,
+ MEMTXATTRS_UNSPECIFIED, zero, 0x8000);
Otherwise, what would be the recommended way to express return value
has to be ignored? Assertion doesn't seem right, since this is not a
programming error.
Thanks,
Phil.