From b5ed1e6cdb5eaa5e90f3976c6cb623eb2f603759 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Tue, 20 Jan 2009 13:12:26 +0000 Subject: [PATCH] Disable LOAD_NOTE on floppy boot. Fixes PR install/38943 on newsmips. --- sys/arch/newsmips/stand/boot/boot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arch/newsmips/stand/boot/boot.c b/sys/arch/newsmips/stand/boot/boot.c index 7f998b52fc85..fa9973848f5f 100644 --- a/sys/arch/newsmips/stand/boot/boot.c +++ b/sys/arch/newsmips/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.16 2005/12/11 12:18:25 christos Exp $ */ +/* $NetBSD: boot.c,v 1.17 2009/01/20 13:12:26 tsutsui Exp $ */ /*- * Copyright (C) 1999 Tsubai Masanari. All rights reserved. @@ -73,6 +73,7 @@ boot(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, struct btinfo_bootarg bi_arg; struct btinfo_bootpath bi_bpath; struct btinfo_systype bi_sys; + int loadflag; /* Clear BSS. */ memset(_edata, 0, _end - _edata); @@ -160,12 +161,17 @@ boot(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, kernels[1] = NULL; } + /* disable LOAD_NOTE on floppy to avoid backward seek across volumes */ + loadflag = LOAD_KERNEL; + if (devname[0] == 'f') /* XXX */ + loadflag &= ~LOAD_NOTE; + marks[MARK_START] = 0; for (i = 0; kernels[i]; i++) { sprintf(file, "%s%s", devname, kernels[i]); DPRINTF("trying %s...\n", file); - fd = loadfile(file, marks, LOAD_KERNEL); + fd = loadfile(file, marks, loadflag); if (fd != -1) break; }