From 9e5c57b7de02be4de3da43d39ce1cb42bcbd1910 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 4 Dec 2025 15:30:43 +0800 Subject: [PATCH] inline the pll check this prevents it from being a single area that has to be patched to bypass the pll check --- libs/bao1x-hal/src/hardening.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/bao1x-hal/src/hardening.rs b/libs/bao1x-hal/src/hardening.rs index 32825c2dc..d8f700501 100644 --- a/libs/bao1x-hal/src/hardening.rs +++ b/libs/bao1x-hal/src/hardening.rs @@ -17,6 +17,7 @@ const DELAY_MARGIN_BITS: u64 = 8; /// off the PLL it is (a) harder to glitch the clock, because skipping a beat on the external /// crystal doesn't *stop* the PLL and (b) harder to glitch the code because the CPU is running /// much faster and the timing of the glitch has to be more precise. +#[inline(always)] pub fn check_pll() { let cgu = CSR::new(utra::sysctrl::HW_SYSCTRL_BASE as *mut u32); if cgu.r(utra::sysctrl::SFR_CGUSEL0) & 1 == 0 {