AMD Address Translation Library "ATL" Coming With Linux 6.8

Written by Michael Larabel in AMD on 3 January 2024 at 03:00 PM EST. 4 Comments
AMD
The AMD Address Translation Library (ATL) is cleaning up and centralizing existing code within the Linux kernel for Zen-based systems. After being reviewed on the kernel mailing list, the AMD ATL is set to be introduced as part of the upcoming Linux 6.8 kernel cycle.

The AMD Address Translation Library itself isn't some shiny new feature but an evolution of existing AMD Zen address translation code that's already been within the Linux kernel for years. As the AMD server hardware capabilities expand and new innovations coming about like CXL, this previously isolated code living within the AMD EDAC (Error Detection and Correction) driver is now being spun off into its own common kernel "library" that can be better leveraged across multiple AMD hardware drivers.

AMD ATL text


The AMD Address Translation Library can now be used across drivers for address translation primarily for error handling scenarios like memory ECC errors. This patch adding the AMD ATL libraty has been queued into TIP.git ahead of next week's Linux 6.8 merge window. The commit sums things up nicely:
"AMD Zen-based systems report memory errors through Machine Check banks representing Unified Memory Controllers (UMCs). The address value reported for DRAM ECC errors is a "normalized address" that is relative to the UMC. This normalized address must be converted to a system physical address to be usable by the OS.

Support for this address translation was introduced to the MCA subsystem with Zen1 systems. The code was later moved to the AMD64 EDAC module, since this was the only user of the code at the time.

However, there are uses for this translation outside of EDAC. The system physical address can be used in MCA for preemptive page offlining as done in some MCA notifier functions. Also, this translation is needed as the basis of similar functionality needed for some CXL configurations on AMD systems.

Introduce a common address translation library that can be used for multiple subsystems including MCA, EDAC, and CXL.

Include support for UMC normalized to system physical address translation for current CPU systems.

The Data Fabric Indirect register access offsets and one of the register fields were changed. Default to the current offsets and register field definition. And fallback to the older values if running on a "legacy" system."

Along with adding the AMD Address Translation Library, another patch in TIP.git drops the former amd64_edac-specific address translation code and switches to using this new library for Linux 6.8.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week