Skip to content

Commit

Permalink
Don't zero ARM RAM on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Sep 15, 2024
1 parent 7557319 commit c2ffb1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/arm/armmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ bool arm_mem_init(arm_mem_t *mem) {
memset(mem->nvm, ~0, FLASH_SIZE);
mem->ram = malloc(HMCRAMC0_SIZE);
if (likely(mem->ram)) {
memset(mem->ram, 0, HMCRAMC0_SIZE);
return true;
free(mem->ram);
}
Expand All @@ -281,7 +282,6 @@ void arm_mem_destroy(arm_mem_t *mem) {
}

void arm_mem_reset(arm_mem_t *mem, uint8_t rcause) {
memset(mem->ram, 0, HMCRAMC0_SIZE);
arm_nvm_clear_page_buffer(mem);
mem->pm.RCAUSE.reg = rcause;
mem->nvmctrl.INTFLAG.bit.READY = true;
Expand Down

0 comments on commit c2ffb1b

Please sign in to comment.