Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src - Increase MAXPARTITIONS for vax from 8 to 16, using the sta...
details: https://anonhg.NetBSD.org/src/rev/f37cd60d4b87
branches: trunk
changeset: 779972:f37cd60d4b87
user: abs <abs%NetBSD.org@localhost>
date: Mon Jul 02 22:42:18 2012 +0000
description:
- Increase MAXPARTITIONS for vax from 8 to 16, using the standard NetBSD
mechanism to ensure all existing /dev nodes continue to work
- Adjust boot block layout to fit additional partitions
- Adjust number of inodes on install media
diffstat:
distrib/vax/miniroot/Makefile.inc | 4 ++--
sys/arch/vax/include/disklabel.h | 26 ++++++++++++++++++++------
sys/arch/vax/include/types.h | 3 ++-
sys/sys/bootblock.h | 7 ++++---
4 files changed, 28 insertions(+), 12 deletions(-)
diffs (98 lines):
diff -r 5ff89b15d9ba -r f37cd60d4b87 distrib/vax/miniroot/Makefile.inc
--- a/distrib/vax/miniroot/Makefile.inc Mon Jul 02 21:44:09 2012 +0000
+++ b/distrib/vax/miniroot/Makefile.inc Mon Jul 02 22:42:18 2012 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.20 2010/02/11 09:06:51 roy Exp $
+# $NetBSD: Makefile.inc,v 1.21 2012/07/02 22:42:18 abs Exp $
IMAGESIZE= 7m
-MAKEFS_FLAGS= -o density=4k
+MAKEFS_FLAGS= -o density=3k
IMAGEENDIAN= le
MAKEDEVTARGETS= all
LISTS+= ${DISTRIBDIR}/common/list.sysinst
diff -r 5ff89b15d9ba -r f37cd60d4b87 sys/arch/vax/include/disklabel.h
--- a/sys/arch/vax/include/disklabel.h Mon Jul 02 21:44:09 2012 +0000
+++ b/sys/arch/vax/include/disklabel.h Mon Jul 02 22:42:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.5 2011/08/30 12:39:59 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.6 2012/07/02 22:42:18 abs Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -33,11 +33,25 @@
#ifndef _MACHINE_DISKLABEL_H_
#define _MACHINE_DISKLABEL_H_
-#define LABELUSESMBR 0 /* no MBR partitionning */
-#define LABELSECTOR 0 /* sector containing label */
-#define LABELOFFSET 64 /* offset of label in sector */
-#define MAXPARTITIONS 8 /* number of partitions */
-#define RAW_PART 2 /* raw partition: xx?c */
+#define LABELUSESMBR 0 /* no MBR partitionning */
+#define LABELSECTOR 0 /* sector containing label */
+#define LABELOFFSET 64 /* offset of label in sector */
+#define MAXPARTITIONS 16 /* number of partitions */
+#define OLDMAXPARTITIONS 8 /* number of partitions before nb-6 */
+#define RAW_PART 2 /* raw partition: xx?c */
+
+/*
+ * We use the highest bit of the minor number for the partition number.
+ * This maintains backward compatibility with device nodes created before
+ * MAXPARTITIONS was increased.
+ */
+#define __VAX_MAXDISKS ((1 << 20) / MAXPARTITIONS)
+#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __VAX_MAXDISKS)
+#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
+ ((minor(dev) / (__VAX_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
+#define DISKMINOR(unit, part) \
+ (((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
+ ((part) / OLDMAXPARTITIONS) * (__VAX_MAXDISKS * OLDMAXPARTITIONS))
/* Just a dummy */
#ifndef _LOCORE
diff -r 5ff89b15d9ba -r f37cd60d4b87 sys/arch/vax/include/types.h
--- a/sys/arch/vax/include/types.h Mon Jul 02 21:44:09 2012 +0000
+++ b/sys/arch/vax/include/types.h Mon Jul 02 22:42:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.45 2012/05/25 12:32:48 matt Exp $ */
+/* $NetBSD: types.h,v 1.46 2012/07/02 22:42:18 abs Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -78,6 +78,7 @@
#define __HAVE_CPU_DATA_FIRST
#define __HAVE_MM_MD_READWRITE
#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#define __HAVE_OLD_DISKLABEL
#ifdef _KERNEL
#define __HAVE_RAS
#endif
diff -r 5ff89b15d9ba -r f37cd60d4b87 sys/sys/bootblock.h
--- a/sys/sys/bootblock.h Mon Jul 02 21:44:09 2012 +0000
+++ b/sys/sys/bootblock.h Mon Jul 02 22:42:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootblock.h,v 1.53 2012/04/02 18:53:54 christos Exp $ */
+/* $NetBSD: bootblock.h,v 1.54 2012/07/02 22:42:18 abs Exp $ */
/*-
* Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -1409,7 +1409,8 @@
uint8_t bb_mbone; /* must be one */
uint16_t bb_lbn_hi; /* lbn (hi word) of bootstrap */
uint16_t bb_lbn_low; /* lbn (low word) of bootstrap */
- uint8_t pad1[332];
+ uint8_t pad1[460];
+ /* disklabel offset is 64 from base, or 56 from start of pad1 */
/* The rest of these fields are identification area and describe
* the secondary block for uVAX VMB.
@@ -1431,7 +1432,7 @@
/* The rest is unused.
*/
- uint8_t pad2[148];
+ uint8_t pad2[20];
} __packed;
#define VAX_BOOT_MAGIC1 0x18 /* size of BB info? */
Home |
Main Index |
Thread Index |
Old Index