aboutsummaryrefslogtreecommitdiff
path: root/sys/riscv/riscv
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2020-05-31 14:43:04 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2020-05-31 14:43:04 +0000
commitcd9207569fabd1edbf2318b59cea2e9ebb860385 (patch)
tree9f3d012f8f3cd16db504cd4f26f4fc957f14ec3b /sys/riscv/riscv
parentb7596ac1876bf43c96f248d4e4c544844d0f86ab (diff)
downloadsrc-cd9207569fabd1edbf2318b59cea2e9ebb860385.tar.gz
src-cd9207569fabd1edbf2318b59cea2e9ebb860385.zip
Remove remnant of arm's ELF trampoline
The trampoline code used for loading gzipped a.out kernels on arm was removed in r350436. A portion of this code allowed for DDB to find the symbol tables when booting without loader(8), and some of this was untouched in the removal. Remove it now. Differential Revision: https://reviews.freebsd.org/D24950
Notes
Notes: svn path=/head/; revision=361661
Diffstat (limited to 'sys/riscv/riscv')
-rw-r--r--sys/riscv/riscv/machdep.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c
index 32220ed5d899..5e3847423ddf 100644
--- a/sys/riscv/riscv/machdep.c
+++ b/sys/riscv/riscv/machdep.c
@@ -729,9 +729,6 @@ vm_offset_t
fake_preload_metadata(struct riscv_bootparams *rvbp)
{
static uint32_t fake_preload[35];
-#ifdef DDB
- vm_offset_t zstart = 0, zend = 0;
-#endif
vm_offset_t lastaddr;
size_t fake_size, dtb_size;
@@ -750,6 +747,7 @@ fake_preload_metadata(struct riscv_bootparams *rvbp)
} while (0)
fake_size = 0;
+ lastaddr = (vm_offset_t)&end;
PRELOAD_PUSH_VALUE(uint32_t, MODINFO_NAME);
PRELOAD_PUSH_STRING("kernel");
@@ -763,24 +761,6 @@ fake_preload_metadata(struct riscv_bootparams *rvbp)
PRELOAD_PUSH_VALUE(uint32_t, MODINFO_SIZE);
PRELOAD_PUSH_VALUE(uint32_t, sizeof(size_t));
PRELOAD_PUSH_VALUE(uint64_t, (size_t)((vm_offset_t)&end - KERNBASE));
-#ifdef DDB
-#if 0
- /* RISCVTODO */
- if (*(uint32_t *)KERNVIRTADDR == MAGIC_TRAMP_NUMBER) {
- fake_preload[i++] = MODINFO_METADATA|MODINFOMD_SSYM;
- fake_preload[i++] = sizeof(vm_offset_t);
- fake_preload[i++] = *(uint32_t *)(KERNVIRTADDR + 4);
- fake_preload[i++] = MODINFO_METADATA|MODINFOMD_ESYM;
- fake_preload[i++] = sizeof(vm_offset_t);
- fake_preload[i++] = *(uint32_t *)(KERNVIRTADDR + 8);
- lastaddr = *(uint32_t *)(KERNVIRTADDR + 8);
- zend = lastaddr;
- zstart = *(uint32_t *)(KERNVIRTADDR + 4);
- db_fetch_ksymtab(zstart, zend);
- } else
-#endif
-#endif
- lastaddr = (vm_offset_t)&end;
/* Copy the DTB to KVA space. */
lastaddr = roundup(lastaddr, sizeof(int));