> There could be a function in the `fb` module that reads the registers
> and returns an `Option<Range<u64>>` - `None` if `is_wpr2_set` is
> `false`, or the WPR2 range otherwise. Then the GSP TU102 HAL would just
> use this function instead of poking the register as it currently does.
>
> Doing so would move the WPR2 registers to the right place, and provide the
> right abstraction for the WPR2 region.
>
> A patch series doing this could look like this:
>
> - Add the `fb` module function abstracting the WPR2 region registers and
> use it in the GSP's TU102 HAL.
> - Move the `NV_PFB_PRI_MMU_WPR2_ADDR*` registers under the `fb` module.
> - Move the `NV_PBUS_SW_SCRATCH_0E_FRTS_ERR` register under the `gsp`
> module, since it is clearly themed after `FRTS`, which is part of the
> GSP boot. But, without moving `NV_PBUS_SW_SCRATCH` (the actual
> register being aliased). I expect you will hit a bug of the `register`
> macro when doing this one - I'll try to address it, but the first two
> steps should be safe to do and correct.
Thanks for the plan Alexandre, worked like a charm.