Skip to content

Add support for FPU flags for PDs#316

Merged
nspin merged 1 commit intoseL4:mainfrom
JDuchniewicz:fpu_flag
Mar 31, 2026
Merged

Add support for FPU flags for PDs#316
nspin merged 1 commit intoseL4:mainfrom
JDuchniewicz:fpu_flag

Conversation

@JDuchniewicz
Copy link
Copy Markdown
Contributor

@JDuchniewicz JDuchniewicz commented Dec 11, 2025

Allows for PDs to specify the fpu flag to explicitly disable the FPU usage in them. By default it's set to true.

@lsf37
Copy link
Copy Markdown
Member

lsf37 commented Dec 11, 2025

The default should be True. The RFC has it on True by default for the kernel for good reasons -- the FPU was enabled by default before and you will get hangs/crashes if you do not force the compiler to avoid FPU/SIMD instructions.

@JDuchniewicz
Copy link
Copy Markdown
Contributor Author

Apologies, right - the FPU will be enabled by default and only disabled if one explicitly specifies fpu=false in the SDF.

@nspin
Copy link
Copy Markdown
Member

nspin commented Mar 28, 2026

I've fixed up the TcbFlagsBuilder idea in this branch, feel free to squash the commit at the tip of this branch into your commit that adds this struct:

https://github.com/nspin/rust-sel4/tree/nspin/suggestion/fpu_flag

After rebasing and incorporating this suggestion, this PR should be ready to merge.

Comment on lines +60 to +62
pub fn build(self) -> Self {
self
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be:

    pub fn build(self) -> Word {
        self.0
    }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected, right.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just can't test it locally - make run-tests fails with linking errors for the toolchain

@JDuchniewicz JDuchniewicz force-pushed the fpu_flag branch 5 times, most recently from c35fbf5 to 1199223 Compare March 31, 2026 05:22
continue
vaddr = max(vaddr, seg['p_vaddr'] + seg['p_memsz'])
return vaddr
return vaddrender_elf.rsr
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this line was mistakenly changed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, bashing my keyboard too quickly 😅

Signed-off-by: Jakub Duchniewicz <j.duchniewicz@unsw.edu.au>
@nspin nspin merged commit 2e06ec1 into seL4:main Mar 31, 2026
12 checks passed
@lsf37 lsf37 moved this from In Progress to Done in seL4 March'26 release (31 March) Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

6 participants