Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Nov 2005 23:02:00 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        delphij@delphij.net, freebsd-arch@freebsd.org
Subject:   Re: RFC: Why not move kernel MD code to sys/arch/?
Message-ID:  <20051114223340.Y85346@delplex.bde.org>
In-Reply-To: <Pine.GSO.4.43.0511131338040.11952-100000@sea.ntplx.net>
References:  <Pine.GSO.4.43.0511131338040.11952-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Nov 2005, Daniel Eischen wrote:

>> Is there any reason that we have sys/i386 and not sys/arch/i386?  I
>> think the latter is a lot cleaner (and libpthread, etc. already has
>> their arch/[arch] directory on the other hand).

I think the former is a lot cleaner.

> FreeBSD started out as 386 only.  It probably just wasn't envisioned
> that we'd have more than just one or two archs.

FreeBSD-1 started with Net/2 which has numerous arches.  I'm not sure
exactly what was in Net/2, but in 4.3-reno /sys is:

GENERIC.alltahoe/	machine@		tahoedist/
GENERIC.allvax/		mdec/			tahoeif/
cassette/		net/			tahoemath/
conf/			netimp/			tahoestand/
consolerl/		netinet/		tahoevba/
floppy/			netiso/			ufs/
hp300/			netns/			vax/
hpdev/			netrmp/			vaxbi/
hpstand/		nfs/			vaxdist/
hpux/			stand/			vaxif/
i386/			sys/			vaxmba/
kdb/			tahoe/			vaxstand/
kern/			tahoealign/		vaxuba/

More than half the directories here are arch-related, but there seem
to be only 3 arches with full support: hp300, tahoe and vax.  The
directory tree was even flatter, with no important subdirs.  The
hp300 directory was amazingly simple and clean:

DOC/		cons.h		kgdb_stub.c	oc_cksum.s	trap.c
Locore.c	cpu.h		locore.s	pcb.h		trap.h
TODO		dkbad.c		machdep.c	psl.h		ufs_machdep.c
autoconf.c	endian.h	machlimits.h	pte.h		vectors.s
clock.c		float.h		machparam.h	reg.h		vm_machdep.c
clockioctl.h	frame.h		machtypes.h	swapgeneric.c	vmparam.h
clockreg.h	genassym.c	mem.c		symbols.sort
conf.c		in_cksum.c	mtpr.h		sys_machdep.c
cons.c		isr.h		ns_cksum.c	tags

FreeBSD-2 started with 4.4BSD which has numerous arches:

compile/	isofs/		net/		nfs/		sys/
conf/		kern/		netccitt/	pmax/		tahoe/
dev/		libkern/	netinet/	scripts/	tests/
hp/		luna68k/	netiso/		sparc/		ufs/
hp300/		mips@		netns/		stand/		vax/
i386/		miscfs/		news3400/	stand.att/	vm/

Net/2 is actually more like this than 4.3-reno.  Here there are 8
supported arches: hp300, i386, luna68k news3400, pmax, sparc, tahoe
and vax.  I think only the older arches are fully supported here.
FreeBSD didn't import most of this, including for i386's -- it got
working i386 support from 386BSD via FreeBSD-1.

> I think this issue has been brought up in the past, and if it causes
> a lot of pain or repo-bloat, they'll probably be some resistance.

It would only cause 100 times as much pain and repo-bloat as when it was
brought up ~10 years ago.

Bruce



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