bvnc_seq.h — Per-BVNC hardware sequences

Per-BVNC hardware sequences.

The steps whose order or structure differs between GPU cores. Each BVNC implements every function in src/bvnc/<bvnc>/seq.c, from its own docsClean specification only; the shared code calls them. A BVNC that lacks one does not link, so no GPU inherits another’s sequence.

Differences that are a plain hardware feature of the device information (BVNC_FEAT_*) stay as #ifdef in the shared code; data that only changes values stays in bvnc.h.

bool bvnc_units_init(struct sysinit *si)

Initialise the GPU units after the dusts are powered (boot-gpu-init.md).

Parameters:
  • si – The host’s sysinit.

Returns:

true when every handshake completed.

bool bvnc_hwr_reset(void)

The reset part of a hardware recovery: quiesce the bus, soft-reset the GPU units (keeping the MIPS core and its wrapper alive), re-initialise them, and flush the SLC.

Returns:

false when the GPU could not be reset; the caller then asks the host for a full GPU restart.

void bvnc_reg_cfg_apply(void)

Apply the host’s register-override list (sysinit.reg_cfg_fw_addr) after the unit initialisation, when the GPU’s specification has one.

bool bvnc_mmu_cache_inval(uint32_t bif_bits, bool pm_tlb)

The cache operations of a KCCB MMUCACHE command.

Parameters:
  • bif_bits – CR_BIF_CTRL_INVAL bits to invalidate (PT, PD, PC, TLB).

  • pm_tlb – Also invalidate the PM TLB.

Returns:

false when a poll timed out.

bool bvnc_kick_admit(uint32_t dm, const struct fwcommoncontext *ctx, uint32_t cmd_id, const void *payload)

Kick admission test: may this task start now, beside the tasks the other data masters run?

Parameters:
  • dm – The data master the task needs (its own is idle).

  • ctx – The task’s context.

  • cmd_id – The command type (CCB_CMD_*, without the task bit).

  • payload – The command.

Returns:

false to keep the task queued for now.

void bvnc_gp_events(uint32_t ev)

Handle the DM0 (general-purpose) events other than the MMU page fault.

Parameters:
  • ev – The CR_EVENT_STATUS bits that were set.

void bvnc_pow_off(void)

The hardware steps of a POW_OFF request, before the state is published.

void bvnc_dm_cache_flush(uint32_t dm)

Per-job cache flush on completion, before the command is retired.

Parameters:
  • dm – The data master that finished.

void bvnc_tq_launch(uint32_t isp_render)

Start a TQ_3D transfer: the last register writes of the kick.

Parameters:
  • isp_render – The ISP_RENDER value of the command.

void bvnc_cdm_multicore_ctrl(const struct cmd_compute *cmd)

Set the multicore compute control of a compute kick.

Parameters:
  • cmd – The compute command.

void bvnc_frag_end_sync(uint32_t ev)

Synchronise with the end of a render before it finishes (after PIXELBE_END_RENDER, before the render-target-array step and the flush).

Parameters:
  • ev – The CR_EVENT_STATUS bits the interrupt task saw (and cleared).

void bvnc_geom_first_kick_pm(void)

PM steps of the first geometry kick of an HWRTData.

void bvnc_bif_cat_base(uint32_t slot, uint64_t pc)

Write a BIF page-catalogue bank (BIF_CAT_BASEn) on every core that uses it.

Parameters:
  • slot – The bank, 1..7.

  • pc – The page catalogue’s physical address.

void bvnc_bif_cat_index(uint32_t dm, uint32_t shift, uint32_t slot)

Read-modify-write a field of BIF_CAT_BASE_INDEX (low word) on the cores the data master runs on.

Parameters:
  • dm – The data master.

  • shift – The field’s first bit (3-bit field).

  • slot – The bank, 1..7.