Re: [PATCH 05/17] nova-core: gsp: Add support for checking if GSP reloaded

From: Timur Tabi
Date: Fri Aug 29 2025 - 14:45:12 EST


On Fri, 2025-08-29 at 13:32 -0400, Joel Fernandes wrote:
> +    /// Function to check if GSP reload/resume has completed during the boot process.
> +    #[expect(dead_code)]
> +    pub(crate) fn check_reload_completed(&self, bar: &Bar0, timeout: Delta) -> Result<bool> {

I think this should be renamed to is_reload_completed() and return just bool instead of Result<bool>

> +        wait_on(timeout, || {
> +            let val = regs::NV_PGC6_BSI_SECURE_SCRATCH_14::read(bar);
> +            if val.boot_stage_3_handoff() {
> +                Some(true)
> +            } else {
> +                None
> +            }
> +        })

And if you insist on returning Result<bool>, at least have this return Some(false) or
Some(val.boot_stage_3_handoff()) instead.