StandaloneMm updates and need feedback

49 views
Skip to first unread message

Tuan Phan

unread,
Jul 27, 2023, 3:33:15 AM7/27/23
to fw-ex...@riscv.org

Hi All,

All changes to support StandaloneMmPkg for Risc-V has been merged to edk2-staging at https://github.com/tianocore/edk2-staging/tree/RiscV64StandaloneMm

At this point, we believe it is in the good shape for everyone welcome to try and please provide feedback.

The instructions:

https://wiki.riseproject.dev/display/HOME/EDK2_00_02_04+Evaluate+with+OpenSBI

https://wiki.riseproject.dev/display/HOME/EDK2_00_02_05+Evaluate+with+Salus

 

The plan and status:

https://wiki.riseproject.dev/pages/viewpage.action?pageId=394869

 

Supported features:

- StandaloneMm can be run  and provides MM services such as secure variables.

- EDK2 support MM protocol that be used to communicate with StandaloneMm services.

 

Tested:

- EDK2 booted with secure boot enabled and secure variables service enabled in StandaloneMm (Penglai)

- MM communication tested between EDK2 and StandaloneMm with Salus for PoC purpose.

 

Current limitation:

- Salus (CoVE), the changes in specs and its implementation needed to provide IO access for StandaloneMm as mentioned in https://wiki.riseproject.dev/display/HOME/EDK2_00_02_03+CoVE+Spec+Changes

 

Next steps are upstreaming all changes. As we are depending on proposed SBI extensions from CoVE and Penglai to be ratified, the generic code changes will be upstream first.

Li, Yong

unread,
Jul 30, 2023, 9:50:04 PM7/30/23
to Tuan Phan, fw-ex...@riscv.org, Samuel Ortiz, Dhaval Sharma

Hi Dhaval, Samuel

 

Not sure whether you are both in this fw-ex...@riscv.org mailing list.

 

But need your help check with https://wiki.riseproject.dev/display/HOME/EDK2_00_02_05+Evaluate+with+Salus and provide feedback from CoVE/CoVE-IO spec and implementation perspective. Thanks !

 

 

Thanks,

Yong Li

--
You received this message because you are subscribed to the Google Groups "RISC-V Firmware Exchange" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fw-exchange...@riscv.org.
To view this discussion on the web visit https://groups.google.com/a/riscv.org/d/msgid/fw-exchange/PH7PR10MB6335440EE8543AF205683F0BA701A%40PH7PR10MB6335.namprd10.prod.outlook.com.

Li, Yong

unread,
Jul 30, 2023, 9:59:11 PM7/30/23
to Tuan Phan, fw-ex...@riscv.org, Anup Patel, Xu, Haibo1

Hi, Anup and all

 

Another thing, as to the SBI lib for MM communication interface,  currently it is not unified for Penglai and Salus. 

For Penglai,  we added “SBI_EXT_SMC” as an extension of existing SBI lib:  https://github.com/tianocore/edk2-staging/commit/0cb82693ab10b7ee46c131f21141dc2544940d15

For Salus implementation, it is based on CoVE TEE https://github.com/tianocore/edk2-staging/commit/85d65625b117ef322813b4d01c187458be7f44b6#diff-80329683b270dafd828dbc1853d2ee7a114d35cb98a6dad1599fa8c6a66a74f7

Tuan had some offline comments to me for this, still I’d somehow get input for this part of definition from you and team, will we have an unified SBI call/library for both , or for different environment use separated libraries ? Definitely need get alignment to this. Thanks

 

Thanks,

Yong Li

 

From: Tuan Phan <tp...@ventanamicro.com>
Sent: Thursday, July 27, 2023 3:33 PM
To: fw-ex...@riscv.org
Subject: StandaloneMm updates and need feedback

 

Hi All,

--

Dhaval Sharma

unread,
Jul 31, 2023, 1:37:48 PM7/31/23
to Li, Yong, Tuan Phan, fw-ex...@riscv.org, Samuel Ortiz
Hi Yong,
I am on fw-exchange and keeping an eye. But Samuel is an expert on this topic and I think he is away for this week. As soon as he is back and available we will get back to you and have a discussion on next steps.
--
Thanks!
=D

Li, Yong

unread,
Aug 14, 2023, 8:55:17 PM8/14/23
to Dhaval Sharma, Tuan Phan, fw-ex...@riscv.org, Samuel Ortiz

Hi Dhaval, Samuel,

 

Not sure whether you have time to have a review to our baseline code, your input and contribution to both code and spec are really needed 😊 , Thanks

 

Thanks,

Yong Li

Dhaval Sharma

unread,
Aug 16, 2023, 6:58:08 AM8/16/23
to Li, Yong, Tuan Phan, fw-ex...@riscv.org, Samuel Ortiz
Hi Yong,
I did have an internal sync with Samuel on this topic last week.
  • I have provided some comments for the review patches. Based on your feedback we can discuss more.
  • You have already successfully loaded StandaloneMM on top of Salus and are able to update secure variables.
  • There is probably some improvement required in terms of mapping of flash MMIO region in a secure manner based on the new SBI extn proposed.
  • It would be nice to have some sort of contemplation on RAS flows (hypothetical flows as to how we could do it and if there are any major issues).
Is there any specific input you are looking for from us other than a review? Samuel will confirm but I think he is planning to provide further feedback on the same upon his return.
=D
--
Thanks!
=D

Li, Yong

unread,
Aug 16, 2023, 11:01:41 PM8/16/23
to Dhaval Sharma, Tuan Phan, fw-ex...@riscv.org, Samuel Ortiz, Xu, Haibo1

Hi Dhaval,

 

Thanks so much for the feedback, will reply your comments !

 

>There is probably some improvement required in terms of mapping of flash MMIO region in a secure manner based on the new SBI extn proposed.

Yes, The spec change probably is the key requirement as of now, Tuan may have more inputs for this.

 

>It would be nice to have some sort of contemplation on RAS flows (hypothetical flows as to how we could do it and if there are any major issues)

Yes, RAS is another feature of StandaloneMm, but haven’t yet start to consider it as of now,.. suggest we can do some plan together later

 

Probably I can set a quick meeting to let Tuan, you, have a discussion all together for the next step once Samuel is back. Thanks !

 

Thanks,

Yong Li

Reply all
Reply to author
Forward
0 new messages