The devinit system allows a GPU programming sequence to be shared by multiple entities that would otherwise not be able to execute common code. One of the primary uses is to initialize the GPU at boot time. The same sequence can be used by the VGA BIOS, the Resource Manager for secondary adapter cases, and the FCode firmware for the Apple Mac platforms. The devinit system also saves space because it can express many types of sequences in less space than normal x86 assembler code. Also, the format of the opcodes used by the devinit system are easy to parse which facilitates being able to customize sequences in an already compiled BIOS image using the BIOSMOD tool. The devinit system consists of scripts that contain opcodes that specify what operations a devinit engine need to perform. Many opcodes have parameters that specify things such as register addresses to use and data values to write to registers. A devinit engine parses these opcodes and performs the indicated operations. Each platform that uses devinit scripts needs to have its own engine (VBIOS, Resource Manager, FCODE). Starting with core6 the devinit engine has variations of a limited subset of opcodes that get their data values from a passed in data buffer. In the VBIOS implementation this buffer is passed in ES:DI. Because ES is used, the data buffer can be located in either the code segment (CS) for fixed data or the stack segment (SS) for dynamic data. There will be two types of variations: one that just grabs the data in sequence and one that has offsets from the beginning of the buffer specified. For example there is now: INIT_NV_REG (the original "inline data" version) dd <address> dd <mask> dd <data> INIT_NV_REG_UNCOUPLED (data is taken from ES:[DI + <data offset>], DI is not changed) dd <address> dd <mask> db <data offset> (notice "db", not "dd") INIT_NV_REG_STREAM (data is taken from next bits at ES:DI, current bit position advanced) dd <address> dd <mask> (notice no data value or offset at all) So for example scaler data could be in a buffer of dwords, and a sequence of INIT_ZM_REG_STREAM opcodes in a script could control where the values are written. With the *_UNCOUPLED opcodes the offset into the passed in data buffer is specified as a byte, which represents the byte offset into the data buffer. This results in a maximum offset of 255 bytes for a maximum buffer size of 256 bytes. The current position is not adjusted, all offsets are relative to the initial data buffer starting location (unless _STREAM opcodes have also been used). With the *_STREAM opcodes the devinit engine keeps track of the current bit position within the current byte. For opcodes with a mask each position of the mask that is a zero will result in a bit being extracted from the stream to fill that position in the data value. When all the bits of the current byte are used up, the devinit engine will advance to the next byte (ES:DI is incremented in the VBIOS implementation). All bits in the data value that correspond to bit positions in the mask that are one will be set to zero. This means that the bit stream is a "packed" bit stream. Bits are taken starting from the least significant bit of the stream byte, and shifted into the most significant bit of the constructed value and shifted to the right. So a mask of 0x00 (inverse is 0xFF) and a stream byte of 0x12 (assuming your starting at bit 0) would result in a data value of 0x12. A mask of 0x0F (inverse is 0xF0) and a stream byte of 0x12 (assuming your starting at bit 0) would result in a data value of 0x20. Below is an example of use of an *_STREAM opcode: Data Buffer Contents: 0x12 0xF4 Devinit Script: ; This will write a 0x12 into CRTC[A0] and advance the stream 8 bits db INIT_ZM_CRTC_STREAM db 0xA0 ; This opcode usage will result in an OR mask of 0x40 ; (the devinit engine extracts stream from the least significant bit), ; and will advance the stream by 4 bits ; (the inverse of the mask ^0x0F = 0xF0 which tells where the bits ; will be and how many there are) db INIT_CRTC_STREAM db 0xA1 db 0x0F ; For this operation the OR mask will be 0xC3 ; (comes from the "F" in 0xF4), ; the stream is advanced by 4 bits db INIT_CRTC_STREAM db 0xA2 db 0x3C It is possible to mix *_STREAM and *_UNCOUPLED opcodes. The *_UNCOUPLED opcodes will simply offset for the adjusted data buffer position without making any further adjustments. Note that the current bit position within the current byte is ignored and not changed by the *_UNCOUPLED opcodes. While mixing the opcodes can be useful in certain situations, great care must be taken to do it properly. The data buffer to use when running scripts for use with *_UNCOUPLED, *_STREAM, and *_READ type opcodes (only applicable for core6 and beyond) depends on the context. In other words, what buffer the devinit engine needs to use depends on what type of script is being run. When no specific data buffer is specified for a type of script, the Resource Manager script engine shall always be called with a default read/write buffer that is 256 bytes in length and initialized to be filled with zeros. This allows scripts to read registers, perform logic operations on the value read, and then write the value back to the same or other registers. Currently, the only script specific data buffer defined is the data buffer for the boot devinit scripts. Like the default data buffer, it shall be a 256 byte read/write buffer. Before passing the buffer to the engine the buffer shall first be cleared to all zeros and then the first portion shall be filled with data copied from the <TBD> table which is pointed to by the BIT in the bios image. This block of fixed values will usually be pointed to by the BIOS Preservation Table so that they remain fixed between firmware upgrades (and thus simulate fuses). Starting with core6 the devinit engine now has the ability to have a common script run for different display pipes (heads), different devices (Output Resources) or/and different sublinks. When the devinit engine is invoked, the device and/or display pipe to use is passed as a parameter to the engine. The device is often taken from the DCB entry of the device that needs to be accessed. To specify that a privileged register address needs to be adjusted depending on the passed in display pipe, the address to access is combined with DEVINIT_USE_DPIPE(0x80000000) using a logic OR. When the devinit engine sees an address with this bit set it masks out the bit and adjusts the base address to be correct for the display pipe that was specified when the engine was invoked. Under EVO designs, this means the passed in display pipe is multiplied by 0x800 and added to the base address. This example illustrates writing the pixel clock on the display pipe that was passed to the devinit engine. ; Write clock db INIT_NV_REG dd NV_PDISP_DSI_FLIPLOCK(0) OR DEVINIT_USE_DPIPE db DEVINIT_OFFSET_ECX Note that in some scripts the concept of specifying a display pipe has no meaning. Such scripts shall not have any addresses that use DEVINIT_USE_DPIPE. The INITCHK utility will flag scripts that use DEVINIT_USE_DEVICE but have no display pipe context with an error (not yet implemented). To specify that a opcode needs to be adjusted depending on the passed in device, the privileged register address to access is combined with the DEVINIT_USE_DEVICE(0x40000000) using a logic OR. When the devinit engine sees an address with this bit set it masks out the bit and adjusts the base address to be correct for the device that was specified when the engine was invoked. Under EVO designs, this means the passed in device is multiplied by 0x800 and added to the base address. This example illustrates disconnecting the source from a DAC output resource. The DAC index to use is passed to the devinit engine. ; Set up the source db  INIT_ZM_REG dd  NV_PDISP_VGA_DAC_CONTROL OR DEVINIT_USE_DEVICE dd  NV_PDISP_VGA_DAC_CONTROL_OWNER_NONE OR \\     NV_PDISP_VGA_DAC_CONTROL_CRCMODE_INIT OR \\     NV_PDISP_VGA_DAC_CONTROL_PROTOCOL_RGB_CRT Note that in some scripts the concept of specifying a device has no meaning. Such scripts shall not have any addresses that use DEVINIT_USE_DEVICE. The INITCHK utility will flag scripts that use DEVINIT_USE_DEVICE but have no device context with an error (not yet implemented). To specify that a opcode needs to be adjusted depending on the passed in sublink, the privileged register address to access is combined with the DEVINIT_USE_SUBLINK(0x20000000) using a logic OR, as it is now, when DEVINIT_USE_SUBLINK is set, we would also need DEVINIT_USE_DEVICE to be set. When the devinit engine sees an address with this bit set it masks out the bit and adjusts the base address to be correct for the sublink that was specified when the engine was invoked. Under EVO designs, this means the passed in device is multiplied by 0x80 and added to the base address. This example illustrates enabling power to a particular SOR and Sublink. ; Enable link power db  INIT_NV_REG dd  NV_PDISP_SOR_DP_LINKCTL0(0) OR DEVINIT_USE_DEVICE OR DEVINIT_USE_SUBLINK dd  NOT NV_PDISP_SOR_DP_LINKCTL0_ENABLE_FIELD_MASK dd  NOT NV_PDISP_SOR_DP_LINKCTL0_ENABLE_YES Note that in some scripts the concept of specifying a sublink has no meaning. Such scripts shall not have any addresses that use DEVINIT_USE_SUBLINK. The INITCHK utility will flag scripts that use DEVINIT_USE_SUBLINK but have no device context with an error (not yet implemented). The DEVINIT_USE_DPIPE, DEVINIT_USE_DEVICE and DEVINIT_USE_SUBLINK bits are in the upper nibble of the 32-bit address, so they do not conflict with the address space of privileged registers (which are constrained to 24 bits). Similar to handling Device Indexes and Display Pipe Indexes for normal opcodes, the method opcodes (INIT_DISPLAY_METHOD*) have flags that are bitwise OR'ed with the method offset. To specify that a method offset needs to be adjusted depending on the passed in display pipe, the method offset is combined with DEVINIT_METHOD_USE_DPIPE using a logic OR. When the devinit engine sees a method offset with this bit set it masks out the bit and adjusts the base method offset to be correct for the display pipe that was specified when the engine was invoked. Under EVO designs, this means the passed in display pipe is multiplied by the proper amount and added to the base method offset. To specify that a opcode needs to be adjusted depending on the passed in DAC, SOR, or PIOR, the method offset is combined with DEVINIT_METHOD_USE_DAC, DEVINIT_METHOD_USE_SOR, or DEVINIT_METHOD_USE_PIOR using a logic OR. When the devinit engine sees a method offset with one of these bits it masks out the bit and adjusts the base method offset to be correct for the device that was specified when the engine was invoked. Under EVO designs, this means the passed in device is multiplied by the proper amount and added to the base method offset. The DEVINIT_METHOD_USE_DPIPE, DEVINIT_METHOD_USE_DAC, DEVINIT_METHOD_USE_SOR, and DEVINIT_METHOD_USE_PIOR bits are in the upper nibble of the 32-bit method offset, so they do not conflict with the address space of the method offsets themselves. There are a variety of opcodes that are no longer in use that are marked as deprecated. Deprecated opcodes are subject to be removed or redefined without further notice. All opcodes that deal with an I/O port may need to be adjusted according to the operating environment at the time of execution unless otherwise specified. For example, if the I/O port is specified as 0x3D4 and the controller is configured for monochrome operation, the port will be automatically adjusted to 0x3B4. This is also true of any of the CRTC opcodes, where the current I/O port address of the CRTC at the time the opcode is process is used. Implementations may need or wish to cache writes to the Miscellaneous Output Register (which controls the CRTC I/O port location) and simulate this operation. Unless otherwise noted, scripts and implementations of devinit engines shall not rely on scripts to preserve I/O register indexes. However, it is valid for implementations to preserve the indexes if it simplifies handling of the opcodes. Thus scripts can not rely on I/O indexes either being preserved or not preserved. Implementations are allowed to save and restore I/O register indexes even when no other operations are performed due to the condition flag state being set to skip operations. Devinit engines in platforms other than the VGA BIOS, such as the Resource Manager, usually need to convert I/O port operations into their equivalent privileged register operation. Please see "NVXX Display Class Priv Register Manual" (dev_disp.ref) for the proper mappings to use. Any devinit engines that use I/O ports directly must take into account the Attribute Controller flip-flop when Attribute Controller registers are specified by an instruction. This is required so that the index and data registers are accessed correctly. Devinit engines that convert I/O port accesses to privileged registers may need to simulate the Attribute Controller flip-flop depending on how the Attribute Controller registers are mapped to privileged registers on a given chip. While not required, it is acceptable to reset the Attribute Controller flip-flop even when other accesses are being skipped due to the state of the condition flag. It is also acceptable to reset the Attribute Controller flip-flop for all registers, not just Attribute Controller registers. For the I2C opcodes devinit engines may acquire the I2C port and prepare it for usage and shut it down and release it when it has finished processing the opcode, even when no I2C transactions are performed such as when the state of the condition flag is set to skip operations. The PLL ID's are used to identify a PLL with a single byte instead of having to use the full 32-bit privileged registers address. These are standardized and used by the Resource Manager, they can not change (other than adding new ones, old ones are not reused). PLL ID's above 080h are assume to be in groups of 16. The lower nibble is stripped when the VGA BIOS searches the PLL lookup table for previous calculated coefficients, so all PLL's in a group need to have the same limit parameters for their PLL coefficient calculation. The PLL ID's defines are listed with the PLL Info Table specification in the "Core 6 Design Specification". For chips with two VGA heads (NV11-NV49), unless otherwise specified the opcodes all use the current CR44 head setting for reads and writes. If the CR44 head is not set earlier in the current script, the setting at the time the script is run is used. Note that chips G80 and beyond only have one VGA head (but have more than one display pipe). With very few exceptions, Devinit engines on different platforms must not attempt to "interpret" what a devinit script is doing in order to slightly modify the operations performed, unless absolutely necessary (starting with Core 6 VGA BIOS and FCODE images). Devinit engines must generally execute the operations specified by the devinit script verbatim. Doing this is very important in order to allow maintaining compatibility with future chips using existing drivers. Exceptions to this rule include conversion of I/O port opcodes to privileged registers in engines that cannot use I/O ports directly, tracking the location of the CRTC registers (0x3B4/0x3D4), and properly dealing with or simulating the attribute controller index/data flip-flop. Any other exceptions to this rule must be listed in this specification. Sub scripts, which are invoked with INIT_SUB/INIT_SUB_DIRECT, are typically implemented by starting a new Devinit Engine context. This new context would reset the Condition Flag. However, this is not the case in all engines: VBIOS CPU engine: INIT_SUB/INIT_SUB_DIRECT implicitly saves and restores the condition flag. VBIOS PMU engine: INIT_SUB/INIT_SUB_DIRECT implicitly saves and restores the condition flag. UEFI CPU engine: INIT_SUB/INIT_SUB_DIRECT implicitly saves and restores the condition flag. RM CPU engine: INIT_SUB/INIT_SUB_DIRECT re-uses the same context, so the condition flag is not saved/restored. Delay a period of time in microsecond units.
This opcode causes the BIOS to delay processing for the number of microseconds specified in the delay value field. If the condition flag is set to the skip execution state, the time delay shall not occur. Prior to core6, a delay of 0 invokes debugger (int1). This can be used as a devinit script "breakpoint". For core6 and beyond, use INIT_BREAK.
All implementations prior to core6 ignore the condition flag. Code in compliance. Code in compliance.
Delay a period of time in milliseconds.
This opcode causes the BIOS to delay processing for the number of milliseconds specified in the delay value field. If the condition flag is set to the skip execution state, the time delay shall not occur.
All implementations prior to core6 ignore the condition flag. Code in compliance. Code in compliance.
Modify a privileged register.
This opcode first reads the specified privileged register. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using the OR mask. The resulting value is then written to the privileged register.
Code in compliance. Engine is skipping all register accesses, not just the final write. Engine is skipping all register accesses, not just the final write.
Modify a privileged register using a value from a passed in data buffer.
This opcode first reads the specified privileged register. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using the 32-bit OR mask retrieved from the passed in data buffer. The resulting value is then written to the privileged register.
Code in compliance. Not implemented yet. Not implemented yet.
Modify a privileged register using a value from a passed in data stream.
This opcode first reads the specified privileged register. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using the 32-bit OR mask retrieved from the passed in data stream. The resulting value is then written to the privileged register. The number of bits the devinit engine will extract from the stream will be equal to the number of bits that are clear in the mask. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Read a privileged register.
This opcode reads the specified privileged register and stores the value read at an offset in the passed in data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Write a new value to a privileged register (zero mask).
This opcode writes the data value to the specified privileged register without prior consideration to the previous value of the register.
Code in compliance. Performs special handling for certain GPIO, PLL, power, and clock registers (needs to be removed for core6). Code in compliance.
Write a new value to a privileged register (zero mask) using a value from a passed in data buffer.
This opcode writes the data value to the specified privileged register without prior consideration to the previous value of the register.
Code in compliance. Not implemented yet. Not implemented yet.
Write a new value to a privileged register (zero mask) using a value from a passed in data stream.
This opcode writes the data value to the specified privileged register without prior consideration to the previous value of the register. The devinit engine will always extract 32 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Sets specified bits in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "OR" operation with the specified data value, and writes the result back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Sets bits specified by a value from a passed in data buffer in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "OR" operation with a value from the passed in data buffer, and writes the result back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Sets bits specified by a value from a passed in data stream in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "OR" operation with a value from the passed in data stream, and writes the result back to the register. The devinit engine will always extract 32 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Resets specified bits in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "AND" operation with the complement of the specified data value, and writes the result back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Resets bits specified by a value from a passed in data buffer in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "AND" operation with the complement of a value from the passed in data buffer, and writes the result back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Resets bits specified by a value from a passed in data stream in a privileged register leaving other bits unchanged.
This opcode reads the current value of the specified register, performs an "AND" operation with the complement of a value from the passed in data stream, and writes the result back to the register. The devinit engine will always extract 32 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Write a new 16-bit value to a privileged register (zero mask).
This opcode writes the 16-bit data value to the specified privileged register without prior consideration to the previous value of the register.
Not implemented (deprecated). Performs special handling for certain GPIO, PLL, power, and clock registers (needs to be removed for core6).
Write a sequential block of privileged register with set of values.
This opcode writes a sequential set of data values to a sequential set of privileged registers. The privileged registers are assumed to be offset 4 bytes from each other.
Code in compliance. Code in compliance. Code in compliance.
Write the same privileged register repeatedly with a sequence of data values.
This opcode writes a sequential set of data values to a single privileged register. This is usually used for programming blocks of indexed data registers where auto-incrementing of the index occurs. The initial index is usually written with a previous instruction such as INIT_ZM_REG.
Not implemented. Not implemented. Not implemented.
Program the specified PLL with a 16-bit frequency value.
This opcode will cause the indicated PLL to be programmed with a value that generates the specified clock frequency. The coefficients programmed into the PLL are calculated by the BIOS from the frequency, based on the chipset's PLL programming algorithm. The 16-bit frequency value is stored in kilohertz units (i.e.: 125Mhz = 12500).
Not implemented. Code in compliance. Ignores condition code.
Program the specified PLL with a 32-bit frequency value.
This opcode will cause the indicated PLL to be programmed with a value that generates the specified clock frequency. The coefficients programmed into the PLL are calculated by the BIOS from the frequency, based on the chipset's PLL programming algorithm. The 32-bit frequency value is stored in kilohertz (i.e.: 125Mhz = 125000). This opcode was actually added in core4r2, but first released in core5. Starting with core6 the opcode only updates the coefficients and does not configure or enable the PLL.
Code in compliance. Code in compliance. Ignores condition code.
Program the PLL specified by a PLL ID with a 32-bit frequency value.
This opcode will cause the indicated PLL to be programmed with a value that generates the specified clock frequency. The coefficients programmed into the PLL are calculated by the BIOS from the frequency, based on the chipset's PLL programming algorithm. The PLL is specified by a PLLID. The ID's are fixed defined values. The 32-bit frequency value is stored in kilohertz (i.e.: 125Mhz = 125000). This opcode only updates the coefficients and does not configure or enable the PLL.
Not implemented. Not implemented. Not implemented.
Modify an I/O port.
This opcode first reads a data value from the I/O port. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using the OR mask. The resulting value is then written back to the I/O port.
Code in compliance. Engine is skipping all register accesses, not just the final write. Engine is skipping all register accesses, not just the final write.
Modify an I/O port using a value from a data stream.
This opcode first reads a data value from the I/O port. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using a value from a passed in data stream. The resulting value is then written back to the I/O port. The number of bits the devinit engine will extract from the stream will be equal to the number of bits that are clear in the mask. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Write a new value to an I/O port (zero mask).
This opcode writes the specified value to the specified I/O port.
Code in compliance. Code in compliance. Code in compliance.
Modify an indexed I/O port.
This opcode first writes the register index to the index register of the indexed I/O port (i.e.: 0x3D4) to select the indexed register to be written. It then reads a value from the data register of the indexed I/O port (i.e.: 0x3D5), performs a logical AND on the read value using the AND mask, then a logical OR on the value using the OR mask. The resulting value is then written back to the data register of the indexed I/O port.
Code in compliance. Engine is skipping all register accesses, not just the final write. No special handling is being performed for Attribute Controller registers. Engine is skipping all register accesses, not just the final write. No special handling is being performed for Attribute Controller registers.
Modify an indexed I/O port using a value from a passed in data buffer.
This opcode first writes the register index to the index register of the indexed I/O port (i.e.: 0x3D4) to select the indexed register to be written. It then reads a value from the data register of the indexed I/O port (i.e.: 0x3D5), performs a logical AND on the read value using the AND mask, then a logical OR on the value using a value from a passed in data buffer. The resulting value is then written back to the data register of the indexed I/O port.
Code in compliance. Not implemented yet. Not implemented yet.
Modify an indexed I/O port using a value from a passed in data stream.
This opcode first writes the register index to the index register of the indexed I/O port (i.e.: 0x3D4) to select the indexed register to be written. It then reads a value from the data register of the indexed I/O port (i.e.: 0x3D5), performs a logical AND on the read value using the AND mask, then a logical OR on the value using a value from a passed in data stream. The resulting value is then written back to the data register of the indexed I/O port. The number of bits the devinit engine will extract from the stream will be equal to the number of bits that are clear in the mask. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Modify a CRTC register.
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then reads a value from the CRTC data register, performs a logical AND on the read value using the AND mask, then a logical OR on the value using the OR mask. The resulting value is then written back to the CRTC data register.
Code in compliance. Engine is skipping all register accesses, not just the final write. Code in compliance.
Modify a CRTC register using a value from a passed in data buffer.
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then reads a value from the CRTC data register, performs a logical AND on the read value using the AND mask, then a logical OR on the value using a value from a passed in data buffer. The resulting value is then written back to the CRTC data register.
Code in compliance. Not implemented yet. Not implemented yet.
Modify a CRTC register using a value from a passed in data stream.
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then reads a value from the CRTC data register, performs a logical AND on the read value using the AND mask, then a logical OR on the value using a value from a passed in data stream. The resulting value is then written back to the CRTC data register. The number of bits the devinit engine will extract from the stream will be equal to the number of bits that are clear in the mask. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Set bits in a CRTC register leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "OR" operation with the specified data value, and writes the result back to the CRTC register.
Code in compliance. Not implemented yet. Not implemented yet.
Set bits in a CRTC register using a value from a passed in data buffer leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "OR" operation using a value from a passed in data buffer, and writes the result back to the CRTC register.
Code in compliance. Not implemented yet. Not implemented yet.
Set bits in a CRTC register using a value from a passed in data stream leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "OR" operation using a value from a passed in data stream, and writes the result back to the CRTC register. The devinit engine will always extract 8 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Reset bits in a CRTC register leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "AND" operation with the complement of the specified data value, and writes the result back to the CRTC register.
Code in compliance. Not implemented yet. Not implemented yet.
Reset bits in a CRTC register using a value from a passed in data buffer leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "AND" operation with the complement of a value from a passed in data buffer, and writes the result back to the CRTC register.
Code in compliance. Not implemented yet. Not implemented yet.
Reset bits in a CRTC register using a value from a passed in data stream leaving other bits unchanged.
This opcode reads the current value of the specified CRTC register, performs an "AND" operation with the complement of a value from a passed in data stream, and writes the result back to the CRTC register. The devinit engine will always extract 8 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Read a CRTC register.
This opcode reads the specified CRTC register and stores the value read at an offset in the passed in data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Read a span of CRTC registers and store the values in a byte stream.
This opcode reads sequential span of CRTC registers and stores the values read into the passed in data stream. The devinit engine will always insert 8 bits for each read CRTC register into the stream when processing this opcode.
Code in compliance. Not implemented yet. Not implemented yet.
Write a span of CRTC registers with data from a byte stream.
This opcode writes a sequential span of CRTC registers using values from a passed in data stream. The devinit engine will always extract 8 bits for each CRTC register from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final values from being written back to the registers.
Code in compliance. Not implemented yet. Not implemented yet.
Poll an I/O port until a masked value compares correctly.
This opcode will poll an I/O port continually until a masked value results in a positive compare. This opcode uses the same table of conditions as the INIT_IO_CONDITION opcode. The timeout value sets the maximum amount of time this opcode will consume, and is not meant to control the sample rate for the terminating condition. This means that the mask/compare operation will usually occur at a higher rate than the delay value. If the poll is not satisfied and a timeout condition occurs the condition flag will be set to the skip execution state. Otherwise the condition flag is left in its current state from before the execution of the opcode. For this reason, it will often be necessary to follow this opcode with an INIT_RESUME if there is no need to know if the timeout occurred. An index of 0xFF in the I/O condition table signals that a direct I/O port shall be used instead of an indexed I/O port.
Code in compliance. Code in compliance. Code in compliance. BYTE INIT_POLL BYTE 1 ; I/O Condition code BYTE 02h ; 200 milliseconds max before continuing
Poll a privileged register until a masked value compares correctly.
This opcode will poll a privileged register continually until a masked value results in a positive compare. This opcode uses the same table of conditions as the INIT_CONDITION opcode. The timeout value sets the maximum amount of time this opcode will consume, and is not meant to control the sample rate for the terminating condition. This means that the mask/compare operation will usually occur at a higher rate than the delay value. If the poll is not satisfied and a timeout condition occurs the condition flag will be set to the skip execution state. Otherwise the condition flag is left in its current state from before the execution of the opcode. For this reason, it will often be necessary to follow this opcode with an INIT_RESUME if there is no need to know if the timeout occurred.
Code in compliance. Code in compliance. Code in compliance. This example will poll using condition code 1, and will not take more than 200 milliseconds before terminating. BYTE INIT_POLL_NV BYTE 03h ;Condition code to poll for BYTE 02h ;200 milliseconds max before continuing
Write a new value to an indexed I/O port (zero mask).
This opcode first writes the register index to the index register of the indexed I/O port (i.e.: 0x3D4) to select the indexed register to be written. It then writes the data value to the data register of the indexed I/O port.
Code in compliance. No special handling is being performed for Attribute Controller registers. No special handling is being performed for Attribute Controller registers.
Write a new value to a CRTC register (zero mask).
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then writes the data value to the CRTC data register.
Code in compliance. Code in compliance. Code in compliance.
Write a new value to a CRTC register from a passed in data buffer (zero mask).
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then writes the data value from a passed in data buffer to the CRTC data register.
Code in compliance. Not implemented yet. Not implemented yet.
Write a new value to a CRTC register from a passed in data stream (zero mask).
This opcode first writes the register index to the CRTC index register to select the indexed register to be written. It then writes the data value from a passed in data stream to the CRTC data register. The devinit engine will always extract 8 bits from the stream for this opcode. The bits must be extracted even when the condition code state prevents the final value from being written back to the register.
Code in compliance. Not implemented yet. Not implemented yet.
Write a set values to a set of CRTC registers with no mask (zero mask).
This opcode writes a specified number of CRTC registers, with the index for each data value being specified. The register indexes can be specified randomly, they do not have to follow any particular sequence or order.
Code in compliance. Code in compliance. Code in compliance.
Perform a copy from a privileged register to an indexed I/O port.
This opcode is used to copy data from a portion of a privileged register and copy it to an indexed I/O port. First a 32-bit value is read from the register at the specified privileged register. This value is then shifted using the 8-bit shift count. A positive shift count indicates a right shift, and a negative shift count (two's complement) indicates a left shift. An AND operation is then performed on this shifted value using the 8-bit source AND mask. Next, an 8-bit value is read from the specified indexed I/O port at the specified index. An AND operation is performed on this value with the 8-bit AND mask. Finally, an OR operation is performed using the this value and the value resulting from the AND with the 8-bit source AND mask. The result is then written back to the indexed I/O port. S008shift can be negative (two's complement) for a left shift This opcode may eventually be deprecated, but currently full support exists in core6+ as of 2008-01-17.
Once a data buffer is available for boot devinit scripts, this opcode will be replaced with the use of the read and logic opcodes. Code in compliance. Engine is skipping all register accesses, not just the final write. Engine is skipping all register accesses, not just the final write.
Perform a copy from a privileged register to another privileged register.
This opcode is used to copy data from a portion of a privileged register to a different privileged register. First a value is read from the specified privileged register. This value is then shifted using the shift count. A positive shift count indicates a right shift, and a negative shift count (two's complement) indicates a left shift. An AND operation is then performed on this shifted value using the source AND mask. An XOR operation is then performed on the result of the AND operation and the XOR mask. Next, a value is read from the destination register address. An AND operation is performed on this value and the destination AND mask, with that result then used in an OR operation with the previous result of the XOR operation. The result is then written back to the destination register. Note that any of the following changes can be done to the individual bits of the destination register by using the specified values for the source AND mask and source XOR mask (for all four cases, the corresponding bit in the destination AND mask needs to be 0): Direct copy from source register (AND mask bit = 1, XOR mask bit = 0) Inverted copy from source register (AND mask bit = 1, XOR mask bit = 1) Force bit to 0 (AND mask bit = 0, XOR mask bit = 0) Force bit to 1 (AND mask bit = 0, XOR mask bit = 1) To preserve a bit in the destination register, the corresponding bit in the destination AND mask needs to be 1, and both the source AND mask and source XOR mask need to be zero. S008shift can be negative (two's complement) for a left shift. This opcode may eventually be deprecated, but currently full support exists in core6+ as of 2008-01-17.
Once a data buffer is available for boot devinit scripts, this opcode will be replaced with the use of the read and logic opcodes. Code in compliance. Engine is skipping all register accesses, not just the final write. Engine is skipping all register accesses, not just the final write.
Perform a direct copy from a privileged register to another privileged register with no manipulation of the data value.
This opcode is used to copy data from a privileged register to a different privileged register. A value is read from the privileged register specified by the u032addr field. The value read is then written back to the destination register specified by u032destaddr.
Code in compliance. Code in compliance. Not implemented.
Restrict processing according to memory configuration register
This opcode first reads a 32-bit value from the NV_PFB_BOOT_0 register and applies the logical AND mask to the lower 8 bits. The resulting value is compared to the comparison value. If the values do not match the condition flag is set to the skip operations state.
Code in compliance. Code in compliance. Not implemented (deprecated).
Restrict processing according to strap register contents.
This opcode first reads a value from the NV_PEXTDEV_BOOT_0 register and applies the logical AND mask to the value read. The resulting value is compared to the comparison value. If the values do not match the condition flag is set to the skip operations state.
Code in compliance. Code in compliance. Not implemented (deprecated).
Used to end a block of script that was restricted due to a condition.
This opcode unconditionally sets the condition flag to the allow operations state so that following opcodes will be processed.
Code in compliance. Code in compliance. Code in compliance.
Perform NOT on the condition flag.
This opcode causes the current state of the condition flag to be inverted.
Code in compliance. Code in compliance. Code in compliance.
Toggle bits to perform a reset operation.
This opcode is used to toggle bits in a register to a disabled state, delay, and then back to an enabled state in order to perform a reset operation. As of core5, the VGA BIOS implementation of handler for this opcode saves the value of NV_PBUS_PCI_NV_19 and clears it to 0. It then sets the specified off state in NV_PMC_ENABLE, delays for 5 microseconds, and sets the on state in NV_PMC_ENABLE. Next it restores NV_PBUS_PCI_NV_19 and turns off NV_PBUS_PCI_NV_20_ROM_SHADOW_ENABLED in NV_PBUS_PCI_NV_20. The Resource Manager implementation disables SBA and AGP. For non-mobile NV17 boards it reads the value of NV_PMC_ENABLE, writes the off state to NV_PMC_ENABLE, delays for 1 millisecond, writes the on state to NV_PMC_ENABLE and reads NV_PMC_ENABLE two more times. For all other boards it writes the off state to NV_PMC_ENABLE and then writes the on state NV_PMC_ENABLE. Finally, for all boards the Resource Manager restores the AGP command register, disables ROM shadow, and reinitializes the timer. The FCode implementation differs in that it respects the condition flag. It disables AGP, SBA, and FW, writes the off state to NV_PMC_ENABLE, delays 5 microseconds, writes the on state to NV_PMC_ENABLE, restores the AGP Command register, and disables ROM shadow. For core6 and beyond, the use of this opcode has been replaced with the use of other opcodes to perform the same operation.
Code in compliance. Code in compliance. Engine is honoring the condition flag.
Execute another script and then return to process the current script.
The Script Table entry to be executed can be found by taking the script table index, multiplying by 2, and adding the result to the Script Table pointer. Control returns to the opcode immediately following the INIT_SUB after the sub script has been executed. In the VBIOS implementation of the devinit engine, the new script is executed by calling the devinit engine recursively. If the condition flag is set to the skip operations state the subscript will not be executed.
Code in compliance. Code in compliance. Code in compliance.
Terminate execution of the current script and run a new one.
The Script Table entry to be executed can be found by taking the script table index, multiplying by 2, and adding the result to the Script Table pointer. This opcode ends processing of the current script, and begins execution of the new script. Control is not returned to the script containing the INIT_JUMP opcode. If the condition flag is set to the skip operations state the jump will not be executed. In that case, there need to be valid opcodes following the INIT_JUMP opcode.
Code in compliance. Code in compliance. Code in compliance.
Execute a generic function in the function table.
This opcode causes the code function specified by the index number to be executed. Following the return of the function, execution continues at the next opcode. Taking the function number, multiplying by 2, and adding the result to the Function Table Pointer base offset will find the location of the offset of the desired function.
Code in compliance. Code in compliance. Not implemented.
Execute register macro array.
This opcode causes the specified macro sequence to be executed from the Macro Table. After completing the macro, execution will continue with the next opcode in the current script. Taking the macro index from the Macro Index Table, multiplying by 8, and adding the result to the Macro Table Pointer base offset will provide the start of the macro in the Macro Table.
Code in compliance. Code in compliance. Code in compliance.
Restrict further processing based on a register condition.
This opcode causes the indicated condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met the condition flag is set to the skip operations state. Taking the condition number, multiplying by 12, and adding the result to the Condition Table Pointer base offset will find the start of the given condition.
Code in compliance. Code in compliance. Engine is checking condition code on entry.
Restrict further processing based on an I/O condition.
This opcode causes the indicated I/O condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met the condition flag is set to the skip operations state. Taking the condition number, multiplying by 5, and adding the result to the I/O Condition Table Pointer base offset will find the start of the given condition. Starting with core5, an index of 0xFF in the I/O condition table signals that a direct I/O port shall be used instead of an indexed I/O port.
Code in compliance. Code in compliance. Engine is checking condition code on entry.
Restrict further processing based on a flag in a flag array indexed by an I/O port value.
This opcode causes the indicated I/O flag condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met the condition flag is set to the skip operations state. Taking the condition number, multiplying by 9, and adding the result to the I/O Flag Condition Table Pointer base offset will find the start of the given condition.
Code in compliance. Engine is forcing the condition code to allow operations on entry when it should be unmodified if condition succeeds. Engine is checking condition code on entry.
Write a privileged register with a value from an array chosen based on the value of another privileged register.
The first privileged register is read and the value read is masked with the specified AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to determine the value to write to the destination privileged register. If the address of the privileged register to write is specified as 0, then no writes will occur. This can be used as a placeholder for a future register address.
Code in compliance. Code in compliance. Code in compliance. And example of writing a panel register, based on a strap field, would be: BYTE  INIT_RESTRICT_PROG DWORD NV_PEXTDEV_BOOT_0 ; Base on strap register DWORD 0x03000000 ; AND mask for desired straps BYTE  24 ; Shift count to make 0 based index BYTE  4  ; Maximum values to select from DWORD NV_PRAMDAC_FP_DEBUG_0 ; Register to write with data DWORD 0x00000384 ; Data for strap index 0 DWORD 0x0000037F ; Data for strap index 1 DWORD 0x00000383 ; Data for strap index 2 DWORD 0x00000384 ; Data for strap index 3
Write a privileged register with a value from an array chosen based on the value of an indexed I/O port.
The indexed I/O register specified by the I/O port and index is read and the value read is masked with the specified AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to determine the value to write to the destination privileged register. If the address of the privileged register to write is specified as 0, then no writes will occur. This can be used as a placeholder for a future register address.
Code in compliance. Code in compliance. Code in compliance.
Modify a privileged register with a value from an array chosen based on the value of an indexed I/O port.
The indexed I/O register specified by the I/O port and index is read and the value read is masked with the specified source AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to determine the value to use to modify the destination privileged register. The destination privileged register is read and the resulting value is masked with the specified AND mask. An OR operation is performed between masked value and the value selected from the data array. The result is written back into the destination privileged register. If the address of the privileged register to write is specified as 0, then no writes will occur. This can be used as a placeholder for a future register address.
Code in compliance. Engine is skipping all register accesses, not just the final write. Code in compliance.
Program a PLL with a frequency in a table indexed by the value in I/O port.
The indexed I/O register specified by the I/O port and index is read and the value read is masked with the specified AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to fetch the frequency value to program the PLL to. The frequency array is in 10 kHz units. If the specified doubling I/O flag condition is true, then the frequency will be doubled before being programmed. This is typically used for DDR memory. If the address of the PLL register to program is specified as 0, then no PLL programming will occur. This can be used as a placeholder for a future PLL register address.
Not implemented. Engine is skipping all register accesses, not just the final setting of the PLL. Engine is skipping all register accesses, not just the final setting of the PLL.
Program a PLL from a dword frequency array indexed by the value in I/O port.
The indexed I/O register specified by the I/O port and index is read and the value read is masked with the specified AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to fetch the frequency value to program the PLL to. The frequency array is in 1 kHz units. If the address of the PLL register to program is specified as 0, then no PLL programming will occur. This can be used as a placeholder for a future PLL register address. This opcode was added in core4r2, but first released in core5. Starting with core6 the opcode only updates the coefficients and does not configure or enable the PLL.
Code in compliance. Engine is skipping all register accesses, not just the final setting of the PLL. Engine is skipping all register accesses, not just the final setting of the PLL.
Program a PLL specified by a PLLID from a dword frequency array indexed by the value in I/O port.
The indexed I/O register specified by the I/O port and index is read and the value read is masked with the specified AND mask and shifted by the specified shift count. The resulting value is used as an index into the array of data values to fetch the frequency value to program the PLL to. The frequency array is in 1 kHz units. The PLL is specified by a PLLID. The ID's are fixed defined values. If the ID of the PLL register to program is specified as 0, then no PLL programming will occur. This can be used as a placeholder for a future PLL register address. This opcode only updates the coefficients and does not configure or enable the PLL.
Not implemented. Not implemented. Not implemented.
Write a privileged register with a value from an array chosen based on the boards memory strap, with a bit screen to specify if the write should be allowed.
The VFIELDID_STRAP_MEMSEL virtual register field is used to obtain a memory strap value. The memory strap value is used as an index into the MemoryStrapTranslation array (pointed to by the BIT). The byte retrieved from the MemoryStrapTranslation is used as an index into the array of data values to retrieve the value to write to the destination privileged register. The translated value is also used to index into a bit screen (mask). If the selected bit is zero, the final write to the destination register shall be skipped. If the selected bit is one, the state of the condition flag determines if the final write to the destination register shall be skipped. The number of data values is specified by the MemoryStrapDataCount (located in the BIT). The number of bits used for the bit screen is determined by rounding MemoryStrapDataCount up to the next whole byte (8 screen bits per byte). If the address of the privileged register to write is specified as 0, then no writes shall occur. This can be used as a placeholder for a future register address. While the Resource Manager must use the VFIELDID_STRAP_MEMSEL virtual register field to obtain the memory strap, the VGA BIOS and Fcode implementations can optionally hard code the logic for obtaining the memory strap or use a different table to obtain it. This can be used to avoid requiring the VGA BIOS or Fcode implementations do processing of virtual fields.
Not implemented. Not implemented. Not implemented.
Modify a privileged register using an AND mask and a value from an array chosen based on the boards memory strap, with a bit screen to specify if the write should be allowed.
The VFIELDID_STRAP_MEMSEL virtual register field is used to obtain a memory strap value. The memory strap value is used as an index into the MemoryStrapTranslation array (pointed to by the BIT). The byte retrieved from the MemoryStrapTranslation is used as an index into the array of data values to retrieve the value used to modify the destination privileged register. The engine reads the privileged register, and then performs a logical AND on the read value using the AND mask. It then does a logical OR on the value using the chosen value from the array of data values. The resulting value is then written back to the privileged register. The translated value is also used to index into a bit screen (mask). If the selected bit is zero, the final write to the destination register shall be skipped. If the selected bit is one, the state of the condition flag determines if the final write to the destination register shall be skipped. The number of data values is specified by the MemoryStrapDataCount (located in the BIT). The number of bits used for the bit screen is determined by rounding MemoryStrapDataCount up to the next whole byte (8 screen bits per byte). If the address of the privileged register to write is specified as 0, then no writes shall occur. This can be used as a placeholder for a future register address. While the Resource Manager must use the VFIELDID_STRAP_MEMSEL virtual register field to obtain the memory strap, the VGA BIOS and Fcode implementations can optionally hard code the logic for obtaining the memory strap or use a different table to obtain it. This can be used to avoid requiring the VGA BIOS or Fcode implementations do processing of virtual fields.
Not implemented. Not implemented. Not implemented.
Write a consecutive sequence of privileged registers with a block of values from a two dimensional array chosen based on the boards memory strap.
The VFIELDID_STRAP_MEMSEL virtual register field is used to obtain a memory strap value. The memory strap value is used as an index into the MemoryStrapTranslation array (pointed to by the BIT). The byte retrieved from the MemoryStrapTranslation is used as a starting index into the array of data values. The address specified in the instruction is used as the starting privileged register address. A 32-bit value retrieved from the array using the starting index is written to the privileged register. The privileged register address is advanced by the number of bytes specified by the stride and the index into the data values is advanced by adding the value of MemoryStrapDataCount (located in the BIT). This is repeated so that the total number of registers written is equal to the value of the count field in the instruction. The total number of data values in the array is computed by multiplying the count specified in the instruction by the value of MemoryStrapDataCount. If the address of the privileged register to write is specified as 0, then no writes shall occur. This can be used as a placeholder for a future register address. While the Resource Manager must use the VFIELDID_STRAP_MEMSEL virtual register field to obtain the memory strap, the VGA BIOS and Fcode implementations can optionally hard code the logic for obtaining the memory strap or use a different table to obtain it. This can be used to avoid requiring the VGA BIOS or Fcode implementations do processing of virtual fields.
Code in compliance. Not implemented. Not implemented.
Set a PLL with a frequency from an array chosen based on the boards memory strap.
The VFIELDID_STRAP_MEMSEL virtual register field is used to obtain a memory strap value. The memory strap value is used as an index into the MemoryStrapTranslation array (pointed to by the BIT). The byte retrieved from the MemoryStrapTranslation is used as an index into the array of frequencies to determine the frequency to program the specified PLL to. The coefficients programmed into the PLL are calculated by the BIOS from the frequency, based on the chipset's PLL programming algorithm. The 32-bit frequency value is stored in kilohertz (i.e.: 125Mhz = 125000). The PLL is specified by a PLLID. The ID's are fixed defined values. The number of frequency values is specified by the MemoryStrapDataCount (located in the BIT). While the Resource Manager must use the VFIELDID_STRAP_MEMSEL virtual register field to obtain the memory strap, the VGA BIOS and Fcode implementations can optionally hard code the logic for obtaining the memory strap or use a different table to obtain it. This can be used to avoid having the VGA BIOS or Fcode implementations have to do virtual field processing. This opcode only updates the coefficients and does not configure or enable the PLL.
Not implemented. Not implemented. Not implemented.
Repeat a block of script a specified number of times.
This opcode causes the following code, up to an INIT_END_REPEAT, to be executed a specified number of times. Note that there must not be an INIT_DONE (or synonym) before the INIT_END_REPEAT code. The INIT_REPEAT opcode ignores the condition flag, but the codes being repeated will refer to or change the condition flag as they normally would.
Code in compliance. Code in compliance. Code in compliance.
End of current script.
This opcode terminates the processing of the current script. For the boot scripts the devinit engine will continue processing with the next script in the Script Table. If the condition flag is not reset via INIT_RESUME prior to INIT_DONE, correct operation is not guaranteed. See section on "Sub scripts and the Condition Flag."
Code in compliance. Code in compliance. Code in compliance.
NV1 opcode for the end of current script.
This opcode signifies the end of the current script. It was replaced by INIT_DONE.
Signal the end of a repeat block.
This opcode delimitates the end of a INIT_REPEAT block.
Code in compliance. Code in compliance. Code in compliance.
Execute another script (specified with a direct offset) and then return to process the current script.
Unlike INIT_SUB which uses a script index, this opcode has a direct offset to the sub script. Control returns to the opcode immediately following the INIT_SUB after the sub script has been executed. In the VBIOS implementation of the devinit engine, the new script is executed by calling the devinit engine recursively. If the condition flag is set to the skip operations state the subscript will not be executed.
Code in compliance. Code in compliance. Code in compliance.
Terminate execution of the current script and run a new one (specified with a direct offset).
This opcode ends processing of the current script, and begins execution of the new script. Control is not returned to the script containing the INIT_JUMP opcode. Unlike INIT_JUMP which uses a script index, this opcode has a direct offset to the new script. If the condition flag is set to the skip operations state the jump will not be executed. In that case, there need to be valid opcodes following the INIT_JUMP opcode.
Code in compliance. Code in compliance. Code in compliance.
Terminate execution of the current script and run a new one (specified relative to the current offset).
This opcode ends processing of the current script, and begins execution of the new script. Control is not returned to the script containing the INIT_JUMP opcode. This opcode uses a relative displacement from the current location to specify where to continue execution. The displacement is relative to the offset immediately after the displacement byte. The displacement is a signed two's complement value. If the condition flag is set to the skip operations state the jump will not be executed. In that case, there need to be valid opcodes following the INIT_JUMP opcode.
Code in compliance. Code in compliance. Code in compliance.
Exit current script if conditions have been met.
This opcode terminates processing of the current script if the condition flag is set to the perform operations state.
Code in compliance. Code in compliance. Code in compliance.
Write a sequence of new values to a sequence of I2C registers (zero mask). When count = 1, Sends I2C register byte address, without adding any effective write
The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) For core4r2 the I2C port for external devices is always assumed to be I2C_C except on crush where it is I2C_D. So for core4r2 the current head does not need to be known. For core5 the DCB entry for the currently active device on the CR44 head is checked to see if the primary or secondary I2C port for external devices shall be used. The primary and secondary ports are specified in the DCB I2C Control Block. For core5 two other special values can also be used for the I2C Port Index. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. For core6 another special value USE_DCB_DDC (0xFE) can also be used for the I2C Port Index, it uses the associated DCB entry's DDC port. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88). Note that the count shall include the register address byte (RAB) and thus has to be one more than the number of data values following the RAB. The devinit engine must not generate any I2C traffic when the condition code specifies that operations should be skipped.
Code in compliance. Not implemented. Not implemented.
Write a set of new values to a set of I2C registers (zero mask).
This opcode causes a given number of registers in a device to be written with specified values through a given I2C port. The designation 'alternating' refers to this opcode's ability to simulate the mode of some I2C devices which allows them to write several non-adjacent I2C registers in a single I2C message by concatenating {address, data} pairs (normally described as 'alternating write mode'). This opcode simulates that ability by breaking the {address, data} pairs into separate I2C messages, with a full stop/start inserted between each pair. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) For core4r2 the I2C port for external devices is always assumed to be I2C_C except on crush where it is I2C_D. So for core4r2 the current head does not need to be known. For core5 the DCB entry for the currently active device on the CR44 head is checked to see if the primary or secondary I2C port for external devices shall be used. The primary and secondary ports are specified in the DCB I2C Control Block. For core5 two other special values can also be used for the I2C Port Index. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. For core6 another special value USE_DCB_DDC (0xFE) can also be used for the I2C Port Index, it uses the associated DCB entry's DDC port. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88). The devinit engine must not generate any I2C traffic when the condition code specifies that operations should be skipped.
Code in compliance. Not implemented. Not implemented.
Read/modify/write an list of I2C register(s)
This opcode causes a specified set of registers in a device to be read, modified, and rewritten through a given I2C port. The designation 'alternating' refers to this opcode's ability to simulate the mode of some I2C devices which allows them to write several non-adjacent I2C registers in a single I2C message by concatenating {address, data} pairs (normally described as 'alternating write mode'). This opcode simulates that ability by breaking the {address, data} pairs into separate I2C messages, with a full Stop/Start inserted between each pair. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) For core4r2 the I2C port for external devices is always assumed to be I2C_C except on crush where it is I2C_D. So for core4r2 the current head does not need to be known. For core5 the DCB entry for the currently active device on the CR44 head is checked to see if the primary or secondary I2C port for external devices shall be used. The primary and secondary ports are specified in the DCB I2C Control Block. For core6 another special value USE_DCB_DDC (0xFE) can also be used for the I2C Port Index, it uses the associated DCB entry's DDC port. For core5 two other special values can also be used for the I2C Port Index. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88). The devinit engine must not generate any I2C traffic when the condition code specifies that operations should be skipped.
Code in compliance. Not implemented. Not implemented.
Poll an I2C register until a masked value compares correctly
This opcode will poll an I2C register continually until a masked value results in a positive compare. The timeout value sets the maximum amount of time this opcode will consume, and is not meant to control the sample rate for the terminating condition. This means that the mask/compare operation will usually occur at a higher rate than the delay value. Note that the units for this opcode are different than the other polling opcodes. If the poll is not satisfied and a timeout condition or an I2C read failure occurs the condition flag will be set to the skip operations state. Otherwise the condition flag is left in its current state from before the execution of the opcode. For this reason, it will often be desirable to follow this opcode with an INIT_RESUME if there is no need to know if the timeout occurred. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) For core4r2 the I2C port for external devices is always assumed to be I2C_C except on crush where it is I2C_D. So for core4r2 the current head does not need to be known. For core5 the DCB entry for the currently active device on the CR44 head is checked to see if the primary or secondary I2C port for external devices shall be used. The primary and secondary ports are specified in the DCB I2C Control Block. For core5 two other special values can also be used for the I2C Port Index. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. For core6 another special value USE_DCB_DDC (0xFE) can also be used for the I2C Port Index, it uses the associated DCB entry's DDC port. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88).
Code in compliance. Not implemented. Not implemented. This example will poll register 0x04 from the device at address 0x70 on I2C port B. Bit 3 of the read value needs to be 0 and bit 2 needs to be a 1. The polling will not take more than 20 milliseconds before terminating. BYTE INIT_POLL_I2C BYTE 02h ; Use I2C port B as specified in the DCB BYTE 70h ; Device address 0x70 BYTE 04h ; Register address 0x04 BYTE 0Ch ; AND mask BYTE 04h ; Compare value BYTE 02h ; 20 milliseconds max before continuing
Check the condition of a register over I2C port
This opcode causes the indicated I2C condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met or an I2C read failure occurs the condition flag is set to the skip operations state. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) For core4r2 the I2C port for external devices is always assumed to be I2C_C except on crush where it is I2C_D. So for core4r2 the current head does not need to be known. For core5 the DCB entry for the currently active device on the CR44 head is checked to see if the primary or secondary I2C port for external devices shall be used. The primary and secondary ports are specified in the DCB I2C Control Block. For core5 two other special values can also be used for the I2C Port Index. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. For core6 another special value USE_DCB_DDC (0xFE) can also be used for the I2C Port Index, it uses the associated DCB entry's DDC port. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88).
Code in compliance. Not implemented. Not implemented. This example will test register 0x04 from the device at address 0x70 on I2C port B. Bit 3 of the read value needs to be 0 and bit 2 needs to be a 1 for the condition to be considered met. BYTE INIT_I2C_CONDITION BYTE 02h ; Use I2C port B as specified in the DCB BYTE 70h ; Device address 0x70 BYTE 04h ; Register address 0x04 BYTE 0Ch ; AND mask BYTE 04h ; Compare value
Performs read/modify/write on an internal TMDS/LVDS encoder link register.
This opcode reads a TMDS/LVDS encoder link register at the specified index on the specified link, masks the value with the specified AND mask, performs an OR operation with the specified OR mask, and write the result back to the register. The definition of the "link" field is as follows: 0 - link A 1 - link B 2 - link C 3 - link D 0x80 - "context" link 0x81 - "context" link's mate (link B if link A is the "context" link) Where "context" link is defined as the link that needs to be operated on. For the Resource Manager, the code will have complete knowledge of which this is. For the VBIOS the definition of the "context" link as follows: 1. Take the current value for CR44 to determine the "current" head. (Note: While the VBIOS always leaves CR44 in broadcast mode for apps, internally it sets it to only the head its currently dealing with (enabling, disabling, changing DPMS level, etc.) 2. Use the scratch register to find what the current DCB index is for the current head (Note: Step 1 above is just conceptual, by just reading the scratch register, CR44 automatically directs us to the current head). 3. Use the link specified in the retrieved DCB entry
Code in compliance. Code in compliance. Code in compliance.
Write a sequence of data values to an internal TMDS/LVDS encoder link.
This opcode writes the specified index/data pairs to the specified internal TMDS/LVDS encoder link. The definition of the "link" field is as follows: 0 - link A 1 - link B 2 - link C 3 - link D 0x80 - "context" link 0x81 - "context" link's mate (link B if link A is the "context" link) Where "context" link is defined as the link that needs to be operated on. For the Resource Manager, the code will have complete knowledge of which this is. For the VBIOS the definition of the "context" link as follows: 1. Take the current value for CR44 to determine the "current" head. (Note: While the VBIOS always leaves CR44 in broadcast mode for apps, internally it sets it to only the head its currently dealing with (enabling, disabling, changing DPMS level, etc.) 2. Use the scratch register to find what the current DCB index is for the current head (Note: Step 1 above is just conceptual, by just reading the scratch register, CR44 automatically directs us to the current head). 3. Use the link specified in the retrieved DCB entry
Code in compliance. Code in compliance. Code in compliance.
Write a set of indirectly indexed CRTC registers with constants.
This opcode will write a series of indirectly indexed CRTC registers. This opcode first writes the index register index to the CRTC base address (0x3D4 or 0x3B4) to select the 'CR space' of the bank of indirect CRTC registers (referred to as INDxx here) to access. It then writes the starting indirect index to the CRTC data register (0x3D5 or 0x3B5). The next step is to write the data register index to the CRTC base address (0x3D4 or 0x3B4) to allow access to the INDxx register of interest. It then writes the data1 value to the CRTC data register (0x3D5 or 0x3B5), effectively updating that INDxx register. This repeats for the number of INDxx registers specified by the count N. A two INDxx register example is given here. The example sets IND00 and IND01 to FFh. For clarity, the example is translated here as a series of DEBUG commands. o 3d4 57 ;use color CRTC base address to select INDxx index o 3d5 0 ;point at IND00 o 3d4 58 ;use color CRTC base address to select INDxx data o 3d5 FF ;update IND00 to FFh o 3d4 57 ;use color CRTC base address to select INDxx index o 3d5 1 ;point at IND01 o 3d4 58 ;use color CRTC base address to select INDxx data o 3d5 FF ;update IND01 to FFh
Code in compliance. Engine is skipping all register accesses, not just the final write. Engine is skipping all register accesses, not just the final write. BYTE INIT_INDEXED_CRTC BYTE 57h ;CRTC INDxx index register BYTE 58h ;CRTC INDxx data register BYTE 00h ;starting INDxx index BYTE 02h ;count BYTE FFh ;first data byte BYTE FFh ;second data byte
Perform a logic AND operation on a dword in the data buffer and a specified value.
The 32-bit value at the specified byte offset into the data buffer is retrieved. An AND operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a logic OR operation on a dword in the data buffer and a specified value.
The 32-bit value at the specified byte offset into the data buffer is retrieved. An OR operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a logic XOR operation on a dword in the data buffer and a specified value.
The 32-bit value at the specified byte offset into the data buffer is retrieved. An XOR operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a shift operation on a dword in the data buffer by a specified amount.
The 32-bit value at the specified byte offset into the data buffer is retrieved. The value is right shifted by the specified number of bits. The result is stored back at the specified byte offset into the data buffer. S008shift can be negative (two's complement) for a left shift
Code in compliance. Not implemented yet. Not implemented yet.
Perform a logic AND operation on a byte in the data buffer and a specified value.
The 8-bit value at the specified byte offset into the data buffer is retrieved. An AND operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a logic OR operation on a byte in the data buffer and a specified value.
The 8-bit value at the specified byte offset into the data buffer is retrieved. An OR operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a logic XOR operation on a byte in the data buffer and a specified value.
The 8-bit value at the specified byte offset into the data buffer is retrieved. An XOR operation is performed between the retrieved value and the data value specified in the opcode. The result is stored back at the specified byte offset into the data buffer.
Code in compliance. Not implemented yet. Not implemented yet.
Perform a shift operation on a byte in the data buffer by a specified amount.
The 8-bit value at the specified byte offset into the data buffer is retrieved. The value is right shifted by the specified number of bits. The result is stored back at the specified byte offset into the data buffer. S008shift can be negative (two's complement) for a left shift
Code in compliance. Not implemented yet. Not implemented yet.
Skip past the specified number of bits in the data stream.
The current position of the data stream is advanced by the specified number of bits. The stream can be advanced into the next byte or any following bytes. S008data can be negative (two's complement) to go backward in the stream.
Code in compliance. Not implemented yet. Not implemented yet.
Forces a computation of the memory size.
This function forces the init processor to execute the chipset specific algorithm to compute the total frame buffer memory size installed. This opcode causes the BIOS function NVResizeMemory to be called. Upon return from the memory sizing routine, the devinit engine continues processing.
Code in compliance. Code in compliance. Engine is honoring the condition flag.
Forces the Memory Information Table entry look-up.
This function forces the init processor to execute entry look-up in the Memory Information Table, which includes reading Memory Strap and/or Memory ID from hardware registers and searching for the matching entry. The memory information is then cached for fast retrieval in subsequent operations. Upon return from the Memory Information Table entry look-up, the devinit engine continues processing. This opcode allows for clear indication of when to read the Memory Strap and Memory ID registers, which may be manipulated by other devinit opcodes, so that all engines can be instructed to process the Memory Information Table in an identical sequence.
Not Implemented. Not Implemented. Not Implemented.
Write an NV1 DAC register after applying a mask.
This opcode first reads the DAC register. It then performs a logical AND on the read value using the AND mask, then a logical OR on the value using the OR mask. The resulting value is then written to the specified register.
Not implemented (deprecated).
Configure Memory Registers (Skip to Next Table).
This function forces the initialization processor to execute the chipset specific algorithm to initialize the memory configuration registers using the memory configuration tables. This operation is performed before the memory sizing is performed. Prior to core3, the opcode would cause the devinit engine to call the hard coded memory initialization routine (NVConfigureMemory). This opcode was modified starting in core3 to instead terminate the current script, which would cause the execution of the following script in the POST Script Table to be executed. Note: Compatibility with older drivers written for BIOS images before core3 is maintained by pointing the next sequential Script Table entry at the memory initialization script. The Script Table entry following the memory initialization script entry points back to the next opcode in the pre-core3 compatible devinit script.
Code in compliance. Code in compliance. Code in compliance.
This function forces the initialization processor to execute the chipset specific algorithm to initialize the memory PLL and NV PLL using the memory configuration tables. Prior to core3, the opcode would cause the devinit engine to call the hard coded memory initialization routine (NVConfigureClocks). This opcode was modified starting in core3 to instead terminate the current script, which would cause the execution of the following script in the POST Script Table to be executed. Note: Compatibility with older drivers written for BIOS images before core3 is maintained by pointing the next sequential Script Table entry at the clock initialization script. The Script Table entry following the clock initialization script entry points back to the next opcode in the pre-core3 compatible devinit script.
Code in compliance. Code in compliance. Code in compliance.
Configure initialization variables from HW strapping.
This function forces the initialization processor to execute the chipset specific algorithm to initialize certain scratch bits that indicate the strapped hardware configuration by way of reading the Strapping Register (NV_PEXTDEV_BOOT_0). The opcode initializes variables for the reference frequency (13Mhz vs. 14.318Mhz), and the RAM configuration straps. Prior to core3, the opcode would cause the devinit engine to call the hard coded initialization routine (ChipPreInit). This opcode was modified starting in core3 to instead terminate the current script, which would cause the execution of the following script in the POST Script Table to be executed. Note: Compatibility with older drivers written for BIOS images before core3 is maintained by pointing the next sequential Script Table entry at the pre-initialization script. The Script Table entry following the pre-initialization script entry points back to the next opcode in the pre-core3 compatible devinit script.
Code in compliance. Code in compliance. Code in compliance.
Set the NV1 DAC PLL synthesizer clock.
Programs the specified NV1 PLL with the specified coefficients.
Not implemented (deprecated).
Signal end of the initialization script.
This opcode terminates the processing of the current script. For the boot scripts the devinit engine will continue processing with the next script in the Script Table.
Write a sequence of data values to an address latched index register set.
This opcode retrieves the first data value and writes it to the data register. It then reads the control register and performs an AND operation on the value read and the control AND mask. An OR operation is done between the resulting value, the control OR mask, and the first index value. This value is then written back to the control register. This process is repeated for all the index/data pairs. The number of pairs is specified by the count value. If the data register is specified as zero, the devinit engine must skip processing of this opcode.
The Core5 implementation is not checking for a data register address of zero. Code in compliance. Code in compliance.
Test frequency condition.
This opcode causes the indicated frequency condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met the condition flag is set to the skip operations state. Taking the PLL code, multiplying by 4, and adding the result to the PLL Register Table Pointer base offset will find the register address of the PLL coefficients to use for the test. The clock frequency is computed from these coefficients and then compared to the range. The range is specified in 10 kHz units. The range to use is first determined by using the virtual field code to access the virtual field table. The value from this register field is fetched. The value is then used as a byte index into the translation table referenced by the translation code. The value at that byte is then used as the index in the frequency array to determine which range to use.
This opcode is only used in the full memory initialization sequence for the Resource Manager. Not implemented (not needed at this time). Code in compliance. Not implemented (not needed at this time).
Write a privileged register with a value from a table indexed by the translated value of field in another privileged register.
This opcode writes different values to a register based on a translated value. The virtual field code is used to access the virtual field table. The value from this register field is fetched. The value is then used as a byte index into the translation table referenced by the translation code. The value at that byte is then used as the index in the data array to determine which dword to use. The indicated register is read and an AND operation is performed using the AND mask. Finally, an OR operation is performed using the dword from the data array and the result is written back into the register. If the address of the privileged register to write is specified as 0, then no writes will occur. This can be used as a placeholder for a future register address.
This opcode is only used in the full memory initialization sequence for the Resource Manager. Not implemented (not needed at this time). Code in compliance. Not implemented (not needed at this time).
Write a part of a privileged register with a value from a table indexed by the translated value of field in another register.
This opcode writes different values to a register based on a translated value. The virtual field code is used to access the virtual field table. The value from this register field is fetched. The value is then used as a byte index into the translation table referenced by the translation code. The value at that byte is then used as the index in the data array to determine which byte to use. The indicated register is read and an AND operation is performed using the AND mask. Finally, an OR operation is performed using the byte from the data array after it has been shifted by the indicated shift amount and the result is written back into the register. If the address of the privileged register to write is specified as 0, then no writes will occur. This can be used as a placeholder for a future register address.
This opcode is only used in the full memory initialization sequence for the Resource Manager. Not implemented (not needed at this time). Code in compliance. Not implemented (not needed at this time).
Programs a PLL with a value from a table indexed by the translated value of field in another register.
This opcode programs different values to a PLL based on a translated value. The virtual field code is used to access the virtual field table. The value from this register field is fetched. The value is then used as a byte index into the translation table referenced by the translation code. The value at that byte is then used as the index in the data array to determine which frequency to use. If the address of the PLL register to program is specified as 0, then no PLL programming will occur. This can be used as a placeholder for a future PLL register address.
This opcode is only used in the full memory initialization sequence for the Resource Manager. Not implemented (not needed at this time). Not checking to see if the PLL register to program is zero. Not implemented (not needed at this time).
Programs spread spectrum for all PLL's/clocks that have spread spectrum enabled, other than the pixel clocks.
This function causes all spread spectrum programming to occur for the system, other than pixel clocks. Processing of the opcode depends on the core and chip family, but for the most part involves checking the DCB to see if spread is enabled and what the settings are and programming those settings. Spread programming should be performed for both internal and external spread (which ever one is specified in the DCB).
Code in compliance. Code in compliance. Not implemented.
Add a delta to current value of a privileged register with mask.
This opcode first reads the specified privileged register. It then adds the add value to the value read. Next it performs a logical AND on the resulting sum using the bitwise inverse of the AND mask to mask out any overflow. A logical AND on the original value read using the AND mask (not inverted) is then performed. The results of the two AND operations are then combined with a logical OR operation. The result from the final OR operation is then written to the privileged register.
Code in compliance. Code in compliance. Code in compliance.
Write DPCD registers with mask.
This opcode first reads the specified DPCD registers, and with AND mask, then or with the data. The result is then written to the DPCD registers.
Code in compliance. Code in compliance. Code in compliance.
Write DPCD registers.
This opcode writes the specified DPCD registers.
Code in compliance. Code in compliance. Code in compliance.
Poll DPCD register until a masked value compares correctly
This opcode will poll a DPCD register continually until a masked value results in a positive compare. The timeout value sets the maximum amount of time this opcode will consume, and is not meant to control the sample rate for the terminating condition. This means that the mask/compare operation will usually occur at a higher rate than the delay value. If the poll is not satisfied and a timeout condition or a DPCD read failure occurs the condition flag will be set to the skip operations state. Otherwise the condition flag is left in its current state from before the execution of the opcode. For this reason, it will often be desirable to follow this opcode with an INIT_RESUME if there is no need to know if the timeout occurred.
Code in compliance. Not implemented. Not implemented.
Check the condition of a DPCD register
This opcode causes the indicated DPCD condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met or a DPCD read failure occurs the condition flag is set to the skip operations state.
Code in compliance. Not implemented. Not implemented.
Programs a PLL with a frequency from a table indexed by the translated value of field in another register.
This opcode programs different values to a PLL based on a translated value. The virtual field code is used to access the virtual field table. The value from this register field is fetched. The value is then used as a byte index into the translation table referenced by the translation code. The value at that byte is then used as the index in the data array to determine which frequency to use. If the address of the PLL register to program is specified as 0, then no PLL programming will occur. This can be used as a placeholder for a future PLL register address. Starting with core6 the opcode only updates the coefficients and does not configure or enable the PLL.
This opcode is only used in the full memory initialization sequence for the Resource Manager. Not implemented (not needed at this time). Not implemented. Not implemented (not needed at this time).
Write a part of a privileged register with a value from a table indexed by the value of field in another privileged register.
First a 32-bit value is read from the register at the specified privileged register (source register). This value is then right shifted using the 8-bit shift count. An AND operation is then performed on this shifted value using the 8-bit source AND mask. The resulting value, the data array offset, is then used as an index into a data array of bytes to get the value to write into the destination privileged register. The data array to use is indicated by the data array table index. The data array table index is an index into a table of word pointers to data arrays. The base address of the data array pointer table (referred to as the table of word pointers above) is in the VBIOS BIT (DataArraysTablePtr in the BIT_NVINIT_PTRS structure). The destination register is read and an AND operation is performed using the AND mask. The value retrieved from the data array is shifted left by the indicated shift amount and then ORed with the the result of the AND operation in the previous step. The resulting value is written back into the destination register.
Code in compliance. Not implemented. Not implemented.
Cause a breakpoint to be triggered while processing the devinit script.
This opcode causes the BIOS to assert an INT1 to invoke the debugger. This can be used as a devinit script "breakpoint". This opcode must never appear in production code.
Code in compliance. Not currently supported. Not currently supported.
Signal that the reset sequence has begun.
This opcode signals that the software reset sequence has begun. Ordinarily, no actual operations are performed by the opcode. However it allows for possible software work arounds by devinit engines in software agents other than the VBIOS, such as the resman, FCODE, and EFI driver. This opcode is designed to be included in the devinit script immediately after the NV_PMC_ENABLE register has be written to put most engines into a reset state. In general, performing operations when encountering this opcode should be avoided. Ideally any new operations needed should be communicated back to the VGA BIOS team so that they can be listed explicitly in the devinit sequence. The reason for this is that these work arounds can interfere with forward compatibility. However, this opcode exists for those cases where embedding the operations in the devinit sequence is not possible or practical (such as work arounds for VGA BIOS images that have already shipped). Any operations performed when this opcode is processed must be documented here in this specification to make sure these operations are taken into account for future devinit scripts.
Code in compliance. Not currently supported. Not currently supported.
Signal that the reset sequence has completed.
This opcode signals that the software reset sequence has completed. Ordinarily, no actual operations are performed by the opcode. However it allows for possible software work arounds by devinit engines in software agents other than the VBIOS, such as the resman, FCODE, and EFI driver. This opcode is designed to be included in the devinit script immediately after the NV_PMC_ENABLE register has be written to take most of the engines out of the reset state. In general, performing operations when encountering this opcode should be avoided. Ideally any new operations needed should be communicated back to the VGA BIOS team so that they can be listed explicitly in the devinit sequence. The reason for this is that these work arounds can interfere with forward compatibility. However, this opcode exists for those cases where embedding the operations in the devinit sequence is not possible or practical (such as work arounds for VGA BIOS images that have already shipped). Any operations performed when this opcode is processed must be documented here in this specification to make sure these operations are taken into account for future devinit scripts.
Code in compliance. Not currently supported. Not currently supported.
Configure all GPIO's based on the DCB GPIO Assignment Table.
This opcode causes the devinit engine to process the DCB GPIO Assignment Table and initialize the output enable and output level for each listed GPIO to the state specified by the "init" bit in each entry. The normal, sequencer, alternate setting for each GPIO listed is also configured.
Code in compliance. Code in compliance. Not currently supported.
Initialize all GPIOs less a specified set of GPIOs by function, based on the DCB GPIO Assignment Table.
This opcode is similar to INIT_GPIO_ALL, except that it lists an array of GPIO functions to be excluded from initialization. It can only be called once in devinit.
Code in compliance. Code in compliance. Not currently supported.
Initialize a specified set of GPIOs by function, based on the DCB GPIO Assignment Table.
This opcode is similar to INIT_GPIO_ALL, except that it lists an array of GPIO functions to be initialized. It can be called multiple times in devinit.
Code in compliance. Not currently supported. Not currently supported.
Invoke a dipslay class method.
This opcode executes a display class method. See the following documents for information about display methods: \\hw\nv5x\class\mfs\class\disp\dispClass_01.mfs, \\hw\nv5x\doc\nv50\iso\specifications\display\display_software_interface.doc, \\hw\nv5x\doc\nv50\iso\specifications\display\display_driver_vbios_switching.doc This opcode is usually not used and is never included in scripts visible to the resman. This opcode is called INIT_METHOD_507D in the EFI source code, but plans are to update that.
Code in compliance. Code not present. Should remain that way for now. Code in compliance, but name of opcode incorrect.
Invoke a dipslay class method using a data value from a passed in data buffer.
This opcode executes a display class method. See the following documents for information about display methods: \\hw\nv5x\class\mfs\class\disp\dispClass_01.mfs, \\hw\nv5x\doc\nv50\iso\specifications\display\display_software_interface.doc, \\hw\nv5x\doc\nv50\iso\specifications\display\display_driver_vbios_switching.doc This opcode is usually not used and is never included in scripts visible to the resman. This opcode is called INIT_METHOD_507D_UNCOUPLED in the EFI source code, but plans are to update that.
Code in compliance. Code not present. Should remain that way for now. Code in compliance, but name of opcode incorrect.
Invoke a dipslay class method using a data value a passed in data stream.
This opcode executes a display class method. See the following documents for information about display methods: \\hw\nv5x\class\mfs\class\disp\dispClass_01.mfs, \\hw\nv5x\doc\nv50\iso\specifications\display\display_software_interface.doc, \\hw\nv5x\doc\nv50\iso\specifications\display\display_driver_vbios_switching.doc This opcode is usually not used and is never included in scripts visible to the resman. The devinit engine will extract 32-bits from the stream. The bits must be extracted even when the condition code state prevents the final value from being written back to the register. This opcode is called INIT_METHOD_507D_STREAM in the EFI source code, but plans are to update that.
Code in compliance. Code not present. Should remain that way for now. Code in compliance, but name of opcode incorrect.
Restrict further processing based on a generic condition with a condition ID.
This opcode causes the indicated condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met the condition flag is set to the skip operations state. Condition ID: CONDITION_ID_INT_DP = 0x00: condition is met if it is internal DP(i.e. requires sequencer control). CONDITION_ID_USE_SPPLL0 = 0x01: condition is met if DP uses SPPLL0. CONDITION_ID_USE_SPPLL1 = 0x02: condition is met if DP uses SPPLL1. (0x3 and 0x4 are reserved for future expansion if we are going to have more SPPLLs.) CONDITION_ID_ASSR_SUPPORT = 0x05: condition is met if DP panel supports ASSR(eDP). CONDITION_ID_FINISH_VCO_CAL_IN_DEVINIT = 0x06: condition is met if the final steps of TMDS VCO calibration should be handled in the devinit script. CONDITION_ID_NO_PANEL_SEQ_DELAYS = 0x07: This condition is true when the panel is in self refresh or if RM has setup a flag to capture supervisor script or for other modes for which we are sure that the panel will not be powered down and doesnt need sequencing. When this condition is true, we run the IED Script with no delays (sor_lvds_Init_Sequencer_nd) and if this condition is false, we run the normal script which has delays (sor_lvds_Init_Sequencer). CONDITION_INVALID = 0xFF: we could override condition ID to _INVALID, in effect to skip this condition. Condition length field is added in an effort to make smooth synchronization between vbios and driver changes. When new condition ID is added, if code(vbios/driver/efi) doesn't support it yet, it should skip condition_length bytes, and continue to process the next devinit token.
Code in compliance. Code not present. Code not present.
Resets CR register bit based on OUTDEV, e.g. resets bit0 if it is SOR0.
This opcode resets bitx if it is OUTDEVx.
Code in compliance. Code not present. Code not present.
Sets CR register bit based on OUTDEV, e.g. sets bit0 if it is SOR0.
This opcode sets bitx if it is OUTDEVx.
Code in compliance. Code not present. Code not present.
Attempts to obtain a PMU hardware mutex
This opcode attempts to obtain a hardware mutex specified by the PMU architecture. The code will make multiple attempts over several milliseconds. Number and time to be determined through testing. Mutex values 1-3 are reserved for vbios. When run by vbios, this opcode will use a value of 2. Operations will be skipped if the mutex is currently held by vbios. When run by RM, the normal process of obtaining a mutex value through the NEXT_AVAIL_MUTEX_ID register should be followed. Be careful when using this opcode within a condition block. Operations will be skipped if the condition flag is set, but this opcode can also set the condition flag if the mutex is not obtained.
Code not present. Code not present. Code not present.
Releases a PMU hardware mutex
This opcode releases a hardware mutex obtained with INIT_OBTAIN_HW_MUTEX. The write will only be performed if the mutex is held by the party executing the command (VBIOS or RM). As this opcode honors the condition flag which is set by INIT_OBTAIN_HW_MUTEX, it should be followed by INIT_RESUME in most cases.
Code not present. Code not present. Code not present.
Executes a specified PMU routine
This opcode executes a PMU routine through the PBI (post-box interface). It can be modeled by this sequence: INIT_HW_OBTAIN_MUTEX pbi INIT_ZM_REG pbi_data_in, param INIT_ZM_REG pbi_ctrl, exec_routine INIT_HW_RELEASE_MUTEX pbi INIT_RESUME The exception to this sequence is that this opcode honors the condition flag and does not affect it.
Code not present. Code not present. Code not present.
Check the condition of a register over 16-bit I2C port
This opcode performs the same functions as INIT_I2C_CONDITION, but for I2C devices that use 16-bit register addressing.
Not audited. Not implemented. Not implemented.
Set NVVDD depending on the VDT entry
This opcode invokes the PMU to set the NVVDD depending on the VDT table entry that is passed.
Audited. Not implemented. Not implemented.
No operation
This opcode does nothing and used to increment the current script offset. This opcode is primarily used to replace existing opcodes in devinit WAR infrastructure.
Code in compliance Not implemented Not implemented. Not implemented.
Restrict further processing based on a register condition.
This opcode reads the specified priveleged register. It then performs a logical AND operation on the read value using the AND MASK provided. It then compares this result to the value field. If the value field matches the result, condition flag is unmodified. If the value field doesn't match the result, condition flag is set to skip operations state.
Code in compliance Not implemented Not implemented. Not implemented.
Reduce the privilege level of the EXT transaction.
This opcode is used to reduce the privilege level to 0. Please note that we only lower the PRIV level only for the transaction and not the actual priv level. This opcode is primarily used in the devinit WAR binary before OVERWRITE and INSERT operations.
Code in compliance Not implemented Not implemented. Not implemented.
Restore the privilege level of the EXT transaction
This opcode is used to restore the privilege level to 3. Please note that we only restore the PRIV level only for the transaction and not the actual priv level. This opcode is primarily used in the devinit WAR binary after OVERWRITE and INSERT operations.
Code in compliance Not implemented Not implemented. Not implemented.
Write a set of privileged registers repeatedly with different sequences of data values.
This opcode writes different blocks of values into a set of privileged registers. This opcode provides scope of space optimizations where a particular set of registers needs to be written with different set of values multiple times.
Code in compliance Not implemented Not implemented. Not implemented.
Calculates and sets up TSOSC temperature coefficients.
Temperature Sensing OSCillators (TSOSCs) require various coefficients for calibration. This opcode reads calibration values from fuses as parameters, calculates the needed coefficients, and programs them.
Code in compliance Not implemented Not implemented. Not implemented.
Poll a privileged register until a masked value compares correctly, only if surrounding INIT_CONDITION is true.
This opcode does the same routine as INIT_POLL_NV after checking for prior register condition in INIT_CONDITION, skips the polling process if the prior condition is not met.
Code in compliance Code in compliance Not implemented. Not implemented. If INIT_CONDITION just before INIT_POLL_NV_COND is met, this example will poll using condition code 1, and will not take more than 200 milliseconds before terminating, else will skip the polling process. BYTE INIT_POLL_NV_COND BYTE 03h ;Condition code to poll for BYTE 02h ;200 milliseconds max before continuing
Write a set of new word values to a set of I2C registers (zero mask).
This opcode causes a given number of registers in a device to be written with specified values through a given I2C port. The designation 'alternating' refers to this opcode's ability to simulate the mode of some I2C devices which allows them to write several non-adjacent I2C registers in a single I2C message by concatenating {address, data} pairs (normally described as 'alternating write mode'). This opcode simulates that ability by breaking the {address, data} pairs into separate I2C messages, with a full stop/start inserted between each pair. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) The primary and secondary ports are specified in the DCB I2C Control Block. USE_PRIMARY_I2C uses the primary port and USE_SECONDARY_I2C uses the secondary port as specified in the DCB I2C Control Block. The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88). The devinit engine must not generate any I2C traffic when the condition code specifies that operations should be skipped.
Code in compliance Not implemented. Not implemented. Not implemented.
Check the condition of a register with 16bit data over I2C port
This opcode causes the indicated I2C condition to be tested. If the condition is met the condition flag is unmodified. If the condition is not met or an I2C read failure occurs the condition flag is set to the skip operations state. The I2C Port Index uses the same equates normally used in the VBIOS, i.e. I2C_A, I2C_B, to indicate the first and second logical I2C ports, respectively. Alternatively, USE_DCB_I2C (0xFF) will force the usage of the logical I2C port index associated with the currently active display for programming external devices, a per-head value. Internally, the VBIOS uses the DCB index scratch register field for the current head to find the I2C port specified by the DCB entry. This assumes: 1. When this opcode is called, the VBIOS is NOT in broadcast mode 2. The DCB index for the head the VBIOS is on is either a valid DCB index or EMPTY_HEAD 3. If the DCB index is EMPTY_HEAD the opcode processing will be skipped (essentially, making this opcode a no-op) The device address specifies the I2C address of the device to initialize via the selected I2C port (e.g. SI178 uses 0x70, CX871 uses 0x88).
Code in compliance Not implemented. Not implemented. Not implemented.