System requirements
BIOS configuration
AMD platforms
- SPM(Special Purpose Memory) configuration
AMD CBS→CXL Common Options→CXL Memory Attribute: Enabled
Warning
If disabled, the CXL memory lacks EFI_MEMORY_SP attribute, causing the OS to boot it as standard system-ram(CPU-less NUMA node via SRAT).
Once it is integrated into system memory, it cannot be reconfigured to DAX. - Use CPU address space
AMD CBS→CXL Common Options→CXL Physical Addressing: System address
Warning
If not set to System address, a mismatch between SPA(System Physical Address) and HPA(Host Physical Address) occurs.
It prevents the HDM(Host-managed Device Memory) Decoder from validating the memory range, making it impossible to create CXL Region.
Without a valid region, the memory cannot be assigned to DAX. - Enable MSI multi vector
AMD CBS→NBIO Common Options→IOMMU/Security→IOMMU: Enabled
Warning
If disabled, Interrupt Remapping is unavailable, limiting the CXL device to a single MSI vector.
But our device is using multi vector MSI, so it should be enabled.
OS
- Ubuntu 24.04.3 LTS
Kernel boot parameter for CXL devdax
- Add
memhp_default_state=offlineto the kernel boot parametersWhy? When CXL memory is onlined as system-ram, the kernel automatically manages it as regular memory. Setting
memhp_default_state=offlineprevents the kernel from auto-onlining hot-plugged memory, allowing it to remain available for devdax configuration.
GRUB configuration
- Edit the GRUB configuration file:
sudo vi /etc/default/grub - Append
memhp_default_state=offlineto theGRUB_CMDLINE_LINUXvariable:GRUB_CMDLINE_LINUX="memhp_default_state=offline"Note If
GRUB_CMDLINE_LINUXalready contains other parameters, appendmemhp_default_state=offlinewith a space separator. Do not remove the existing parameters. - Update GRUB and reboot:
sudo update-grub sudo reboot - After reboot, verify the parameter is applied:
cat /proc/cmdline | grep memhp_default_state
Required APT packages
build-essential cmake ninja-build wget
python3-dev python3-pip python3-venv libncurses6
libglib2.0-0 libslirp0 liburing2 libcurl3-gnutls
Required Python packages
numpy tomli capstone cxxfilt pyelftools
Docker
- Optional, recommended for consistent build environments
Note
For non-Ubuntu systems, it is recommended to use the official Docker image to ensure full compatibility.