aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2022-09-29 19:33:33 +0000
committerKyle Evans <kevans@FreeBSD.org>2022-09-29 19:33:33 +0000
commit78f3c734a5b755ceb47fea220e94755c8e82bd67 (patch)
tree0c6e01ec4515fd031308a32370a78871518f66ac
parent23c318ed86c4b4e6c474823a944f5fb9f2f1c2fd (diff)
downloadsrc-78f3c734a5b755ceb47fea220e94755c8e82bd67.tar.gz
src-78f3c734a5b755ceb47fea220e94755c8e82bd67.zip
arm64: fix build without FDT
static_kenv is only used under `FDT`, and `try_load_dtb` is only defined with `FDT`. Reviewed by: andrew, imp, manu Differential Revision: https://reviews.freebsd.org/D36791
-rw-r--r--sys/arm64/arm64/machdep.c2
-rw-r--r--sys/arm64/arm64/machdep_boot.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index be6b289b0489..3f4ebac52cbe 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -768,7 +768,9 @@ initarm(struct arm64_bootparams *abp)
update_special_regs(0);
link_elf_ireloc(kmdp);
+#ifdef FDT
try_load_dtb(kmdp);
+#endif
efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t);
diff --git a/sys/arm64/arm64/machdep_boot.c b/sys/arm64/arm64/machdep_boot.c
index 9ab4edf616e2..9b519f252369 100644
--- a/sys/arm64/arm64/machdep_boot.c
+++ b/sys/arm64/arm64/machdep_boot.c
@@ -53,9 +53,10 @@ __FBSDID("$FreeBSD$");
extern int *end;
static char *loader_envp;
-static char static_kenv[4096];
#ifdef FDT
+static char static_kenv[4096];
+
#define CMDLINE_GUARD "FreeBSD:"
#define LBABI_MAX_COMMAND_LINE 512
static char linux_command_line[LBABI_MAX_COMMAND_LINE + 1];