Use RF_PROTECTED_SECTORS instead of a (wrong) magic value.

The bootblock now is able to load ofwboot from a raid1 root.
This commit is contained in:
martin 2004-06-18 18:42:15 +00:00
parent 0d510f3e7e
commit 31895478bc
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
\ $NetBSD: bootblk.fth,v 1.5 2003/04/05 08:58:55 he Exp $
\ $NetBSD: bootblk.fth,v 1.6 2004/06/18 18:42:15 martin Exp $
\
\ IEEE 1275 Open Firmware Boot Block
\
@ -441,7 +441,7 @@ h# 2000 buffer: indir-block
then 2drop
sboff read-super
sb-buf fs_magic l@ fs_magic_value <> if
64 dup to raid-offset
rf_protected dup to raid-offset
dev_bsize * sboff + read-super
sb-buf fs_magic l@ fs_magic_value <> if
." Invalid superblock magic" cr

View File

@ -1,4 +1,4 @@
# $NetBSD: genfth.cf,v 1.3 2003/04/05 08:58:55 he Exp $
# $NetBSD: genfth.cf,v 1.4 2004/06/18 18:42:15 martin Exp $
#
# Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -83,6 +83,7 @@ include <sys/time.h>
include <ufs/ufs/dinode.h>
include <ufs/ufs/dir.h>
include <ufs/ffs/fs.h>
include <dev/raidframe/raidframevar.h>
#
# ufs sizing constants
@ -97,6 +98,9 @@ define bblock BBLOCK
# XXX: Will not work for UFS2!
define sblock SBLOCK_UFS1
# RAID1 boot support
define rf_protected RF_PROTECTED_SECTORS
#
# ufs superblock
#