88#include "dapf.h"
99#include "devicetree.h"
1010#include "exception.h"
11+ #include "firmware.h"
1112#include "malloc.h"
1213#include "memory.h"
1314#include "pcie.h"
@@ -33,6 +34,8 @@ static void *initrd_start = NULL;
3334static size_t initrd_size = 0 ;
3435static char * chosen_params [MAX_CHOSEN_PARAMS ][2 ];
3536
37+ extern const char * const m1n1_version ;
38+
3639int dt_set_gpu (void * dt );
3740
3841#define DT_ALIGN 16384
@@ -275,6 +278,25 @@ static int dt_set_chosen(void)
275278 }
276279 }
277280
281+ if (fdt_setprop (dt , node , "asahi,iboot1-version" , system_firmware .iboot ,
282+ strlen (system_firmware .iboot ) + 1 ))
283+ bail ("FDT: couldn't set asahi,iboot1-version" );
284+
285+ if (fdt_setprop (dt , node , "asahi,system-fw-version" , system_firmware .string ,
286+ strlen (system_firmware .string ) + 1 ))
287+ bail ("FDT: couldn't set asahi,system-fw-version" );
288+
289+ if (fdt_setprop (dt , node , "asahi,iboot2-version" , os_firmware .iboot ,
290+ strlen (os_firmware .iboot ) + 1 ))
291+ bail ("FDT: couldn't set asahi,iboot2-version" );
292+
293+ if (fdt_setprop (dt , node , "asahi,os-fw-version" , os_firmware .string ,
294+ strlen (os_firmware .string ) + 1 ))
295+ bail ("FDT: couldn't set asahi,os-fw-version" );
296+
297+ if (fdt_setprop (dt , node , "asahi,m1n1-stage2-version" , m1n1_version , strlen (m1n1_version ) + 1 ))
298+ bail ("FDT: couldn't set asahi,m1n1-stage2-version" );
299+
278300 if (dt_set_rng_seed_sep (node ))
279301 return dt_set_rng_seed_adt (node );
280302
0 commit comments