Attention is currently required from: Arthur Heymans, Arthur Heymans, Maximilian Brune, ron minnich, ron minnich.

Philipp Hug uploaded patch set #14 to this change.

View Change

riscv/mb/qemu: fix DRAM probing

Current version of qemu raise an exception when accessing invalid memory.
Modify the probing code to temporary redirect the exception handler like on
ARM platform.
Also move saving of the stack frame out to trap_util.S to have all at the same
place for a future rewrite.

TEST=boots to ramstage
Change-Id: I25860f688c7546714f6fdbce8c8f96da6400813c
Signed-off-by: Philipp Hug <>
Signed-off-by: Arthur Heymans <>
M src/arch/riscv/
M src/arch/riscv/include/arch/exception.h
A src/arch/riscv/ramdetect.c
M src/arch/riscv/trap_handler.c
M src/arch/riscv/trap_util.S
M src/lib/imd_cbmem.c
6 files changed, 93 insertions(+), 19 deletions(-)

git pull ssh:// refs/changes/86/36486/14

To view, visit change 36486. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I25860f688c7546714f6fdbce8c8f96da6400813c
Gerrit-Change-Number: 36486
Gerrit-PatchSet: 14
Gerrit-Owner: Philipp Hug <>
Gerrit-Reviewer: Arthur Heymans <>
Gerrit-Reviewer: Marc Karasek <>
Gerrit-Reviewer: Martin L Roth <>
Gerrit-Reviewer: Maximilian Brune <>
Gerrit-Reviewer: Philipp Hug <>
Gerrit-Reviewer: build bot (Jenkins) <>
Gerrit-Reviewer: ron minnich <>
Gerrit-CC: Arthur Heymans <>
Gerrit-CC: Patrick Rudolph <>
Gerrit-CC: Paul Menzel <>
Gerrit-CC: Stefan Reinauer <>
Gerrit-CC: ron minnich
Gerrit-Attention: Arthur Heymans <>
Gerrit-Attention: ron minnich
Gerrit-Attention: Maximilian Brune <>
Gerrit-Attention: Arthur Heymans <>
Gerrit-Attention: ron minnich <>
Gerrit-MessageType: newpatchset