VHK158 - Boot Linux from HBM
This page describes the steps to build and run PetaLinux images targeting VHK158 Pre-production Silicon HBM memory instead of the default DDR.
Table Of Contents
Introduction
This page explains the steps to create a simple hardware design with HBM connected to the CIPS. Then we will build a PetaLinux image after using the design XSA and will execute the Linux from HBM memory. The design and software build is based on the 2023.1 version.
Hardware Design
Source the Tcl file (This can be downloaded from the HBM_design page). The Tcl file contains all of the necessary changes to have the HBM enabled in the AXI NOC block.
The design essentially consists of a CIPS and NOC block as shown here:
The HBM connections to the CIPS can be seen in the NoC, apart from the QOS and connectivity configurations.
Create and build the project to generate the design XSA.
Software Design
In order to make the Linux boot from HBM, we have to make the address changes at various boot stages including U-boot, ATF, and the Device-tree.
This section details the steps to create and build the PetaLinux project using the XSA file created as part of the hardware design build.
Build Steps
petalinux-create -t project -s <BSP_file>
cd <petalinux_proj>
petalinux-config --get-hw-description <XSA file Path>
Make the below modifications to the configuration menu to adjust the memory settings as per the HBM address space and to make HBM a primary memory:
Subsystem AUTO Hardware Settings ---> Memory Settings ---> Primary Memory (HBM0_PC1)
Adjust the ATF to offload our U-Boot running in HBM after modifying its base address
ARM Trusted Firmware Configuration ---> PRELOADED BL33 BASE = 0x4048000000
Save and Exit
U-Boot Changes
Adjust the U-Boot and DTB base addresses after creating the user.cfg file and making the below-suggested changes in “project-spec/meta-user/recipes-bsp/u-boot/files/user.cfg"
CONFIG_TEXT_BASE=0x4048000000
CONFIG_XILINX_OF_BOARD_DTB_ADDR=0x4040001000
Make sure to update the u-boot-xlnx_%.bbappend file to include the user.cfg in it:
SRC_URI += “file://user.cfg”
Note: You can also make these changes after running “petalinux-config -c u-boot
"
Device Tree Changes
Here are the relevant device tree changes to be made in "project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi", to add the HBM memory nodes manually and remove the unused DDR node:
Building the project
Build the project with all of the above-suggested changes:
Binary Packaging
Create the bootable image using the command:
You can optionally, follow the below steps to create the WIC image to flash it to the SD card:
Run Steps
Copy the BOOT.BIN, boot.scr, Image and rootfs.cpio.gz.u-boot to SD card and boot.
Upon booting the VHK158, you can see the below serial prints that indicate the system boot from HBM memory:
Related Links
Board Page - Versal HBM Series VHK158 Evaluation Kit
Master Answer Record - AMD Customer Community
Related pages
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy