aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-03-23 15:37:25 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-03-23 15:37:25 +0000
commit6bcba8dac9a4ddaeabf84ad8d31b1113a9dcf8c2 (patch)
tree800303191cbdff6fbb82a032a55900485e2904ef
parent63f344024a0d336b116f3563a1604fbd9b4253c7 (diff)
downloadsrc-6bcba8dac9a4ddaeabf84ad8d31b1113a9dcf8c2.tar.gz
src-6bcba8dac9a4ddaeabf84ad8d31b1113a9dcf8c2.zip
arm64: Only check for freebsd,dts-version if we are booted in FDT mode.
Reported by: andrew
-rw-r--r--sys/arm64/arm64/machdep.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 308a870fe188..97fa374b1c75 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -1356,16 +1356,18 @@ initarm(struct arm64_bootparams *abp)
strlcpy(kernelname, env, sizeof(kernelname));
#ifdef FDT
- root = OF_finddevice("/");
- if (OF_getprop(root, "freebsd,dts-version", dts_version, sizeof(dts_version)) > 0) {
- if (strcmp(LINUX_DTS_VERSION, dts_version) != 0)
- printf("WARNING: DTB version is %s while kernel expects %s, "
- "please update the DTB in the ESP\n",
- dts_version,
- LINUX_DTS_VERSION);
- } else {
- printf("WARNING: Cannot find freebsd,dts-version property, "
- "cannot check DTB compliance\n");
+ if (arm64_bus_method == ARM64_BUS_FDT) {
+ root = OF_finddevice("/");
+ if (OF_getprop(root, "freebsd,dts-version", dts_version, sizeof(dts_version)) > 0) {
+ if (strcmp(LINUX_DTS_VERSION, dts_version) != 0)
+ printf("WARNING: DTB version is %s while kernel expects %s, "
+ "please update the DTB in the ESP\n",
+ dts_version,
+ LINUX_DTS_VERSION);
+ } else {
+ printf("WARNING: Cannot find freebsd,dts-version property, "
+ "cannot check DTB compliance\n");
+ }
}
#endif