-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A recent GRUB binary implicitly uses advanced SIMD registers. We don't want to trap use of these registers, we have to ensure that CPACR_EL.FPEN is set to 0b11. Signed-off-by: Akira Moroo <retrage01@gmail.com>
- Loading branch information
Showing
3 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
pub mod asm; | ||
pub mod layout; | ||
pub mod paging; | ||
pub mod simd; | ||
mod translation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (C) 2023 Akira Moroo | ||
|
||
use aarch64_cpu::registers::*; | ||
use tock_registers::interfaces::ReadWriteable; | ||
|
||
pub fn setup_simd() { | ||
CPACR_EL1.modify(CPACR_EL1::FPEN::TrapNothing); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters