aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2020-10-30 15:28:04 -0700
committerAndrew Waterman <andrew@sifive.com>2020-10-30 15:28:04 -0700
commitdef2f01eee49aa639c6e393d161687998cd64c4e (patch)
treea0e2d1d247ea8fcf5fb3daf63c04db0103a7725c
parenta161e6f3ef31004e47a5b94b85c2e84b764f8637 (diff)
downloadpk-def2f01eee49aa639c6e393d161687998cd64c4e.zip
pk-def2f01eee49aa639c6e393d161687998cd64c4e.tar.gz
pk-def2f01eee49aa639c6e393d161687998cd64c4e.tar.bz2
Revert "Disable device tree filter when load a dts from file (#217)"
This reverts commit a161e6f3ef31004e47a5b94b85c2e84b764f8637. Resolves #218
-rw-r--r--Makefile.in4
-rw-r--r--bbl/bbl.c2
-rw-r--r--bbl/bbl.lds1
-rwxr-xr-xconfigure26
-rw-r--r--machine/machine.ac4
-rw-r--r--machine/machine.mk.in5
-rw-r--r--machine/mentry.S13
7 files changed, 1 insertions, 54 deletions
diff --git a/Makefile.in b/Makefile.in
index 3e3872b..5c2687d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -116,10 +116,6 @@ ifneq (@BBL_PAYLOAD@,no)
CFLAGS := $(CFLAGS) -DBBL_PAYLOAD=\"bbl_payload\"
endif
BBL_PAYLOAD := @BBL_PAYLOAD@
-ifneq (@MACHINE_DTS@,no)
-CFLAGS := $(CFLAGS) -DMACHINE_DTS=\"machine_dts\"
-endif
-MACHINE_DTS := @MACHINE_DTS@
COMPILE := $(CC) -MMD -MP $(CFLAGS) \
$(sprojs_include)
# Linker
diff --git a/bbl/bbl.c b/bbl/bbl.c
index 8e29801..3b92fc1 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -41,13 +41,11 @@ static void filter_dtb(uintptr_t source)
uint32_t size = fdt_size(source);
memcpy((void*)dest, (void*)source, size);
-#ifndef MACHINE_DTS
// Remove information from the chained FDT
filter_harts(dest, &disabled_hart_mask);
filter_plic(dest);
filter_compat(dest, "riscv,clint0");
filter_compat(dest, "riscv,debug-013");
-#endif
}
static void protect_memory(void)
diff --git a/bbl/bbl.lds b/bbl/bbl.lds
index 9d51f1d..624f691 100644
--- a/bbl/bbl.lds
+++ b/bbl/bbl.lds
@@ -67,7 +67,6 @@ SECTIONS
*(.srodata*)
*(.gnu.linkonce.d.*)
*(.comment)
- *(.dtb)
}
/* End of initialized data segment */
diff --git a/configure b/configure
index c51e865..9d2c146 100755
--- a/configure
+++ b/configure
@@ -590,7 +590,6 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
subprojects_enabled
subprojects
-MACHINE_DTS
BBL_LOGO_FILE
BBL_PAYLOAD
BBL_ENABLE_LOGO
@@ -649,7 +648,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -685,7 +683,6 @@ with_payload
with_logo
enable_boot_machine
enable_fp_emulation
-with_dts
'
ac_precious_vars='build_alias
host_alias
@@ -740,7 +737,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -993,15 +989,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1139,7 +1126,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1292,7 +1279,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1345,7 +1331,6 @@ Optional Packages:
--with-mem-start Set physical memory start address
--with-payload Set ELF payload for bbl
--with-logo Specify a better logo
- --with-dts Support a machine dts
Some influential environment variables:
CC C compiler command
@@ -4484,15 +4469,6 @@ $as_echo "#define PK_ENABLE_FP_EMULATION /**/" >>confdefs.h
fi
-# Check whether --with-dts was given.
-if test "${with_dts+set}" = set; then :
- withval=$with_dts; MACHINE_DTS=$with_dts
-
-
-fi
-
-
-
diff --git a/machine/machine.ac b/machine/machine.ac
index e3033b2..a787113 100644
--- a/machine/machine.ac
+++ b/machine/machine.ac
@@ -4,7 +4,3 @@ AC_ARG_ENABLE([fp-emulation], AS_HELP_STRING([--disable-fp-emulation], [Disable
AS_IF([test "x$enable_fp_emulation" != "xno"], [
AC_DEFINE([PK_ENABLE_FP_EMULATION],,[Define if floating-point emulation is enabled])
])
-
-AC_ARG_WITH([dts], AS_HELP_STRING([--with-dts], [Support a machine dts]),
- [AC_SUBST([MACHINE_DTS], $with_dts, [machine dts])]
-)
diff --git a/machine/machine.mk.in b/machine/machine.mk.in
index c7075fb..dcecb7a 100644
--- a/machine/machine.mk.in
+++ b/machine/machine.mk.in
@@ -37,8 +37,3 @@ machine_c_srcs = \
machine_asm_srcs = \
mentry.S \
fp_asm.S \
-
-mentry.o: machine.dtb
-
-machine.dtb: $(MACHINE_DTS)
- dtc -O dtb $^ -o $@ \ No newline at end of file
diff --git a/machine/mentry.S b/machine/mentry.S
index e619812..9ec9916 100644
--- a/machine/mentry.S
+++ b/machine/mentry.S
@@ -281,10 +281,6 @@ do_reset:
#endif
# Boot on the first hart
-#ifdef MACHINE_DTS
- csrr a0, mhartid
- la a1, dtb_start
-#endif
j init_first_hart
.LmultiHartInit:
@@ -317,15 +313,6 @@ do_reset:
wfi
j .LmultiHart
-#ifdef MACHINE_DTS
-.section .dtb
-.align 3
-.global dtb_start, dtb_end
-dtb_start:
-.incbin "machine.dtb"
-dtb_end:
-#endif
-
.bss
.align RISCV_PGSHIFT
stacks: