[RFC PATCH] perf/arm64: Add BRBE support for bpf_get_branch_snapshot()

Leo Yan leo.yan at arm.com
Tue Jan 6 02:54:51 PST 2026


On Mon, Jan 05, 2026 at 09:46:01PM +0000, Puranjay Mohan wrote:

[...]

> Thanks for running the test, it will help me debug it better. But as
> Mark pointer out this has fundamental problems which I will try to fix
> first.

I saw the discussion.  Maybe we can refer to other architecture for
how to resolve the issues.

> P.S. - The test on FVP RevC, does this need special hardware or this
> is an emulation platform, in the later case, can I do the test myself
> somehow?

FVP is an emulation platform, and the best chance is to download
Shrinkwrap tool [1] for access it.  Below are some notes:

- For a FVP with BRBE enabled, I created a addition.yaml:

---8<---

layers:
     - arch/v9.5.yaml

run:
   params:
      -C bp.hostbridge.userNetworking: 1
      -C bp.hostbridge.userNetPorts: 8022=22
      -C cluster0.has_brbe: 1
      -C cluster0.has_brbe_v1p1: 1
      -C cluster1.has_brbe: 1
      -C cluster1.has_brbe_v1p1: 1
   rtvars:
      CMDLINE:
         type: string
         value: console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda rw ip=dhcp kpti=off

--->8---

- Build firmware for FVP:

  export PATH=/path/to/shrinkwrap:$PATH
  shrinkwrap build --overlay=addition.yaml ns-edk2.yaml

- Build Linux kernel:

  ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Image arm/fvp-base-revc.dtb

- Run FVP:

  shrinkwrap run -o addition.yaml \
        --rtvar=KERNEL=$KERNEL_PATH/arch/arm64/boot/Image \
        --rtvar=DTB=$KERNEL_PATH/arch/arm64/boot/dts/arm/fvp-base-revc.dtb \
        --rtvar=ROOTFS=debian.img ns-edk2.yaml

You can download a root file system image from [2].  Just note, FVP is
slow so you might need to cross build kernel and eBPF selftest on your
host machine and then mount your host folder onto FVP's /mnt folder,
something like:

  sshfs -o allow_other,default_permissions,reconnect \
      username at host_ip:/path/to/build/folder /mnt

Thanks,
Leo

[1] https://shrinkwrap.docs.arm.com/en/latest/userguide/quickstart.html#
[2] https://releases.linaro.org/debian/images/developer-arm64/debian12/debian.img



More information about the linux-arm-kernel mailing list