BIR_GLOBAL_REF refuses on the RV32 path. Computing the address is the easy part; the problem is that nothing initialises it. The ELF has a single PT_LOAD and no .data, and the kernel is a bare function that never runs a crt1 to stage an image, so any pointer would reference uninitialised L1. Even a zero-init global would be wrong, since L1 is not guaranteed zero.
Needs a second PT_LOAD, a matching .segments triple for it, and a decision about who copies it into place before the kernel runs. tt-metal's own answer is do_crt1 in hw/inc/internal/firmware_common.h, which the kernel calls itself with __kernel_data_lma.
BIR_GLOBAL_REF refuses on the RV32 path. Computing the address is the easy part; the problem is that nothing initialises it. The ELF has a single PT_LOAD and no .data, and the kernel is a bare function that never runs a crt1 to stage an image, so any pointer would reference uninitialised L1. Even a zero-init global would be wrong, since L1 is not guaranteed zero.
Needs a second PT_LOAD, a matching .segments triple for it, and a decision about who copies it into place before the kernel runs. tt-metal's own answer is do_crt1 in hw/inc/internal/firmware_common.h, which the kernel calls itself with __kernel_data_lma.