Build Guide

From 15h.org
(Redirected from PCI Express)
Jump to navigation Jump to search
Komos - a build using the AM3+ Sabertooth 990FX R2.0

Since you're reading the 15h.org build guide, we'll assume you're interested in building a fully-FOSS-firmware-compatible AMD system to run coreboot-15h. This guide assumes you're looking to build a new desktop, server, or workstation system from separately-purchased components.

If you are not building from separate components (such as for the various prebuilt Supermicro servers which included compatible motherboards), head over to the Motherboards page and look for your board's model. For laptops, see the Laptops page.

Choosing a Platform

coreboot-15h is available for many motherboards, across several different AMD sockets - which one you should choose depends on the balance of performance, cost, power consumption, and physical size you want for your system.

For an easy to build open source desktop, the AM3+ platform is recommended. Compatible cases and CPU coolers are easy to find. AM3+ processors have the highest single core performance, making them the best choice for responsive activities such as web browsing or gaming.

Users that require lots of RAM (1024 GB max) or many cores (64 max) should look at the C32 and G34 platforms. The C32 is the smaller of the two and is easier to build: motherboards can fit common cases and compatible CPU coolers are easy to find. A more powerful system can be built with G34, but compatible cases and coolers can be hard to find.

Small (mITX to uATX), low power (25 to 40 W) open source machines can be built using the AM1, AM3+, and C32 platforms.

Many of the supported platforms can use ECC memory and have a working IOMMU. ECC memory support is important for machines running nonstop over long periods of time. The IOMMU enables PCIe device isolation or passthrough to a virtual machine, a feature required to use Qubes OS.

Socket Type Motherboard Per Socket ECC Support IOMMU Support TPM Support
Size CPU Sockets Model Type CPU Cores Max Frequency (GHz) CPU TDP (W) Max RAM
Socket AM1 mITX 1 ASRock AM1H-ITX Desktop 2 to 4 2.20 25 16 GB Yes No Untested
Socket AM3+ uATX 1 Supermicro H8SML Server 4 to 8 3.80 25 to 65 64 GB Yes Yes Yes
ATX ASUS Crosshair V Formula-Z Desktop 5.00 25 to 220 Untested
ASUS Sabertooth 990FX R2.0 Untested
Socket C32 uATX 1 Supermicro H8SCM Server 4 to 8 3.80 35 to 95 256 GB Yes Yes No
SSI CEB 2 ASUS KCMA-D8 No
Socket G34 ATX 1 Supermicro H8SGL Server 4 to 16 3.80 85 to 140 256 GB Yes Yes Yes
SSI EEB 2 ASUS KGPE-D16 Yes
SWTX 4 Supermicro H8QG6 Yes

All of these platforms besides the AM1 support ECC memory, IOMMU, SR-IOV, SLAT, PCI-e ACS and are based on Orochi - AMD's high-power, high-performance platform for Family 15h systems.

If you're looking to build a lower-power quad-core system (such as for an efficient router or media player machine), you may be interested in a Trinity/Richland or Kabini APU instead. For these, choose an FM2 board for midrange desktop systems, or AM1 for low-power systems with lightweight applications although please note that the AM1 currently lacks a functional IOMMU.

The 35W C32 4310EE and the 25W 3320EE are capable of 1Gbps routing and wireguard VPN on opnsense a FreeBSD distribution.

Building with AM3+

The Best AM3+ Processors by TDP
Processor Cores Frequency (GHz) TDP (W)
Base Full Load Turbo Half Load Turbo
Opteron 3320 EE 4 1.90 2.10 2.50 25
Opteron 3350 HE 4 2.80 3.10 3.80 45
Opteron 3380 8 2.60 2.90 3.60 65
FX-4320 4 4.00 4.10 4.20 95
FX-6330 6 3.60 3.90 4.20 95
FX-8310 8 3.40 3.70 4.30 95
FX-4350 4 4.20 ? 4.30 125
FX-8370 8 4.00 4.10 4.30 125
FX-9590 8 4.70 5.00 5.00 220

For all CPU models, see Socket AM3+#Orochi Processors

Socket AM3+ provides access to both the most power efficient and the most power hungry processors. coreboot-15h supports the Supermicro H8SML for efficient Opteron processors and the ASUS Sabertooth 990FX R2.0 and Crosshair V Formula-Z motherboards for the fast FX processors. The FX-9590 can be TDP capped in coreboot-15h to use it as a very cold and efficient FX-8370 with higher turbo frequencies. For example, the TDP capped build orion runs a full core load at 4.00 GHz with core temperatures under 40°C (silently). Single core loads still reach 5.00 GHz in this setup.

AM3+ is currently the best option for high single core performance on an open firmware system. For this reason, AM3+ systems are preferred for latency sensitive tasks such as signal processing, web browsing, and gaming. By modern standards, it is possible to build a low to mid-tier gaming system using the AM3+ platform. Recent games, such as Elden Ring, are able to run smoothly at 4K on orion.

All Socket AM3+ processors support ECC RAM and cache. Not all Socket AM3+ motherboards wire the DDR3 ECC pins to the processor. The three AM3+ motherboards supported by coreboot-15h all support ECC RAM. Socket AM3+ only supports UDIMM memory, which limits the maximum supported memory for AM3+ platforms.

As a consumer gaming platform, CPU coolers for AM3+ are common and still widely-available. It is also easy to find compatible cases for the AM3+ motherboards as they all use very common sizes. These aspects make AM3+ systems very easy to build.

Unlike modern desktop CPUs (and other CPUs of its time), AM3+ is a PGA socket, with pins on the CPU and holes in the socket. Be careful to avoid bending pins on the CPU during installation and removal. The socket on the motherboard is typically harder to damage. Bent CPU pins are easily fixed using the empty tip of a mechanical pencil to reallign them.

Building with C32

The Best C32 Processors by TDP
Processor Cores Frequency (GHz) TDP (W)
Base Full Load Turbo Half Load Turbo
Opteron 4310 EE 4 2.00 3.00 35
Opteron 4256 EE 8 1.60 1.90 2.80 35
Opteron 42DX EE 4 2.20 3.30 40
Opteron 4365 EE 8 2.00 2.30 2.80 40
Opteron 4332 HE 6 3.00 3.30 3.70 65
Opteron 4376 HE 8 2.60 2.90 3.60 65
Opteron 4340 6 3.50 3.70 3.80 95
Opteron 4386 8 3.10 3.40 3.80 95

For all CPU models, see Socket C32#Orochi Processors

Socket C32 motherboards covering both 1 and 2 socket configurations are supported. The fastest C32 CPU is the 8-core Opteron 4386, and UDIMM, RDIMM, and LRDIMM memory are all supported. Each CPU supports 2 memory channels, and all coreboot-15h-supported boards are 2-DIMM-per-channel. Unlike with G34, C32 CPUs support 64GB LRDIMMs in all slots - this means that, despite having half as many slots, C32 motherboards surprisingly support the same 256 GB per socket as G34, albeit with fewer channels.

C32 CPUs use LGA sockets, like Intel or newer AMD CPUs. This generally makes the CPU less fragile, but the socket on the motherboard more so.

As with modern PC hardware, if you purchase a C32 motherboard without CPUs installed, inspect its sockets closely for bent, damaged, or dirty pins.

Socket F 3.5 pitch coolers can be used for C32 and can be far more affordable and still available new, see the Coolers page for more information.

Early revisions of certain motherboards only support the 41xx CPU and must be avoided.

Most of the 2U server coolers are insufficient for the 95W C32 CPU's to be under 55C at low and quiet fan speeds when in use so it is advisable to obtain a 3U/4U case if you want it close to your desk.

Building with G34

Qubesotron - a build using the G34 KGPE-D16
The Best G34 Processors by TDP
Processor Cores Frequency (GHz) TDP (W)
Base Full Load Turbo Half Load Turbo
Opteron 6366 HE 16 1.80 2.30 3.10 85
Opteron 6338P 12 2.30 2.50 2.80 99
Opteron 6370P 16 2.00 2.20 2.50 99
Opteron 6328 8 3.20 3.50 3.80 115
Opteron 6380 16 2.50 2.80 3.40 115
Opteron 6386 SE 16 2.80 3.20 3.50 140

For all CPU models, see Socket G34#Orochi Processors

Socket G34, usually on the ASUS KGPE-D16, is probably the most popular and best-known platform for FOSS firmware on AMD systems. G34 motherboards were made with 1, 2, and 4 sockets, and coreboot-15h supports boards covering all of these configurations. The fastest G34 CPU is the 16-core Opteron 6386 SE, and UDIMM, RDIMM, and LRDIMM memory are all supported. Each CPU supports 4 memory channels, and all coreboot-15h-supported boards are 2-DIMM-per-channel. RDIMMs up to 32GB, or LRDIMMs up to 64GB each, are both supported. Despite this, two 32GB RDIMMs can be used per channel, versus only one 64GB LRDIMM - this means that the memory limit is 256 GB per socket, whether you use RDIMM or LRDIMM memory. RDIMM is generally the fastest, least-expensive and most-compatible option.

Good G34 CPU coolers can be difficult to find - many G34 servers used passive CPU coolers reliant on specific fan and baffle arrangements, which are not easily adapted for standard PC cases in custom-built systems. A list of relevant CPU coolers is available on the Coolers page - the rare Noctua G34 coolers are well-regarded and highly-prized, while Dynatron active server coolers are sometimes still available used. Depending on what you can find, it may be easier to adapt a modern CPU cooler to fit instead.

G34 CPUs use LGA sockets, like Intel or newer AMD CPUs. This generally makes the CPU less fragile, but the socket on the motherboard more so.

As with modern PC hardware, if you purchase a G34 motherboard without CPUs installed, inspect its sockets closely for bent, damaged, or dirty pins and the CPU for damage to the components or contacts on the bottom.

There are several pre-built KGPE-D16 systems commonly available with low wear such as the Barracuda Opteron G34 which may be a good choice as they already come with the hard to find heatsinks and 16 core CPU's.

Building with AM1

Platform currently has no IOMMU support

The ASRock AM1H-ITX motherboard was recently added to the coreboot-15h project. It is still in a testing phase. The ASUS AM1I-A is maintained by an external project.

Building with FM2

TODO: Check for IOMMU support on FM2.

Two Socket FM2 motherboards are supported by coreboot, but have not been thoroughly tested by the 15h community. These are the ASUS F2A85-M and ASUS A88XM-E.

PCI Express Devices

A Samsung PM1725a HHHL SSD - note the PCIe x8 card edge

The Family 15h and Family 16h platforms supported by coreboot-15h support up to PCI Express 2.0 ("Gen2") - a single Gen2 x16 slot delivers 8 GB/s of bandwidth. Compared to newer platforms, this can be a notable limitation for bandwidth-intensive devices such as GPUs or NVMe storage. For this reason, it's a good idea to select PCIe devices with more lanes whenever possible.

PCI Express link performance
Version Year introduced Line code Transfer rate
(per lane)
Throughput (GB/s)
x1 x2 x4 x8 x16
1.0 2003 NRZ 8b/10b 2.5 GT/s 0.25 0.5 1 2 4
2.0 2007 5.0 GT/s 0.5 1 2 4 8
3.0 2010 128b/130b 8.0 GT/s 0.985 1.969 3.938 7.877 15.754
4.0 2017 16.0 GT/s 1.969 3.938 7.877 15.754 31.508
5.0 2019 32.0 GT/s 3.938 7.877 15.754 31.508 63.015

This table shows the throughput of all PCIe lane widths, from Gen1 through Gen5. The advantages of additional PCIe lanes on a Gen2 chipset should be clear - a Gen2 x16 link provides comparable bandwidth to a Gen3 x8, or a Gen4 x4.

Extended PCI-e features such as Above 4G Decoding, Large/ReBAR, ARI and ATS are currently not supported by 15h coreboot but could potentially be added in the future as the chipset should support them.

PCI-e ACS is fully supported with the excellent IOMMU groups required by Qubes/Xen and VFIO device assignment.

SR-IOV is supported and should work fine under the limitations of not having ARI reducing the max VF's per bus.

Networking Cards

Almost any modern networking device should be compatible if it doesn't require large BAR support:

Most 15h workstation/server boards come with dual onboard Intel 82574L interfaces, since they do not feature an on-board flash chip they are safer for direct device assignment performed without the use of SR-IOV. Not assigning the ROM BAR to the guest may improve security for direct-attach.

It's recommended to use SR-IOV for safer device assignment and to lock the flash descriptors with intel ethernet tools if you're using a PCI-e network interface card in order to ensure maximum security.

TODO: How to lock PCI-e device flash descriptors on network cards, USB devices and so on.

1Gbps:

Intel i350:

This bridgeless and switchless PCI-e device with SR-IOV is available used and new in a variety of different configurations if you desire additional 1Gbps ports.

It is advised to use an intel firmware tool to ensure that WoL and iPXE/iSCSI is disabled on the re-writable ROM and the flash is disabled requiring a full system reboot to re-enable increasing the security level.

Broadcom BCM5719:

Considered a more free device than the i350 as substantially more logic is performed by the host loaded firmware instead of the card ROM. FOSS firmware has been developed for the RaptorCS Talos 2 LOM's which should also work in independent 5719 PCI-e cards for iPXE or BMC communication.

Removing the firmware from the card and locking the flash is considered best for security as the Linux drivers should provide general functionality without it and would likely make this the most secure option without the use of SR-IOV.

https://github.com/meklort/bcm5719-fw

https://github.com/meklort/bcm5719-fw/issues/232 (includes a list of card part numbers)

Intel 82576:

The quad port 82576 supports SR-IOV but it is a switched design and thus requires larger amounts of resources, their use could result in your graphics devices not receiving the proper BAR's. Security and flexibility is also reduced as each pair of ports shares an IOMMU group.

10Gbps:

(10/40 Cards without large BAR requirements, binary blobs and ideally no re-writable on-board firmware required for basic functionality should be listed here.)

TBD

25/40Gbps:

TBD

GPUs

Most high-end PCIe GPUs (old and new) support using all 16 lanes, but certain newer midrange cards are x8 or x4 and could potentially limit your 3D performance when limited to PCI-e 2.0

Newer cards will likely be highly CPU limited on the fastest available 15h CPU's.

Recommended cards:

AMD Polaris as the last generation of graphics cards without the vPSP, such as the Radeon RX590 8GB, the single slot Radeon Pro WX 7100 8GB or the low profile WX 4100.

Although the vPSP is restricted by the IOMMU and has nowhere near the level of access of it's mainboard counterparts it does prevent the theoretical development of owner controlled firmware for a video card which is already considered a very complex undertaking and will likely never happen.

If you do not care about that or consider the claim of the vPSP theoretically preventing hostile internal firmware re-writes as a benefit then potentially a newer x16 card could be purchased.

NVMe SSDs

A common generic M.2 adapter card kit. The bottom slot is for PCIe M.2 drives, the top slot (and cable) are for SATA M.2 drives.

Few motherboards supported by coreboot-15h have built-in M.2 slots. However, a PCIe M.2 SSD can be used in a PCIe slot using a common NVMe-to-x4 adapter card (many also allow an additional M.2 SATA SSD to be connected to a SATA port). A Gen2 x4 slot provides 2 GB/s of PCIe bandwidth - if your SSD's sequential read and write speeds are below 2000 MB/s, PCIe 2.0 will not bottleneck it. However, many NVMe SSDs are capable of more.

The D16 systems support PCI-e Bifurcation via the staging branch with two x16 slots capable of x8/x8 and configured in menuconfig thus making a four slot NVMe Cassette able to use two cards in position one and three.

It has yet to be added to the D8 but it should also work on this platform or any other with an electrical x16 slot.

Higher NVMe bandwidth on these platforms requires a directly attached SSD with more than 4 PCIe lanes - since the M.2 connector is only x4, this means using an AIC (Add-In Card)-format SSD, which installs directly in a PCIe slot. The following AIC SSDs are known to be capable of more than 2000 MB/s sequential throughput over at least 8 PCIe lanes:

Add-In Card SSD examples:
Model Capacity PCIe Width Sequential Read (MB/s) Sequential Write (MB/s) Random Read IOPS Random Write IOPS
Samsung PM1725a HHHL 1.6/3.2/6.4 TB x8 (up to Gen3) 6200 (~3600 on Gen2) 2600 1,000,000 180,000
Samsung PM1735a HHHL 1.6/3.2/6.4/12.8 TB x8 (up to Gen4) 7000 (~3600 on Gen2) 3200 800,000 135,000

Another choice is a four slot switched NVMe PCI-e x16 card as this would enable the full usage of multiple modern PCI-e x4 SSD's with an oversubscribed PCI-e 2.0 x16 uplink if the switch supports lane rate conversion on the uplink. If you wish to assign NVMe devices to virtual machines one at a time and insure proper IOMMU groups and device isolation the switch must also support PCI-e ACS.

NVMe cassettes both switched and bifurcated can also be used to add other types of PCI-e M2 devices to a system with limited expansion slots.

Southbridge cards should work and are an excellent way to obtain modern features such as USB 3, SATA 6Gbps and additional PCI-e M2/NVMe slots.

System Cooling

In order to ensure a long component life it is very important to ensure that your motherboard temperatures remain at optimal levels.

1U and 2U server cases use small loud fans and are unsuitable for deskside use with CPU's above 45W.

The primary heat sources on a motherboard that need cooling are the CPU, RAM, VRMs, Northbridge, Southbridge, and GPU. Internal sensors are used within the CPU to adjust fan speeds to maintain safe CPU temperatures. Many processors can be configured to throttle if the CPU die is becoming unsafely hot as a secondary protection mechanism. Dedicated GPU cards often operate the same way. The remaining components (RAM, VRMs, Northbridge, and Southbridge) all expect to be sufficiently cooled by case airflow. This is where differences between "Desktop" and "Server" motherboards become important.

A visual comparison of Desktop (left) and Server (right) motherboard cooling expectations. A server air shroud condenses and focuses airflow over key components.

Server boards are designed for small cases with loud, powerful fans. Air shrouds are frequently utilized to further condense air over key components. Desktop boards often have larger heatsinks on the VRMs, Northbridge, and Southbridge to allow for quieter, less powerful fans in an office environment. A pair of motherboards with similar components is shown above to highlight the differences between Desktop and Server designs. The Server motherboard has significantly less cooling on the VRMs and no heatsink at all on the Southbridge.

Even larger Server boards, such as the KGPE-D16, can be found with no VRM cooling despite housing more powerful processors than the two boards shown above.

Desktop systems largely place the motherboard perpendicular to the ground, allowing hot air to naturally flow towards the "top" of the motherboard. Heatsink fins and RAM are oriented to utilize this passive heat convection. Servers largely orient the motherboard parallel to the ground and expect "front to back" airflow in the case. Installing a Server motherboard in a vertical Desktop case can cause cooling problems for the installed RAM; the RAM modules will be stacked above each other, forcing the "topmost" module to absorb a tremendous amount of heat from the modules beneath it.

The "topmost" module in a fully populated, vertically oriented Server motherboard can thus rapidly exceed 120°C under load without sufficient cooling.

Workstation systems utilize Server motherboards in a vertical case, similar to Desktops. Powerful fans are placed along the edge of the motherboard, housed in green in the above example, to provide concentrated "front to back" airflow over the motherboard. If you are building a Workstation, it is best to choose a tight fitting case with high pressure fans positioned close to the motherboard.

TODO:

Northbridge fan cooling example.

Cooling the northbridge chipset when using a graphics card or other PCI-e device that extends over it (almost all of them) and optimal temperatures for component life.

Shopping Tips

It is recommended to purchase later revision boards without visible dust buildup as they will likely be in better condition.

Configuration and Tuning

Power Conservation:

Compile all PCI-e power saving options and force enable ASPM for all devices in your operating system in order to reduce CPU wakeup.

Use nohz=on and nohz full kernel command line options for a tickless system.

CPU Governor ondemand or conservative.

Disabling WoL with ethtool on each interface will shut off the network interfaces when the system is off and save a few watts of power, WoL is why the LOM status lights are on when the system is plugged in.

Using the jumpers to disable unneeded on board devices such as VGA or the LOM's since the 82574L has ASPM disabled in the e1000e driver and the VGA doesn't work at all without a blob on the Supermicro motherboards.

Security:

Microcode updates are highly recommended in order to provide secure operation of the Piledriver IOMMU, fix CPU timing errors and provide Spectre related enhancements.