summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-10-06 09:34:20 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-10-06 09:34:20 +0000
commitf196589a7087814b79032bb34b22d6783920901c (patch)
tree2fb78fca8d1dce2b7aacd0e2858d08df68dcac0b
parent863f6d1f986ac14897d019261d7d728f9a87ced1 (diff)
clean up old 6.7 softraid migration code
ofwboot still passes an old/small .openbsd.bootdata size from before 6.7 when boothowto was added. Report the exact size from now on such that a future diff can rectify the corresponding check in autoconf.c:bootstrap(). All this was done to keep old/new bootloaders working with new/old kernels, but 6.7 is long gone and we should all be running current code. OK stsp
-rw-r--r--sys/arch/sparc64/stand/ofwboot/elf64_exec.c12
-rw-r--r--sys/arch/sparc64/stand/ofwboot/vers.c2
2 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/sparc64/stand/ofwboot/elf64_exec.c b/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
index 0b57c98dfa3..eba60994465 100644
--- a/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
+++ b/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf64_exec.c,v 1.16 2023/06/03 21:37:53 krw Exp $ */
+/* $OpenBSD: elf64_exec.c,v 1.17 2023/10/06 09:34:19 kn Exp $ */
/* $NetBSD: elfXX_exec.c,v 1.2 2001/08/15 20:08:15 eeh Exp $ */
/*
@@ -106,15 +106,9 @@ elf64_exec(int fd, Elf_Ehdr *elf, u_int64_t *entryp, void **ssymp, void **esymp)
if (phdr.p_filesz < BOOTDATA_LEN_SOFTRAID)
continue;
- /*
- * Kernels up to and including OpenBSD 6.7
- * check for an exact match if the length.
- * Lie here to make sure we can still boot
- * older kernels with softraid.
- */
obd = (struct openbsd_bootdata *)(long)phdr.p_paddr;
obd->version = BOOTDATA_VERSION;
- obd->len = BOOTDATA_LEN_SOFTRAID;
+ obd->len = sizeof(struct openbsd_bootdata);
#ifdef SOFTRAID
/*
@@ -134,7 +128,7 @@ elf64_exec(int fd, Elf_Ehdr *elf, u_int64_t *entryp, void **ssymp, void **esymp)
#endif
- if (phdr.p_filesz < BOOTDATA_LEN_BOOTHOWTO)
+ if (phdr.p_filesz < sizeof(struct openbsd_bootdata))
continue;
obd->boothowto = boothowto;
diff --git a/sys/arch/sparc64/stand/ofwboot/vers.c b/sys/arch/sparc64/stand/ofwboot/vers.c
index a94dcf18489..fa4762b2541 100644
--- a/sys/arch/sparc64/stand/ofwboot/vers.c
+++ b/sys/arch/sparc64/stand/ofwboot/vers.c
@@ -1 +1 @@
-const char version[] = "1.25";
+const char version[] = "1.26";