MCPcopy Create free account
hub / github.com/F-Stack/f-stack / try_load_dtb

Function try_load_dtb

freebsd/arm64/arm64/machdep.c:1073–1100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1071
1072#ifdef FDT
1073static void
1074try_load_dtb(caddr_t kmdp)
1075{
1076 vm_offset_t dtbp;
1077
1078 dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
1079#if defined(FDT_DTB_STATIC)
1080 /*
1081 * In case the device tree blob was not retrieved (from metadata) try
1082 * to use the statically embedded one.
1083 */
1084 if (dtbp == 0)
1085 dtbp = (vm_offset_t)&fdt_static_dtb;
1086#endif
1087
1088 if (dtbp == (vm_offset_t)NULL) {
1089 printf("ERROR loading DTB\n");
1090 return;
1091 }
1092
1093 if (OF_install(OFW_FDT, 0) == FALSE)
1094 panic("Cannot install FDT");
1095
1096 if (OF_init((void *)dtbp) != 0)
1097 panic("OF_init failed with the found device tree");
1098
1099 parse_fdt_bootargs();
1100}
1101#endif
1102
1103static bool

Callers 1

initarmFunction · 0.85

Calls 3

parse_fdt_bootargsFunction · 0.85
printfFunction · 0.50
panicFunction · 0.50

Tested by

no test coverage detected