AMD, the AMD Arrow logo, AMD Athlon, ATI, Mobility, PowerPlay, CrossFire, Radeon, and combinations thereof, are trademarks of Advanced Micro Devices, Inc.
HyperTransport is a licensed trademark of the HyperTransport Technology Consortium.
Microsoft and Windows are registered trademarks of Microsoft Corporation.
Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
Disclaimer
The contents of this document are provided in connection with Advanced Micro Devices, Inc. ("AMD") products. AMD makes no representations or warranties with respect
to the accuracy or completeness of the contents of this publication and reserves the right to make changes to specifications and product descriptions at any time without notice.
No license, whether express, implied, arising by estoppel, or otherwise, to any intellectual property rights are granted by this publication. Except as set forth in AMD's Standard
Terms and Conditions of Sale, AMD assumes no liability whatsoever, and disclaims any express or implied warranty, relating to its products including, but not limited to, the
implied warranty of merchantability, fitness for a particular purpose, or infringement of any intellectual property right.
AMD's products are not designed, intended, authorized or warranted for use as components in systems intended for surgical implant into the body, or in other applications
intended to support or sustain life, or in any other application in which the failure of AMD's product could create a situation where personal injury, death, or severe property or
environmental damage may occur. AMD reserves the right to discontinue or make changes to its products at any time without notice.
1.1 About This Manual .............................................................................................................................................................1-1
2.4 General RS780 IOC Programming After Boot-Up.............................................................................................................2-3
2.5 Miscellaneous IOC Features Programming ........................................................................................................................2-4
3.2 Memory Clock Changes For POWERPLAY......................................................................................................................3-3
3.3 Switching Back From PM Mode to Nominal Mode ...........................................................................................................3-4
3.4 Power Saving Settings ........................................................................................................................................................3-5
3.5 DOS Mode Power Saving ...................................................................................................................................................3-7
5.2.1PCIE Port Configuration Space............................................................................................................................5-1
5.2.2PCIE Core Index Space ....................................................................................................................................... 5-2
5.2.3PCIE Port Index Space ........................................................................................................................................ 5-2
5.4.2DDI Modes Only ................................................................................................................................................. 5-5
5.4.3PCIE and DDI Combined Modes ........................................................................................................................ 5-6
5.6.1Default Configuration D .................................................................................................................................... 5-10
5.6.2Configuration C ................................................................................................................................................. 5-10
5.7 PCIE Link Training Sequence...........................................................................................................................................5-11
5.9.14Link Training ..................................................................................................................................................... 5-22
5.9.15Power Down Control ......................................................................................................................................... 5-22
5.9.16Software Initiated Speed Change to GEN2 (CMOS Option – Disabled by Default)
5.9.17Active State Power Management (ASPM) ........................................................................................................ 5-31
5.10.12 Link Training ..................................................................................................................................................... 5-46
5.10.13 Power Down Control ......................................................................................................................................... 5-46
5.10.14 Software Initiated Speed Change to GEN2 (CMOS Option – Disabled by Default).........................................5-49
5.10.15 Active State Power Management (ASPM).........................................................................................................5-51
5.12.2Program the Common Clock Configuration.......................................................................................................5-59
5.12.3Slot Power Limit (CMOS Option - Default 75W) .............................................................................................5-59
5.12.4Update Hot-Plug Info .........................................................................................................................................5-59
5.12.5Disable Immediate Timeout on Link Down .......................................................................................................5-59
5.12.8Dynamic Link Width Control.............................................................................................................................5-60
5.12.9Special Features Programming Sequence ..........................................................................................................5-60
Chapter 6: Graphics Core Settings
6.1 Bus Interface (BIF) .............................................................................................................................................................6-1
6.5 Gpuioreg BAR For Accessing nbconfig Registers (A12)...................................................................................................6-2
6.7 Master Abort Status ............................................................................................................................................................6-3
8.1 HT Link Initialization......................................................................................................................................................... 8-1
8.2 HTIU Indirect Register Space ............................................................................................................................................ 8-1
8.3 CPU Register Access ......................................................................................................................................................... 8-1
8.6.4AMD Family 10h Processor Buffer Allocation Settings .................................................................................... 8-8
8.6.5AMD Family 11h Buffer Allocation Settings ................................................................................................... 8-17
8.6.6K8 Buffer Allocation Settings (Special Settings For UMA Mode)................................................................... 8-24
8.6.7Additional UMA Settings .................................................................................................................................. 8-24
8.7 Power Management Settings............................................................................................................................................ 8-25
8.7.1AMD Family 10h PMM Programming ............................................................................................................. 8-25
8.7.2AMD Family 11h PMM Programming ............................................................................................................. 8-25
8.8.2Low-Power HyperTransport Features ............................................................................................................... 8-26
8.9.1Debug Menu Features........................................................................................................................................ 8-29
Chapter 9: CLMC Programming
9.1 Global CLMC Settings....................................................................................................................................................... 9-1
9.1.2Default Inactive Lane State ................................................................................................................................. 9-1
9.3.1Programming the NBMCIND Registers.............................................................................................................. 9-3
9.4 CLMC Control Features..................................................................................................................................................... 9-4
9.4.1CDLD (Centralized Dynamic Link Disconnection) ............................................................................................ 9-4
9.4.2CDLC (Centralized Dynamic Link Configuration) ............................................................................................. 9-4
9.4.3CDLW (Centralized Dynamic Link Width) ........................................................................................................ 9-9
This document is intended for BIOS engineers designing BIOSes for systems based on AMD’s 780G family of
northbridges. It describes the register programming requirements needed to ensure the proper functioning of the 780G
ASIC. Use this document in conjunction with the related AMD 780G Family Register Reference Guide and AMD 780G
Family BIOS Developer’s Guide.
Unless indicated otherwise, the programming information in this document applies to the following 780G variants (note
that Chapter 9only applies to 780G mobile variants):
•RS780 (AMD 780G)
•RS780C (AMD 780V)
•RS780D (AMD 790GX)
•RS780E (AMD 780E)
•RS780M (AMD M780G)
•RS780MC (AMD M780V)
•RX781 (AMD M770) (Chapter 6 does not apply to the RX781 variant)
Some of the settings indicated in this document are workarounds for items that are expected to be solved in subsequent
ASIC revisions. This document will therefore be updated as frequently as required.
Chapter 1
Introduction
Changes and additions to the previous release of this document are highlighted in red. Refer to Appendix A: Revision
History at the end of this document for a detailed revision history.
Configuration access to the RS780 can be accomplished through one of the following two methods described in sections
2.3.1 and 2.3.2 below.
2.3.1Using CF8/CFC I/O Pair
This method works for all registers of Dev0 and Dev1, and all PCI registers of Dev2 to Dev10. This method DOES NOT
work for PCIE extended registers of Dev2 to Dev10. The address mapping follows the standard PCI specification:
•Addr[11:8] = FunNum
•Addr[15:12] = DevNum
•Addr[23:16] = BusNum
•Addr[7:2] = RegNum
Note: For conventional CF8/CFC IO pair configuration access, the first IO write to CF8 (which is a register index access),
has to set Data[31] to indicate that this is a configuration access. Otherwise, it will be treated as a regular IO cycle.
2.3.2Using BAR3 Memory Mapped Register Access
This method works for all PCI registers of Dev0, all PCI registers, and PCIE extended registers of Dev2 to Dev8. The
address mapping follows the PCIE specification:
•Addr[14:12] = FunNum
•Addr[19:15] = DevNum
•Addr[11:2] = RegNum (Addr[11:8] is an extended register field)
•Addr[20 + n-1:20] = BusNum *
•Addr[33:20 + n] = Reserved for BAR3 match *
* Note: ‘n’ indicates how many bits are allocated for the bus number. This value is decided by nbcfg0x84[18:16]. These
relations are listed in Table 2-2 below:
Table 2-2 nbcfg0x84[18:16] Relations
nbcfg0x84[18:16]n
3’b0011
3’b0102
3’b0113
3’b1004
3’b1015
3’b1106
3’b1117
3’b0008
The programming procedure to enable BAR3 is as follows:
Note: nbcfg0x20 is the BAR3 memory upper address register (above 4G). The RS780 could support memory up to 16G,
so this register must be set correctly.
After system boot-up, all registers should keep the default values.
The BIOS starts the bus enumeration, and detects the following: Bus0Dev0Fun0, Dev0Fun1, Dev1Fun0, Dev1Fun1,
Dev2Fun0, Dev3Fun0, Dev4Fun0, Dev5Fun0, Dev6Fun0, Dev7Fun0. Then, for all of these PCI device headers or P2P
device headers, the BIOS enables IOSpace (0x04[0]) and MemSpaceEn (0x04[1]). It also defines the primary bus number,
the secondary bus number, and the subordinate bus number.
The following registers in Table 2-3 need to be programmed after boot-up. Note: After boot-up to Windows occurs, the
IOC register default values follow the values in this table.
•Step 2: Program the BAR2 register (assign values to nbcfg0x18[31:5]). A 32 bytes IO space is reserved for
BAR2(ACPI PM) registers.
•Step 3: Enable BAR2 decoding (set nbcfg0x84[7]).
Note: The above programming procedure is necessary before enabling ACPI. BAR2 is a memory mapped IO base register
that could be used to reserve some space for the ACPI registers. After BAR2 is setup, IO access which address matches
BAR[31:5] should be treated as ACPI register access, and Addr[4:0] is used as the register offset. The current offset 0x00
and 0x04 are used, as PM2_CNTL and PM1_Status, respectively.
2.5.2S3 PME_Turn_Off/PME_To_Ack Sequence
No programming is required in the RS780. However, a backup sequence is required in case there is a mis-communication
between the northbridge and the southbridge.
2.5.3Disabling Internal Graphics
Internal graphics disabling is controlled by an efuse bit, but may also be disabled by writing 1 to register nbcfg0x7C[0]
(NBCFG.NB_IOC_CFG_CNTL[0])
2.5.4GFX MSI Enable
The SBIOS must enable internal graphics MSI capability in GCCFG by setting the following:
•NBCFG.NB_CNTL.STRAP_MSI_ENABLE=’1’
The OS will determine if MSI’s are supported by the system, and if so, the OS will set the following:
•GCCFG.MSI_MSG_CNTL.MSI_EN=’1’
Note: At the time of this writing, to enable MSI in Vista, set the registry key as follows:
Set nbmiscind0x0C[3] to disable Bus0 Device3 register access and decoding. Note: An efuse called CrossFireDisable is
also used that could disable Device 3. Either bit as 1 would disable device 3.
•Input_address refers the request address IOC received from CPU.
•BROADCAST_BASE refers to the broadcast memory range start address.
•Bridge_Prefetchable_BASE refers to external graphics device memory range start address.
•BROADCAST_OFFSET is the offset between translated broadcast base address and bridge Prefetchable_BASE
address.
Two broadcast addresses are obtained by applying two Bridge_Prefetchable_BASE addresses from the two PCI
configuration space. Therefore, a single CPU memory write request could be translated and redirected to two external
graphics devices by IOC. Note that this address translation and broadcast algorithm is only applicable to CPU memory
write requests. For CPU memory read requests, the address translation to the primary graphics device is performed using
the above equation, and the request is only forwarded to the primary graphics devices since only one response is expected
by the CPU.
The P2P master could be any device from the southbridge, devices connected behind P2P bridge 2, 3, 4, 5, 6, 7,9 and 10.
The P2P targets could be devices connected behind P2P bridge 1, 2, 3, 4, 5, 6, 7,9, 10. The southbridge cannot be a target
for trusted-PC purposes. The P2P traffic could be only memory writes. After bootup, by default all P2P traffic listed
above should be enabled. In order to disable a P2P target at a specific device, the following register bits in Table 2-5 need
to be set as follows:
MVPU is a feature that enables P2P traffic between external graphics devices (the devices behind P2P bridge 2 and 3) and
the internal graphics device (the device behind P2P bridge 1). The corresponding P2P traffic access enable bits are
described in section Table 2-5 above.
2.9IOC Dynamic Clock Setup
The following clocks are in IOC:
•LCLK (free running)
•LCLK_MST (master branch)
•LCLK_SLV (slave branch - Note: This dynamic branch should not be used)
Note: Only LCLK_MST (master branch) and LCLK_SLV (slave branch) can be dynamically turned on and off.
The two bits that control IOC dynamic clocks are as follows:
•clkcfg0x8C[13] CLKGATE_DIS_IOC_LCLK_MST
•clkcfg0x8C[14] CLKGATE_DIS_IOC_LCLK_SLV (Note: Ensure that this bit is programmed to 1 in order to avoid
system instability)
Note: Clkconfig:0x94[27] CLKGATE_IOC_SLV_GFX - BIOS should program to 1 to disable clock gating on this
branch.
RS780 boots up in synchronous UMA clock mode. The memory clock and HT clock are driven by the same HT PLL. In
UMA sync mode the memory PLL is not used and should be powered down.
•Program <NBMCIND:0x6> Bit[31] MC_MPLL_CONTROL.MPLL_POWERDOWN = ‘1’ to power down memory
3.4.3Powering Down Graphics Core and Memory Clocks in Northbridge-Only Mode
Table 3-4 Powering Down Graphics core and Memory Clocks in NB-Only Mode Settings
ASIC RevSettingsFunction/Comment
All Revs
<CLKCFG:0x8C> Bit[21] = 0x1
<CLKCFG:00xE4> Bit[0] = 0x1
Powers down reference clock to graphics core PLL in
northbridge only mode
Powers down clock to memory controller in
northbridge only mode
3.4.4Powering Down IOC GFX Clock in No External Graphics Mode
Table 3-5 Powering Down IOC GFX Clock In No External Graphics Mode Settings
ASIC RevSettingsFunction/Comment
All Revs
<CLKCFG:0xE8> Bit[17] = 0x1 Powers down clock to IOC GFX block in no external
graphics mode
3.4.5PWM Controller
There are five PWM controllers mapped to five GPIO pins that can be used for voltage adjustment purpose after boot-up.
Table 3-6 PWM Controller/GPIO Pins Mapping
ASIC RevRegister settingFunction/Comment
All Revs
1.CLK_TOP_PWM1_CTRL<CLKCFG:0xB0>
2. CLK_TOP_PWM2_CTRL<CLKCFG:0xB4>
3. CLK_TOP_PWM3_CTRL <CLKCFG:0xCC>
4. CLK_TOP_PWM4_CTRL<CLKCFG:0x4C>
5. CLK_TOP_PWM5_CTRL<CLKCFG:0x50>
1. PWM control on LVDS_BLON GPIO pin
2. PWM control on LVDS_ENA_BL GPIO pin
3. PWM control on STRP_DATA GPIO pin
4. PWM control on LVDS_DIGON GPIO pin
5. PWM control on TMDS_HPD GPIO pin
Each of the above PWM registers in PWM Controller/GPIO Pins Mapping has the following register fields:
•Bit[0]: Enable the PWM controller
•Bits[12:1]: Number of cycles in pulse period of a 100MHz reference clock
•Bits[24:13]: Number of high cycles in pulse period of a 100MHz reference clock
•Bit[25]: Output enable of the GPIO
The STRP_DATA pin by default is driving low, and register setting <clkcfg:0xE0> Bit[0] = ‘1’ is required before using
PWM or GPIO control.
The STRP_DATA pin is also used for core voltage scaling purposes. The CLK_TOP_PWM3_CTRL < CLKCFG:0xCC >
Bit[0] = ’0’ is required to enable the graphics device driver to have control on the STRP_DATA pin.
The register settings < nbmisind:0x40 > Bit[8] = ‘1’ and Bit[10] = ’1’ are required for using PWM1 on the LVDS_BLON
pin.
This chapter describes the initialization and feature programming of the northbridge PCI Express subsystem. The
northbridge implements PCI Express point-to-point links to external devices.
There are 9 configurable PCI Express ports, which can be divided into 3 groups (implemented in hardware as 3 separate
cores):
•PCIE-GFX: 2 ports, 16 lanes in total. Each port is configurable from x1 to x8 link. The 2 ports can also be combined
to provide 1 x16 port (default configuration).
•PCIE-GPPSB: 1 SB port and 4 GPP ports, 8 lanes in total. The SB port provides a dedicated x4 link to the
southbridge. The remaining 4 lanes are distributed across the 4 GPP ports to support 4 different configurations: a)
4:0:0:0:0, b) 4:4:0:0:0, c) 4:2:2:0:0, d) 4:2:1:1:0 and e) 4:1:1:1:1 (default configuration).
•PCIE-GPP: 2 ports, 2 lanes in total. Each port provides a x1 link. The 2 ports can also be combined to provide a x2
link.
5.2PCI Express Configuration Space
The PCI Express configuration space consists of the following four groups:
•PCIE Port Configuration Space (section 5.2.1)
•PCIE Core Index Space (section 5.2.2)
Chapter 5
PCIE Initialization
•PCIE Port Index Space (section 5.2.3)
•PCIE Extended Configuration Space (section 5.2.4)
5.2.1PCIE Port Configuration Space
Each PCIE port has a standard Type 1 Virtual PCI-to-PCI bridge header in the PCI configuration space. These are devices
2 through 10 on PCI bus 0.
•GFX Port A: Device 2 (GFX0)
•GFX Port B: Device 3 (GFX1)
•GPPSB Port A: Device 8 (SB link, hidden by default)
The PCIE Core Index Space contains control and status registers that are generic to all PCIE ports in the northbridge.
This register space is accessed through an index/data register pair:
•NB_BIF_NB: NB_PCIE_INDX_ADDR: nbconfig: 0xe0
•NB_PCIE_INDX_ADDR: [7:0] - Address in PCIE Core
•GFX_GPPSB_SEL [18:16]:
•000 – PCIE GFX Core
•001 – PCIE GPPSB Core
•010 – PCIE GPP Core
•011 – Broadcast to all 3 cores
•All other values are unused
•NB_BIF_NB: NB_PCIE_INDX_DATA: nbconfig: 0xe4
Note: Registers in the core index space are referenced with the name PCIEIND or BIF_NB.
5.2.3PCIE Port Index Space
The Port Index Space contains control and status registers that are specific to each port within the core. Each PCIE device
implements its own set of registers in this space.
Each PCIE device contains an index/data pair in its Virtual Bridge PCI configuration space to access the Port Index Space
registers. Please note the following information for the index/data register pair:
•Index register: bus 0, device X, register 0xE0.
•Data register: bus 0, device X, register 0xE4.
Note: Register descriptions are referenced with the name PCIEIND_P or BIF_NBP.
5.2.4PCIE Extended Configuration Space
PCI Express extends the PCI configuration space from 256 bytes to 4096 bytes. Extended PCIE configuration space
memory maps 4KB for each device. The first 256 bytes of each 4KB are the same as PCI 2.3 configuration registers, and
the remaining 3840 bytes are PCIE specific configuration registers.
The northbridge uses NBCFG:NB_BAR3_PCIEXP_MMCFG nbconfig:0x1C (BAR3) to map the PCI Express Extended
Configuration Space to a 256MB range within the first 4GB of addressable memory. PCIE devices are accessed by
reading/writing to a memory mapped address that is based on the base address in BAR3. The PCIE target address is
formed as follows:
•Addr[11:2] = RegNum (Addr[11:8] is extended register field)
Note: ‘n’ indicates how many bits are allocated for the bus number. This value is decided by BAR3BusRange in
NBCFG:NB_PCI_ARB[18:16] nbconfig:0x84 register. These relations are listed in Table 5-1 below:
Note: The BAR3 memory upper address register is nbcfg0x20 (above 4G). The RS780 could support memory up to 16G,
so this register has to be set properly.
After a Power-On or Reset event the North Bridge puts all of its PCI Express devices into their default states, which are
shown in Table 5-3 below:
Table 5-3 Power-On and Reset State
ASIC RevPCI Device Number (PCIE Port)Link TrainingNumber of Lanes Supported
RS780 All RevsDev 2 (PCIE-GFX Port A)Disabled1, 2, 4, 8, or 16
Dev 3 (PCIE-GFX Port B)Disabled1, 2, 4, or 8
Dev 4 (PCIE-GPPSB Port B)Disabled1, 2, or 4
Dev 5 (PCIE-GPPSB Port C)Disabled1
Dev 6 (PCIE-GPPSB Port D or - C in 4:2:x:x:0 mode)Disabled1 or 2
Dev 7 (PCIE-GPPSB Port E or - D in 4:2:1:1:0 mode)Disabled1
Dev 8 (PCIE-GPPSB Port A)Enabled1 or 2 or 4
Dev 9 (PCIE-GPP Port A)Disabled1
Dev 10 (PCIE-GPP Port B)Disabled1
Note: PCI device 8 (Dev 8) does not appear in the PCI configuration space by default.
5.4PCIE GFX Configurations
The x16 PCIE GFX interface is fully multiplexed to provide as many directly connected display options as possible. Each
output format can be mapped to any of the four-lane groups (0-3, 4-7, 8-11 and 12-15) in the 16 available lanes.
However, there are only 3 separate PLLs associated with lanes 0-3 (PLL A), 4-7 (PLL B) and 8-15 (PLL C). The
supported configurations in RS780 are detailed below.
5.4.1PCIE Modes Only
The PCIE GFX core can support up to 2 PCIE devices. Each PCIE device can be a GFX or a GPP device. Table 5-4
outlines all the supported PCIE configurations.
Table 5-4 PCIE Configurations
Lanes0 to 34 to 78 to 1112 to 15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
GFX x16 A
GFX x8 A
GFX x8 A
GFX x8 AGFX x8 B
GPP x4 A
GPP x4 B
GPP x4 A
GPP x4 B
GPP x4 AGPP x4 B
GPP x4 AGPP x4 B
GPP x4 AGPP x4 B
GPP x4 BGPP x4 A
GPP x4 AGPP x4 B
GFX x8 AGPP x4 B
GFX x8 AGPP x4 B
GPP x4 BGFX x8 A
GPP x4 AGFX x8 B
The core should be configured to run in single port mode if only Port A is present and in dual port mode whenever Port B
is present (regardless of Port A). The GFX ports are held from link training by default. To enable a GFX port, the
corresponding HOLD_TRAINING bit must be set to 0 to allow link training to proceed.
The SBIOS is responsible for programming the lane and clock muxing specific to each case. Refer to Chapter 7: PCIE
Initialization for DDI for programming details.
Note: This programming must be done before hold training is released.
Table 5-7 Dual Port Configuration Register Settings
ASIC RevStepRegister SettingsFunction/Comment
RS780 All Revs1PCIE_NBCFG_REG6 – NBMISCIND:0x36
STRAP_BIF_all_valid (active low)
PCIE GFX Configurations
De-asserts STRAP_BIF_all_valid for PCIE-GFX
core.
5.4.2DDI Modes Only
In the RS780, DDI is a collective term used to describe the supported display formats, which include DVI, HDMI and
DisplayPort. DVI and HDMI can run in either single link (x4, DDI_SL) or dual link (x8, DDL_DL) mode. DisplayPort
can run in x1, x2 or x4 mode.
Due to the fact that lanes 8-15 are sharing PLL C, the subgroups of lanes 8-11 and lanes 12-15 cannot be used
simultaneously to support 2 independent display outputs. All the supported configurations are detailed in Table 5-8 below.
Table 5-8 DDI Configurations
Lanes0 to 34 to 78 to 1112 to 15
1
2
3
4
5
6
7
8
9
10
11
Set bit [31] to 1
2PCIE_LINK_CFG - NBMISCIND:0x8
MULTIPORT_CONFIG_GFX
Set bits[11:8] to 4’b0101
3PCIE_NBCFG_REG6 – NBMISCIND:0x36
STRAP_BIF_all_valid (active low)
Set bit [31] to 0
DDI_SL
DDI_SL
DDI_SLDDI_SL
DDI_DL
DDI_SLDDI_SL
DDI_SLDDI_SL
DDI_SLDDI_SL
DDI_SLDDI_SL
Enables dual port configuration
Asserts STRAP_BIF_all_valid for PCIE-GFX
core.
DDI_SL
DDI_SL
DDI_DL
The VBIOS/Driver will be responsible for DDI programming sequence. In the case of DDI modes only, the SBIOS can
pass control over to the VBIOS/Driver after powering down any unused lanes and PLLs.
PCIE and DDI modes can also be combined to use simultaneously, the supported configurations are listed in the following
chart. For each group of 8 lanes (lanes 0-7 and lanes 8-15), only 1 DDI or 1 PCIE device can be used at any one time.
Table 5-9 PCIE and DDI Configurations
Lanes0 to 34 to 78 to 1112 to 15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
DDI_SLGFX x8 A
DDI_SLDDI_SLGFX x8 A
GPP x4 AGPP x4 BDDI_SL
GPP x4 AGPP x4 BDDI_SL
GPP x4 AGPP x4 BDDI_DL
DDI_SLGPP x4 AGPP x4 B
DDI_SLDDI_SLGPP x4 AGPP x4 B
GFX x8 ADDI_SL
GFX x8 ADDI_SL
GFX x8 ADDI_DL
DDI_SLGFX x8 A
DDI_DLGFX x8 A
DDI_SLGPP x4 AGPP x4 B
DDI_DLGPP x4 AGPP x4 B
The SBIOS is responsible for PCIE mode programming (same as section 5.4.1) and the VBIOS/Driver is responsible for
completing the DDI programming.
5.5PCIE GPPSB Configurations
The SB link shares the same PCIE core with 4 other GPP devices. The SB port has 4 dedicated lanes and the 4 GPP ports
share among 4 lanes, for a total of 8 lanes. The following configurations are supported:
•Default Configuration E (4:1:1:1:1), STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0100 (section 5.5.2)
•Configuration A (4:0:0:0:0), STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0000 (section 5.5.3)
•Configuration B (4:4:0:0:0), STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0001 (section 5.5.4)
•Configuration C (4:2:2:0:0), STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0010 (section 5.5.5)
•Configuration D (4:2:1:1:0), STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0011 (section 5.5.6)
The device remapping feature provides the ability to map a PCIE slot to any device number. There are 2 possible ways of
remapping:
•Manual Remapping
The slot-to-device number mapping is specified through the register setting in Table 5-10:
Table 5-10 Device Remapping
NB_PROG_DEVMAP_EN, bit [0] 0=Device mapping disabled (default)
GPP_PORTB_DEVMAP, bits [7:4] 0=Map to Device 4
GPP_PORTC_DEVMAP, bits [11:8] 0=Map to Device 4
GPP_PORTD_DEVMAP, bits [15:12] 0=Map to Device 4
GPP_PORTE_DEVMAP, bits [19:16] 0=Map to Device 4
PCIE GPPSB Configurations
NBCFG: NB_PROG_DEVICE_REMAP_0 NBMISCIND:0x20
1=Device remapping enabled using GPP_PORT*_DEVMAP
1=Map to Device 5
2=Map to Device 6
3=Map to Device 7
1=Map to Device 5
2=Map to Device 6
3=Map to Device 7
1=Map to Device 5
2=Map to Device 6
3=Map to Device 7
1=Map to Device 5
2=Map to Device 6
3=Map to Device 7
•Automatic Remapping
The remapping is done automatically according to the PCIE GPPSB configuration so that the slot to device number
mapping is always the same. The SBIOS should program the field in Table 5-11 to enable this feature by default.
Table 5-11 Automatic Remapping
NBCFG: NB_PROG_DEVICE_REMAP_0 NBMISCIND:0x20
IOC_PCIE_Dev_Remap_Dis, bit [1] 0=Automatic device remapping enabled
1=Automatic device remapping disabled
5.5.2Default Configuration E (STRAP_BIF_LINK_CONFIG_GPPSB = 4’b0100)
The default configuration only has the SB port enabled. The GPP ports are held from link training. To enable the GPP
ports, the corresponding HOLD_TRAINING bit must be set to 0 to allow link training to proceed.
Since the SB link must be alive for SBIOS code execution, a special programming sequence must be performed to switch
between configurations. This sequence will cause the hardware to assert reset to the GPPSB core, load the new
configuration and deassert reset for the link to re-train at the new configuration.
Table 5-17 Switching GPPSB Configurations
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_NBCFG_REG7 - NBMISCIND:0x37
reconfig_gppsb_en
Set bit[12] to 1
2PCIE_NBCFG_REG7 - NBMISCIND:0x37
reconfig_gppsb_atomic_reset_dis
Set bit[15] to 1
3PCIE_NBCFG_REG7 - NBMISCIND:0x37
reconfig_gppsb_link_config_xfer_mode
Set bit[17] to 1
4aStrapsOutputMux_7 - NBMISCIND:0x67
STRAP_BIF_LINK_CONFIG_GPPSB
Set bits[7:4] to desired configuration
4bStrapsOutputMux_6 – NBMISCIND:0x66
STRAP_BIF_all_valid (active low)
PCIE GPPSB Configurations
Enables GPPSB reconfiguration
Sets desired GPPSB configurations
De-asserts STRAP_BIF_all_valid for PCIE-GPPSB
core.
Set bit [31] to 1
5PCIE_NBCFG_REG7 - NBMISCIND:0x37
reconfig_gppsb
Read bit[14]
6PCIE_NBCFG_REG7 - NBMISCIND:0x37
reconfig_gppsb
Write the inversion of bit[14] read back from step 5
7StrapsOutputMux_6 – NBMISCIND:0x66
STRAP_BIF_all_valid (active low)
Set bit [31] to 0
8Wait for 1ms
9PCIE_LC_STATE0 – PCIEIND_P: 0xA5 in Dev 8
LC_CURRENT_STATE
Poll for bits[5:0] = 5’h10
10PCIE_LC_STATE0 – PCIEIND_P: 0x12A in Dev 8
VC_NEGOTIATION_PENDING
Poll for bit[1] = 0
Asserts STRAP_BIF_all_valid for PCIE-GPPSB core.
Waits until SB has trained to L0
Ensures that virtual channel negotiation is completed.
The GPP core only has 2 available lanes, supporting either two x1 GPP devices or one x2 GPP device. The GPP ports are
held from link training. To enable the GPP ports, the corresponding HOLD_TRAINING bit must be set to 0 to allow link
training to proceed.
The link training sequence cannot be interrupted and no other BIOS code can be added in between.
Note: The contents of Table 5-21 continues onto the next two pages of this document.
Table 5-21 PCIE Link Training Sequence
ASIC RevStepRegister Setting Function/Comment
RS780 All
Revs
1Release hold training for Device * by clearing the
corresponding HOLD_TRAINING bit to 0.
2Delay 200us
3BIF_NBP:PCIE_LC_STATE0 ·PCIEIND_P:0xA5
Read back the following values:
LC_CURRENT_STATE = [5:0]
LC_PREV_STATE1 = [13:8]
LC_PREV_STATE2 = [21:16]
LC_PREV_STATE3 = [29:24]
If any read back value is 6’h3F -> then perform
CF9 reset;
If LC_CURRENT_STATE = 6’h00 to 6’h04, then
no device is present. Keep checking for up to
40ms, if no device is present Æ Go to Step 8.
Otherwise, go to Step 4.
PCIE Link Training Sequence
The HOLD_TRAINING bit can be found in section 5.4 (GFX),
section 5.5 (GPPSB), and section 5.6 (GPP).
Detects if there is any card present from reading back
PCIE_LC_STATE0 in Port Index space of Device*.
If LC_CURRENT_STATE = 6’h06 -> read back
current link width by reading bits [6:4] of the
following register:
BIF_NBP:PCIE_LC_LINK_WIDTH_CNTL[6:4]
PCIEIND_P:0xA2
LC_LINK_WIDTH_RD
If [6:4]=3’h4 and lane reversal is not enable set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[7:4]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_DIS[15:12]=4’hf·
PCIEIND:0x65
If [6:4]=3’h4 and lane reversal is enabled set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[3:0]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_D[11:8]=4’hf·
PCIEIND:0x65
If [6:4]=3’h3 and lane reversal is not enabled set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[7:2]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_DIS[15:10]=4’hf·
PCIEIND:0x65
If [6:4]=3’h3 and lane reversal is enabled set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[5:0]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_D[13:8]=4’hf·
PCIEIND:0x65
CMOS option (disabled by default).
This programming sequence is required if some lanes on the end
point are broken. It is specific for GFX card in single slot
configuration.
If [6:4]=3’h2 and lane reversal is not enabled set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[7:1]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_DIS[15:9]=4’hf·
PCIEIND:0x65
If [6:4]=3’h2 and lane reversal is enabled set:
BIF_NB:PCIE_P_PAD_FORCE_DIS[6:0]=4’hf·
PCIEIND:0x65
BIF_NB:PCIE_P_PAD_FORCE_D[14:8]=4’hf·
PCIEIND:0x65
Toggle GPIO reset to the PCIe slot.
Got to Step5.
If [6:4] takes any other values than described
above; go to Step 5.
5BIF_NBP:PCIE_LC_STATE0 ·PCIEIND_P:0xA5
LC_CURRENT_STATE
Read back bits [5:0].
If LC_CURRENT_STATE = 6’h07 -> Device is in
compliance state (training sequence is done).
Move to train the next device;
If LC_CURRENT_STATE = 6’h10 -> go to step 6
Otherwise, keep polling for up to 2 seconds, then
perform CF9 reset. This should only be repeated
for a maximum of 15 times.
Detects if link is in Compliance State or it is trained to L0 from
reading back PCIE_LC_STATE0 [5:0] in Device*.
If LC_CURRENT_STATE can not reach 6’h10 or
6’h07 -> go to Step 9.
Read back value 0 means link negotiation is
successful -> go to Step 8
Read back value 1 means the link needs to be
re-trained -> go to Step 7
7Set bit[8] = 1 and set bits[2:0] to be equal to
bits[6:4] of the following register:
BIF_NBP:PCIE_LC_LINK_WIDTH_CNTL
PCIEIND_P:0xA2
LC_RECONFIG_NOW, bit[8]
LC_LINK_WIDTH, bit[2:0] <LC_LINK_WIDTH_RD, bit[6:4]
Wait for 5ms after the bits above are set, then go
back to Step 2 (stay in this loop indefinitely).
8For AMD GFX Cards only -> go to section
5.12.9.1
After the implementation of RV370/RV380
Initialization Workaround, and after reading back
the Device ID for the non-AMD Device, as well as
AMD devices for which this workaround is not
applicable, perform the following:
BIF_NB:PCIE_CI_CNTL[9]=1’b0PCIEIND:0x20
CI_RC_ORDERING_DIS
Clear bit[9] to 0.
9Hide the bridge for non-hot-plug device;
Set the hold training bit to 1 (see Step 1);
Power down the port, then move to the train the
next device.
Detects if Data Link Negotiation is performed, by reading bit [1] of
BIF_NBP:PCIE_VC0_RESOURCE_STATUS[1]· pcieConfigDev*:
0x12a
Retrains the link.
RV370/RV380 Initialization Workaround.
When no device is detected or the link cannot be trained properly,
than these 3 steps should be performed.
5.8Overall PCIE Programming Sequence
The overall PCIE programming sequence can be divided into the following parts:
•PCIE-GFX Core Initialization (section 5.9)
•PCIE-GPPSB and PCIE-GPP Cores Initialization (5.10)
•Dynamic Link Width Control (5.11)
•PCI Enumeration and Special Features Programming Sequence (5.12)
Note: Section 5.9 and section 5.10 should be implemented as separate threads in the SBIOS so that they can be executed
in parallel.
The initialization sequence should be executed in the same order as the sections are organized.
5.9.1REFCLK Options
•
External Clock Mode (Default Mode): an external clock chip is used to drive a dedicated GFX REFCLK
Note: For ASIC Rev A11 ONLY - When accessing PCIE_NBCFG_REG10 (NBMISCIND:0x28), the write enable
bit must be set for both reads and writes.
Table 5-22 External Clock Mode
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_NBCFG_REG8 – NBMISCIND:0x38
B_PCLK_BIDIR_TX_EN
Set bit[29] to 0
2PCIE_NBCFG_REG8 – NBMISCIND:0x38
B_PCLK_BIDIR_RX_EN
Set bit[28] to 1
Disables the GFX REFCLK transmitter so that the GFX
REFCLK PAD can be driven by an external source.
Enables GFX REFCLK receiver to receive the REFCLK
from an external source.
3PCIE_NBCFG_REG10 – NBMISCIND:0x28
B_PREFCLK_SEL_A
Set bits[7:6] to 2’b01
4PCIE_NBCFG_REG10 – NBMISCIND:0x28
B_PREFCLK_SEL_B
Set bits[9:8] to 2’b01
5PCIE_NBCFG_REG10 – NBMISCIND:0x28
B_PREFCLK_SEL_C
Set bits[11:10] to 2’b01
6StrapsOutputMux_C – NBMISCIND:0x6C
REFCLK_BIDIR_SEL
Set bit[31] to 1
Selects the GFX REFCLK to be the source for PLL A.
Selects the GFX REFCLK to be the source for PLL B.
Selects the GFX REFCLK to be the source for PLL C.
All 3 PLLs will be configured to have the same source in
SBIOS. The PLLs may have different sources in DDI
modes and the setting will be overwritten by the
VBIOS/Driver.
Selects the single ended GFX REFCLK to be the
source for core logic.
•Internal Clock Mode: SB REFCLK is routed internally to be the source of GFX REFCLK
Table 5-23 Internal Clock Mode
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_NBCFG_REG8 – NBMISCIND:0x38
B_PCLK_BIDIR_TX_EN
Set bit[29] to 1
2PCIE_NBCFG_REG8 – NBMISCIND:0x38
B_PCLK_BIDIR_RX_EN
Enables the GFX REFCLK transmitter so that the
GFX REFCLK PAD can be driven by the SB REFCLK.
Disables GFX REFCLK receiver from receiving the
REFCLK from an external source.
5.9.2Lane Reversal (CMOS Option - Disabled by Default)
There should be 2 CMOS options for Port A and Port B:
•PCIE-GFX Port A Lane Reversal (Single/Dual Configuration)
•PCIE-GFX Port B Lane Reversal (Dual Configuration)
Table 5-24 Lane Reversal (CMOS Option - Disabled by Default)
ASIC
Rev
RS780
All Revs
StepRegister SettingsFunction/Comment
1PCIE_NBCFG_REG6 – NBMISCIND:0x36
STRAP_BIF_all_valid (active low)
PCIE-GFX Core Initialization
Selects SB REFCLK to be the source for PLL C.
All 3 PLLs will be configured to have the same source
in SBIOS. The PLLs may have different sources in
DDI modes and the setting will be overwritten by the
VBIOS/Driver.
Selects the single ended SB REFCLK to be the
source for core logic.
2Use the Delay Training CMOS Option described in the
next section
Asserts both calibration reset and global reset
De-asserts calibration reset
De-asserts global reset
Program the GPIO in the SB700 to reset the PCIE-GFX
slot.
Program delay link training timer.
5.9.6Delay Training Option (CMOS Option – Default 2ms)
Some PCIE devices may require additional initialization time after a reset is de-asserted before they can train the link
properly. A typical delay of 2ms is sufficient for most devices. In order to accommodate devices that require additional
delay, a CMOS option with a selectable time from 0 to 200 ms, with increments of 1ms, should be implemented. Training
to the slots should not be released until the timer expires.
Lets PI use Electrical Idle from PHY
when turning off PLL in L1 at Gen2
speed instead Inferred Electrical Idle.
NOTE: LC still uses Inferred Electrical
Idle.
Prevents the Electrical Idle from
causing a transition from Rcv_L0 to
Rcv_L0s.
Prevents the LTSSM from going to
Rcv_L0s if it has already
acknowledged a request to go to L1.
LDSK only taking deskew on
deskewing error detect
Bypasses lane de-skew logic if in x1
RS780 A13
and beyond
Set bit [14] to 1
21NBCFG:PCIE_NBCFG_REG5 -- NBMISCIND:0x35
B_PG2PLL_IDLEDET_TH[1:0]
Set bits [22:21] to 2’b10
22NBCFG: PCIE_NBCFG_REG4 – NBMISCIND: 0x34
STRAP_BIF_DE_EMPHASIS_SEL (port A)
Set bit[5] to 0
NBCFG: PCIE_NBCFG_REGA – NBMISCIND: 0x22
STRAP_BIF_DE_EMPHASIS_SEL (port B)
Set bit[6] to 0
Release hold training (by setting the corresponding hold training bit in the table below) and then start the link training
procedure outlined in Section 5.7 PCIE Link Training Sequence.
Table 5-35 Link Training
5.9.15Power Down Control
In order to save power, inactive lanes and PLLs should be powered down.
5.9.15.1Inactive Lanes
There are a total of 16 register bits assigned to control the powering down of inactive lanes. The transmitter and the
receiver of a lane can be powered down separately; in the case of an inactive lane, both the transmitter and the receiver
should be powered down.
Each register bit controls the powering down of 2 lanes; the corresponding register bit should be set to 1 when both lanes
are inactive. The register and lane mappings are specified as follows:
There are 3 PLLs associated with lanes 0-3 (PLL A), 4-7 (PLL B) and 8-15 (PLL C). In order to achieve maximum power
saving, the transmitter and receiver output buffers of the PLL can also be powered down separately. There are 3 different
parameters to control each PLL:
•B_PPLL_PDNB_FDIS: Power down the PLL completely, no current consumption except for leakage.
•B_P90_PLL_BUF_PDNB_TX_FDIS: Power down the transmitter output buffers.
•B_P90_PLL_BUF_PDNB_RX_FDIS: Power down the receiver output buffers.
A PLL can be powered down completely (all 3 parameters set to 1) when all the lanes associated with it are inactive.
B_PRX_PDNB_FDISB_PTX_PDNB_FDIS
1514131211109876543210
The receiver of a PLL can be powered down when lanes associated with it are running in DDI mode due to the absence of
receiver data stream in DDI mode. (The receiver of a lane is also powered down in DDI mode, which is automatically
done by hardware).
Table 5-41 (for normal mode) and Table 5-42 (for reversal mode) specify the inactive lanes (0-15) and inactive PLLs (A,
B, C) in each of the supported configurations in Table 5-40 above. The register settings for the power down can then be
worked out based on the mapping in section 5.9.15.1 (“Inactive Lanes”) and in section 5.9.15.2 (“Inactive PLLs”).
6Lane reversal is not supported in this configuration
7Lane reversal is not supported in this configuration
8Lane reversal is not supported in this configuration
9Lane reversal is not supported in this configuration
10Lane reversal is not supported in this configuration
11Lane reversal is not supported in this configuration
12Lane reversal is not supported in this configuration
13Lane reversal is not supported in this configuration
14Same as case 4
15Lane reversal is not supported in this configuration
16Lane reversal is not supported in this configuration
17Same as case 4
Port A:
0-3, 8-11
A
Port B:
4-7, 12-15
B
C if A&B are x0
0-7
A, B
Port B:
8-15
C
8-15
C
Port B:
0-7
A, B
x0x1, x2x4x8
A, B, C
0-7
A, B
Port B:
8-15
C
0-3, 10-11
A
Port B:
4-7, 14-15
B
Port A:
2-7
B
Port B:
8-11, 14-15
No inactive PLL
Port A:
10-15
No inactive PLL
Port B:
0-3, 6-7
A
Lane Reversal Enabled
0-13
A, B
Port A:
0-5
A
Port B:
8-13
No inactive PLL
Port A:
0-3
A
Port B:
4-7
B
Port A:
4-7
B
Port B:
8-11
No inactive PLL
Port A:
12-15
No inactive PLL
Port B:
0-3
A
0-11
A, B
Port A:
0-3
A
Port B:
8-11
No inactive PLL
N/A
Port A:
No inactive lane
No inactive PLL
Port B:
N/A
Port A:
No inactive lane
No inactive PLL
Port B:
N/A
0-7
A, B
Port A:
No inactive lane
No inactive PLL
Port B:
No inactive lane
No inactive PLL
5.9.15.3.2 Selecting TXCLK Source For Core Logic
The programming in this step must be executed before the register writes for the power down. The PCIE core logic
requires a TXCLK which comes from either PLL A or PLL C; therefore, the clock muxes must be programmed to select
the clock source from a running PLL.
Set bit[12] = 1
Set bit[13] = 1
Set bit[14] = 1
Set bit[15] = 1
3PCIE_PDNB_CNTL – NBMISCIND: 0x7
IO_TXCLK_A_SEL
IO_TXCLK_B_SEL
IO_TXCLK_C_SEL
Set bits[21:20] = 2’b10
Set bits[23:22] = 2’b10
Set bits[25:24] = 2’b10
Selects PLL C to be the source clock
for TXCLK_PERM
Selects PLL C to be the source clock
for TXCLK SND and RCV
Selects PLL C to be the source clock
for B_PTX_DATA_CLK
•PLL C is to be powered down
No programming is required in this case since the default is selecting PLL A.
•PLL A and PLL C are both powered down
This case should never happen when any PCIE link is trained. Even though only Lanes 4-7 are used (PLL B is
associated with these physical lanes), either PLL A or PLL C must be on to provide a clock for the core logic.
5.9.15.3.3 Turning Off REFCLK Receiver Buffers
If no link is trained, then the REFCLK receiver buffer should be turned off to save power.
Table 5-44 Turning Off REFCLK Receiver Buffers Settings
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_NBCFG_REG8 – NBMISCIND:0x38
B_PCLK_BIDIR_RX_EN
Set bit[28] to 0
5.9.15.3.4 Turning Off Electrical Idle Detectors
The electrical idle detectors should be powered off when:
•No compliance card is detected.
•No GFX link is trained (TMDS/HDMI/DP modes are irrelevant as the electrical ide detectors are unused in those
modes).
Table 5-45 Turning Off Electrical Idle Detectors Settings
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_NBCFG_REG4 – NBMISCIND:0x34
B_PG2RX_IDLEDET_EN
Disables GFX REFCLK receiver to
receive the REFCLK from an external
source
Disables the electrical idle detectors
for all 16 GFX lanes
The register settings for power down in DDI only modes can be worked out based on the information found in Table 5-47:
Table 5-47 Powering Down in DDI Only Modes Register Setting Information
CaseInactive Lanes
14-15B, CA
20-3, 8-15A, CB
30-7, 12-15A, BC
40-11A, BC
58-15CA, B
68-15CA, B
74-7, 12-15BA, C
84-11BA, C
90-3, 12-15AB, C
100-3, 8-11AB, C
110 - 7A, BC
DDI_DL
DDI_SL
DDI_SL
DDI_SL
DDI_SLDDI_SL
DDI_SLDDI_SL
DDI_DL
Inactive PLLs
(Full Power Down)
PLLs with Inactive RX
Buffers
5.9.15.5Powering Down in Combined PCIE and DDI Modes
If both PCIE and DDI devices are present, the first step is to work out the power down register settings individually
assuming PCIE only and DDI only modes. Then the 2 register settings should be “ANDed” together for a final setting
that would only power down the lanes and PLLs which are unused in both PCIE and DDI modes.
The programming sequence in the subsections from this point onward should be executed after the VBIOS post is
completed.
5.9.17.1ASPM L1 (CMOS Option - Enabled by Default)
The SBIOS should first check if the card is an AMD graphics card (it must check the AMD vendor ID, and check that it is
a graphics card) and that the ASPM L1 CMOS option is set. Once this has been checked, the below programming
sequence should be performed.
The following 2 CMOS options should be available:
•PCIE-GFX Port A ASPM L1 (Single/Dual Configuration)
•PCIE-GFX Port B ASPM L1 (Dual Configuration)
Table 5-49 ASPM L1 (CMOS Option - Enabled by Default)
5.9.18.2LCLK Gating (CMOS Option – Disabled by Default)
Table 5-54 LCLK Gating (CMOS Option - Disabled by Default)
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1CLKCFG: 0x94
CLKGATE_DISABLE
Set bit[16] to 0
5.9.18.3Shutting Off TXCLK Permanently (CMOS Option – Disabled by Default)
The TXCLK can be shut off permanently to save power when the no lane is active for PCIE purpose. When this feature is
enabled, all register reads/writes to the core will be invalid.
Table 5-55 Shutting Off TXCLK Permanently (CMOS Option - Disabled by Default)
NBCFG: StrapsOutputMux_7 – NBMISCIND:0x67
B_P90RX_CLKG_EN
Set bit[26] to 1
GPP Core:
NBCFG: PCIE_NBCFG_REGC – NBMISCIND:0x24
B_P90RX_CLKG_EN
Set bit[28] to 1
14BIF_NBP:PCIE_LC_CNTL -- PCIEIND_P:0xA0
LC_16X_CLEAR_TX_PIPE
Set bits[7:4] to4’h3
16BIF_NB:PCIE_P_CNTL -- PCIEIND:0x40
P_ELEC_IDLE_MODE
Set bits [15:14] to 2’b10
17BIF_NBP:PCIE_LC_CNTL2 -- PCIEIND_P:0xB1
LC_BLOCK_EL_IDLE_IN_L0
Set bit[20] to 1
18BIF_NBP:PCIE_LC_TRAINING_CNTL -- PCIEIND_P:0xA1
LC_DONT_GO_TO_L0S_IF_L1_ARMED
Set bit [11] to 1.
19BIF_NB:PCIE_P_CNTL -- PCIEIND:0x40
RXP_REALIGN_ON_EACH_TSX_OR_SKP
Enables Rx Clock gating in CDR
Sets number of TX Clocks to drain TX
Pipe to 3.
Lets PI use Electrical Idle from PHY
when turning off PLL in L1 at Gen2
speed instead Inferred Electrical Idle.
Note: LC still uses Inferred Electrical
Idle.
Prevents the Electrical Idle from
causing a transition from Rcv_L0 to
Rcv_L0s.
Prevents the LTSSM from going to
Rcv_L0s if it has already
acknowledged a request to go to L1.
LDSK only taking deskew on
deskewing error detect
Set bit[28] to 0
20BIF_NB:PCIE_STRAP_PI -- PCIEIND:0xC2
STRAP_LDSK_X1_BYPASS
Set bit [14] to 1
21GPPSB Core:
NBCFG: StrapsOutputMux_A – NBMISCIND:0x6A
B_PG2PLL_IDLEDET_TH[1:0]
Set bits [23:22] to 2’b10
GPP Core:
NBCFG: PCIE_NBCFG_REGC – NBMISCIND:0x24
B_PG2PLL_IDLEDET_TH[1:0]
Set bits [17:16] to 2’b10
Set bits [14:8] depending on the configuration
(the default is 0, meaning 128 slots)
2PCIE_CI_CNTL – PCIEIND: 0x20
CI_SLV_CPL_ALLOC_MODE
Set bit[11] to 1
Config B (4:4:0:0:0):
Use default values
Config C (4:2:2:0:0):
Port A: Set bits[14:8] = 7’d32
Port B: Set bits[14:8] = 7’d16
Port C: Set bits[14:8] = 7’d16
Config D (4:2:1:1:0):
Port A: Set bits[14:8] = 7’d32
Port B: Set bits[14:8] = 7’d16
Port C: Set bits[14:8] = 7’d12
Port D: Set bits[14:8] = 7’d12
Config E (4:1:1:1:1):
Port A: Set bits[14:8] = 7’d32
Port B: Set bits[14:8] = 7’d12
Port C: Set bits[14:8] = 7’d12
Port D: Set bits[14:8] = 7’d12
Port E: Set bits[14:8] = 7’d12
Release hold training (by setting the corresponding hold training bit in section 5.5) and then start the link training
procedure outlined in section 5.7.
5.10.13 Power Down Control
5.10.13.1GPPSB Core
5.10.13.1.1 Inactive Lanes
The inactive lane(s) of each port is determined by performing the procedure found in Table 5-69:
Table 5-69 Inactive Lanes
ASIC RevStepRegister SettingFunction/Comment
RS780 All
Revs
1BIF_NB: PCIE_DEBUG_CNTL – PCIEIND: 0x12
DEBUG_PORT_EN
Set bits[7:0] according to the Port
2BIF_NB: PCIE_LC_STATUS2 – PCIEIND: 0x29
LC_TOTAL_INACTIVE_LANES
Read back bits[3:0]
8’h1 = Port A
8’h2 = Port B
8’h3 = Port C
8’h4 = Port D
8’h5 = Port E
Bit [0] represents lane 0 of the lanes assigned to the
port. For example: If Lanes 4-7 are assigned to Port B,
then bit [0] of the read back value represents whether
lane 4 is active or not.
1=Inactive lane
0=Active lane
The per core indirect register PCIE_P_PAD_FORCE_DIS (PCIEIND 0x65) is used to power down inactive lanes in the
GPPSB core. The transmitter and the receiver of each lane can be powered down independently; the register bit to lane
mapping is shown in Table 5-70 below:
The electrical idle detectors should be powered off when no GPP links is trained.
Table 5-77 Turning Off Electrical Idle Detectors Settings
ASIC
Rev
RS780 All
Revs
StepRegister SettingsFunction/Comment
1PCIE_NBCFG_REGC – NBMISCIND:0x24
B_PG2RX_IDLEDET_EN
Set bit[19] to 0
5.10.13.1.3 Inactive PLL
Since there is only 1 PLL for the GPPSB core and the SB link is always alive, the PLL for this core can never be powered
down by software programming. The only occasion that the PLL can be powered down is when all the ports in the
GPPSB core are in L1/L23 power save states; the hardware is responsible for the power down in this case.
5.10.13.2GPP Core
5.10.13.2.1 Inactive Lanes
Disables the electrical idle detectors for 2
GPP lanes.
The inactive lane(s) of each port is determined by performing the procedure found in Table 5-78.
Table 5-78 Inactive Lanes
ASIC
Rev
RS780 All
Revs
StepRegister SettingsFunction/Comment
1BIF_NB: PCIE_DEBUG_CNTL – PCIEIND: 0x12
DEBUG_PORT_EN
Set bits[7:0] according to the Port
2BIF_NB: PCIE_LC_STATUS2 – PCIEIND: 0x29
LC_TOTAL_INACTIVE_LANES
Read back bits[1:0]
8’h1 = Port A
8’h2 = Port B
Bit [0] represents lane 0 of the lanes
assigned to the port
1=Inactive lane
0=Active lane
The per core indirect register PCIE_P_PAD_FORCE_DIS (PCIEIND 0x65) is used to power down inactive lanes in the
GPP core. The transmitter and the receiver of each lane can be powered down independently; the register bit to lane
mapping is shown inTable 5-79.
Table 5-79 Transmitter and Receiver Shut Down
LaneReceiver Shut DownTransmitter Shut Down
GPP TX/RX480
GPP TX/RX591
Table 5-80 and Table 5-81 show the corresponding power down bits for each port in different configurations.
5.10.16.3Shutting Off TXCLK Permanently (CMOS Option – Disabled by Default)
The TXCLK can be shut off permanently to save power when the whole GPP core is inactive. When this feature is
enabled, all register reads/writes to the core will be invalid.
Table 5-94 Shutting Off TXCLK Permanently (CMOS Option - Disabled by Default)
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1PCIE_PDNB_CNTL – NBMISCIND : 0x7
GPP_PERM2_TXCLK_STOP
Set bit[11] to 1
Shuts off TXCLK permanently in
the GPP core
5.10.17 Non-Posted VC1 Traffic Support on SB Link (CMOS Option – Disabled by Default)
Note: Steps 1-3 in the programming sequence in Table 5-95 have to be done in both the NB and the SB register space.
Table 5-95 Non-Posted VC1 Traffic Support on SB Link (CMOS Option - Disabled by Default)
Dynamic Link Width Control (CMOS Option – Disabled by Default)
Table 5-96 Dynamic Link Width Control
ASIC RevStepRegister SettingsFunction/Comment
2If the current link width is less than the intended link width based on
CMOS option selected, then grey out the link width selected in the
CMOS option and skip this sequence.
This check prevents users from
trying to train the link to greater link
width than maximum value limited
with number of physical lanes
connected on the PCIE slot.
If the current link width is equal 3’b101, then the link must be retrained
to x8, and then proceed with the sequence, and in step 4 set the
desired link width to 3’b100.
If the current link width is equal to intended link width, then skip this
sequence.
If the current link width is greater than the intended link width, then
proceed with the sequence.
3BIF_NB:PCIE_P_CNTL[0]=1’b1-- PCIEIND:0x40
P_PWRDN_EN
Set bit [0] to 1
On the AMD GFX card:
BIF:PCIE_P_CNTL[0]=1’b0· PCIEIND:0xB0
P_PWRDN_EN
PCI Enumeration and Special Features Programming Sequence
5.12PCI Enumeration and Special Features Programming Sequence
5.12.1PCI Enumeration
The SBIOS scans all of the PCI buses looking for P2P bridges. When a P2P bridge is located, it is assigned bus numbers
and a routine is performed to check if this P2P bridge is PCIE. If it is PCIE, then PCIE root port initialization is performed
on that P2P bridge. If an error occurs during this initialization, the BIOS Vendor routine calls a chipset-specific routine to
hide the PCIE P2P bridge that generated the error. The following PCIE registers are touched by the PCIE root port
initialization.
Note: All PCIE registers are accessed through PCIE memory mapped configuration space.
5.12.2Program the Common Clock Configuration
•
Call OEM routine to determine if clocks are common to PCIE Port and endpoint.
•Program CommonClockConfig (bit6) = 1 in PCIE Link control reg in P2P and endpoint.
•Re-train the link. Uses PCIE LinkControl and LinkStatus regs.
•Note: LinkControl & LinkStatus are accessed via memory mapped config space.
•Loop with a delay of 1ms between each read of PCIE LinkStatus
•if bit11=0 then exit loop
•if loop count == 100 then exit loop with error flag set this will cause Port to be hidden.
5.12.3Slot Power Limit (CMOS Option - Default 75W)
Table 5-97 Slot Power Limit (CMOS Option – Default 75W)
PCI Enumeration and Special Features Programming Sequence
5.12.6Register Locking
Table 5-99 Register Locking
ASIC RevStepRegister SettingsFunction/Comment
RS780
All Revs
1BIF_NB:PCIE_CNTL[0]=1’b1· PCIEIND:0x10
HWINIT_WR_LOCK
This should be set for all 3 cores (GFX, GPPSB and
GPP).
Set bit[0] to 1
2NBCFG:NB_CNTL[1]=1’b1· NBMISCIND:0x0
HIDE_NB_AGP_CAP
Set bit[0] to 1
5.12.7Optional Features
The optional features for the GFX core (sections 5.9.16 to 5.9.18) and the GPPSB/GPP cores (sections 5.10.14 to 5.10.17)
should be executed here if the CMOS option(s) is enabled.
5.12.8Dynamic Link Width Control
The dynamic link width control code (section 5.11) can be executed here if a link width change is required.
To workaround the S3 Resume issue with the Nvidia card, perform the following: when the system boots up: record the
SSVID/SSDID (address 0x2C) to CMOS. During the S3 resume, read the SSVID/SSDID and compare the result with the
expected number in CMOS. If it is different, then restore the new value from CMOS to offset 0x40 in Nvidia.
PCI Enumeration and Special Features Programming Sequence
Sets the clock recovery phase filter size specifically
for the RV370.
•Step 3.1.1: Detect if the card is trained to L0 from PCIEIND_P: 0xA5 bits [5:0]. Move to the next step if it is
6’h10. Otherwise repeat up to 1 second, then set the HOLD_TRAINING bit to 1.
•Step 3.1.2: Detect if Data Link Negotiation is done from the VC_NEGOTIATION field in
PCIE_VC0_RESOURCE_STATUS. Move to the next step if it is 0. Otherwise write to PCIEIND_P: 0xA2
to re-train the link: set bit [8] to 1; set bits [2:0] = bits [6:4], wait for 5ms, then loop back to Step 1. Stay in
this loop for a maximum of 15 times. Set HOLD_TRAINING to 1 if the hot plug device failed the checking.
Perform the following steps when the system detects that a hot plug device is removed:
•Step 1: Issue a dummy CFG read to the removed device (expect FF back)
•Step 2: Check the A5 register to see if it has any value between 00 to 04, disable the training, and power-down the
lanes. If the value is not between 00 to 04, then issue a dummy CFG read, and check the A5 register. Stay in this loop
for a maximum of 5 times.
•Step 3: Put Device into D3.
5.12.9.4Atheros Card Initialization
For Atheros XB6x device, L1 can be enabled (if CMOS option is to enable L1).
When BIOS detects that an XB6x device is present (Vendor ID 0x168c) behind a PCIE bridge, the following in Table
5-103 should occur.
Note: If the settings below are not configured properly, then there is a possibility of a hard hang.
Table 5-103 Atheros Card Initialization
ASIC RevStepRegister SettingsFunction/Comment
RS780 All
Revs
1BIF_NBP:LINK_CNTL[1]=1’b1·
pcieConfigDev2:0x68
PM_CONTROL
PCI Enumeration and Special Features Programming Sequence
For the device behind which the XB6x is found and
CMOS L1 option is enabled, enable L1 support.
Set bit [1] to 1.
2Set XB6x 0x70C=0x0F003F01Enables workaround on Atherous side.
3Set XB6x 0x70[1:0]=xxxxxxx2
Set bit [1] to 1.
5.12.9.5System Information Table Setting for PowerExpress Mode
Table 5-104 Sytem Information Table Setting for PowerExpress Mode
ASIC RevStepRegister SettingsFunction/Comment
RS880 All
Revs
1BIF_NBP:LINK_CNTL2 -- pcieConfigDev*:0x88
TARGET_LINK_SPEED
2Check the register in step 1 for all ports, then based on
whether PowerExpress mode is running, set bit [6] in
the Integrated information table accordingly.
Enables L1 support on Atheros side if CMOS L1
option is enabled.
4'h2: Advertises the link speed to be Gen2.
4'h1: Advertises the link speed to be Gen1.
Bit [6] = 0 when [(no Gen2 GPP devices are populated)
&& (((PCIE gfx link is trained in Gen2) && (Running in
PowerExpress mode)) || (PCIE gfx link is trained in
Gen1))]
Bit [6] = 1 when [(any Gen2 GPP device is populated) ||
((PCIE GFX link is trained in Gen2) && (not runnning in
PowerExpress mode))]
For the most part, the RS780 BIF is based on the RV610 (laka) design with the front-end PCIE interface removed.
Although the PCIE-specific registers still exist, most of them do not perform any function (writes do not affect operation).
The following are other notable differences:
•DEVICE_IDs, MAJOR_REV_IDs, and MINOR_REV_IDs are hardcoded and set at the ASIC level. See section 6.2.
•CFG_ATI_REV_ID is now available in CONFIG_CNTL (as in other integrated graphics devices). See section 6.3.
•GFX_DEBUG_BAR has been added (as in other integrated graphics devices). See section 6.4.
•The graphics device now appears as a PCI device (as opposed to a PCIE device).
•Removes PCI-e capabilities from CAP_PTR linked list in PCI configuration space
•BIOS_SCRATCH_0 to BIOS_SCRATCH_15 registers are available
•Straps must be programmed by the SBIOS. See section 6.6.
•Master-abort status is available via CFG status bit. See section 6.7.
6.2DEVICE_IDs, MAJOR_REV_IDs, MINOR_REV_IDs
The graphics functions (F0 in single display mode, or F0/F1 in dual display mode) and audio function if enabled (F1 in
single display mode, or F2 in dual display mode) have the following IDs:
•Graphics devices: MAJOR_REV_ID = 0x0, MINOR_REV_ID = 0x0 in A11
•Audio device: MAJOR_REV_ID = 0x0, MINOR_REV_ID = 0x0 in A11
6.3CFG_ATI_REV_ID
The CFG_ATI_REV_ID field reads back the following:
Table 6-1 CFG_ATI_REV_ID Read Back Values
EFUSE_CFG_FAMILY_ID[6:5]A11A12A13
000x000x010x01
010x000x010x03
100x000x010x01
110x000x010x03
6.4GFX_DEBUG_BAR
The GFX_DEBUG_BAR provides a way for the software driver to access the BIF’s configuration space.
Memory-mapped accesses that hit this aperture are converted into the corresponding configuration read/write cycles. This
function is intended for the driver and might not be a concern of the SBIOS.
This function is enabled by first setting NB_GC_STRAPS.GFX_DEBUG_BAR_EN = 1. Next, function 0 BAR 6 should
be written. The 1MB aperture is fixed as a non-prefetchable region that supports 32b addressing only.
Gpuioreg BAR For Accessing nbconfig Registers (A12)
6.5Gpuioreg BAR For Accessing nbconfig Registers (A12)
If this function is enabled, then the accesses to internal graphics IO space, with offset 0x60/0x64, are forwarded to
nbconfig:0x60/0x64. To enable the decoding with the IOC the following bit should be set:
•NBMISCIND (offset 0x1): Bit [8] needs to be 1
6.6Initialization
Set the following CFG registers:
•NB_GC_STRAPS
•NB_INTERRUPT_PIN
BIF requires several “strap” bits to be set before it can function. These bits should be loaded into NB_NBMISCCFG:
NB_BIF_SPARE as follows:
Table 6-2 Strap Bits
NB_NBMISCCFG:
NB_BIF_SPARE
Bit 10MSI_DATA_FIX_EN
Bit 9MSI_BE_FIX_DIS
Bit 8CFG_BIF_BIOS_ROM_EN
Bit 7BIF_MEM_AP_SIZE_STRAP_SEL
Bit 6BIF_AUDIO_EN_STRAP_SEL
Bit 5RCU_BIF_config_done
Bit 4SLV_BD_RAD_FORCE_EN
Bit 3SLV_BD_RAD_MWr4_DIS
Bit 2SLV_BD_RAD_MWr3_DIS
Bit 1CFG_BIF_MSI_EN
Bit 0Reg_BIF_RST_DIS
FieldDescription
This is for the RS780 ASIC revision A13 and above
0=Disable ECO for MSI DATA bug causing incorrect
MSI to be written
1=Enable
This is for the RS780 ASIC revision A12 and above
0=Enable ECO for MSI BE alignment bug causing MSI
to go to the incorrect address
1=Disable
Not used. Leave as ‘0’
Write as ‘1’
Write as ‘1’
See below: at this point, write as ‘0’
Write as ‘0’: effects back-door access (below)
Write as ‘0’: effects back-door access (below)
Write as ‘0’: effects back-door access (below)
1=Enable MSI
0 =Disable MSI
Write as ‘0’: used to control driver resets of BIF
Before BIF can be used, the SBIOS must provide strap values to it. After hard reset, BIF is in strap mode where normal
cycles are not permitted; but instead BIF interprets posted memory mapped writes as writes to various ROMSTRAP and
EFUSE registers.
It is suggested that these registers be written in the following order before any regular BIF registers are written (i.e.,
before PCI config cycles to the graphics device). Only the 20b LSBs of the byte address are relevant for these cycles (the
MSBs are ignored). To prevent confusion within the CPU and northbridge, it is suggested that the MSBs be selected such
that the addresses fall within the memory-mapped BAR that will eventually be used by the graphics device.
Table 6-3 Initialization
Address LSB[19:0]RegisterValue
0x15000CC_BIF_ROMSTRAP0Recommended: 0x2C006300
0x15010CC_BIF_ROMSTRAP1Recommended: 0x03015330
0x15020CC_BIF_ROMSTRAP2Recommended: 0x04000040
Commonly used bits:
Bit [5]=BIF_64BAR_EN_A
Bits [9:7]=BIF_MEM_AP_SIZE[2:0]
Bit [10]=BIF_REG_AP_SIZE[1]
Bit [25]=BIF_DUALFUNC_DISPLAY_EN
Bit [26]=BIF_AUDIO_EN
Bit [27]=BIF_MSI_DIS
Bit [31]=BIF_TRUSTED_CFG_EN
Note: See RV610 documentation for the bit-fields of these registers.
Finally, NB_BIF_SPARE[5] should be set. This is a work-around and may be removed in future devices. Once that is set,
BIF switches into normal functional mode and the traditional PCI configuration cycles can begin.
6.7Master Abort Status
The master abort status for BIF is now available via a sticky bit in APCCFG. The bit is reset when a ‘1’ is written to it:
Table 6-4 Master Abort Status
SettingFunction/Comment
APC_AGP_PCI_STATUS.MASTER_ABORTRead:
6.8HDP/MC Write Combiner
A write from the HT interface to the frame buffer follows the following path:
•HT -> IOC -> BIF -> HDP -> MC -> HT.
Master Abort Status
0=No master abort received
1=Master abort received
Write:
0=No change
1=Reset master abort received status
The IOC segments a 64B write into four 16B writes which would normally result in four 16B writes back to the CPU via
the HT interface. This is undesirable due to HT inefficiencies in transferring small data sizes.
Table 6-5 Write Combiner Control Registers
SettingFunction/Comment
HDP_HOST_PATH_CNTL.WRITE_COMBINE_EN 0=Disable the write combiner in HDP
MC_ARB:RAMCFG.REQUEST_512B 0=Enable the write combiner in MC (2 x 32B -> 64B)
6.9Graphics UMA FB Size
For UMA graphics the recommended UMA FB size depends on the total amount of system memory that is available
(according to the values in Table 6-6). Some additional small performance improvements may be gained by increasing the
FB to 512MB.
Table 6-6 Recommended UMAFB Size
Total System Memory (GB)UMA Framebuffer Size (MB)
< = 512 MB64 MB
768 MB, 1GB128 MB
> = 1GB256 MB
1=Enable the write combiner in HDP (2 x 16B -> 32B)
64MB of SP are recommended for performance improvements. The interleaving ratio should be set based on the system
configuration, as shown in Table 6-7 below. For other SP speeds use the closest value from Table 6-7.
Note: The optimal ratio is sensitive to both the benchmark and the exact system configuration. On a given system, for a
given benchmark, the optimal ratio may differ slightly from the values Table 6-7.