Skip to content

Instantly share code, notes, and snippets.

@asahilina
Last active November 16, 2022 07:01
Show Gist options
  • Save asahilina/4a4e7e7304c593a26d8a873ba69a7771 to your computer and use it in GitHub Desktop.
Save asahilina/4a4e7e7304c593a26d8a873ba69a7771 to your computer and use it in GitHub Desktop.
AGX buffers

Legend:

  • (K)ernel or (U)ser
  • (S)hared or (P)rivate
  • (F)irmware or (G)PU or (X)Both

TVB Buffer heap:

Directly related to the buffer heap

  • (KSF): Buffer info struct (maybe should be KPF?)
  • (KSF): Block control pointers
  • (KSF): Use counter
  • (UPX): Page list (check if private is really OK? Grows?)
  • (UPX): Block list (check if private is really OK? Grows?)
  • (USG): Heap blocks (maybe should be UPG? does it matter?)

Associated with a buffer heap instance

  • (KSF): Buffer statistics
  • (KPF): Unknown kernel_buffer (0x40)
  • (UPX): Tail Pointer Cache (variable * clusters, currently grows for scene size requirements if needed, never shrinks)

Associated with a submission / scene

  • (KPF): Scene info struct
  • (USG): Unknown user_buffer (0x80, maybe Macrotile Array?)
  • (USG): Heap metadata (0x200)
  • (USG): Tilemap (variable, currently allocated/freed per submission)
  • (USG): Preemption buffers (size depends on GPU gen/cluster count, currently bundled as one consecutive allocation)
  • (USG): That weird buffer with u64 0,2,3,4,5... (0x800 * 8)
  • (USG): Clustering buffers (t600x only):
    • Meta1 (4 * clusters)
    • Meta2 (0x190 * clusters)
    • Meta3 (0x280 * clusters)
    • Meta4 (0x30 * clusters)
    • Cluster tilemap array (variable * clusters)
    • Currently the meta buffers are bundled as one consecutive allocation, cluster tilemap array is a separate one

Unsorted submission-associated

  • (USG): The thing we call aux_fb, which is probably nonsense and actually a tiler thing (0x8000)

Not listed: the actual work command buffers, microsequences, and event notifier related structures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment