Patch Set 2:

Patch Set 2:

Patch Set 2: Code-Review+1

Thanks!
Please change "riscv: fix run_payload" to something more specific.
Do you have suggest?
Also mention how the change has been tested.
I read this code and found a logic error when setting the MPP field of mstatus.
If you do not return via mret, MPIE will not work.
I have only tested the situation of return to M-Mode.

e.g.

riscv: use mret to invoke M-mode payload and disable interrupts

Fixes a logic error that sets MPIE, but didn't use mret to return to the payload. This left MIE set to an undefined value.

Now all modes are handled the same way:

TEST=Run an M-mode payload

Thank you very much!

View Change

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaab595f916949c57104ec00f8b06ea047fe76bba
Gerrit-Change-Number: 33462
Gerrit-PatchSet: 3
Gerrit-Owner: Xiang Wang <wxjstz@126.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: Xiang Wang <wxjstz@126.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Shawn C <citypw@gmail.com>
Gerrit-CC: ron minnich <rminnich@gmail.com>
Gerrit-Comment-Date: Thu, 20 Jun 2019 12:19:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment