Re: [PATCH 08/27] gpu: nova-core: add LIBOS3 log buffers and state monitor buffer

From: Timur Tabi

Date: Wed Aug 19 2026 - 14:16:58 EST


On Tue, 2026-08-18 at 20:52 -0700, John Hubbard wrote:
> +/// Matches the registry defaults for the init, interrupt, RM, and MNOC tasks
> +/// (`NV_REG_STR_RM_GSP_LOG_BUFFER_SIZE_TASK_*_DEFAULT`).
> +type TaskLogBuffer = LogBuffer<LOG_BUFFER_SIZE, RM_LOG_BUFFER_NUM_PAGES>;
> +
> +/// Log buffer for a task that GSP-RM gives a single page.
> +///
> +/// Matches the size GSP-RM hardcodes for the root and RM state monitor tasks.
> +type SmallLogBuffer = LogBuffer<GSP_PAGE_SIZE, 1>;
>  
> -impl LogBuffer {
> +impl<const SIZE: usize, const NUM_PAGES: usize> LogBuffer<SIZE, NUM_PAGES> {
>      /// Creates a new `LogBuffer` mapped on `dev`.
>      fn new(dev: &device::Device<device::Bound>) -> Result<Self> {
> +        build_assert!(SIZE == NUM_PAGES * GSP_PAGE_SIZE);

Why do we need to specify both NUM_PAGES and SIZE? We can always derive one from the other.