Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require OS to start in HS-mode #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Require OS to start in HS-mode #27

wants to merge 2 commits into from

Conversation

jones-drew
Copy link
Collaborator

@jones-drew jones-drew commented Jan 20, 2025

resolves issue #11

BRS combines operating system and hypervisor in its definition for
'OS' which makes it a more convenient term to use in requirements.

Signed-off-by: Andrew Jones <[email protected]>
The H extension is required by RVA23 which is required by the server
platform. Ensure that when the OS/hypervisor is started that it's
available.

Resolves: #11
Signed-off-by: Andrew Jones <[email protected]>
@andreiw
Copy link
Collaborator

andreiw commented Jan 23, 2025

Totally makes sense.

@andreiw
Copy link
Collaborator

andreiw commented Jan 23, 2025

Thinking more about this, "starting the OS" is a bit too vague in UEFI land.

Do you mean the OS loader (an UEFI application) must start in HS mode? Or did you mean at actual hand-off from UEFI (e.g. at ExitBootServices time) that the execution continues in HS mode?

Consider if we didn't have a #30 rule, and an Sv57 system actually placed RAM at bit 56. Then BRS UEFI_030 rule could never be met, right? But if the UEFI implementation partially ran in HS mode it could get away with using the G-stage tables to provide a 1:1 mapping and allow protecting regions - riscv-non-isa/riscv-brs#221.

I'm not saying we should or should not allow such a situation, but the vague wording here could enable technically starting the OS in HS mode, yet the OS boot loader runs in VS mode. So let's use concise language.

(I would, for the sake of simplicity, require the actual UEFI implementation to run in HS mode, hand off to OS loader in HS mode, and leave the hart in HS mode after ExitBootServices)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants