Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 May 2012 18:15:53 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org, freebsd-hackers@FreeBSD.org, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: [review request] zfsboot/zfsloader: support accessing filesystems within a pool
Message-ID:  <4FA7E729.4000308@FreeBSD.org>
In-Reply-To: <4FA7E069.8020208@FreeBSD.org>
References:  <4F8999D2.1080902@FreeBSD.org> <4FA4F36A.6030903@FreeBSD.org> <4FA4F883.2060008@FreeBSD.org> <201205070953.04032.jhb@freebsd.org> <4FA7E069.8020208@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 07/05/2012 17:47 Andriy Gapon said the following:
> on 07/05/2012 16:53 John Baldwin said the following:
>> Ok.  Maybe add one comment to the bootargs.h head to explain that the 'bootargs'
>> struct starts at ARGOFF and can grow up, while struct bootinfo is copied such that
>> it's end is at the top of the argument area and grows down.
> 
> Will do.

Could you please check the wording and correct it or suggest alternatives?
Thank you.

diff --git a/sys/boot/i386/common/bootargs.h b/sys/boot/i386/common/bootargs.h
index 510efdd..8bc1b32 100644
--- a/sys/boot/i386/common/bootargs.h
+++ b/sys/boot/i386/common/bootargs.h
@@ -29,6 +29,15 @@
 #define	BF_OFF		8	/* offsetof(struct bootargs, bootflags) */
 #define	BI_OFF		20	/* offsetof(struct bootargs, bootinfo) */

+/*
+ * We reserve some space above BTX allocated stack for the arguments
+ * and certain data that could hang off them.  Currently only struct bootinfo
+ * is supported in that category.  The bootinfo is placed at the top
+ * of the arguments area and the actual arguments are placed at ARGOFF offset
+ * from the top and grow towards the top.  Hopefully we have enough space
+ * for bootinfo and the arguments to not run into each other.
+ * Arguments area below ARGOFF is reserved for future use.
+ */
 #define	ARGSPACE	0x1000	/* total size of the BTX args area */
 #define	ARGOFF		0x800	/* actual args offset within the args area */
 #define	ARGADJ		(ARGSPACE - ARGOFF)



-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FA7E729.4000308>