<commit_before><?xml version="1.0" encoding="UTF-8"?>
<database xmlns="http://nouveau.freedesktop.org/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<import file="copyright.xml"/>

<import file="nvchipsets.xml" />
<import file="nv98_fuc.xml" />
<import file="nv50_pgraph.xml" />

<domain name="NV_MMIO" bare="yes" prefix="chipset">

<array name="PGRAPH" offset="0x400000" stride="0x200000" length="1" variants="NVC0-">

	<reg32 offset="0x0100" name="INTR"> <!-- HOST/DAEMON only -->
		<brief>Interrupt status</brief>
		<doc>Shows currently pending interrupts. Write 1 to a bit to reset it, and ACK the interrupt.</doc>
		<bitfield name="NOTIFY" pos="0">
			<doc>You asked for a NOTIFY with interrupt and got it.</doc>
		</bitfield>
		<bitfield name="QUERY" pos="1">
			<doc>You asked for a QUERY with interrupt and got it.</doc>
		</bitfield>
		<bitfield name="SYNC" pos="2" />
		<bitfield name="ILLEGAL_MTHD" pos="4">
			<doc>You tried to use a method that doesn't exist on this class.</doc>
		</bitfield>
		<bitfield name="ILLEGAL_CLASS" pos="5">
			<doc>You tried to use a class not supported by this GPU.</doc>
		</bitfield>
		<bitfield name="DOUBLE_NOTIFY" pos="6">
			<doc>You tried to use NOTIFY command on another NOTIFY command.</doc>
		</bitfield>
		<bitfield name="UNK7" pos="7" />
		<bitfield name="FIRMWARE_MTHD" pos="8">
			<doc>You ran one of the FIRMWARE methods.</doc>
		</bitfield>
		<bitfield name="BUFFER_NOTIFY" pos="16">
			<doc>You asked for m2mf transfer with interrupt after finish and got it.</doc>
		</bitfield>
		<bitfield name="CTXCTL_UP" pos="19">
			<doc>Triggered by poking CTXCTL INTR_UP_SET.</doc>
		</bitfield>
		<bitfield name="DATA_ERROR" pos="20">
			<doc>You used an invalid parameter for this method. Or maybe you tried
			to launch some operation, but the relevant state is inconsistent.
			Relevant state is in DATA_ERROR</doc>
		</bitfield>
		<bitfield name="TRAP" pos="21">
			<doc>A PGRAPH command failed in the middle of execution. TRAP register will
			tell you which subunit reports the trap.</doc>
		</bitfield>
		<bitfield name="SINGLE_STEP" pos="24" />
	</reg32>
	<reg32 offset="0x0108" name="TRAP">
		<brief>Trap status</brief>
		<doc>Like INTR, but applies to TRAP sub-types. Shows which subunits report trap.
		Each subunit has its own TRAP status register, which you have to check in turn
		to know the exact TRAP sub-subtype, and reset it. Write 1 to a bit to reset it
		and ACK the trap.</doc>
		<bitfield name="DISPATCH" pos="0">
			<brief>Check 404000</brief>
		</bitfield>
		<bitfield name="M2MF" pos="1">
			<brief>Check 404600</brief>
		</bitfield>
		<bitfield name="UNK2" pos="2"/>
		<bitfield name="CCACHE" pos="3">
			<brief>Check 408030</brief>
		</bitfield>
		<bitfield name="UNK4" pos="4">
			<brief>Check 405840. Shader-related.</brief>
		</bitfield>
		<bitfield name="UNK5" pos="5"/>
		<bitfield name="UNK6" pos="6">
			<brief>Check 40601c</brief>
		</bitfield>
		<bitfield name="MACRO" pos="7">
			<brief>Check 404490</brief>
		</bitfield>
		<bitfield name="GPC" pos="24"/>
		<bitfield name="ROP" pos="25"/>
	</reg32>
	<reg32 offset="0x0110" name="DATA_ERROR" type="NV50_PGRAPH_DATA_ERROR">
		<doc>Stores type of the pending DATA_ERROR.</doc>
	</reg32>
	<reg32 offset="0x0118" name="TRAP_GPCS"/>
	<reg32 offset="0x011c" name="TRAP_ROPS"/>
	<reg32 offset="0x0120" name="INTR_NMHOST">
		<!-- a bitfield in the QUERY command selects whether to trigger an interrupt here or in the usual reg -->
		<bitfield name="QUERY" pos="1"/>
	</reg32>
	<reg32 offset="0x0124" name="INTR_EN_NMHOST">
		<bitfield name="QUERY" pos="1"/>
	</reg32>
	<reg32 offset="0x0130" name="TRAP_GPCS_EN"/>
	<reg32 offset="0x0134" name="TRAP_ROPS_EN"/>
	<reg32 offset="0x0138" name="TRAP_EN">
		<brief>Trap enable</brief>
		<doc>A bitmask of events that will cause traps, same bit assignments as in TRAP reg.</doc>
		<bitfield name="DISPATCH" pos="0" />
		<bitfield name="M2MF" pos="1" />
		<bitfield name="UNK2" pos="2"/>
		<bitfield name="CCACHE" pos="3"/>
		<bitfield name="UNK4" pos="4"/>
		<bitfield name="UNK5" pos="5"/>
		<bitfield name="UNK6" pos="6"/>
		<bitfield name="MACRO" pos="7"/>
		<bitfield name="GPC" pos="24"/>
		<bitfield name="ROP" pos="25"/>
	</reg32>
	<reg32 offset="0x013c" name="INTR_EN">
		<brief>Interrupt enable</brief>
		<doc>A bitmask of events that will cause interrupts, same bit assignments as in INTR reg.</doc>
		<bitfield name="NOTIFY" pos="0" />
		<bitfield name="QUERY" pos="1" />
		<bitfield name="SYNC" pos="2" />
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="ILLEGAL_CLASS" pos="5" />
		<bitfield name="DOUBLE_NOTIFY" pos="6" />
		<bitfield name="UNK7" pos="7" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
		<bitfield name="BUFFER_NOTIFY" pos="16" />
		<bitfield name="CTXCTL_UP" pos="19" />
		<bitfield name="DATA_ERROR" pos="20" />
		<bitfield name="TRAP" pos="21" />
		<bitfield name="SINGLE_STEP" pos="24" />
	</reg32>
	<reg32 offset="0x0140" name="INTR_DISPATCH_CTXCTL_DOWN">
		<doc>If a bit is set to 1, a given interrupt will use _CTXCTL_DOWN versions
		of interrupt registers and will be routed to main CTXCTL interrupt source
		11 [HUB_CTXCTL_DOWN] instead of host PGRAPH interrupt.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>
	<reg32 offset="0x0144" name="INTR_CTXCTL_DOWN">
		<doc>Like INTR, but for CTXCTL interrupts.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>
	<reg32 offset="0x0148" name="INTR_EN_CTXCTL_DOWN">
		<doc>Like INTR_EN, but for CTXCTL interrupts.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>

	<reg32 offset="0x0200" name="ICMD_CMD" />
	<reg32 offset="0x0204" name="ICMD_DATA" />

	<stripe offset="0x0500" name="FIFO">
		<reg32 offset="0x00" name="CONTROL">
			<bitfield pos="0" name="PULL">
				<doc>Enables executing commands incoming through DISPATCH_CMD.</doc>
			</bitfield>
			<bitfield pos="8" name="UNK8"/>
			<bitfield pos="16" name="UNK16"/> <!-- usually set, but doesn't seem needed for operation... -->
			<bitfield high="28" low="20" name="LIMIT" variants="NV84-">
				<doc>Max number of slots allowed to be occupied in FIFO. 0 and > 0x100 are treated as 0x100.</doc>
			</bitfield>
		</reg32>
		<reg32 offset="0x04" name="STATUS" access="r">
			<bitfield pos="0" name="EMPTY" />
			<bitfield pos="1" name="FULL" />
			<bitfield high="15" low="4" name="OCCUPIED">
				<doc>How many slots contain valid data atm.</doc>
			</bitfield>
			<bitfield high="23" low="16" name="GET"/>
			<bitfield high="31" low="24" name="PUT"/>
		</reg32>
	</stripe>

	<reg32 offset="0x0700" name="STATUS" access="r">
		<bitfield name="ALL" pos="0"/>

		<bitfield name="M2MF" pos="6"/>
		<bitfield name="CTXCTL" pos="7"/>

		<bitfield name="GPC" pos="24"/>
		<bitfield name="ROP" pos="25"/>
	</reg32>

	<reg32 offset="0x0704" name="TRAPPED_ADDR">
		<doc>Offending subchan + method, for [most types of] PGRAPH interrupts.</doc>
		<bitfield name="MTHD" high="13" low="2" shr="2" />
		<bitfield name="SUBCH" high="18" low="16" />
	</reg32>
	<reg32 offset="0x0708" name="TRAPPED_DATA_LOW">
		<doc>Offending method data, for [most types of] PGRAPH interrupts.</doc>
	</reg32>
	<reg32 offset="0x070c" name="TRAPPED_DATA_HIGH" /> <!-- I have no idea what this is for. But it's been around since NV10. -->

	<array offset="0x4000" name="DISPATCH" stride="0x400" length="1">
		<reg32 offset="0x00" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x04" name="CMD_ADDR">
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="SUBCH" high="18" low="16" />
			<bitfield name="NONINCR" pos="20" />
			<bitfield name="UNK1" pos="21" /> <!-- sometimes set by DISPATCH itself during exec... related to NOTIFY? -->
			<bitfield name="SINGLE_STEP_DONE" pos="22" />
			<bitfield name="DOUBLE" pos="25" />
			<bitfield name="CURRENT_SUBCH" pos="29" />
			<bitfield name="VALID" pos="31" />
		</reg32>
		<reg32 offset="0x08" name="CMD_DATA_LOW" />
		<reg32 offset="0x0c" name="CMD_DATA_HIGH" />
		<reg32 offset="0x10" name="CTX_SWITCH" />
		<reg32 offset="0x24" name="SUBCH">
			<bitfield name="SUBCH" high="15" low="13" />
		</reg32>
		<reg32 offset="0x28" name="MISC">
			<bitfield name="NOTIFY_PENDING" pos="8" />
			<bitfield name="NOTIFY_AWAKEN" pos="16" />
		</reg32>
		<reg32 offset="0x2c" name="ST2_ADDR">
			<doc>Second stage of dispatch... if QUERY blows up on you,
			it can get stuck here. At least sometimes.</doc>
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="ILLEGAL_CLASS" pos="29" />
			<bitfield name="ILLEGAL_MTHD" pos="30" />
			<bitfield name="VALID" pos="31" />
		</reg32>

		<reg32 offset="0x3c" name="ST2_DATA_LOW" />
		<reg32 offset="0x40" name="ST2_DATA_HIGH" />

		<reg32 offset="0x48" name="ST3_ADDR">
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="VALID" pos="31" />
		</reg32>
		<reg32 offset="0x50" name="ST3_DATA_LOW" />
		<reg32 offset="0x54" name="ST3_DATA_HIGH" />

		<reg32 offset="0xc0" name="COND_ADDRESS_HIGH" />
		<reg32 offset="0xc4" name="COND_ADDRESS_LOW" />

		<reg32 offset="0xd0" name="NOTIFY_3D_ADDRESS_HIGH" /> <!-- also compute -->
		<reg32 offset="0xd4" name="NOTIFY_3D_ADDRESS_LOW" />
		<reg32 offset="0xd8" name="NOTIFY_2D_ADDRESS_HIGH" />
		<reg32 offset="0xdc" name="NOTIFY_2D_ADDRESS_LOW" />
		<reg32 offset="0xe0" name="NOTIFY_M2MF_ADDRESS_HIGH" />
		<reg32 offset="0xe4" name="NOTIFY_M2MF_ADDRESS_LOW" />

		<reg32 offset="0x200" name="CTX_CACHE" length="8" />
	</array>
	<array offset="0x4400" name="MACRO" stride="0x100" length="1">
		<reg32 offset="0" name="REG" length="8"/>
		<reg32 offset="0x88" name="MCACHE_CTRL">
			<bitfield low="0" high="15" name="CLASS"/>
			<bitfield low="16" high="27" name="MTHD" shr="2"/>
			<bitfield pos="30" name="READ_TRIGGER"/>
			<bitfield pos="31" name="WRITE_TRIGGER"/>
		</reg32>
		<reg32 offset="0x8c" name="MCACHE_DATA"/>
		<reg32 offset="0x90" name="TRAP">
			<bitfield name="TOO_FEW_PARAMS" pos="0" />
			<bitfield name="TOO_MANY_PARAMS" pos="1" />
			<bitfield name="ILLEGAL_OPCODE" pos="2" />
			<bitfield name="DOUBLE_BRANCH" pos="3" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>
	<array offset="0x4600" name="M2MF" stride="0x200" length="1">
		<reg32 offset="0x00" name="TRAP">
			<bitfield name="PUSH_TOO_MUCH_DATA" pos="0" />
			<bitfield name="PUSH_NOT_ENOUGH_DATA" pos="1" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>
	<array offset="0x4800" name="DDATA" stride="0x800" length="1">
	</array>
	<array offset="0x5800" name="UNK5800" stride="0x800" length="1">
		<reg32 offset="0x40" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x44" name="TRAP_UNK44"/>
		<reg32 offset="0x70" name="GPC_TPCNT" length="4">
			<bitfield low="0" high="3" name="0"/>
			<bitfield low="4" high="7" name="1"/>
			<bitfield low="8" high="11" name="2"/>
			<bitfield low="12" high="15" name="3"/>
			<bitfield low="16" high="19" name="4"/>
			<bitfield low="20" high="23" name="5"/>
			<bitfield low="24" high="27" name="6"/>
			<bitfield low="28" high="31" name="7"/>
		</reg32>
	</array>
	<array offset="0x6000" name="UNK6000" stride="0x800" length="1">
		<reg32 offset="0x18" name="TRAP_UNK0">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x1c" name="TRAP_UNK1">
			<bitfield name="TEMP_TOO_SMALL" pos="0" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x28" name="GPC_TPCNT" length="4">
			<bitfield low="0" high="3" name="0"/>
			<bitfield low="4" high="7" name="1"/>
			<bitfield low="8" high="11" name="2"/>
			<bitfield low="12" high="15" name="3"/>
			<bitfield low="16" high="19" name="4"/>
			<bitfield low="20" high="23" name="5"/>
			<bitfield low="24" high="27" name="6"/>
			<bitfield low="28" high="31" name="7"/>
		</reg32>
		<reg32 offset="0xa8" name="TP_GPCID" length="0x40">
			<bitfield low="0" high="4" name="0"/>
			<bitfield low="8" high="12" name="1"/>
			<bitfield low="16" high="20" name="2"/>
			<bitfield low="24" high="28" name="3"/>
		</reg32>
		<reg32 offset="0x4b0" name="TEMP_SIZE_PER_MP" shr="8"/>
	</array>
	<stripe offset="0x6800" stride="0x400" length="2">
		<stripe offset="0" name="TPGRAD" stride="0x20" length="0x20">
			<reg32 offset="0" name="MASK" length="8"/>
		</stripe>
	</stripe>
	<array offset="0x7800" name="TPBUS" stride="0x800" length="1">
		<reg32 offset="0x0c" name="TP_GPCID" length="44">
			<bitfield low="0" high="4" name="0"/>
			<bitfield low="5" high="9" name="1"/>
			<bitfield low="10" high="14" name="2"/>
			<bitfield low="15" high="19" name="3"/>
			<bitfield low="20" high="24" name="4"/>
			<bitfield low="25" high="29" name="5"/>
		</reg32>
		<reg32 offset="0xbc" name="TOTAL">
			<bitfield low="0" high="7" name="ROP_COUNT"/>
			<bitfield low="8" high="15" name="GPC_COUNT"/>
		</reg32>
	</array>
	<array offset="0x8000" name="CCACHE" stride="0x800" length="1">
		<reg32 offset="0x04" name="HUB2GPC_ADDR" shr="8"/>
		<reg32 offset="0x08" name="HUB2GPC_CONF">
			<bitfield low="0" high="7" name="UNK0"/>
			<bitfield low="8" high="10" name="UNK8"/>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
		<reg32 offset="0x0c" name="HUB2ESETUP_ADDR" shr="8"/>
		<reg32 offset="0x10" name="HUB2ESETUP_CONF">
			<bitfield low="0" high="10" name="UNK0"/>
			<bitfield low="11" high="15" name="UNK11"/>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
		<reg32 offset="0x30" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>

	<group name="nvc0_ctxctl">
		<use-group name="nv98_fucbase"/>
		<reg32 offset="0x400" name="DONE">
			<doc>Reg saying when misc things are done.</doc>
			<bitfield pos="2" name="STRAND"/>
			<bitfield pos="5" name="MMCTX"/>
			<bitfield pos="6" name="MMIO_RD"/>
			<bitfield pos="7" name="MMIO_WRS"/>
			<bitfield pos="8" name="BAR">
				<doc>When BAR has all bits from BAR_REQMASK[0]&amp;BAR_REQMASK[1] set.</doc>
			</bitfield>
			<bitfield pos="11" name="CC_WATCHDOG"/>
			<bitfield pos="12" name="UNK12">
				<doc>Related to fuc+0xaxx and 404160.</doc>
			</bitfield>
			<bitfield pos="13" name="UNK13"/>
		</reg32>
		<enum name="nvc0_ctxctl_isrc" inline="yes">
			<value value="0x02" name="GPC_UNK2"/>
			<value value="0x03" name="HUB_CHANNEL_SWITCH"/>
			<value value="0x04" name="HUB_UNK4"/>
			<value value="0x0b" name="HUB_CTXCTL_DOWN"/>
			<value value="0x0c" name="HUB_UNK12"/>
			<value value="0x20" name="ZERO"/>
			<!-- 0x20 + X is DONE bit X -->
			<value value="0x22" name="STRAND"/>
			<value value="0x25" name="MMCTX"/>
			<value value="0x26" name="MMIO_RD"/>
			<value value="0x27" name="MMIO_WRS"/>
			<value value="0x28" name="BAR"/>
			<value value="0x2b" name="CC_WATCHDOG"/>
			<value value="0x2c" name="UNK12"/>
			<value value="0x2d" name="UNK13"/>
		</enum>
		<bitset name="nvc0_ctxctl_iroute" inline="yes">
			<bitfield low="0" high="5" name="SRC0" type="nvc0_ctxctl_isrc"/>
			<bitfield low="8" high="13" name="SRC1" type="nvc0_ctxctl_isrc"/>
			<bitfield pos="16" name="FUN">
				<value value="0" name="OR"/>
				<value value="1" name="AND"/>
			</bitfield>
			<bitfield pos="17" name="NOT"/>
			<bitfield pos="18" name="LEVEL"/>
		</bitset>
		<reg32 offset="0x404" name="INTR_ROUTE" type="nvc0_ctxctl_iroute">
			<doc>Indexed fuc register, in 8 copies. Index i determines the source
			of fuc interrupt i+8.</doc>
		</reg32>
		<reg32 offset="0x40c" name="BAR_REQMASK" length="2"/>
		<reg32 offset="0x414" name="BAR"/>
		<reg32 offset="0x418" name="BAR_SET"/>
		<reg32 offset="0x430" name="CC_WATCHDOG">
			<bitfield low="0" high="29" name="TIME_REMAINING"/>
			<bitfield pos="31" name="ENABLE"/>
		</reg32>

		<reg32 offset="0x500" name="WRCMD_DATA"/>
		<reg32 offset="0x504" name="WRCMD_CMD"/>

		<reg32 offset="0x620" name="NEW_CAPS">
			<bitfield low="0" high="7" name="CODE_SIZE" shr="8"/>
			<bitfield low="8" high="15" name="DATA_SIZE" shr="8"/>
		</reg32>

		<reg32 offset="0x700" name="MMCTX_SAVE_SWBASE" shr="8"/>
		<reg32 offset="0x704" name="MMCTX_LOAD_SWBASE" shr="8"/>
		<reg32 offset="0x710" name="MMCTX_BASE"/>
		<reg32 offset="0x714" name="MMCTX_CTRL">
			<bitfield low="0" high="4" name="QFREE"/>
			<bitfield low="8" high="12" name="QLIMIT"/>
			<bitfield pos="16" name="DIR">
				<value value="0" name="SAVE"/>
				<value value="1" name="LOAD"/>
			</bitfield>
			<!-- what do these two do, exactly? -->
			<bitfield pos="17" name="START_TRIGGER"/>
			<bitfield pos="18" name="STOP_TRIGGER"/>
		</reg32>
		<reg32 offset="0x718" name="MMCTX_MULTI_STRIDE"/>
		<reg32 offset="0x71c" name="MMCTX_MULTI_MASK"/>
		<reg32 offset="0x720" name="MMCTX_QUEUE">
			<bitfield pos="0" name="BASE_EN"/>
			<bitfield pos="1" name="MULTI_EN"/>
			<bitfield low="2" high="25" name="ADDR" shr="2"/>
			<bitfield low="26" high="31" name="CNTM1">
				<brief>count - 1</brief>
			</bitfield>
		</reg32>
		<reg32 offset="0x728" name="MMIO_CTRL">
			<bitfield pos="0" name="UNK0"/>
			<bitfield low="2" high="25" name="ADDR" shr="2"/>
			<bitfield pos="29" name="WRS"/>
			<bitfield pos="30" name="ACCESS">
				<value value="0" name="READ"/>
				<value value="1" name="WRITE"/>
			</bitfield>
			<bitfield pos="31" name="TRIGGER"/>
		</reg32>
		<reg32 offset="0x72c" name="MMIO_RDVAL"/>
		<reg32 offset="0x730" name="MMIO_WRVAL"/>
		<reg32 offset="0x74c" name="MMCTX_LOAD_COUNT"/> <!-- WTF? -->

		<reg32 offset="0x800" name="CC_SCRATCH" length="8"/>
		<reg32 offset="0x820" name="CC_SCRATCH_SET" length="8"/>
		<reg32 offset="0x840" name="CC_SCRATCH_CLEAR" length="8"/>
		<reg32 offset="0x880" name="STRANDS"/>

		<reg32 offset="0x908" name="STRAND_SAVE_SWBASE" shr="8"/>
		<reg32 offset="0x90c" name="STRAND_LOAD_SWBASE" shr="8"/>
		<reg32 offset="0x910" name="STRAND_SIZE">
			<doc>In words.</doc>
		</reg32>
		<reg32 offset="0x918" name="STRAND_GENE_CNT"/> <!-- also used as param by UNK5? -->
		<reg32 offset="0x91c" name="STRAND_FIRST_GENE"/>
		<reg32 offset="0x928" name="STRAND_CMD">
			<value value="1" name="LATCH_FIRST_GENE"/>
			<value value="2" name="LATCH_GENE_CNT"/>
			<value value="3" name="SAVE"/>
			<value value="4" name="LOAD"/>
			<value value="5" name="UNK5"/> <!-- uses 918 -->
			<value value="0xa" name="UNKA"/> <!-- uses 93c, selects strand set? -->
			<value value="0xb" name="UNKB"/> <!-- uses 93c -->
			<value value="0xc" name="UNKC"/> <!-- pre other commands -->
			<value value="0xd" name="UNKD"/> <!-- post other commands -->
		</reg32>

		<reg32 offset="0xa04" name="MEM_BASE" shr="8"/>
		<reg32 offset="0xa0c" name="MEM_CHAN" type="nv50_channel"/>
		<reg32 offset="0xa10" name="MEM_CMD">
			<value value="7" name="LOAD_CHAN"/>
		</reg32>
		<reg32 offset="0xa20" name="MEM_TARGET">
			<bitfield low="0" high="4" name="TARGET">
				<value value="1" name="VM"/>
				<value value="2" name="VRAM"/>
				<value value="3" name="SYSRAM_NOSNOOP"/>
				<value value="4" name="SYSRAM"/>
			</bitfield>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
	</group>

	<group name="nvc0_rop">
		<array offset="0x000" name="ZROP" stride="0x100" length="1">
			<reg32 offset="0x70" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x100" name="CROP" stride="0x100" length="1">
			<reg32 offset="0x44" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<reg32 offset="0x204" name="TRAP">
			<bitfield pos="0" name="CROP"/>
			<bitfield pos="1" name="ZROP"/>
		</reg32>
		<reg32 offset="0x208" name="TRAP_EN">
			<bitfield pos="0" name="CROP"/>
			<bitfield pos="1" name="ZROP"/>
		</reg32>
		<reg32 offset="0x210" name="RED_SWITCH">
			<bitfield pos="2" name="PAUSE_ROP"/>
			<bitfield pos="6" name="POWER_ROP"/>
			<bitfield pos="10" name="ENABLE_ROP"/>
		</reg32>
	</group>

	<group name="nvc0_tp">
		<array offset="0x000" name="POLY" stride="0x200" length="1">
			<reg32 offset="0x048" name="POLY2ESETUP">
				<bitfield low="0" high="27" name="ADDRESS" shr="12"/>
				<bitfield pos="28" name="UNK28"/>
			</reg32>
			<reg32 offset="0x05c" name="TFB_UNFUCKUP_OFFSET_QUERIES">
				<doc>If set to 0, the 9097/1b0c/0d005002 query will return bytes written
				since the last time TFB_BUFFER_OFFSET (9097/0390) was written.
				Set it to 1 to make it return the full/absolute offset, which is required
				for a sane implementation of transform feedback.
				(Setting only on GPC[0].TP[0] seems enough.)</doc>
			</reg32>
			<reg32 offset="0x084" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
			<reg32 offset="0x088" name="TPID"/>
		</array>
		<array offset="0x200" name="TEX" stride="0x100" length="1">
			<reg32 offset="0x24" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x300" name="TPBUS" stride="0x100" length="1">
			<reg32 offset="0x00" name="TP_GPCID" length="44">
				<bitfield low="0" high="4" name="0"/>
				<bitfield low="5" high="9" name="1"/>
				<bitfield low="10" high="14" name="2"/>
				<bitfield low="15" high="19" name="3"/>
				<bitfield low="20" high="24" name="4"/>
				<bitfield low="25" high="29" name="5"/>
			</reg32>
			<reg32 offset="0xd0" name="UNKD0">
				<bitfield low="0" high="7" name="ROP_COUNT"/>
				<bitfield low="8" high="15" name="GPC_COUNT"/>
				<bitfield low="16" high="28" name="UNK16"/>
			</reg32>
			<reg32 offset="0xe4" name="UNKE4">
				<bitfield low="0" high="29" name="UNK0"/>
			</reg32>
		</array>
		<array offset="0x480" name="L1" stride="0x80" length="1">
			<reg32 offset="0x0c" name="TRAP">
				<bitfield pos="1" name="GLOBAL_MAP_READ"/> <!-- not passed up to TP.TRAP, causes VM fault -->
				<bitfield pos="2" name="GLOBAL_MAP_WRITE"/> <!-- not passed up to TP.TRAP, causes VM fault -->
				<bitfield pos="30" name="CLEAR"/>
				<bitfield pos="31" name="ENABLE"/>
			</reg32>
			<reg32 offset="0x68" name="TPID"/>
		</array>
		<reg32 offset="0x508" name="TRAP">
			<bitfield pos="0" name="TEX"/>
			<bitfield pos="1" name="MP"/>
			<bitfield pos="2" name="POLY"/>
			<bitfield pos="3" name="L1C"/>
		</reg32>
		<reg32 offset="0x50c" name="TRAP_EN">
			<bitfield pos="0" name="TEX"/>
			<bitfield pos="1" name="MP"/>
			<bitfield pos="2" name="POLY"/>
			<bitfield pos="3" name="L1C"/>
		</reg32>
		<array offset="0x600" name="MP" stride="0x200" length="1">
			<reg32 offset="0x044" name="UNK44_TRAP"/>
			<reg32 offset="0x04c" name="UNK4C_TRAP"/>
			<reg32 offset="0x058" name="TRAP_HANDLER_PC"/>
			<reg32 offset="0x060" name="PM_OP" length="4">
				<bitfield low="0" high="15" name="0"/>
				<bitfield low="16" high="31" name="1"/>
			</reg32>
			<reg32 offset="0x070" name="PM_COUNTER_OVERFLOW">
				<bitfield pos="0" name="0"/>
				<bitfield pos="1" name="1"/>
				<bitfield pos="2" name="2"/>
				<bitfield pos="3" name="3"/>
				<bitfield pos="4" name="4"/>
				<bitfield pos="5" name="5"/>
				<bitfield pos="6" name="6"/>
				<bitfield pos="7" name="7"/>
			</reg32>
			<reg32 offset="0x074" name="PM_COUNTER" length="8"/>
			<reg32 offset="0x098" name="TPID"/>
		</array>
	</group>

	<group name="nvc0_gpc">
		<array offset="0x380" name="UNK380" stride="0x080" length="1">
		</array>
		<array offset="0x400" name="PROP" stride="0x100" length="1">
			<reg32 offset="0x20" name="TRAP">
				<bitfield pos="1" name="RT_PITCH_OVERRUN"/>
				<bitfield pos="4" name="RT_WIDTH_OVERRUN"/>
				<bitfield pos="5" name="RT_HEIGHT_OVERRUN"/>
				<bitfield pos="7" name="ZETA_STORAGE_TYPE_MISMATCH"/>
				<bitfield pos="8" name="RT_STORAGE_TYPE_MISMATCH"/>
				<bitfield pos="10" name="RT_LINEAR_MISMATCH"/>
				<bitfield pos="30" name="CLEAR"/>
				<bitfield pos="31" name="ENABLE"/>
			</reg32>
			<reg32 offset="0x34" name="TRAP_5">
				<bitfield low="0" high="15" name="X"/>
				<bitfield low="16" high="31" name="Y"/>
			</reg32>
			<reg32 offset="0x38" name="TRAP_6">
				<bitfield low="8" high="13" name="FORMAT"/>
			</reg32>
			<reg32 offset="0x3c" name="TRAP_7">
				<bitfield low="0" high="7" name="STORAGE_TYPE"/>
			</reg32>
		</array>
		<array offset="0x500" name="UNK500" stride="0x100" length="1">
		</array>
		<array offset="0x600" name="UNK600" stride="0x080" length="1">
		</array>
		<array offset="0x680" name="UNK680" stride="0x080" length="1">
		</array>
		<array offset="0x700" name="UNK700" stride="0x080" length="1">
		</array>
		<array offset="0x800" name="ESETUP" stride="0x080" length="1">
			<reg32 offset="0x08" name="HUB2ESETUP_ADDR" shr="8"/>
			<reg32 offset="0x0c" name="HUB2ESETUP_CONF">
				<bitfield low="0" high="10" name="UNK0"/>
				<bitfield pos="31" name="UNK31"/>
			</reg32>
			<reg32 offset="0x10" name="POLY2ESETUP">
				<bitfield low="0" high="27" name="ADDRESS" shr="12"/>
				<bitfield pos="31" name="UNK31"/>
			</reg32>
			<reg32 offset="0x24" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x880" name="FFB" stride="0x080" length="1">
			<reg32 offset="0x2c" name="PART_CONFIG">
				<bitfield low="0" high="3" name="PART_COUNT"/>
				<bitfield pos="4" name="MEM_SPLIT_ENABLE"/>
			</reg32>
			<reg32 offset="0x34" name="UNK34_ADDR" shr="8"/>
			<reg32 offset="0x38" name="UNK38_ADDR" shr="8"/>
		</array>
		<array offset="0x900" name="ZCULL" stride="0x080" length="1">
			<reg32 offset="0x00" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x980" name="UNK980" stride="0x080" length="1">
		</array>
		<array offset="0xa00" name="UNKA00" stride="0x100" length="1">
		</array>
		<array offset="0xb00" name="TPBUS" stride="0x100" length="1">
			<reg32 offset="0x08" name="TP_GPCID" length="44">
				<bitfield low="0" high="4" name="0"/>
				<bitfield low="5" high="9" name="1"/>
				<bitfield low="10" high="14" name="2"/>
				<bitfield low="15" high="19" name="3"/>
				<bitfield low="20" high="24" name="4"/>
				<bitfield low="25" high="29" name="5"/>
			</reg32>
			<reg32 offset="0xb8" name="TOTAL">
				<bitfield low="0" high="7" name="ROP_COUNT"/>
				<bitfield low="8" high="15" name="GPC_COUNT"/>
			</reg32>
		</array>
		<array offset="0xc00" name="TPCONF" stride="0x080" length="1">
			<reg32 offset="0x8" name="TPCNT"/>
			<reg32 offset="0x10" name="TPID" length="8"/>
		</array>
		<array offset="0xc80" name="UNKC80" stride="0x080" length="1">
			<reg32 offset="0xc" name="TPCNT"/>
		</array>
		<array offset="0xd00" name="UNKD00" stride="0x080" length="1">
		</array>
		<array offset="0xe00" name="UNKE00" stride="0x100" length="1">
		</array>
		<array offset="0xf00" name="UNKF00" stride="0x100" length="1">
		</array>
		<array offset="0x1000" name="CCACHE" stride="0x100" length="1">
			<reg32 offset="0x04" name="HUB2GPC_ADDR" shr="8"/>
			<reg32 offset="0x08" name="HUB2GPC_CONF">
				<bitfield low="0" high="7" name="UNK0"/>
			</reg32>
			<reg32 offset="0x28" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array name="TP_BROADCAST" offset="0x1800" stride="0x800" length="1">
			<use-group name="nvc0_tp"/>
		</array>

		<array name="CTXCTL" offset="0x2000" stride="0x1000" length="1">
			<use-group name="nvc0_ctxctl"/>
			<reg32 offset="0x608" name="UNITS">
				<bitfield low="0" high="4" name="TP_COUNT"/>
				<bitfield low="16" high="20" name="UNK_ZCULL_COUNT"/>
			</reg32>
			<reg32 offset="0x614" name="RED_SWITCH">
				<bitfield pos="1" name="PAUSE_GPC"/>
				<bitfield pos="5" name="POWER_GPC"/>
				<bitfield pos="9" name="ENABLE_GPC"/>
				<bitfield pos="11" name="UNK11"/>
			</reg32>
			<reg32 offset="0x618" name="MYINDEX"/>
			<reg32 offset="0xc90" name="TRAP">
				<bitfield pos="0" name="PROP"/>
				<bitfield pos="1" name="ZCULL"/>
				<bitfield pos="2" name="CCACHE"/>
				<bitfield pos="3" name="ESETUP"/>
				<bitfield low="16" high="23" name="TP"/>
			</reg32>
			<reg32 offset="0xc94" name="TRAP_EN">
				<bitfield pos="0" name="PROP"/>
				<bitfield pos="1" name="ZCULL"/>
				<bitfield pos="2" name="CCACHE"/>
				<bitfield pos="3" name="ESETUP"/>
				<bitfield low="16" high="23" name="TP"/>
			</reg32>
		</array>

		<array name="TP" offset="0x4000" stride="0x800" length="4">
			<use-group name="nvc0_tp"/>
		</array>
	</group>

	<array name="CTXCTL" offset="0x9000" stride="0x1000" length="1">
		<use-group name="nvc0_ctxctl"/>
		<reg32 offset="0x604" name="UNITS">
			<bitfield low="0" high="4" name="GPC_COUNT"/>
			<bitfield low="16" high="20" name="ROP_COUNT"/>
		</reg32>
		<reg32 offset="0x614" name="RED_SWITCH">
			<bitfield pos="0" name="PAUSE_MAIN"/>
			<bitfield pos="1" name="PAUSE_GPC"/>
			<bitfield pos="4" name="POWER_MAIN"/>
			<bitfield pos="5" name="POWER_GPC"/>
			<bitfield pos="6" name="POWER_ROP"/>
			<bitfield pos="8" name="ENABLE_MAIN"/>
			<bitfield pos="9" name="ENABLE_GPC"/>
			<bitfield pos="10" name="ENABLE_ROP"/>
		</reg32>

		<reg32 offset="0xc14" name="INTR_UP_ROUTE" type="nvc0_ctxctl_iroute">
			<doc>Indexed fuc register, in 19 copies. Index i determines the source
			of interrupt i. Source for interrupt 19 is hardwired to 0x2b [WATCHDOG].</doc>
		</reg32>
		<reg32 offset="0xc18" name="INTR_UP_STATUS"/>
		<reg32 offset="0xc1c" name="INTR_UP_SET"/>
		<reg32 offset="0xc20" name="INTR_UP_CLEAR"/>
		<reg32 offset="0xc24" name="INTR_UP_ENABLE"/>
	</array>

	<array name="ROP_BROADCAST" offset="0x8800" stride="0x400" length="1">
		<use-group name="nvc0_rop"/>
	</array>

	<array name="ROP" offset="0x10000" stride="0x400" length="8">
		<use-group name="nvc0_rop"/>
	</array>

	<array name="GPC_BROADCAST" offset="0x18000" stride="0x8000" length="1">
		<use-group name="nvc0_gpc"/>
	</array>

	<array name="GPC" offset="0x100000" stride="0x8000" length="4">
		<use-group name="nvc0_gpc"/>
	</array>
</array>

</domain>

</database>
<commit_msg>nvc0/pgraph: Nailed down VSTATUS regs, mostly.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<database xmlns="http://nouveau.freedesktop.org/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<import file="copyright.xml"/>

<import file="nvchipsets.xml" />
<import file="nv98_fuc.xml" />
<import file="nv50_pgraph.xml" />

<domain name="NV_MMIO" bare="yes" prefix="chipset">

<array name="PGRAPH" offset="0x400000" stride="0x200000" length="1" variants="NVC0-">

	<reg32 offset="0x0100" name="INTR"> <!-- HOST/DAEMON only -->
		<brief>Interrupt status</brief>
		<doc>Shows currently pending interrupts. Write 1 to a bit to reset it, and ACK the interrupt.</doc>
		<bitfield name="NOTIFY" pos="0">
			<doc>You asked for a NOTIFY with interrupt and got it.</doc>
		</bitfield>
		<bitfield name="QUERY" pos="1">
			<doc>You asked for a QUERY with interrupt and got it.</doc>
		</bitfield>
		<bitfield name="SYNC" pos="2" />
		<bitfield name="ILLEGAL_MTHD" pos="4">
			<doc>You tried to use a method that doesn't exist on this class.</doc>
		</bitfield>
		<bitfield name="ILLEGAL_CLASS" pos="5">
			<doc>You tried to use a class not supported by this GPU.</doc>
		</bitfield>
		<bitfield name="DOUBLE_NOTIFY" pos="6">
			<doc>You tried to use NOTIFY command on another NOTIFY command.</doc>
		</bitfield>
		<bitfield name="UNK7" pos="7" />
		<bitfield name="FIRMWARE_MTHD" pos="8">
			<doc>You ran one of the FIRMWARE methods.</doc>
		</bitfield>
		<bitfield name="BUFFER_NOTIFY" pos="16">
			<doc>You asked for m2mf transfer with interrupt after finish and got it.</doc>
		</bitfield>
		<bitfield name="CTXCTL_UP" pos="19">
			<doc>Triggered by poking CTXCTL INTR_UP_SET.</doc>
		</bitfield>
		<bitfield name="DATA_ERROR" pos="20">
			<doc>You used an invalid parameter for this method. Or maybe you tried
			to launch some operation, but the relevant state is inconsistent.
			Relevant state is in DATA_ERROR</doc>
		</bitfield>
		<bitfield name="TRAP" pos="21">
			<doc>A PGRAPH command failed in the middle of execution. TRAP register will
			tell you which subunit reports the trap.</doc>
		</bitfield>
		<bitfield name="SINGLE_STEP" pos="24" />
	</reg32>
	<reg32 offset="0x0108" name="TRAP">
		<brief>Trap status</brief>
		<doc>Like INTR, but applies to TRAP sub-types. Shows which subunits report trap.
		Each subunit has its own TRAP status register, which you have to check in turn
		to know the exact TRAP sub-subtype, and reset it. Write 1 to a bit to reset it
		and ACK the trap.</doc>
		<bitfield name="DISPATCH" pos="0">
			<brief>Check 404000</brief>
		</bitfield>
		<bitfield name="M2MF" pos="1">
			<brief>Check 404600</brief>
		</bitfield>
		<bitfield name="UNK2" pos="2"/>
		<bitfield name="CCACHE" pos="3">
			<brief>Check 408030</brief>
		</bitfield>
		<bitfield name="UNK4" pos="4">
			<brief>Check 405840. Shader-related.</brief>
		</bitfield>
		<bitfield name="UNK5" pos="5"/>
		<bitfield name="UNK6" pos="6">
			<brief>Check 40601c</brief>
		</bitfield>
		<bitfield name="MACRO" pos="7">
			<brief>Check 404490</brief>
		</bitfield>
		<bitfield name="GPC" pos="24"/>
		<bitfield name="ROP" pos="25"/>
	</reg32>
	<reg32 offset="0x0110" name="DATA_ERROR" type="NV50_PGRAPH_DATA_ERROR">
		<doc>Stores type of the pending DATA_ERROR.</doc>
	</reg32>
	<reg32 offset="0x0118" name="TRAP_GPCS"/>
	<reg32 offset="0x011c" name="TRAP_ROPS"/>
	<reg32 offset="0x0120" name="INTR_NMHOST">
		<!-- a bitfield in the QUERY command selects whether to trigger an interrupt here or in the usual reg -->
		<bitfield name="QUERY" pos="1"/>
	</reg32>
	<reg32 offset="0x0124" name="INTR_EN_NMHOST">
		<bitfield name="QUERY" pos="1"/>
	</reg32>
	<reg32 offset="0x0130" name="TRAP_GPCS_EN"/>
	<reg32 offset="0x0134" name="TRAP_ROPS_EN"/>
	<reg32 offset="0x0138" name="TRAP_EN">
		<brief>Trap enable</brief>
		<doc>A bitmask of events that will cause traps, same bit assignments as in TRAP reg.</doc>
		<bitfield name="DISPATCH" pos="0" />
		<bitfield name="M2MF" pos="1" />
		<bitfield name="UNK2" pos="2"/>
		<bitfield name="CCACHE" pos="3"/>
		<bitfield name="UNK4" pos="4"/>
		<bitfield name="UNK5" pos="5"/>
		<bitfield name="UNK6" pos="6"/>
		<bitfield name="MACRO" pos="7"/>
		<bitfield name="GPC" pos="24"/>
		<bitfield name="ROP" pos="25"/>
	</reg32>
	<reg32 offset="0x013c" name="INTR_EN">
		<brief>Interrupt enable</brief>
		<doc>A bitmask of events that will cause interrupts, same bit assignments as in INTR reg.</doc>
		<bitfield name="NOTIFY" pos="0" />
		<bitfield name="QUERY" pos="1" />
		<bitfield name="SYNC" pos="2" />
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="ILLEGAL_CLASS" pos="5" />
		<bitfield name="DOUBLE_NOTIFY" pos="6" />
		<bitfield name="UNK7" pos="7" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
		<bitfield name="BUFFER_NOTIFY" pos="16" />
		<bitfield name="CTXCTL_UP" pos="19" />
		<bitfield name="DATA_ERROR" pos="20" />
		<bitfield name="TRAP" pos="21" />
		<bitfield name="SINGLE_STEP" pos="24" />
	</reg32>
	<reg32 offset="0x0140" name="INTR_DISPATCH_CTXCTL_DOWN">
		<doc>If a bit is set to 1, a given interrupt will use _CTXCTL_DOWN versions
		of interrupt registers and will be routed to main CTXCTL interrupt source
		11 [HUB_CTXCTL_DOWN] instead of host PGRAPH interrupt.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>
	<reg32 offset="0x0144" name="INTR_CTXCTL_DOWN">
		<doc>Like INTR, but for CTXCTL interrupts.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>
	<reg32 offset="0x0148" name="INTR_EN_CTXCTL_DOWN">
		<doc>Like INTR_EN, but for CTXCTL interrupts.</doc>
		<bitfield name="ILLEGAL_MTHD" pos="4" />
		<bitfield name="FIRMWARE_MTHD" pos="8" />
	</reg32>

	<reg32 offset="0x0200" name="ICMD_CMD" />
	<reg32 offset="0x0204" name="ICMD_DATA" />

	<stripe offset="0x0500" name="FIFO">
		<reg32 offset="0x00" name="CONTROL">
			<bitfield pos="0" name="PULL">
				<doc>Enables executing commands incoming through DISPATCH_CMD.</doc>
			</bitfield>
			<bitfield pos="8" name="UNK8"/>
			<bitfield pos="16" name="UNK16"/> <!-- usually set, but doesn't seem needed for operation... -->
			<bitfield high="28" low="20" name="LIMIT" variants="NV84-">
				<doc>Max number of slots allowed to be occupied in FIFO. 0 and > 0x100 are treated as 0x100.</doc>
			</bitfield>
		</reg32>
		<reg32 offset="0x04" name="STATUS" access="r">
			<bitfield pos="0" name="EMPTY" />
			<bitfield pos="1" name="FULL" />
			<bitfield high="15" low="4" name="OCCUPIED">
				<doc>How many slots contain valid data atm.</doc>
			</bitfield>
			<bitfield high="23" low="16" name="GET"/>
			<bitfield high="31" low="24" name="PUT"/>
		</reg32>
	</stripe>

	<reg32 offset="0x0380" name="VSTATUS_0" access="r">
		<bitfield low="0" high="2" name="HUB_UNK0" type="NV50_VSTATUS"/>
		<bitfield low="3" high="5" name="HUB_UNK1" type="NV50_VSTATUS"/>
		<bitfield low="6" high="8" name="HUB_UNK2" type="NV50_VSTATUS"/>
		<bitfield low="9" high="11" name="HUB_UNK3" type="NV50_VSTATUS"/>
		<bitfield low="12" high="14" name="HUB_UNK4" type="NV50_VSTATUS"/>
		<bitfield low="15" high="17" name="HUB_UNK5" type="NV50_VSTATUS"/>
	</reg32>

	<reg32 offset="0x0384" name="VSTATUS_1" access="r">
		<bitfield low="0" high="2" name="HUB_UNK6" type="NV50_VSTATUS"/>
		<bitfield low="3" high="5" name="HUB_UNK7" type="NV50_VSTATUS"/>
		<bitfield low="6" high="8" name="HUB_UNK8" type="NV50_VSTATUS"/>
		<bitfield low="9" high="11" name="HUB_UNK9" type="NV50_VSTATUS"/>
		<bitfield low="12" high="14" name="HUB_UNK10" type="NV50_VSTATUS"/>
	</reg32>

	<reg32 offset="0x0388" name="VSTATUS_2" access="r">
		<bitfield low="0" high="2" name="ROP_UNK0" type="NV50_VSTATUS"/>
		<bitfield low="3" high="5" name="ROP_UNK1" type="NV50_VSTATUS"/>
		<bitfield low="6" high="8" name="ROP_UNK2" type="NV50_VSTATUS"/>
		<bitfield low="9" high="11" name="HUB_UNK11" type="NV50_VSTATUS"/>
		<bitfield low="12" high="14" name="HUB_UNK12" type="NV50_VSTATUS"/>
		<bitfield low="15" high="17" name="HUB_UNK13" type="NV50_VSTATUS"/>
	</reg32>

	<reg32 offset="0x0390" name="VSTATUS_3" access="r">
		<bitfield low="0" high="2" name="GPC" type="NV50_VSTATUS"/>
		<bitfield low="3" high="5" name="HUB_UNK14" type="NV50_VSTATUS"/>
		<bitfield low="6" high="8" name="HUB_UNK15" type="NV50_VSTATUS"/>
		<bitfield low="9" high="11" name="HUB_UNK16" type="NV50_VSTATUS"/>
	</reg32>

	<reg32 offset="0x0604" name="GPC_STATUS" access="r"/> <!-- mask of busy GPCs -->
	<reg32 offset="0x0608" name="ROP_STATUS" access="r"/> <!-- mask of busy ROPs -->

	<reg32 offset="0x0700" name="STATUS" access="r">
		<bitfield pos="0" name="ALL"/>

		<bitfield pos="3" name="UNK3_PAUSABLE"/>

		<bitfield pos="5" name="UNK5_PAUSABLE"/>
		<bitfield pos="6" name="M2MF"/>
		<bitfield pos="7" name="CTXCTL"/>
		<bitfield pos="8" name="UNK8_PAUSABLE"/>
		<bitfield pos="9" name="UNK9_PAUSABLE"/>
		<bitfield pos="11" name="UNK11_PAUSABLE"/>
		<bitfield pos="12" name="UNK12_PAUSABLE"/>
		<bitfield pos="13" name="UNK13_PAUSABLE"/>
		<bitfield pos="14" name="UNK14_PAUSABLE"/>
		<bitfield pos="15" name="UNK15_PAUSABLE"/>
		<bitfield pos="16" name="UNK16_PAUSABLE"/>
		<bitfield pos="17" name="UNK17_PAUSABLE"/>

		<bitfield pos="24" name="GPC"/>
		<bitfield pos="25" name="ROP"/>
	</reg32>

	<reg32 offset="0x0704" name="TRAPPED_ADDR">
		<doc>Offending subchan + method, for [most types of] PGRAPH interrupts.</doc>
		<bitfield name="MTHD" high="13" low="2" shr="2" />
		<bitfield name="SUBCH" high="18" low="16" />
	</reg32>
	<reg32 offset="0x0708" name="TRAPPED_DATA_LOW">
		<doc>Offending method data, for [most types of] PGRAPH interrupts.</doc>
	</reg32>
	<reg32 offset="0x070c" name="TRAPPED_DATA_HIGH" /> <!-- I have no idea what this is for. But it's been around since NV10. -->

	<array offset="0x4000" name="DISPATCH" stride="0x400" length="1">
		<reg32 offset="0x00" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x04" name="CMD_ADDR">
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="SUBCH" high="18" low="16" />
			<bitfield name="NONINCR" pos="20" />
			<bitfield name="UNK1" pos="21" /> <!-- sometimes set by DISPATCH itself during exec... related to NOTIFY? -->
			<bitfield name="SINGLE_STEP_DONE" pos="22" />
			<bitfield name="DOUBLE" pos="25" />
			<bitfield name="CURRENT_SUBCH" pos="29" />
			<bitfield name="VALID" pos="31" />
		</reg32>
		<reg32 offset="0x08" name="CMD_DATA_LOW" />
		<reg32 offset="0x0c" name="CMD_DATA_HIGH" />
		<reg32 offset="0x10" name="CTX_SWITCH" />
		<reg32 offset="0x24" name="SUBCH">
			<bitfield name="SUBCH" high="15" low="13" />
		</reg32>
		<reg32 offset="0x28" name="MISC">
			<bitfield name="NOTIFY_PENDING" pos="8" />
			<bitfield name="NOTIFY_AWAKEN" pos="16" />
		</reg32>
		<reg32 offset="0x2c" name="ST2_ADDR">
			<doc>Second stage of dispatch... if QUERY blows up on you,
			it can get stuck here. At least sometimes.</doc>
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="ILLEGAL_CLASS" pos="29" />
			<bitfield name="ILLEGAL_MTHD" pos="30" />
			<bitfield name="VALID" pos="31" />
		</reg32>

		<reg32 offset="0x3c" name="ST2_DATA_LOW" />
		<reg32 offset="0x40" name="ST2_DATA_HIGH" />

		<reg32 offset="0x48" name="ST3_ADDR">
			<bitfield name="MTHD" high="12" low="2" shr="2" />
			<bitfield name="VALID" pos="31" />
		</reg32>
		<reg32 offset="0x50" name="ST3_DATA_LOW" />
		<reg32 offset="0x54" name="ST3_DATA_HIGH" />

		<reg32 offset="0xc0" name="COND_ADDRESS_HIGH" />
		<reg32 offset="0xc4" name="COND_ADDRESS_LOW" />

		<reg32 offset="0xd0" name="NOTIFY_3D_ADDRESS_HIGH" /> <!-- also compute -->
		<reg32 offset="0xd4" name="NOTIFY_3D_ADDRESS_LOW" />
		<reg32 offset="0xd8" name="NOTIFY_2D_ADDRESS_HIGH" />
		<reg32 offset="0xdc" name="NOTIFY_2D_ADDRESS_LOW" />
		<reg32 offset="0xe0" name="NOTIFY_M2MF_ADDRESS_HIGH" />
		<reg32 offset="0xe4" name="NOTIFY_M2MF_ADDRESS_LOW" />

		<reg32 offset="0x200" name="CTX_CACHE" length="8" />
	</array>
	<array offset="0x4400" name="MACRO" stride="0x100" length="1">
		<reg32 offset="0" name="REG" length="8"/>
		<reg32 offset="0x88" name="MCACHE_CTRL">
			<bitfield low="0" high="15" name="CLASS"/>
			<bitfield low="16" high="27" name="MTHD" shr="2"/>
			<bitfield pos="30" name="READ_TRIGGER"/>
			<bitfield pos="31" name="WRITE_TRIGGER"/>
		</reg32>
		<reg32 offset="0x8c" name="MCACHE_DATA"/>
		<reg32 offset="0x90" name="TRAP">
			<bitfield name="TOO_FEW_PARAMS" pos="0" />
			<bitfield name="TOO_MANY_PARAMS" pos="1" />
			<bitfield name="ILLEGAL_OPCODE" pos="2" />
			<bitfield name="DOUBLE_BRANCH" pos="3" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>
	<array offset="0x4600" name="M2MF" stride="0x200" length="1">
		<reg32 offset="0x00" name="TRAP">
			<bitfield name="PUSH_TOO_MUCH_DATA" pos="0" />
			<bitfield name="PUSH_NOT_ENOUGH_DATA" pos="1" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>
	<array offset="0x4800" name="DDATA" stride="0x800" length="1">
	</array>
	<array offset="0x5800" name="UNK5800" stride="0x800" length="1">
		<reg32 offset="0x40" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x44" name="TRAP_UNK44"/>
		<reg32 offset="0x70" name="GPC_TPCNT" length="4">
			<bitfield low="0" high="3" name="0"/>
			<bitfield low="4" high="7" name="1"/>
			<bitfield low="8" high="11" name="2"/>
			<bitfield low="12" high="15" name="3"/>
			<bitfield low="16" high="19" name="4"/>
			<bitfield low="20" high="23" name="5"/>
			<bitfield low="24" high="27" name="6"/>
			<bitfield low="28" high="31" name="7"/>
		</reg32>
	</array>
	<array offset="0x6000" name="UNK6000" stride="0x800" length="1">
		<reg32 offset="0x18" name="TRAP_UNK0">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x1c" name="TRAP_UNK1">
			<bitfield name="TEMP_TOO_SMALL" pos="0" />
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
		<reg32 offset="0x28" name="GPC_TPCNT" length="4">
			<bitfield low="0" high="3" name="0"/>
			<bitfield low="4" high="7" name="1"/>
			<bitfield low="8" high="11" name="2"/>
			<bitfield low="12" high="15" name="3"/>
			<bitfield low="16" high="19" name="4"/>
			<bitfield low="20" high="23" name="5"/>
			<bitfield low="24" high="27" name="6"/>
			<bitfield low="28" high="31" name="7"/>
		</reg32>
		<reg32 offset="0xa8" name="TP_GPCID" length="0x40">
			<bitfield low="0" high="4" name="0"/>
			<bitfield low="8" high="12" name="1"/>
			<bitfield low="16" high="20" name="2"/>
			<bitfield low="24" high="28" name="3"/>
		</reg32>
		<reg32 offset="0x4b0" name="TEMP_SIZE_PER_MP" shr="8"/>
	</array>
	<stripe offset="0x6800" stride="0x400" length="2">
		<stripe offset="0" name="TPGRAD" stride="0x20" length="0x20">
			<reg32 offset="0" name="MASK" length="8"/>
		</stripe>
	</stripe>
	<array offset="0x7800" name="TPBUS" stride="0x800" length="1">
		<reg32 offset="0x0c" name="TP_GPCID" length="44">
			<bitfield low="0" high="4" name="0"/>
			<bitfield low="5" high="9" name="1"/>
			<bitfield low="10" high="14" name="2"/>
			<bitfield low="15" high="19" name="3"/>
			<bitfield low="20" high="24" name="4"/>
			<bitfield low="25" high="29" name="5"/>
		</reg32>
		<reg32 offset="0xbc" name="TOTAL">
			<bitfield low="0" high="7" name="ROP_COUNT"/>
			<bitfield low="8" high="15" name="GPC_COUNT"/>
		</reg32>
	</array>
	<array offset="0x8000" name="CCACHE" stride="0x800" length="1">
		<reg32 offset="0x04" name="HUB2GPC_ADDR" shr="8"/>
		<reg32 offset="0x08" name="HUB2GPC_CONF">
			<bitfield low="0" high="7" name="UNK0"/>
			<bitfield low="8" high="10" name="UNK8"/>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
		<reg32 offset="0x0c" name="HUB2ESETUP_ADDR" shr="8"/>
		<reg32 offset="0x10" name="HUB2ESETUP_CONF">
			<bitfield low="0" high="10" name="UNK0"/>
			<bitfield low="11" high="15" name="UNK11"/>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
		<reg32 offset="0x30" name="TRAP">
			<bitfield name="CLEAR" pos="30" />
			<bitfield name="ENABLE" pos="31" />
		</reg32>
	</array>

	<group name="nvc0_ctxctl">
		<use-group name="nv98_fucbase"/>
		<reg32 offset="0x400" name="DONE">
			<doc>Reg saying when misc things are done.</doc>
			<bitfield pos="2" name="STRAND"/>
			<bitfield pos="5" name="MMCTX"/>
			<bitfield pos="6" name="MMIO_RD"/>
			<bitfield pos="7" name="MMIO_WRS"/>
			<bitfield pos="8" name="BAR">
				<doc>When BAR has all bits from BAR_REQMASK[0]&amp;BAR_REQMASK[1] set.</doc>
			</bitfield>
			<bitfield pos="11" name="CC_WATCHDOG"/>
			<bitfield pos="12" name="UNK12">
				<doc>Related to fuc+0xaxx and 404160.</doc>
			</bitfield>
			<bitfield pos="13" name="UNK13"/>
		</reg32>
		<enum name="nvc0_ctxctl_isrc" inline="yes">
			<value value="0x02" name="GPC_UNK2"/>
			<value value="0x03" name="HUB_CHANNEL_SWITCH"/>
			<value value="0x04" name="HUB_UNK4"/>
			<value value="0x0b" name="HUB_CTXCTL_DOWN"/>
			<value value="0x0c" name="HUB_UNK12"/>
			<value value="0x20" name="ZERO"/>
			<!-- 0x20 + X is DONE bit X -->
			<value value="0x22" name="STRAND"/>
			<value value="0x25" name="MMCTX"/>
			<value value="0x26" name="MMIO_RD"/>
			<value value="0x27" name="MMIO_WRS"/>
			<value value="0x28" name="BAR"/>
			<value value="0x2b" name="CC_WATCHDOG"/>
			<value value="0x2c" name="UNK12"/>
			<value value="0x2d" name="UNK13"/>
		</enum>
		<bitset name="nvc0_ctxctl_iroute" inline="yes">
			<bitfield low="0" high="5" name="SRC0" type="nvc0_ctxctl_isrc"/>
			<bitfield low="8" high="13" name="SRC1" type="nvc0_ctxctl_isrc"/>
			<bitfield pos="16" name="FUN">
				<value value="0" name="OR"/>
				<value value="1" name="AND"/>
			</bitfield>
			<bitfield pos="17" name="NOT"/>
			<bitfield pos="18" name="LEVEL"/>
		</bitset>
		<reg32 offset="0x404" name="INTR_ROUTE" type="nvc0_ctxctl_iroute">
			<doc>Indexed fuc register, in 8 copies. Index i determines the source
			of fuc interrupt i+8.</doc>
		</reg32>
		<reg32 offset="0x40c" name="BAR_REQMASK" length="2"/>
		<reg32 offset="0x414" name="BAR"/>
		<reg32 offset="0x418" name="BAR_SET"/>
		<reg32 offset="0x430" name="CC_WATCHDOG">
			<bitfield low="0" high="29" name="TIME_REMAINING"/>
			<bitfield pos="31" name="ENABLE"/>
		</reg32>

		<reg32 offset="0x500" name="WRCMD_DATA"/>
		<reg32 offset="0x504" name="WRCMD_CMD"/>

		<reg32 offset="0x620" name="NEW_CAPS">
			<bitfield low="0" high="7" name="CODE_SIZE" shr="8"/>
			<bitfield low="8" high="15" name="DATA_SIZE" shr="8"/>
		</reg32>

		<reg32 offset="0x700" name="MMCTX_SAVE_SWBASE" shr="8"/>
		<reg32 offset="0x704" name="MMCTX_LOAD_SWBASE" shr="8"/>
		<reg32 offset="0x710" name="MMCTX_BASE"/>
		<reg32 offset="0x714" name="MMCTX_CTRL">
			<bitfield low="0" high="4" name="QFREE"/>
			<bitfield low="8" high="12" name="QLIMIT"/>
			<bitfield pos="16" name="DIR">
				<value value="0" name="SAVE"/>
				<value value="1" name="LOAD"/>
			</bitfield>
			<!-- what do these two do, exactly? -->
			<bitfield pos="17" name="START_TRIGGER"/>
			<bitfield pos="18" name="STOP_TRIGGER"/>
		</reg32>
		<reg32 offset="0x718" name="MMCTX_MULTI_STRIDE"/>
		<reg32 offset="0x71c" name="MMCTX_MULTI_MASK"/>
		<reg32 offset="0x720" name="MMCTX_QUEUE">
			<bitfield pos="0" name="BASE_EN"/>
			<bitfield pos="1" name="MULTI_EN"/>
			<bitfield low="2" high="25" name="ADDR" shr="2"/>
			<bitfield low="26" high="31" name="CNTM1">
				<brief>count - 1</brief>
			</bitfield>
		</reg32>
		<reg32 offset="0x728" name="MMIO_CTRL">
			<bitfield pos="0" name="UNK0"/>
			<bitfield low="2" high="25" name="ADDR" shr="2"/>
			<bitfield pos="29" name="WRS"/>
			<bitfield pos="30" name="ACCESS">
				<value value="0" name="READ"/>
				<value value="1" name="WRITE"/>
			</bitfield>
			<bitfield pos="31" name="TRIGGER"/>
		</reg32>
		<reg32 offset="0x72c" name="MMIO_RDVAL"/>
		<reg32 offset="0x730" name="MMIO_WRVAL"/>
		<reg32 offset="0x74c" name="MMCTX_LOAD_COUNT"/> <!-- WTF? -->

		<reg32 offset="0x800" name="CC_SCRATCH" length="8"/>
		<reg32 offset="0x820" name="CC_SCRATCH_SET" length="8"/>
		<reg32 offset="0x840" name="CC_SCRATCH_CLEAR" length="8"/>
		<reg32 offset="0x880" name="STRANDS"/>

		<reg32 offset="0x908" name="STRAND_SAVE_SWBASE" shr="8"/>
		<reg32 offset="0x90c" name="STRAND_LOAD_SWBASE" shr="8"/>
		<reg32 offset="0x910" name="STRAND_SIZE">
			<doc>In words.</doc>
		</reg32>
		<reg32 offset="0x918" name="STRAND_GENE_CNT"/> <!-- also used as param by UNK5? -->
		<reg32 offset="0x91c" name="STRAND_FIRST_GENE"/>
		<reg32 offset="0x928" name="STRAND_CMD">
			<value value="1" name="LATCH_FIRST_GENE"/>
			<value value="2" name="LATCH_GENE_CNT"/>
			<value value="3" name="SAVE"/>
			<value value="4" name="LOAD"/>
			<value value="5" name="UNK5"/> <!-- uses 918 -->
			<value value="0xa" name="UNKA"/> <!-- uses 93c, selects strand set? -->
			<value value="0xb" name="UNKB"/> <!-- uses 93c -->
			<value value="0xc" name="UNKC"/> <!-- pre other commands -->
			<value value="0xd" name="UNKD"/> <!-- post other commands -->
		</reg32>

		<reg32 offset="0xa04" name="MEM_BASE" shr="8"/>
		<reg32 offset="0xa0c" name="MEM_CHAN" type="nv50_channel"/>
		<reg32 offset="0xa10" name="MEM_CMD">
			<value value="7" name="LOAD_CHAN"/>
		</reg32>
		<reg32 offset="0xa20" name="MEM_TARGET">
			<bitfield low="0" high="4" name="TARGET">
				<value value="1" name="VM"/>
				<value value="2" name="VRAM"/>
				<value value="3" name="SYSRAM_NOSNOOP"/>
				<value value="4" name="SYSRAM"/>
			</bitfield>
			<bitfield pos="31" name="UNK31"/>
		</reg32>
	</group>

	<group name="nvc0_rop">
		<array offset="0x000" name="ZROP" stride="0x100" length="1">
			<reg32 offset="0x70" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x100" name="CROP" stride="0x100" length="1">
			<reg32 offset="0x44" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<reg32 offset="0x200" name="VSTATUS" access="r">
			<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
			<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
			<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
			<bitfield low="9" high="11" name="PCOUNTER" type="NV50_VSTATUS"/>
			<bitfield low="12" high="14" name="UNK4" type="NV50_VSTATUS"/>
			<bitfield low="15" high="17" name="UNK5" type="NV50_VSTATUS"/>
		</reg32>
		<reg32 offset="0x204" name="TRAP">
			<bitfield pos="0" name="CROP"/>
			<bitfield pos="1" name="ZROP"/>
		</reg32>
		<reg32 offset="0x208" name="TRAP_EN">
			<bitfield pos="0" name="CROP"/>
			<bitfield pos="1" name="ZROP"/>
		</reg32>
		<reg32 offset="0x210" name="RED_SWITCH">
			<bitfield pos="2" name="PAUSE_ROP"/>
			<bitfield pos="6" name="POWER_ROP"/>
			<bitfield pos="10" name="ENABLE_ROP"/>
		</reg32>
	</group>

	<group name="nvc0_tp">
		<array offset="0x000" name="POLY" stride="0x200" length="1">
			<reg32 offset="0x048" name="POLY2ESETUP">
				<bitfield low="0" high="27" name="ADDRESS" shr="12"/>
				<bitfield pos="28" name="UNK28"/>
			</reg32>
			<reg32 offset="0x05c" name="TFB_UNFUCKUP_OFFSET_QUERIES">
				<doc>If set to 0, the 9097/1b0c/0d005002 query will return bytes written
				since the last time TFB_BUFFER_OFFSET (9097/0390) was written.
				Set it to 1 to make it return the full/absolute offset, which is required
				for a sane implementation of transform feedback.
				(Setting only on GPC[0].TP[0] seems enough.)</doc>
			</reg32>
			<reg32 offset="0x060" name="VSTATUS" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="9" high="11" name="UNK3" type="NV50_VSTATUS"/>
				<bitfield low="12" high="14" name="UNK4" type="NV50_VSTATUS"/>
				<bitfield low="15" high="17" name="UNK5" type="NV50_VSTATUS"/>
				<bitfield low="18" high="20" name="UNK6" type="NV50_VSTATUS"/>
				<bitfield low="21" high="23" name="UNK7" type="NV50_VSTATUS"/>
				<bitfield low="24" high="26" name="UNK8" type="NV50_VSTATUS"/>
				<bitfield low="27" high="29" name="UNK9" type="NV50_VSTATUS"/>
			</reg32>
			<reg32 offset="0x084" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
			<reg32 offset="0x088" name="TPID"/>
		</array>
		<array offset="0x200" name="TEX" stride="0x100" length="1">
			<reg32 offset="0x24" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
			<reg32 offset="0x38" name="VSTATUS_0" length="2" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="4" high="6" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="8" high="10" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="11" high="13" name="UNK3" type="NV50_VSTATUS"/>
				<bitfield low="14" high="16" name="UNK4" type="NV50_VSTATUS"/>
				<bitfield low="17" high="19" name="UNK5" type="NV50_VSTATUS"/>
				<bitfield low="20" high="22" name="UNK6" type="NV50_VSTATUS"/>
				<bitfield low="23" high="25" name="UNK7" type="NV50_VSTATUS"/>
				<bitfield low="26" high="28" name="UNK8" type="NV50_VSTATUS"/>
				<bitfield low="29" high="31" name="UNK9" type="NV50_VSTATUS"/>
			</reg32>
			<reg32 offset="0xdc" name="VSTATUS_1" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="4" high="6" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="8" high="10" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="11" high="13" name="UNK3" type="NV50_VSTATUS"/>
			</reg32>
		</array>
		<array offset="0x300" name="TPBUS" stride="0x100" length="1">
			<reg32 offset="0x00" name="TP_GPCID" length="44">
				<bitfield low="0" high="4" name="0"/>
				<bitfield low="5" high="9" name="1"/>
				<bitfield low="10" high="14" name="2"/>
				<bitfield low="15" high="19" name="3"/>
				<bitfield low="20" high="24" name="4"/>
				<bitfield low="25" high="29" name="5"/>
			</reg32>
			<reg32 offset="0xd0" name="UNKD0">
				<bitfield low="0" high="7" name="ROP_COUNT"/>
				<bitfield low="8" high="15" name="GPC_COUNT"/>
				<bitfield low="16" high="28" name="UNK16"/>
			</reg32>
			<reg32 offset="0xe4" name="UNKE4">
				<bitfield low="0" high="29" name="UNK0"/>
			</reg32>
		</array>
		<array offset="0x400" name="UNK400" stride="0x80" length="1">
			<reg32 offset="0x10" name="VSTATUS" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="9" high="11" name="UNK3" type="NV50_VSTATUS"/>
			</reg32>
		</array>
		<array offset="0x480" name="L1" stride="0x80" length="1">
			<reg32 offset="0x0c" name="TRAP">
				<bitfield pos="1" name="GLOBAL_MAP_READ"/> <!-- not passed up to TP.TRAP, causes VM fault -->
				<bitfield pos="2" name="GLOBAL_MAP_WRITE"/> <!-- not passed up to TP.TRAP, causes VM fault -->
				<bitfield pos="30" name="CLEAR"/>
				<bitfield pos="31" name="ENABLE"/>
			</reg32>
			<reg32 offset="0x68" name="TPID"/>
		</array>
		<array offset="0x500" name="MASTER" stride="0x100" length="1">
			<reg32 offset="0x00" name="VSTATUS" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="9" high="11" name="UNK3" type="NV50_VSTATUS"/>
				<bitfield low="12" high="14" name="UNK4" type="NV50_VSTATUS"/>
				<bitfield low="15" high="17" name="UNK5" type="NV50_VSTATUS"/>
				<bitfield low="18" high="20" name="UNK6" type="NV50_VSTATUS"/>
			</reg32>
			<reg32 offset="0x08" name="TRAP">
				<bitfield pos="0" name="TEX"/>
				<bitfield pos="1" name="MP"/>
				<bitfield pos="2" name="POLY"/>
				<bitfield pos="3" name="L1C"/>
			</reg32>
			<reg32 offset="0x0c" name="TRAP_EN">
				<bitfield pos="0" name="TEX"/>
				<bitfield pos="1" name="MP"/>
				<bitfield pos="2" name="POLY"/>
				<bitfield pos="3" name="L1C"/>
			</reg32>
		</array>
		<array offset="0x600" name="MP" stride="0x200" length="1">
			<reg32 offset="0x044" name="UNK44_TRAP"/>
			<reg32 offset="0x04c" name="UNK4C_TRAP"/>
			<reg32 offset="0x058" name="TRAP_HANDLER_PC"/>
			<reg32 offset="0x060" name="PM_OP" length="4">
				<bitfield low="0" high="15" name="0"/>
				<bitfield low="16" high="31" name="1"/>
			</reg32>
			<reg32 offset="0x070" name="PM_COUNTER_OVERFLOW">
				<bitfield pos="0" name="0"/>
				<bitfield pos="1" name="1"/>
				<bitfield pos="2" name="2"/>
				<bitfield pos="3" name="3"/>
				<bitfield pos="4" name="4"/>
				<bitfield pos="5" name="5"/>
				<bitfield pos="6" name="6"/>
				<bitfield pos="7" name="7"/>
			</reg32>
			<reg32 offset="0x074" name="PM_COUNTER" length="8"/>
			<reg32 offset="0x098" name="TPID"/>
			<reg32 offset="0x128" name="VSTATUS" access="r">
				<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
				<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
				<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
				<bitfield low="9" high="11" name="UNK3" type="NV50_VSTATUS"/>
				<bitfield low="12" high="14" name="UNK4" type="NV50_VSTATUS"/>
				<bitfield low="15" high="17" name="UNK5" type="NV50_VSTATUS"/>
				<bitfield low="18" high="20" name="UNK6" type="NV50_VSTATUS"/>
				<bitfield low="21" high="23" name="UNK7" type="NV50_VSTATUS"/>
				<bitfield low="24" high="26" name="UNK8" type="NV50_VSTATUS"/>
				<bitfield low="27" high="29" name="UNK9" type="NV50_VSTATUS"/>
				<bitfield low="30" high="31" name="UNK30"/> <!-- what the fuck? -->
			</reg32>
		</array>
	</group>

	<group name="nvc0_gpc">
		<array offset="0x380" name="UNK380" stride="0x080" length="1">
		</array>
		<array offset="0x400" name="PROP" stride="0x100" length="1">
			<reg32 offset="0x20" name="TRAP">
				<bitfield pos="1" name="RT_PITCH_OVERRUN"/>
				<bitfield pos="4" name="RT_WIDTH_OVERRUN"/>
				<bitfield pos="5" name="RT_HEIGHT_OVERRUN"/>
				<bitfield pos="7" name="ZETA_STORAGE_TYPE_MISMATCH"/>
				<bitfield pos="8" name="RT_STORAGE_TYPE_MISMATCH"/>
				<bitfield pos="10" name="RT_LINEAR_MISMATCH"/>
				<bitfield pos="30" name="CLEAR"/>
				<bitfield pos="31" name="ENABLE"/>
			</reg32>
			<reg32 offset="0x34" name="TRAP_5">
				<bitfield low="0" high="15" name="X"/>
				<bitfield low="16" high="31" name="Y"/>
			</reg32>
			<reg32 offset="0x38" name="TRAP_6">
				<bitfield low="8" high="13" name="FORMAT"/>
			</reg32>
			<reg32 offset="0x3c" name="TRAP_7">
				<bitfield low="0" high="7" name="STORAGE_TYPE"/>
			</reg32>
		</array>
		<array offset="0x500" name="UNK500" stride="0x100" length="1">
		</array>
		<array offset="0x600" name="UNK600" stride="0x080" length="1">
		</array>
		<array offset="0x680" name="UNK680" stride="0x080" length="1">
		</array>
		<array offset="0x700" name="UNK700" stride="0x080" length="1">
		</array>
		<array offset="0x800" name="ESETUP" stride="0x080" length="1">
			<reg32 offset="0x08" name="HUB2ESETUP_ADDR" shr="8"/>
			<reg32 offset="0x0c" name="HUB2ESETUP_CONF">
				<bitfield low="0" high="10" name="UNK0"/>
				<bitfield pos="31" name="UNK31"/>
			</reg32>
			<reg32 offset="0x10" name="POLY2ESETUP">
				<bitfield low="0" high="27" name="ADDRESS" shr="12"/>
				<bitfield pos="31" name="UNK31"/>
			</reg32>
			<reg32 offset="0x24" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x880" name="FFB" stride="0x080" length="1">
			<reg32 offset="0x2c" name="PART_CONFIG">
				<bitfield low="0" high="3" name="PART_COUNT"/>
				<bitfield pos="4" name="MEM_SPLIT_ENABLE"/>
			</reg32>
			<reg32 offset="0x34" name="UNK34_ADDR" shr="8"/>
			<reg32 offset="0x38" name="UNK38_ADDR" shr="8"/>
		</array>
		<array offset="0x900" name="ZCULL" stride="0x080" length="1">
			<reg32 offset="0x00" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array offset="0x980" name="UNK980" stride="0x080" length="1">
		</array>
		<array offset="0xa00" name="UNKA00" stride="0x100" length="1">
		</array>
		<array offset="0xb00" name="TPBUS" stride="0x100" length="1">
			<reg32 offset="0x08" name="TP_GPCID" length="44">
				<bitfield low="0" high="4" name="0"/>
				<bitfield low="5" high="9" name="1"/>
				<bitfield low="10" high="14" name="2"/>
				<bitfield low="15" high="19" name="3"/>
				<bitfield low="20" high="24" name="4"/>
				<bitfield low="25" high="29" name="5"/>
			</reg32>
			<reg32 offset="0xb8" name="TOTAL">
				<bitfield low="0" high="7" name="ROP_COUNT"/>
				<bitfield low="8" high="15" name="GPC_COUNT"/>
			</reg32>
		</array>
		<array offset="0xc00" name="TPCONF" stride="0x080" length="1">
			<reg32 offset="0x8" name="TPCNT"/>
			<reg32 offset="0x10" name="TPID" length="8"/>
		</array>
		<array offset="0xc80" name="UNKC80" stride="0x080" length="1">
			<reg32 offset="0xc" name="TPCNT"/>
		</array>
		<array offset="0xd00" name="UNKD00" stride="0x080" length="1">
		</array>
		<array offset="0xe00" name="UNKE00" stride="0x100" length="1">
		</array>
		<array offset="0xf00" name="UNKF00" stride="0x100" length="1">
		</array>
		<array offset="0x1000" name="CCACHE" stride="0x100" length="1">
			<reg32 offset="0x04" name="HUB2GPC_ADDR" shr="8"/>
			<reg32 offset="0x08" name="HUB2GPC_CONF">
				<bitfield low="0" high="7" name="UNK0"/>
			</reg32>
			<reg32 offset="0x28" name="TRAP">
				<bitfield name="CLEAR" pos="30" />
				<bitfield name="ENABLE" pos="31" />
			</reg32>
		</array>
		<array name="TP_BROADCAST" offset="0x1800" stride="0x800" length="1">
			<use-group name="nvc0_tp"/>
		</array>

		<array name="CTXCTL" offset="0x2000" stride="0x1000" length="1">
			<use-group name="nvc0_ctxctl"/>
			<reg32 offset="0x608" name="UNITS">
				<bitfield low="0" high="4" name="TP_COUNT"/>
				<bitfield low="16" high="20" name="UNK_ZCULL_COUNT"/>
			</reg32>
			<reg32 offset="0x614" name="RED_SWITCH">
				<bitfield pos="1" name="PAUSE_GPC"/>
				<bitfield pos="5" name="POWER_GPC"/>
				<bitfield pos="9" name="ENABLE_GPC"/>
				<bitfield pos="11" name="UNK11"/>
			</reg32>
			<reg32 offset="0x618" name="MYINDEX"/>
			<reg32 offset="0xc90" name="TRAP">
				<bitfield pos="0" name="PROP"/>
				<bitfield pos="1" name="ZCULL"/>
				<bitfield pos="2" name="CCACHE"/>
				<bitfield pos="3" name="ESETUP"/>
				<bitfield low="16" high="23" name="TP"/>
			</reg32>
			<reg32 offset="0xc94" name="TRAP_EN">
				<bitfield pos="0" name="PROP"/>
				<bitfield pos="1" name="ZCULL"/>
				<bitfield pos="2" name="CCACHE"/>
				<bitfield pos="3" name="ESETUP"/>
				<bitfield low="16" high="23" name="TP"/>
			</reg32>
		</array>

		<array name="TP" offset="0x4000" stride="0x800" length="4">
			<use-group name="nvc0_tp"/>
		</array>
	</group>

	<array name="CTXCTL" offset="0x9000" stride="0x1000" length="1">
		<use-group name="nvc0_ctxctl"/>
		<reg32 offset="0x604" name="UNITS">
			<bitfield low="0" high="4" name="GPC_COUNT"/>
			<bitfield low="16" high="20" name="ROP_COUNT"/>
		</reg32>
		<reg32 offset="0x614" name="RED_SWITCH">
			<bitfield pos="0" name="PAUSE_MAIN"/>
			<bitfield pos="1" name="PAUSE_GPC"/>
			<bitfield pos="4" name="POWER_MAIN"/>
			<bitfield pos="5" name="POWER_GPC"/>
			<bitfield pos="6" name="POWER_ROP"/>
			<bitfield pos="8" name="ENABLE_MAIN"/>
			<bitfield pos="9" name="ENABLE_GPC"/>
			<bitfield pos="10" name="ENABLE_ROP"/>
		</reg32>

		<reg32 offset="0xc14" name="INTR_UP_ROUTE" type="nvc0_ctxctl_iroute">
			<doc>Indexed fuc register, in 19 copies. Index i determines the source
			of interrupt i. Source for interrupt 19 is hardwired to 0x2b [WATCHDOG].</doc>
		</reg32>
		<reg32 offset="0xc18" name="INTR_UP_STATUS"/>
		<reg32 offset="0xc1c" name="INTR_UP_SET"/>
		<reg32 offset="0xc20" name="INTR_UP_CLEAR"/>
		<reg32 offset="0xc24" name="INTR_UP_ENABLE"/>
		<reg32 offset="0xc80" name="VSTATUS_0" access="r">
			<bitfield low="0" high="2" name="UNK0" type="NV50_VSTATUS"/>
			<bitfield low="3" high="5" name="UNK1" type="NV50_VSTATUS"/>
			<bitfield low="6" high="8" name="UNK2" type="NV50_VSTATUS"/>
			<bitfield low="9" high="11" name="UNK3" type="NV50_VSTATUS"/>
			<bitfield low="12" high="14" name="UNK4" type="NV50_VSTATUS"/>
			<bitfield low="15" high="17" name="UNK5" type="NV50_VSTATUS"/>
			<bitfield low="18" high="20" name="UNK6" type="NV50_VSTATUS"/>
			<bitfield low="21" high="23" name="UNK7" type="NV50_VSTATUS"/>
		</reg32>
		<reg32 offset="0xc84" name="VSTATUS_1" access="r">
			<bitfield low="0" high="2" name="UNK8" type="NV50_VSTATUS"/>
			<bitfield low="3" high="5" name="UNK9" type="NV50_VSTATUS"/>
			<bitfield low="6" high="8" name="UNK10" type="NV50_VSTATUS"/>
			<bitfield low="9" high="11" name="UNK11" type="NV50_VSTATUS"/>
			<bitfield low="12" high="14" name="UNK12" type="NV50_VSTATUS"/>
			<bitfield low="15" high="17" name="UNK13" type="NV50_VSTATUS"/>
			<bitfield low="18" high="20" name="UNK14" type="NV50_VSTATUS"/>
			<bitfield low="21" high="23" name="PCOUNTER" type="NV50_VSTATUS"/>
		</reg32>
		<reg32 offset="0xc88" name="VSTATUS_2" access="r">
			<bitfield low="0" high="2" name="UNK15" type="NV50_VSTATUS"/>
			<bitfield low="3" high="5" name="UNK16" type="NV50_VSTATUS"/>
		</reg32>
		<reg32 offset="0xc8c" name="VSTATUS_3" access="r">
			<bitfield low="0" high="2" name="UNK17" type="NV50_VSTATUS"/>
			<bitfield low="3" high="5" name="UNK18" type="NV50_VSTATUS"/>
			<bitfield low="6" high="8" name="UNK19" type="NV50_VSTATUS"/>
			<bitfield low="9" high="11" name="UNK20" type="NV50_VSTATUS"/>
		</reg32>
	</array>

	<array name="ROP_BROADCAST" offset="0x8800" stride="0x400" length="1">
		<use-group name="nvc0_rop"/>
	</array>

	<array name="ROP" offset="0x10000" stride="0x400" length="8">
		<use-group name="nvc0_rop"/>
	</array>

	<array name="GPC_BROADCAST" offset="0x18000" stride="0x8000" length="1">
		<use-group name="nvc0_gpc"/>
	</array>

	<array name="GPC" offset="0x100000" stride="0x8000" length="4">
		<use-group name="nvc0_gpc"/>
	</array>
</array>

</domain>

</database>

{'fraction_non_alphanumeric': 0.21159762623390635, 'fraction_numerical': 0.08159456425061604, 'mean_word_length': 4.688313842581073, 'pattern_counts': {'":': 0, '<': 1760, '<?xml version=': 2, '>': 1762, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '621069', 'n_tokens_mistral': 32427, 'n_tokens_neox': 27729, 'n_words': 5761}